@@ -162,6 +162,39 @@ tests = do
162162 (QApp (QVar "f")
163163 (QApp (QConst "List") (QVar "a")))))))
164164
165+ test "test #28" do
166+ let input = "forall f a. Alternative f => Lazy(f (List a))=>f a -> f (List a)"
167+ assertRight (parseTypeQuery input) ((QForAll (nl "f" ["a"]))
168+ (QConstraint "Alternative" (l [QVar "f"])
169+ (QConstraint "Lazy" (l [QApp (QVar "f")
170+ (QApp (QConst "List") (QVar "a"))])
171+ (QFun (QApp (QVar "f") (QVar "a"))
172+ (QApp (QVar "f")
173+ (QApp (QConst "List") (QVar "a")))))))
174+
175+ test "test #29" do
176+ let input = "{a::Int,b::Int}"
177+ assertRight (parseTypeQuery input)
178+ (QApp (QConst "Record") (QRow (List.fromFoldable [ Tuple "a" (QConst "Int"), Tuple "b" (QConst "Int")])))
179+
180+ test "test #30" do
181+ let input = "{record''' :: Int}"
182+ assertRight (parseTypeQuery input)
183+ (QApp (QConst "Record") (QRow (List.fromFoldable [ Tuple "record'''" (QConst "Int")])))
184+
185+ test "test #31" do
186+ let input = "(row''' :: Int)"
187+ assertRight (parseTypeQuery input)
188+ (QRow (List.fromFoldable [ Tuple "row'''" (QConst "Int")]))
189+
190+ test "test #32" do
191+ let input = "(row1 :: Int, row2 :: (),row3::(row4::{}))"
192+ assertRight (parseTypeQuery input)
193+ (QRow (l [ Tuple "row1" (QConst "Int")
194+ , Tuple "row2" (QRow Nil)
195+ , Tuple "row3" (QRow (l [ Tuple "row4" (QApp (QConst "Record") (QRow Nil)) ])) ]))
196+
197+
165198 suite "polish notation" do
166199
167200 test "test #1" do