{-#OPTIONS -fglasgow-exts#-} ----------------------------------------------------------------------------- -- | -- Module : Hetero -- Copyright : (C) 2007 Ulisses Araujo Costa -- -- Maintainer : ulissesmonhecosta@gmail.com -- Portability : portable -- -- Just heterogeneous lists in Haskell -- ----------------------------------------------------------------------------- module Hetero where data Hetero where H :: forall a . Show a => a -> Hetero instance Show Hetero where show (H s) = show s lista , lista2 :: [Hetero] lista = [H ['a'..'z'], H 10, H '0', H 3.1, H [1..10]] lista2 = [H [H [H '0', H [1..10]], H '0'], H 1]