
27 Oct
2006
27 Oct
'06
6:45 p.m.
On 27/10/06, David House
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, dmhouse@gmail.com