Polymorphic strict fields

Ashley Yakeley ashley at semantic.org
Thu May 3 01:47:51 EDT 2007


Iavor Diatchki wrote:
> Notice, furthermore, that the behavior of such constructors may be a
> bit unexpected when combined with overloading.  Consider, for example,
> the following declarations:
> 
>> data T = T !(forall a. Eq a => a)
>> test = seq (T undefined) True
> 
> In GHC 6.6 ``test`` evaluets to ``True`` because ``undefined`` is
> converted to a function that expects its implict evidence argument.

It's the same with functions:

   myseq :: (forall a. Eq a => a) -> b -> b
   myseq = seq

   myseq undefined True
   ==> True

-- 
Ashley Yakeley



More information about the Haskell-prime mailing list