Skip to content

Instantly share code, notes, and snippets.

@laser
Created September 4, 2015 02:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save laser/5f5fb02e98b169b4a2ef to your computer and use it in GitHub Desktop.
yarply
module Main where
data Foo = Foo
{ x :: String
, y :: String
, z :: String
} deriving (Show)
q = Foo "one" "two" "three" -- Foo {x = "one", y = "two", z = "three"}
q2 = q { x = "nine" } -- Foo {x = "nine", y = "two", z = "three"}
{-let og = Foo "Original"-}
{-let ns = setBar og "New School"-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment