Skip to content

Instantly share code, notes, and snippets.

@lotz84
Created April 13, 2015 02:24
Show Gist options
  • Save lotz84/9a8c97dbe0a9b73ebca8 to your computer and use it in GitHub Desktop.
Save lotz84/9a8c97dbe0a9b73ebca8 to your computer and use it in GitHub Desktop.
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ExistentialQuantification #-}
data ShowBox = forall s. Show s => SB s
instance Show ShowBox where
show (SB s) = show s
heteroList :: [ShowBox]
heteroList = [SB (), SB 5, SB True]
main = print heteroList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment