Skip to content

Instantly share code, notes, and snippets.

@cdparks
Created March 21, 2015 18:16
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 cdparks/f18373921c7a59156cd7 to your computer and use it in GitHub Desktop.
Save cdparks/f18373921c7a59156cd7 to your computer and use it in GitHub Desktop.
Partially initialized record
data Point2D = Point2D { x :: Double, y :: Double }
p = Point2D { x = 1 }
-- Point2D (D# 1.0) (recConError "x.hs:3:5-21|y"#)
main = do
print (x p)
print (y p) -- BOOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment