Created
January 22, 2013 04:11
-
-
Save mwotton/4591985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo where | |
data FooArgs = FooArgs { foo :: String, | |
baz :: Integer } | |
fooer :: FooArgs -> String | |
fooer = undefined -- doesn't really matter what it does | |
-- missingArg = fooer (FooArgs { foo = "abc" }) | |
-- legit = fooer (FooArgs { foo = "abc", baz = 12 }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*Foo> let missingArg = fooer (FooArgs { foo = "abc" })
:4:25:
Warning: Fields of
FooArgs' not initialised: baz In the first argument of
fooer', namely(FooArgs {foo = "abc"})' In the expression: fooer (FooArgs {foo = "abc"}) In an equation for
missingArg':missingArg = fooer (FooArgs {foo = "abc"})
*Foo> let legit = fooer (FooArgs { foo = "abc", baz = 12 })