-
Notifications
You must be signed in to change notification settings - Fork 0
/
Prelude.typed.hs
2 lines (2 loc) · 7.89 KB
/
Prelude.typed.hs
1
2
import AST.AST
typed=Mod "Prelude" ["Prelude.lol","Prelude.exampleProgram","Prelude.prog","Prelude.example"] [] [Fun "False" (TForAll (TCon "Prelude.Bool")) (ELit (LA "false")),Fun "Prelude.AppT" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prelude.Type")) (TApp (TApp (TCon "Prim.->") (TCon "Prelude.Type")) (TCon "Prelude.Type")))) (ELambda [PVar "x1",PVar "x2"] (ETuple [ELit (LA "appT"),EVar "x1",EVar "x2"])),Fun "Prelude.ConT" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prim.String")) (TCon "Prelude.Type"))) (ELambda [PVar "x1"] (ETuple [ELit (LA "conT"),EVar "x1"])),Fun "Prelude.Cons" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TApp (TCon "Prim.->") (TApp (TCon "Prelude.List") (TVar "a"))) (TApp (TCon "Prelude.List") (TVar "a"))))) (ELambda [PVar "x1",PVar "x2"] (ETuple [ELit (LA "cons"),EVar "x1",EVar "x2"])),Fun "Prelude.F" (TForAll (TCon "Prelude.Bool")) (ELit (LA "f")),Fun "Prelude.Fale" (TForAll (TCon "Prelude.Boll")) (ELit (LA "fale")),Fun "Prelude.Infinity" (TForAll (TCon "Prelude.Timeout")) (ELit (LA "infinity")),Fun "Prelude.Nil" (TForAll (TApp (TCon "Prelude.List") (TVar "a"))) (ELit (LA "nil")),Fun "Prelude.NoConIO" (TForAll (TApp (TCon "Prelude.IO") (TVar "a"))) (ELit (LA "noConIO")),Fun "Prelude.T" (TForAll (TCon "Prelude.Bool")) (ELit (LA "t")),Fun "Prelude.T0" (TForAll (TCon "Prelude.T0")) (ELit (LA "t0")),Fun "Prelude.T2" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TApp (TCon "Prim.->") (TVar "b")) (TApp (TApp (TCon "Prelude.T2") (TVar "b")) (TVar "a"))))) (ELambda [PVar "x1",PVar "x2"] (ETuple [ELit (LA "t2"),EVar "x1",EVar "x2"])),Fun "Prelude.T3" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TApp (TCon "Prim.->") (TVar "b")) (TApp (TApp (TCon "Prim.->") (TVar "c")) (TApp (TApp (TApp (TCon "Prelude.T3") (TVar "c")) (TVar "b")) (TVar "a")))))) (ELambda [PVar "x1",PVar "x2",PVar "x3"] (ETuple [ELit (LA "t3"),EVar "x1",EVar "x2",EVar "x3"])),Fun "Prelude.T4" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TApp (TCon "Prim.->") (TVar "b")) (TApp (TApp (TCon "Prim.->") (TVar "c")) (TApp (TApp (TCon "Prim.->") (TVar "d")) (TApp (TApp (TApp (TApp (TCon "Prelude.T4") (TVar "d")) (TVar "c")) (TVar "b")) (TVar "a"))))))) (ELambda [PVar "x1",PVar "x2",PVar "x3",PVar "x4"] (ETuple [ELit (LA "t4"),EVar "x1",EVar "x2",EVar "x3",EVar "x4"])),Fun "Prelude.Timeout" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prim.Number")) (TCon "Prelude.Timeout"))) (ELambda [PVar "x1"] (ETuple [ELit (LA "timeout"),EVar "x1"])),Fun "Prelude.Tue" (TForAll (TCon "Prelude.Boll")) (ELit (LA "tue")),Fun "True" (TForAll (TCon "Prelude.Bool")) (ELit (LA "true")),Fun "Prelude.arity0" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prim.String")) (TApp (TApp (TCon "Prim.->") (TCon "Prim.String")) (TApp (TApp (TCon "Prim.->") (TCon "Prelude.T0")) (TVar "a"))))) (ELambda [PVar "mod",PVar "fun"] (EApp (EApp (EApp (EApp (EApp (EVar "Prim.apply") (ELit (LS "Prim"))) (ELit (LS "arity0toArity1"))) (ELit (LI 2))) (EVar "mod")) (EVar "fun"))),Fun "Prelude.bind" (TForAll (TApp (TApp (TCon "Prim.->") (TApp (TCon "Prelude.IO") (TVar "a"))) (TApp (TApp (TCon "Prim.->") (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TCon "Prelude.IO") (TVar "b")))) (TApp (TCon "Prelude.IO") (TVar "b"))))) (ELambda [PVar "io",PVar "f"] (EApp (EVar "Prelude.mkIO") (ELambda [PWild] (EApp (EVar "Prelude.runIO") (EApp (EVar "f") (EApp (EVar "Prelude.runIO") (EVar "io"))))))),Fun "Prelude.coerce" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TVar "b"))) (ELambda [PVar "x"] (EApp (EApp (EApp (EApp (EVar "Prim.apply") (ELit (LS "Prim"))) (ELit (LS "coerce"))) (ELit (LI 1))) (EVar "x"))),Fun "Prelude.example" (TCon "Prim.String") (EApp (EApp (EVar "Prelude.show") (ETuple [ELit (LA "conT"),ELit (LS "Prelude.Boll")])) (EVar "Prelude.Tue")),Fun "Prelude.exampleProgram" (TApp (TCon "Prelude.IO") (TApp (TCon "Prelude.IO") (TCon "Prim.Atom"))) (EApp (EApp (EVar "Prelude.bind") (EVar "Prelude.self")) (EVar "Prelude.fun1")),Fun "Prelude.fun1" (TApp (TApp (TCon "Prim.->") (TCon "Prim.Pid")) (TApp (TCon "Prelude.IO") (TApp (TCon "Prelude.IO") (TCon "Prim.Atom")))) (ELambda [PVar "s"] (EApp (EApp (EVar "Prelude.bind") (EApp (EApp (EApp (EVar "Prelude.send") (ETuple [ELit (LA "conT"),ELit (LS "Prelude.Bool")])) (EVar "s")) (EVar "Prelude.T"))) (EVar "Prelude.fun2"))),Fun "Prelude.fun2" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "t14")) (TApp (TCon "Prelude.IO") (TApp (TCon "Prelude.IO") (TCon "Prim.Atom"))))) (ELambda [PVar "_arg1"] (ECase (ETuple [EVar "_arg1"]) [(PTuple [PWild],EReceive [(PTuple [PLit (LA "t2"),PCon "Prelude.ConT" [PLit (LS "Prelude.Bool")],PVar "b"],EApp (EApp (EVar "Prelude.isBool") (EVar "b")) (EApp (EVar "Prelude.io_format") (ELit (LS "Got a list of numbers!"))))] (Timeout 3000,EApp (EVar "Prelude.io_format") (ELit (LS "huh"))))])),Fun "Prelude.io_format" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prim.String")) (TApp (TCon "Prelude.IO") (TCon "Prim.Atom")))) (ELambda [PVar "s"] (EApp (EVar "Prelude.mkIO") (ELambda [PWild] (EApp (EApp (EApp (EApp (EVar "Prim.apply") (ELit (LS "io"))) (ELit (LS "format"))) (ELit (LI 1))) (EVar "s"))))),Fun "Prelude.isBool" (TForAll (TApp (TApp (TCon "Prim.->") (TCon "Prelude.Bool")) (TApp (TApp (TCon "Prim.->") (TVar "a")) (TVar "a")))) (ELambda [PWild,PVar "x"] (EVar "x")),Fun "Prelude.isListNumber" (TForAll (TApp (TApp (TCon "Prim.->") (TApp (TCon "Prelude.List") (TCon "Prim.Number"))) (TApp (TApp (TCon "Prim.->") (TVar "a")) (TVar "a")))) (ELambda [PWild,PVar "x"] (EVar "x")),Fun "Prelude.listNumber" (TForAll (TApp (TCon "Prelude.List") (TCon "Prim.Number"))) (EVar "Prelude.Nil"),Fun "Prelude.lol" (TCon "Prelude.Type") (EApp (EApp (EVar "Prelude.typeOf") (ETuple [ELit (LA "conT"),ELit (LS "Prelude.Type")])) (EApp (EVar "Prelude.ConT") (ELit (LS "woop")))),Fun "Prelude.mkIO" (TForAll (TApp (TApp (TCon "Prim.->") (TApp (TApp (TCon "Prim.->") (TCon "Prelude.T0")) (TVar "a"))) (TApp (TCon "Prelude.IO") (TVar "a")))) (ELambda [PVar "f"] (EApp (EVar "Prelude.coerce") (EVar "f"))),Fun "Prelude.prog" (TApp (TApp (TCon "Prim.->") (TCon "Prim.Pid")) (TApp (TCon "Prelude.IO") (TCon "Prelude.Bool"))) (ELambda [PVar "pid"] (EApp (EApp (EApp (EVar "Prelude.send") (ETuple [ELit (LA "conT"),ELit (LS "Prelude.Bool")])) (EVar "pid")) (EVar "Prelude.T"))),Fun "Prelude.runIO" (TForAll (TApp (TApp (TCon "Prim.->") (TApp (TCon "Prelude.IO") (TVar "a"))) (TVar "a"))) (ELambda [PVar "io"] (EApp (EApp (EVar "Prelude.coerce") (EVar "io")) (EVar "Prelude.T0"))),Fun "Prelude.sametype" (TForAll (TApp (TApp (TCon "Prim.->") (TVar "a")) (TApp (TApp (TCon "Prim.->") (TVar "a")) (TVar "a")))) (ELambda [PVar "x",PVar "y"] (EVar "x")),Fun "Prelude.self" (TForAll (TApp (TCon "Prelude.IO") (TCon "Prim.Pid"))) (EApp (EVar "Prelude.mkIO") (EApp (EApp (EVar "Prelude.arity0") (ELit (LS "erlang"))) (ELit (LS "self")))),Fun "Prelude.send" (TForAll (TImplicit (TVar "t") (TApp (TApp (TCon "Prim.->") (TCon "Prim.Pid")) (TApp (TApp (TCon "Prim.->") (TVar "t")) (TApp (TCon "Prelude.IO") (TVar "t")))))) (ELambda [PVar "type",PVar "pid",PVar "message"] (EApp (EVar "Prelude.mkIO") (ELambda [PWild] (EApp (EApp (EApp (EApp (EApp (EVar "Prim.apply") (ELit (LS "erlang"))) (ELit (LS "!"))) (ELit (LI 2))) (EVar "pid")) (EApp (EApp (EVar "Prelude.T2") (EVar "type")) (EVar "message")))))),Fun "Prelude.show" (TForAll (TImplicit (TVar "x") (TApp (TApp (TCon "Prim.->") (TVar "x")) (TCon "Prim.String")))) (ELambda [PCon "Prelude.ConT" [PLit (LS "Prelude.Boll")],PVar "x"] (ECase (EApp (EVar "Prelude.coerce") (EVar "x")) [(PCon "Prelude.Tue" [],ELit (LS "Tue")),(PCon "Prelude.Fale" [],ELit (LS "Fale"))])),Fun "Prelude.spawn" (TForAll (TApp (TApp (TCon "Prim.->") (TApp (TCon "Prelude.IO") (TVar "a"))) (TApp (TCon "Prelude.IO") (TCon "Prim.Pid")))) (ELambda [PVar "io"] (EApp (EApp (EApp (EApp (EVar "Prim.apply") (ELit (LS "Prim"))) (ELit (LS "primSpawn"))) (ELit (LI 1))) (EVar "io"))),Fun "Prelude.typeOf" (TForAll (TImplicit (TVar "t") (TApp (TApp (TCon "Prim.->") (TVar "t")) (TCon "Prelude.Type")))) (ELambda [PVar "t",PWild] (EVar "t"))] (fromList [])