HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Request an account if you don't have one.

Hask

Categories: Stub articles | Mathematics | Theoretical foundations

Hask is the name usually given to the category having Haskell types as objects and Haskell functions between them as morphisms.

A type-constructor that is an instance of the Functor class is an endofunctor on Hask.

A solution approach to the issue of partiality making many of the identities required by categorical constructions not literally true in Haskell:


The seq problem

The right identity law fails in Hask if we distinguish values which can be distinguished by seq, since:

id . undefined = \x -> id (undefined x) = \x -> undefined x

should be equal to undefined, but can be distinguished from it using seq:

   ghci> (undefined :: Int -> Int) `seq` ()
   * Exception: Prelude.undefined
   ghci> (id . undefined :: Int -> Int) `seq` ()
   ()

This article is a stub. You can help by expanding it.

Retrieved from "http://haskell.cs.yale.edu/haskellwiki/Hask"

This page has been accessed 453 times. This page was last modified 23:59, 17 November 2009. Recent content is available under a simple permissive license.