Does Hask form a theoretically valid category? Or

2019-08-25 07:04发布

问题:

Hask looks like a subcategory of the SET - category of all sets and single-argument functions between them. However, seems like it fails to preserve id when it comes down to the undefined: seq undefined () fails with exception as it suppose to, however seq (undefined . id) () = seq (id . undefined) () = (). Obviously, id acts wrongly.

Is there a way to (theoretically at least) resolve this issue and make Hask a category indeed? Except throwing undefined away?