I just thought that the shorter explanation could do better: the difference is in the types of the constructor functions.

Code:
> {-# LANGUAGE ExistentialQuantification #-}
> {-# LANGUAGE RankNTypes #-}
> data SomeNum1 = forall a. SN1 a
> data SomeNum2 = SN2 (forall a. a)

ghci session:
*Main> :t SN1
SN1 :: a -> SomeNum1
*Main> :t SN2
SN2 :: (forall a. a) -> SomeNum2

This is not the whole story, types of the bound variables you get on pattern matching differ too, but this makes the short explanation a bit longer :).

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to