On 27/10/06, David House <[EMAIL PROTECTED]> wrote:
heteroList' = [MkT' 5, MkT' (), MkT' True]
main = mapM_ print heteroList'

{- prints:
5
()
True
-}

Sorry, the definition of main is a bit off. It should read:

main = mapM_ (\(MkT' x) -> print x) heteroList'

Of course you have to unpack the MkT' first (or define a Show instance
for T', noting that you can't derive anything on existentials).

--
-David House, [EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to