[Haskell-cafe] Functors [Comments from OCaml Hacker Brian Hurt]

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Jan 17 08:28:05 EST 2009


Hello Luke,

Saturday, January 17, 2009, 3:16:06 PM, you wrote:

>   fmap id = id
>   fmap (f . g) = fmap f . fmap g

>  The first property is how we write "preserving underlying
> structure", but this has a precise, well-defined meaning that we can
> say a given functor obeys or it does not (and if it does not, we say
> that it's a bad instance).  But you are correct that Haskell does
> not allow us to require proofs of such properties.

not haskell itself, but QuickCheck allows. we may even consider
lifting these properties to the language level

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list