git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add test case covering new row syntax
09792aaŁukasz Hanuszczak
examples/passing/RowConstructors.pursnew file+25
@@ -0,0 +1,25 @@
1+module Main where
2+
3+type Foo = (x :: Number | (y :: Number | (z :: Number)))
4+type Bar = (x :: Number, y :: Number, z :: Number)
5+type Baz = { w :: Number | Bar }
6+
7+foo :: { | Foo }
8+foo = { x: 0, y: 0, z: 0 }
9+
10+bar :: { | Bar }
11+bar = { x: 0, y: 0, z: 0 }
12+
13+id' :: Object Foo -> Object Bar
14+id' = id
15+
16+foo' :: { | Foo }
17+foo' = id' foo
18+
19+bar' :: { | Bar }
20+bar' = id' bar
21+
22+baz :: Baz
23+baz = { x: 0, y: 0, z: 0, w: 0 }
24+
25+main = Debug.Trace.trace "Done"