git.iko.soy/rowtype-yoga/purescript-docs-search
on master help sign in
Add KindApp
commit6cc8a7f44baeb71051caf0270cfacb3be3539065 authorVladimir Kalnitsky <klntsky@gmail.com> dateSat 7 May 2022, 16:20 (4 years ago) parent2892933
7 files changed+309−269
src/Docs/Search/App/SearchResults.purs+3 src/Docs/Search/TypeDecoder.purs+6 src/Docs/Search/TypePrinter.purs+3 src/Docs/Search/TypeQuery.purs+4 src/Docs/Search/TypeShape.purs+3 test/Main.purs+3−269 test/Test/TypeJson.purs+287
src/Docs/Search/App/SearchResults.purs+3
@@ -545,6 +545,9 @@ renderType = case _ of
545545 , renderType t2
546546 ]
547547
548+ KindApp t1 t2 ->
549+ HH.span_ [ renderType t1, space, renderType t2 ]
550+
548551 ty@(ForAll _ _ _) ->
549552 renderForAll ty
550553
src/Docs/Search/TypeDecoder.purs+6
@@ -98,6 +98,8 @@ data Type
9898 | TypeOp QualifiedName
9999 -- | A type application
100100 | TypeApp Type Type
101+ -- | Explicit kind application
102+ | KindApp Type Type
101103 -- | Forall quantifier
102104 | ForAll String (Maybe Type) Type
103105 -- | A type withset of type class constraints
@@ -139,6 +141,9 @@ instance decodeJsonType :: DecodeJson Type where
139141 "TypeApp" ->
140142 decodeContents (decodeTuple TypeApp (const err)) (Left err) json
141143 where err = mkJsonError' "TypeApp" json
144+ "KindApp" ->
145+ decodeContents (decodeTuple KindApp (const err)) (Left err) json
146+ where err = mkJsonError' "KindApp" json
142147 "ForAll" ->
143148 decodeContents
144149 (decodeTriple
@@ -180,6 +185,7 @@ instance encodeJsonType :: EncodeJson Type where
180185 TypeConstructor val -> tagged "TypeConstructor" (encodeJson val)
181186 TypeOp val -> tagged "TypeOp" (encodeJson val)
182187 TypeApp t1 t2 -> tagged "TypeApp" (encodeTuple t1 t2)
188+ KindApp t1 t2 -> tagged "KindApp" (encodeTuple t1 t2)
183189 ForAll str Nothing ty -> tagged "ForAll" (encodeTriple str ty emptySkolemScope)
184190 ForAll str (Just k) ty -> tagged "ForAll" (encodeQuadriple str k ty emptySkolemScope)
185191 ConstrainedType c t -> tagged "ConstrainedType" (encodeTuple c t)
src/Docs/Search/TypePrinter.purs+3
@@ -37,6 +37,9 @@ showType = case _ of
3737 TypeApp t1 t2 ->
3838 showType t1 <> " " <> showType t2
3939
40+ KindApp t1 t2 ->
41+ showType t1 <> " " <> showType t2
42+
4043 ty@(ForAll _ _ _) ->
4144 showForAll ty
4245
src/Docs/Search/TypeQuery.purs+4
@@ -297,6 +297,9 @@ unify query type_ = go Nil (List.singleton { q: query, t: type_ })
297297 go acc ({ q, t: REmpty } : rest) =
298298 go (QueryMismatch q : acc) rest
299299
300+ go acc ({ q, t: t@(KindApp _ _) } : rest) =
301+ go (TypeMismatch t : acc) rest
302+
300303
301304-- | Sum various penalties.
302305penalty :: TypeQuery -> Type -> Int
@@ -411,6 +414,7 @@ typeSize = go 0 <<< List.singleton
411414 go (n + 1) rest
412415 go n (TypeOp _ : rest) =
413416 go (n + 1) rest
417+ go n (KindApp t1 t2 : res) = go n (t1 : t2 : res)
414418 go n (TypeApp (TypeApp (TypeConstructor
415419 (QualifiedName { moduleNameParts: [ "Prim" ]
416420 , name: Identifier "Function" })) t1) t2 : rest) =
src/Docs/Search/TypeShape.purs+3
@@ -115,6 +115,9 @@ shapeOfType ty = List.reverse $ go (pure ty) Nil
115115 TypeApp child1 child2 ->
116116 go (child1 : child2 : rest) (PApp : acc)
117117
118+ KindApp child1 child2 ->
119+ go (child1 : child2 : rest) (PApp : acc)
120+
118121 forallType@(ForAll _ _ _) ->
119122 go (foralls.ty : rest) (PForAll (List.length foralls.binders) : acc)
120123 where foralls = joinForAlls forallType
test/Main.purs+3−269
@@ -2,22 +2,14 @@ module Test.Main where
22
33import Prelude
44
5−import Data.Argonaut.Core (Json)
6−import Data.Argonaut.Decode (decodeJson)
7−import Data.Argonaut.Parser (jsonParser)
8−import Data.Either (Either(..))
9−import Data.Maybe (Maybe(..))
10−import Docs.Search.TypeDecoder (Constraint(..), FunDep(..), FunDeps(..), QualifiedName(..), Type(..))
11−import Docs.Search.Types (Identifier(..))
125import Effect (Effect)
13−import Partial.Unsafe (unsafePartial)
146import Test.Declarations as Declarations
15−import Test.Extra (assertRight)
167import Test.IndexBuilder as IndexBuilder
178import Test.ModuleIndex as ModuleIndex
189import Test.TypeQuery as TypeQuery
10+import Test.TypeJson as TypeJson
1911import Test.UI as UI
20−import Test.Unit (TestSuite, suite, test)
12+import Test.Unit (TestSuite)
2113import Test.Unit.Main (runTest)
2214
2315main :: Effect Unit
@@ -25,268 +17,10 @@ main = do
2517 runTest mainTest
2618 UI.main
2719
28−mkJson :: String -> Json
29−mkJson str =
30− unsafePartial $ case jsonParser str of
31− Right r -> r
32−
3320mainTest :: TestSuite
3421mainTest = do
3522 TypeQuery.tests
23+ TypeJson.tests
3624 IndexBuilder.tests
3725 Declarations.tests
3826 ModuleIndex.tests
39− suite "FunDeps decoder" do
40− test "FunDeps" do
41− let
42− funDeps = mkJson """
43− [
44− [
45− [
46− "lhs",
47− "rhs"
48− ],
49− [
50− "output"
51− ]
52− ]
53− ]
54− """
55− assertRight (decodeJson funDeps)
56− (FunDeps [ FunDep { lhs: [ "lhs", "rhs" ]
57− , rhs: [ "output"]
58− }
59− ])
60−
61− suite "Constraint decoder" do
62− test "Constraint" do
63− let constraint = mkJson """
64− {
65− "constraintAnn": [],
66− "constraintClass": [
67− [
68− "Prim"
69− ],
70− "Partial"
71− ],
72− "constraintArgs": [],
73− "constraintData": null
74− }
75− """
76− assertRight (decodeJson constraint)
77− (Constraint { constraintClass: qualified ["Prim"] "Partial"
78− , constraintArgs: []
79− })
80−
81− suite "Type decoder" do
82− test "TypeVar" do
83− let typeVar = mkJson """
84− {
85− "annotation": [],
86− "tag": "TypeVar",
87− "contents": "m"
88− }
89− """
90−
91− assertRight (decodeJson typeVar)
92− (TypeVar "m")
93−
94− test "TypeApp" do
95− let typeApp1 = mkJson """
96− {
97− "annotation": [],
98− "tag": "TypeApp",
99− "contents": [
100− {
101− "annotation": [],
102− "tag": "TypeConstructor",
103− "contents": [
104− [
105− "Control",
106− "Monad",
107− "ST",
108− "Internal"
109− ],
110− "ST"
111− ]
112− },
113− {
114− "annotation": [],
115− "tag": "TypeVar",
116− "contents": "h"
117− }
118− ]
119− }
120− """
121−
122− assertRight (decodeJson typeApp1) $
123− TypeApp
124− (TypeConstructor (qualified [ "Control"
125− , "Monad"
126− , "ST"
127− , "Internal"
128− ]
129− "ST"
130− ))
131− (TypeVar "h")
132−
133− test "TypeOp" do
134− let typeOp = mkJson """
135− {
136− "annotation": [],
137− "tag": "TypeOp",
138− "contents": [
139− [
140− "Data",
141− "NaturalTransformation"
142− ],
143− "~>"
144− ]
145− }
146− """
147− assertRight (decodeJson typeOp) $
148− TypeOp $ qualified [ "Data", "NaturalTransformation" ] "~>"
149−
150− test "BinaryNoParens" do
151− let binaryNoParens = mkJson """
152− {
153− "annotation": [],
154− "tag": "BinaryNoParensType",
155− "contents": [
156− {
157− "annotation": [],
158− "tag": "TypeOp",
159− "contents": [
160− [
161− "Data",
162− "NaturalTransformation"
163− ],
164− "~>"
165− ]
166− },
167− {
168− "annotation": [],
169− "tag": "TypeVar",
170− "contents": "m"
171− },
172− {
173− "annotation": [],
174− "tag": "TypeVar",
175− "contents": "n"
176− }
177− ]
178− }
179− """
180−
181− assertRight (decodeJson binaryNoParens) $
182− BinaryNoParensType
183− (TypeOp $ qualified ["Data", "NaturalTransformation"] "~>")
184− (TypeVar "m")
185− (TypeVar "n")
186−
187− test "ParensInType" do
188− let parensInType = mkJson """
189− {
190− "annotation": [],
191− "tag": "ParensInType",
192− "contents": {
193− "annotation": [],
194− "tag": "TypeApp",
195− "contents": [
196− {
197− "annotation": [],
198− "tag": "TypeConstructor",
199− "contents": [
200− [
201− "Data",
202− "Maybe"
203− ],
204− "Maybe"
205− ]
206− },
207− {
208− "annotation": [],
209− "tag": "TypeConstructor",
210− "contents": [
211− [
212− "Prim"
213− ],
214− "String"
215− ]
216− }
217− ]
218− }
219− }
220− """
221−
222− assertRight (decodeJson parensInType) $
223− ParensInType $
224− TypeApp
225− (TypeConstructor (qualified [ "Data", "Maybe" ] "Maybe"))
226− (TypeConstructor (qualified [ "Prim" ] "String"))
227− test "RCons" do
228−
229− let rcons = mkJson """
230− {
231− "annotation": [],
232− "tag": "RCons",
233− "contents": [
234− "tail",
235− {
236− "annotation": [],
237− "tag": "TypeApp",
238− "contents": [
239− {
240− "annotation": [],
241− "tag": "TypeConstructor",
242− "contents": [
243− [
244− "Data",
245− "Symbol"
246− ],
247− "SProxy"
248− ]
249− },
250− {
251− "annotation": [],
252− "tag": "TypeVar",
253− "contents": "t"
254− }
255− ]
256− },
257− {
258− "annotation": [],
259− "tag": "REmpty"
260− }
261− ]
262− }
263− """
264−
265− assertRight (decodeJson rcons) $
266− RCons
267− (Identifier "tail")
268− (TypeApp (TypeConstructor $ qualified [ "Data", "Symbol" ] "SProxy")
269− (TypeVar "t"))
270− REmpty
271−
272− test "ForAll #1" do
273− let forallJson = mkJson """
274− {"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},null]}
275− """
276− assertRight (decodeJson forallJson) $
277− ForAll "a" Nothing (TypeApp (TypeApp (TypeConstructor $ qualified ["Prim"] "Function")
278− (TypeConstructor $ qualified ["Prim"] "String"))
279− (TypeVar "a"))
280−
281− suite "jsons" do
282−
283− test "jsons #1" do
284− let json = mkJson """
285−{"annotation":[],"tag":"ForAll","contents":["o",{"annotation":[],"tag":"ForAll","contents":["r",{"annotation":[],"tag":"ForAll","contents":["l",{"annotation":[],"tag":"ConstrainedType","contents":[{"constraintAnn":[],"constraintClass":[["Type","Data","Boolean"],"And"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"l"},{"annotation":[],"tag":"TypeVar","contents":"r"},{"annotation":[],"tag":"TypeVar","contents":"o"}],"constraintData":null},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"l"}]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"r"}]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"o"}]}]}]}]},null]},null]},null]}
286− """
287−
288− assertRight (decodeJson json) $ (ForAll "o" Nothing (ForAll "r" Nothing (ForAll "l" Nothing (ConstrainedType (Constraint { constraintArgs: [(TypeVar "l"),(TypeVar "r"),(TypeVar "o")], constraintClass: (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "And" }) }) (TypeApp (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Prim"], name: Identifier "Function" })) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "l"))) (TypeApp (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Prim"], name: Identifier "Function" })) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "r"))) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "o"))))))))
289−
290−
291−qualified :: Array String -> String -> QualifiedName
292−qualified moduleNameParts name = QualifiedName { moduleNameParts, name: Identifier name }
test/Test/TypeJson.pursnew file+287
@@ -0,0 +1,287 @@
1+module Test.TypeJson
2+ ( tests )
3+where
4+
5+import Prelude
6+
7+import Docs.Search.TypeDecoder (Constraint(..), FunDep(..), FunDeps(..), QualifiedName(..), Type(..))
8+import Docs.Search.Types (Identifier(..))
9+import Test.Extra (assertRight)
10+import Test.TypeQuery as TypeQuery
11+
12+import Data.Argonaut.Core (Json)
13+import Data.Argonaut.Decode (decodeJson)
14+import Data.Argonaut.Parser (jsonParser)
15+import Data.Either (Either(..))
16+import Data.Maybe (Maybe(..))
17+import Partial.Unsafe (unsafePartial)
18+import Test.Unit (TestSuite, suite, test)
19+
20+
21+tests :: TestSuite
22+tests = do
23+ suite "FunDeps decoder" do
24+ test "FunDeps" do
25+ let
26+ funDeps = mkJson """
27+ [
28+ [
29+ [
30+ "lhs",
31+ "rhs"
32+ ],
33+ [
34+ "output"
35+ ]
36+ ]
37+ ]
38+ """
39+ assertRight (decodeJson funDeps)
40+ (FunDeps [ FunDep { lhs: [ "lhs", "rhs" ]
41+ , rhs: [ "output"]
42+ }
43+ ])
44+
45+ suite "Constraint decoder" do
46+ test "Constraint" do
47+ let constraint = mkJson """
48+ {
49+ "constraintAnn": [],
50+ "constraintClass": [
51+ [
52+ "Prim"
53+ ],
54+ "Partial"
55+ ],
56+ "constraintArgs": [],
57+ "constraintData": null
58+ }
59+ """
60+ assertRight (decodeJson constraint)
61+ (Constraint { constraintClass: qualified ["Prim"] "Partial"
62+ , constraintArgs: []
63+ })
64+
65+ suite "Type decoder" do
66+ test "TypeVar" do
67+ let typeVar = mkJson """
68+ {
69+ "annotation": [],
70+ "tag": "TypeVar",
71+ "contents": "m"
72+ }
73+ """
74+
75+ assertRight (decodeJson typeVar)
76+ (TypeVar "m")
77+
78+ test "TypeApp" do
79+ let typeApp1 = mkJson """
80+ {
81+ "annotation": [],
82+ "tag": "TypeApp",
83+ "contents": [
84+ {
85+ "annotation": [],
86+ "tag": "TypeConstructor",
87+ "contents": [
88+ [
89+ "Control",
90+ "Monad",
91+ "ST",
92+ "Internal"
93+ ],
94+ "ST"
95+ ]
96+ },
97+ {
98+ "annotation": [],
99+ "tag": "TypeVar",
100+ "contents": "h"
101+ }
102+ ]
103+ }
104+ """
105+
106+ assertRight (decodeJson typeApp1) $
107+ TypeApp
108+ (TypeConstructor (qualified [ "Control"
109+ , "Monad"
110+ , "ST"
111+ , "Internal"
112+ ]
113+ "ST"
114+ ))
115+ (TypeVar "h")
116+
117+ test "TypeOp" do
118+ let typeOp = mkJson """
119+ {
120+ "annotation": [],
121+ "tag": "TypeOp",
122+ "contents": [
123+ [
124+ "Data",
125+ "NaturalTransformation"
126+ ],
127+ "~>"
128+ ]
129+ }
130+ """
131+ assertRight (decodeJson typeOp) $
132+ TypeOp $ qualified [ "Data", "NaturalTransformation" ] "~>"
133+
134+ test "BinaryNoParens" do
135+ let binaryNoParens = mkJson """
136+ {
137+ "annotation": [],
138+ "tag": "BinaryNoParensType",
139+ "contents": [
140+ {
141+ "annotation": [],
142+ "tag": "TypeOp",
143+ "contents": [
144+ [
145+ "Data",
146+ "NaturalTransformation"
147+ ],
148+ "~>"
149+ ]
150+ },
151+ {
152+ "annotation": [],
153+ "tag": "TypeVar",
154+ "contents": "m"
155+ },
156+ {
157+ "annotation": [],
158+ "tag": "TypeVar",
159+ "contents": "n"
160+ }
161+ ]
162+ }
163+ """
164+
165+ assertRight (decodeJson binaryNoParens) $
166+ BinaryNoParensType
167+ (TypeOp $ qualified ["Data", "NaturalTransformation"] "~>")
168+ (TypeVar "m")
169+ (TypeVar "n")
170+
171+ test "ParensInType" do
172+ let parensInType = mkJson """
173+ {
174+ "annotation": [],
175+ "tag": "ParensInType",
176+ "contents": {
177+ "annotation": [],
178+ "tag": "TypeApp",
179+ "contents": [
180+ {
181+ "annotation": [],
182+ "tag": "TypeConstructor",
183+ "contents": [
184+ [
185+ "Data",
186+ "Maybe"
187+ ],
188+ "Maybe"
189+ ]
190+ },
191+ {
192+ "annotation": [],
193+ "tag": "TypeConstructor",
194+ "contents": [
195+ [
196+ "Prim"
197+ ],
198+ "String"
199+ ]
200+ }
201+ ]
202+ }
203+ }
204+ """
205+
206+ assertRight (decodeJson parensInType) $
207+ ParensInType $
208+ TypeApp
209+ (TypeConstructor (qualified [ "Data", "Maybe" ] "Maybe"))
210+ (TypeConstructor (qualified [ "Prim" ] "String"))
211+ test "RCons" do
212+
213+ let rcons = mkJson """
214+ {
215+ "annotation": [],
216+ "tag": "RCons",
217+ "contents": [
218+ "tail",
219+ {
220+ "annotation": [],
221+ "tag": "TypeApp",
222+ "contents": [
223+ {
224+ "annotation": [],
225+ "tag": "TypeConstructor",
226+ "contents": [
227+ [
228+ "Data",
229+ "Symbol"
230+ ],
231+ "SProxy"
232+ ]
233+ },
234+ {
235+ "annotation": [],
236+ "tag": "TypeVar",
237+ "contents": "t"
238+ }
239+ ]
240+ },
241+ {
242+ "annotation": [],
243+ "tag": "REmpty"
244+ }
245+ ]
246+ }
247+ """
248+
249+ assertRight (decodeJson rcons) $
250+ RCons
251+ (Identifier "tail")
252+ (TypeApp (TypeConstructor $ qualified [ "Data", "Symbol" ] "SProxy")
253+ (TypeVar "t"))
254+ REmpty
255+
256+ test "ForAll #1" do
257+ let forallJson = mkJson """
258+ {"annotation":[],"tag":"ForAll","contents":["a",{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"String"]}]},{"annotation":[],"tag":"TypeVar","contents":"a"}]},null]}
259+ """
260+ assertRight (decodeJson forallJson) $
261+ ForAll "a" Nothing (TypeApp (TypeApp (TypeConstructor $ qualified ["Prim"] "Function")
262+ (TypeConstructor $ qualified ["Prim"] "String"))
263+ (TypeVar "a"))
264+
265+ test "KindApp" do
266+ let kindAppJson = mkJson """
267+ {"annotation":[],"tag":"KindApp","contents":[{"annotation":[],"tag":"REmpty"},{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Type"]}]}
268+ """
269+ assertRight (decodeJson kindAppJson) $
270+ KindApp REmpty (TypeConstructor (qualified ["Prim"] "Type"))
271+ suite "jsons" do
272+
273+ test "jsons #1" do
274+ let json = mkJson """
275+{"annotation":[],"tag":"ForAll","contents":["o",{"annotation":[],"tag":"ForAll","contents":["r",{"annotation":[],"tag":"ForAll","contents":["l",{"annotation":[],"tag":"ConstrainedType","contents":[{"constraintAnn":[],"constraintClass":[["Type","Data","Boolean"],"And"],"constraintArgs":[{"annotation":[],"tag":"TypeVar","contents":"l"},{"annotation":[],"tag":"TypeVar","contents":"r"},{"annotation":[],"tag":"TypeVar","contents":"o"}],"constraintData":null},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"l"}]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Prim"],"Function"]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"r"}]}]},{"annotation":[],"tag":"TypeApp","contents":[{"annotation":[],"tag":"TypeConstructor","contents":[["Type","Data","Boolean"],"BProxy"]},{"annotation":[],"tag":"TypeVar","contents":"o"}]}]}]}]},null]},null]},null]}
276+ """
277+
278+ assertRight (decodeJson json) $ (ForAll "o" Nothing (ForAll "r" Nothing (ForAll "l" Nothing (ConstrainedType (Constraint { constraintArgs: [(TypeVar "l"),(TypeVar "r"),(TypeVar "o")], constraintClass: (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "And" }) }) (TypeApp (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Prim"], name: Identifier "Function" })) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "l"))) (TypeApp (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Prim"], name: Identifier "Function" })) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "r"))) (TypeApp (TypeConstructor (QualifiedName { moduleNameParts: ["Type","Data","Boolean"], name: Identifier "BProxy" })) (TypeVar "o"))))))))
279+
280+
281+qualified :: Array String -> String -> QualifiedName
282+qualified = TypeQuery.qname
283+
284+mkJson :: String -> Json
285+mkJson str =
286+ unsafePartial $ case jsonParser str of
287+ Right r -> r