Skip to content

Instantly share code, notes, and snippets.

@JoeyEremondi
Last active August 29, 2015 14:17
Show Gist options
  • Save JoeyEremondi/b773c19c69d6ad2a4f07 to your computer and use it in GitHub Desktop.
Save JoeyEremondi/b773c19c69d6ad2a4f07 to your computer and use it in GitHub Desktop.
elm-record-poly-test
import Text (asText)
type alias Foo a b = {a | x:Int, y:b}
type alias Bar a b = {a | y:b, z:Int}
type alias FooBar a b = Foo (Bar a b) b
myRec : Foo (Bar {} Int) Int
myRec = {x = 1, y = 3, z = 10}
--fun : Foo2(Bar2({})) -> Float
--fun rec = rec.y.p
main = asText "Hello world"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment