Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created April 19, 2014 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwotton/11070163 to your computer and use it in GitHub Desktop.
Save mwotton/11070163 to your computer and use it in GitHub Desktop.
markdev ➜ ~ cat andy.hs
data Foo = FooCon { bar :: String, baz :: Int, quux :: [Foo]}
deriving (Show,Eq)
main = do
let FooCon { baz=b2, bar=b1, quux=b3 } = FooCon "abc" 1 []
print b1
print b2
print b3
markdev ➜ ~ runhaskell andy.hs
"abc"
1
[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment