Created
August 17, 2014 15:47
-
-
Save jastice/bfccf4b96b40be3eb432 to your computer and use it in GitHub Desktop.
Why does this compile?
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
type Thing t = { t | a:Int, b: String } | |
type Tag = { c: Int, d: String } | |
type Tagged = Thing Tag | |
thing = { a=3, b="foo" } | |
tagged = { thing | d = "derp" } | |
write: Tagged -> Element | |
write {a,b,c,d} = asText <| join " " [show c, d] | |
main = write tagged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment