Last active
March 7, 2021 00:42
-
-
Save jisantuc/2b3d6e1add1eebac2c351a261d93c30c 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 Main where | |
newtype Foo = Foo { module :: String } | |
-- fine but the syntax highlighter hates it | |
foo :: Foo | |
foo = Foo { module: "hi" } | |
-- also fine but the syntax highlighter hates it | |
getModule :: Foo -> String | |
getModule (Foo rec ) = rec.module | |
-- _not fine_ -- cannot destructure module field | |
-- getModule :: Foo -> String | |
-- getModule (Foo { module }) = module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment