Skip to content

Instantly share code, notes, and snippets.

@nrolland
Last active August 29, 2015 14:20
Show Gist options
  • Save nrolland/9f40164ddfb11d1d94e4 to your computer and use it in GitHub Desktop.
Save nrolland/9f40164ddfb11d1d94e4 to your computer and use it in GitHub Desktop.
module Bug where
type Adress = {city :: String}
type Person = {adress::Adress}
getCity :: Person -> String
getCity { adress = {city = c} } = c
billy = {adress: {city : "SFO" }}
b = getCity billy --OK
c = getCity billy --KO Error in binding group getCity, c: getCity may not be defined in the current scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment