Re: [Haskell-cafe] Questions about the Functor class and it's use in "Data types à la carte"

Roberto Zunino zunino at
Sun Dec 16 07:33:30 EST 2007

Dominic Steinitz wrote:
> This would give
> = \x -> bot x
> and by eta reduction

This is the point: eta does not hold if seq exists.

  undefined `seq` 1 == undefined
  (\x -> undefined x) `seq` 1 == 1

The "(.) does not form a category" argument should be something like:

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

where the last inequation is due to the presence of seq. That is,
without seq, there is no way to distinguish between undefined and (const
undefined), so you could use a semantic domain where they coincide. In
that case, eta does hold.


More information about the Haskell-Cafe mailing list