git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add some more sophisticated cases to row constructors test suite
commit354026f148b9c4e994da5fab47fa4d1bc4e36c49 authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com> dateWed 18 Mar 2015, 22:18 (12 years ago) parent3ecbdc6
1 file changed+15
examples/passing/RowConstructors.purs+15
examples/passing/RowConstructors.purs+15
@@ -22,4 +22,19 @@ bar' = id' bar
2222baz :: Baz
2323baz = { x: 0, y: 0, z: 0, w: 0 }
2424
25+type Quux r = (q :: Number | r)
26+type Norf r = (q' :: Number | Quux r)
27+
28+quux :: { f :: { | Foo } | Quux Bar }
29+quux = { f: foo', x: 0, y: 0, z: 0, q: 0 }
30+
31+quux' :: { | Norf Bar }
32+quux' = { x: 0, y: 0, z: 0, q: 0, q': 0 }
33+
34+wildcard :: { w :: Number | _ } -> Baz
35+wildcard { w: w } = { x: w, y: w, z: w, w: w }
36+
37+wildcard' :: { | Quux _ } -> Number
38+wildcard' { q: q } = q
39+
2540main = Debug.Trace.trace "Done"