aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/lux.lux57
1 files changed, 25 insertions, 32 deletions
diff --git a/source/lux.lux b/source/lux.lux
index aab80ed7e..f46a9f66d 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -4,9 +4,6 @@
apply))
## Basic types
-(def' Any #AnyT)
-(def' Nothing #NothingT)
-
(def' Bool (#DataT "java.lang.Boolean"))
(export' Bool)
@@ -48,9 +45,7 @@
(export' Maybe)
## (deftype #rec Type
-## (| #AnyT
-## #NothingT
-## (#DataT Text)
+## (| (#DataT Text)
## (#TupleT (List Type))
## (#VariantT (List (, Text Type)))
## (#RecordT (List (, Text Type)))
@@ -65,19 +60,17 @@
(case' (#AppT [List (#TupleT (#Cons [Text (#Cons [Type #Nil])]))])
TypeEnv
(#AppT [(#AllT [#None "Type" ""
- (#VariantT (#Cons [["lux;AnyT" (#TupleT #Nil)]
- (#Cons [["lux;NothingT" (#TupleT #Nil)]
- (#Cons [["lux;DataT" Text]
- (#Cons [["lux;TupleT" (#AppT [List Type])]
- (#Cons [["lux;VariantT" TypeEnv]
- (#Cons [["lux;RecordT" TypeEnv]
- (#Cons [["lux;LambdaT" (#TupleT (#Cons [Type (#Cons [Type #Nil])]))]
- (#Cons [["lux;BoundT" Text]
- (#Cons [["lux;VarT" Int]
- (#Cons [["lux;AllT" (#TupleT (#Cons [(#AppT [Maybe TypeEnv]) (#Cons [Text (#Cons [Text (#Cons [Type #Nil])])])]))]
- (#Cons [["lux;AppT" (#TupleT (#Cons [Type (#Cons [Type #Nil])]))]
- #Nil])])])])])])])])])])]))])
- #NothingT]))))
+ (#VariantT (#Cons [["lux;DataT" Text]
+ (#Cons [["lux;TupleT" (#AppT [List Type])]
+ (#Cons [["lux;VariantT" TypeEnv]
+ (#Cons [["lux;RecordT" TypeEnv]
+ (#Cons [["lux;LambdaT" (#TupleT (#Cons [Type (#Cons [Type #Nil])]))]
+ (#Cons [["lux;BoundT" Text]
+ (#Cons [["lux;VarT" Int]
+ (#Cons [["lux;AllT" (#TupleT (#Cons [(#AppT [Maybe TypeEnv]) (#Cons [Text (#Cons [Text (#Cons [Type #Nil])])])]))]
+ (#Cons [["lux;AppT" (#TupleT (#Cons [Type (#Cons [Type #Nil])]))]
+ #Nil])])])])])])])])]))])
+ Void]))))
(export' Type)
## (deftype (Bindings k v)
@@ -151,17 +144,17 @@
## (deftype CompilerState
## (& #source (Maybe Reader)
-## #modules (List Any)
-## #module-aliases (List Any)
-## #envs (List (Env Text Any))
+## #modules (List Void)
+## #module-aliases (List Void)
+## #envs (List (Env Text Void))
## #types (Bindings Int Type)
## #host HostState))
(def' CompilerState
(:' Type
(#RecordT (#Cons [["lux;source" (#AppT [Maybe Reader])]
- (#Cons [["lux;modules" (#AppT [List Any])]
- (#Cons [["lux;module-aliases" (#AppT [List Any])]
- (#Cons [["lux;envs" (#AppT [List (#AppT [(#AppT [Env Text]) Any])])]
+ (#Cons [["lux;modules" (#AppT [List Void])]
+ (#Cons [["lux;module-aliases" (#AppT [List Void])]
+ (#Cons [["lux;envs" (#AppT [List (#AppT [(#AppT [Env Text]) Void])])]
(#Cons [["lux;types" (#AppT [(#AppT [Bindings Int]) Type])]
(#Cons [["lux;host" HostState]
#Nil])])])])])]))))
@@ -824,18 +817,18 @@
## (deftype CompilerState
## (& #source (Maybe Reader)
-## #modules (List Any)
-## #module-aliases (List Any)
-## #envs (List (Env Text Any))
+## #modules (List Void)
+## #module-aliases (List Void)
+## #envs (List (Env Text Void))
## #types (Bindings Int Type)
## #writer (^ org.objectweb.asm.ClassWriter)
## #loader (^ java.net.URLClassLoader)
## #eval-ctor Int))
## (deftype CompilerState
## (& (#source (Maybe Reader))
-## (#modules (PList Text Any))
+## (#modules (PList Text Void))
## (#module-aliases (PList Text Text))
-## (#envs (List (Env Text Any)))
+## (#envs (List (Env Text Void)))
## (#types (Bindings Int Type))
## (#host (& (#writer (^ org.objectweb.asm.ClassWriter))
## (#loader (^ java.net.URLClassLoader))
@@ -1073,8 +1066,8 @@
## args)))))
## (def (const x)
-## (All [a]
-## (-> a (-> Any a)))
+## (All [a b]
+## (-> a (-> b a)))
## (lambda [_]
## x))