diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 239 | ||||
-rw-r--r-- | stdlib/source/lux/host.jvm.lux | 3 | ||||
-rw-r--r-- | stdlib/source/lux/host.old.lux | 3 | ||||
-rw-r--r-- | stdlib/source/lux/macro.lux | 1 | ||||
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/extension/statement.lux | 44 | ||||
-rw-r--r-- | stdlib/source/program/scriptum.lux | 2 |
6 files changed, 116 insertions, 176 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 5022eb2d3..ed223ac3d 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -23,15 +23,13 @@ (10 ["lux" "Any"] (8 (0) (4 1))) [dummy-cursor - (10 (1 [[dummy-cursor (7 ["lux" "type?"])] + (10 (1 [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 ("lux text concat" - ("lux text concat" "The type of things whose type is irrelevant." __paragraph) - "It can be used to write functions or data-structures that can take, or return, anything."))]] - (0)))))]) + (1 [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 ("lux text concat" + ("lux text concat" "The type of things whose type is irrelevant." __paragraph) + "It can be used to write functions or data-structures that can take, or return, anything."))]] + (0))))]) ## (type: Nothing ## (All [a] a)) @@ -39,15 +37,13 @@ (10 ["lux" "Nothing"] (7 (0) (4 1))) [dummy-cursor - (10 (1 [[dummy-cursor (7 ["lux" "type?"])] + (10 (1 [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 ("lux text concat" - ("lux text concat" "The type of things whose type is undefined." __paragraph) - "Useful for expressions that cause errors or other 'extraordinary' conditions."))]] - (0)))))]) + (1 [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 ("lux text concat" + ("lux text concat" "The type of things whose type is undefined." __paragraph) + "Useful for expressions that cause errors or other 'extraordinary' conditions."))]] + (0))))]) ## (type: (List a) ## #Nil @@ -61,118 +57,100 @@ (2 (4 1) (9 (4 1) (4 0)))))) [dummy-cursor - (10 (1 [[dummy-cursor (7 ["lux" "type?"])] + (10 (1 [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (1 [[dummy-cursor (7 ["lux" "tags"])] - [dummy-cursor (9 (1 [dummy-cursor (5 "Nil")] (1 [dummy-cursor (5 "Cons")] (0))))]] - (1 [[dummy-cursor (7 ["lux" "type-args"])] - [dummy-cursor (9 (1 [dummy-cursor (5 "a")] (0)))]] - (1 [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "A potentially empty list of values.")]] - (0)))))))]) + (1 [[dummy-cursor (7 ["lux" "tags"])] + [dummy-cursor (9 (1 [dummy-cursor (5 "Nil")] (1 [dummy-cursor (5 "Cons")] (0))))]] + (1 [[dummy-cursor (7 ["lux" "type-args"])] + [dummy-cursor (9 (1 [dummy-cursor (5 "a")] (0)))]] + (1 [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "A potentially empty list of values.")]] + (0))))))]) ("lux def" Bit (10 ["lux" "Bit"] (0 "#Bit" #Nil)) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "Your standard, run-of-the-mill boolean values (as bits).")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "Your standard, run-of-the-mill boolean values (as bits).")]] + #Nil)))]) ("lux def" I64 (10 ["lux" "I64"] (7 (0) (0 "#I64" (#Cons (4 1) #Nil)))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "64-bit integers without any semantics.")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "64-bit integers without any semantics.")]] + #Nil)))]) ("lux def" Nat (10 ["lux" "Nat"] (0 "#I64" (#Cons (0 "#Nat" #Nil) #Nil))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 ("lux text concat" - ("lux text concat" "Natural numbers (unsigned integers)." __paragraph) - "They start at zero (0) and extend in the positive direction."))]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 ("lux text concat" + ("lux text concat" "Natural numbers (unsigned integers)." __paragraph) + "They start at zero (0) and extend in the positive direction."))]] + #Nil)))]) ("lux def" Int (10 ["lux" "Int"] (0 "#I64" (#Cons (0 "#Int" #Nil) #Nil))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "Your standard, run-of-the-mill integer numbers.")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "Your standard, run-of-the-mill integer numbers.")]] + #Nil)))]) ("lux def" Rev (10 ["lux" "Rev"] (0 "#I64" (#Cons (0 "#Rev" #Nil) #Nil))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 ("lux text concat" - ("lux text concat" "Fractional numbers that live in the interval [0,1)." __paragraph) - "Useful for probability, and other domains that work within that interval."))]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 ("lux text concat" + ("lux text concat" "Fractional numbers that live in the interval [0,1)." __paragraph) + "Useful for probability, and other domains that work within that interval."))]] + #Nil)))]) ("lux def" Frac (10 ["lux" "Frac"] (0 "#Frac" #Nil)) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "Your standard, run-of-the-mill floating-point (fractional) numbers.")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "Your standard, run-of-the-mill floating-point (fractional) numbers.")]] + #Nil)))]) ("lux def" Text (10 ["lux" "Text"] (0 "#Text" #Nil)) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "Your standard, run-of-the-mill string values.")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "Your standard, run-of-the-mill string values.")]] + #Nil)))]) ("lux def" Name (10 ["lux" "Name"] (2 Text Text)) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "A name. It is used as part of Lux syntax to represent identifiers and tags.")]] - #Nil))))]) + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "A name. It is used as part of Lux syntax to represent identifiers and tags.")]] + #Nil)))]) ## (type: (Maybe a) ## #None @@ -185,17 +163,15 @@ ## "lux.Some" (4 1)))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "tags"])] - [dummy-cursor (9 (#Cons [dummy-cursor (5 "None")] (#Cons [dummy-cursor (5 "Some")] #Nil)))]] - (#Cons [[dummy-cursor (7 ["lux" "type-args"])] - [dummy-cursor (9 (#Cons [dummy-cursor (5 "a")] #Nil))]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "A potentially missing value.")]] - #Nil))))))]) + (#Cons [[dummy-cursor (7 ["lux" "tags"])] + [dummy-cursor (9 (#Cons [dummy-cursor (5 "None")] (#Cons [dummy-cursor (5 "Some")] #Nil)))]] + (#Cons [[dummy-cursor (7 ["lux" "type-args"])] + [dummy-cursor (9 (#Cons [dummy-cursor (5 "a")] #Nil))]] + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "A potentially missing value.")]] + #Nil)))))]) ## (type: #rec Type ## (#Primitive Text (List Type)) @@ -243,28 +219,26 @@ ("lux check type" (9 Type List)))} ("lux check type" (9 (4 1) (4 0))))) [dummy-cursor - (10 (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (10 (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "tags"])] - [dummy-cursor (9 (#Cons [dummy-cursor (5 "Primitive")] - (#Cons [dummy-cursor (5 "Sum")] - (#Cons [dummy-cursor (5 "Product")] - (#Cons [dummy-cursor (5 "Function")] - (#Cons [dummy-cursor (5 "Parameter")] - (#Cons [dummy-cursor (5 "Var")] - (#Cons [dummy-cursor (5 "Ex")] - (#Cons [dummy-cursor (5 "UnivQ")] - (#Cons [dummy-cursor (5 "ExQ")] - (#Cons [dummy-cursor (5 "Apply")] - (#Cons [dummy-cursor (5 "Named")] - #Nil))))))))))))]] - (#Cons [[dummy-cursor (7 ["lux" "doc"])] - [dummy-cursor (5 "This type represents the data-structures that are used to specify types themselves.")]] - (#Cons [[dummy-cursor (7 ["lux" "type-rec?"])] - [dummy-cursor (0 #1)]] - #Nil))))))]) + (#Cons [[dummy-cursor (7 ["lux" "tags"])] + [dummy-cursor (9 (#Cons [dummy-cursor (5 "Primitive")] + (#Cons [dummy-cursor (5 "Sum")] + (#Cons [dummy-cursor (5 "Product")] + (#Cons [dummy-cursor (5 "Function")] + (#Cons [dummy-cursor (5 "Parameter")] + (#Cons [dummy-cursor (5 "Var")] + (#Cons [dummy-cursor (5 "Ex")] + (#Cons [dummy-cursor (5 "UnivQ")] + (#Cons [dummy-cursor (5 "ExQ")] + (#Cons [dummy-cursor (5 "Apply")] + (#Cons [dummy-cursor (5 "Named")] + #Nil))))))))))))]] + (#Cons [[dummy-cursor (7 ["lux" "doc"])] + [dummy-cursor (5 "This type represents the data-structures that are used to specify types themselves.")]] + (#Cons [[dummy-cursor (7 ["lux" "type-rec?"])] + [dummy-cursor (0 #1)]] + #Nil)))))]) ## (type: Cursor ## {#module Text @@ -281,11 +255,9 @@ #Nil))))]] (#Cons [[dummy-cursor (7 ["lux" "doc"])] [dummy-cursor (5 "Cursors are for specifying the location of Code nodes in Lux files during compilation.")]] - (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - #Nil)))))]) + #Nil))))]) ## (type: (Ann m v) ## {#meta m @@ -305,11 +277,9 @@ [dummy-cursor (5 "The type of things that can be annotated with meta-data of arbitrary types.")]] (#Cons [[dummy-cursor (7 ["lux" "type-args"])] [dummy-cursor (9 (#Cons [dummy-cursor (5 "m")] (#Cons [dummy-cursor (5 "v")] #Nil)))]] - (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - #Nil))))))]) + #Nil)))))]) ## (type: (Code' w) ## (#Bit Bit) @@ -372,11 +342,9 @@ #Nil))))))))))))]] (#Cons [[dummy-cursor (7 ["lux" "type-args"])] [dummy-cursor (9 (#Cons [dummy-cursor (5 "w")] #Nil))]] - (#Cons [[dummy-cursor (7 ["lux" "type?"])] + (#Cons [[dummy-cursor (7 ["lux" "export?"])] [dummy-cursor (0 #1)]] - (#Cons [[dummy-cursor (7 ["lux" "export?"])] - [dummy-cursor (0 #1)]] - #Nil)))))]) + #Nil))))]) ## (type: Code ## (Ann Cursor (Code' (Ann Cursor)))) @@ -388,11 +356,9 @@ [dummy-cursor (#Record (#Cons [[dummy-cursor (#Tag ["lux" "doc"])] [dummy-cursor (#Text "The type of Code nodes for Lux syntax.")]] - (#Cons [[dummy-cursor (#Tag ["lux" "type?"])] + (#Cons [[dummy-cursor (#Tag ["lux" "export?"])] [dummy-cursor (#Bit #1)]] - (#Cons [[dummy-cursor (#Tag ["lux" "export?"])] - [dummy-cursor (#Bit #1)]] - #Nil))))]) + #Nil)))]) ("lux def" _ann ("lux check" (#Function (#Apply (#Apply Cursor Ann) @@ -469,16 +435,7 @@ ("lux def" default-def-meta-exported ("lux check" (#Apply (#Product Code Code) List) - (#Cons [(tag$ ["lux" "type?"]) - (bit$ #1)] - (#Cons [(tag$ ["lux" "export?"]) - (bit$ #1)] - #Nil))) - (record$ #Nil)) - -("lux def" default-def-meta-private - ("lux check" (#Apply (#Product Code Code) List) - (#Cons [(tag$ ["lux" "type?"]) + (#Cons [(tag$ ["lux" "export?"]) (bit$ #1)] #Nil)) (record$ #Nil)) @@ -545,7 +502,7 @@ ("lux def" Code-List (#Apply Code List) - (record$ default-def-meta-private)) + (record$ #Nil)) ## (type: (Either l r) ## (#Left l) @@ -1612,9 +1569,8 @@ ## (: (All [a b] (-> (-> a (m b)) (m a) (m b))) ## bind)) (def:''' Monad - (list& [(tag$ ["lux" "tags"]) - (tuple$ (list (text$ "wrap") (text$ "bind")))] - default-def-meta-private) + (list [(tag$ ["lux" "tags"]) + (tuple$ (list (text$ "wrap") (text$ "bind")))]) Type (#Named ["lux" "Monad"] (All [m] @@ -3997,11 +3953,10 @@ type-meta (: Code (case tags?? (#Some tags) - (` {#.tags [(~+ (list@map text$ tags))] - #.type? #1}) + (` {#.tags [(~+ (list@map text$ tags))]}) _ - (` {#.type? #1}))) + (` {}))) type' (: (Maybe Code) (if rec? (if (empty? args) diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux index 6daaf4869..3b3d31341 100644 --- a/stdlib/source/lux/host.jvm.lux +++ b/stdlib/source/lux/host.jvm.lux @@ -1402,8 +1402,7 @@ (short-class-name full-name)) params' (list@map code.local-identifier params)] (` (def: (~ (code.identifier ["" def-name])) - {#.type? #1 - #..jvm-class (~ (code.text full-name))} + {#..jvm-class (~ (code.text full-name))} .Type (All [(~+ params')] (primitive (~ (code.text (sanitize full-name))) diff --git a/stdlib/source/lux/host.old.lux b/stdlib/source/lux/host.old.lux index 9c866a66a..0c6cfcd9e 100644 --- a/stdlib/source/lux/host.old.lux +++ b/stdlib/source/lux/host.old.lux @@ -1510,8 +1510,7 @@ (short-class-name full-name)) params' (list@map (|>> product.left code.local-identifier) params)] (` (def: (~ (code.identifier ["" def-name])) - {#.type? #1 - #..jvm-class (~ (code.text full-name))} + {#..jvm-class (~ (code.text full-name))} Type (All [(~+ params')] (primitive (~ (code.text (sanitize full-name))) diff --git a/stdlib/source/lux/macro.lux b/stdlib/source/lux/macro.lux index e5ac9a87a..0b0c59623 100644 --- a/stdlib/source/lux/macro.lux +++ b/stdlib/source/lux/macro.lux @@ -202,7 +202,6 @@ (flag-set? (name-of <tag>)))] [export? #.export? "exported"] - [type? #.type? "a type"] [structure? #.struct? "a structure"] [recursive-type? #.type-rec? "a recursive type"] [signature? #.sig? "a signature"] diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux index 6c2ba872f..7deb93696 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux @@ -17,7 +17,7 @@ ["." dictionary]]] ["." macro ["." code]] - [type (#+ :share :by-example) + ["." type (#+ :share :by-example) ("#@." equivalence) ["." check]]] ["." // ["#." bundle] @@ -27,7 +27,7 @@ ["#." generation] [analysis ["." module] - ["." type]] + [".A" type]] ["#/" // #_ ["#." analysis] ["#." synthesis (#+ Synthesis)] @@ -59,8 +59,8 @@ generate (get@ [#////statement.generation #////statement.phase] state)] [_ code//type codeA] (////statement.lift-analysis (////analysis.with-scope - (type.with-fresh-env - (type.with-type type + (typeA.with-fresh-env + (typeA.with-type type (do @ [codeA (analyse codeC)] (wrap [type codeA])))))) @@ -83,9 +83,9 @@ _ (///generation.save! false name statement)] (wrap [code//type codeT target-name value])))) -(def: (definition name ?type codeC) +(def: (definition name codeC) (All [anchor expression statement] - (-> Name (Maybe Type) Code + (-> Name Code (Operation anchor expression statement [Type expression Text Any]))) (do ///.monad [state (//.lift ///.get-state) @@ -94,20 +94,12 @@ generate (get@ [#////statement.generation #////statement.phase] state)] [_ code//type codeA] (////statement.lift-analysis (////analysis.with-scope - (type.with-fresh-env - (case ?type - (#.Some type) - (type.with-type type - (do @ - [codeA (analyse codeC)] - (wrap [type codeA]))) - - #.None - (do @ - [[code//type codeA] (type.with-inference (analyse codeC)) - code//type (type.with-env - (check.clean code//type))] - (wrap [code//type codeA])))))) + (typeA.with-fresh-env + (do @ + [[code//type codeA] (typeA.with-inference (analyse codeC)) + code//type (typeA.with-env + (check.clean code//type))] + (wrap [code//type codeA]))))) codeS (////statement.lift-synthesis (synthesize codeA))] (definition' generate name code//type codeS))) @@ -119,7 +111,7 @@ (////statement.lift-analysis (do ///.monad [_ (module.define short-name [type annotations value])] - (if (macro.type? annotations) + (if (type@= .Type type) (case (macro.declared-tags annotations) #.Nil (wrap []) @@ -155,11 +147,7 @@ #let [full-name [current-module short-name]] [_ annotationsT annotationsV] (evaluate! Code annotationsC) #let [annotationsV (:coerce Code annotationsV)] - [value//type valueT valueN valueV] (..definition full-name - (if (macro.type? annotationsV) - (#.Some Type) - #.None) - valueC) + [value//type valueT valueN valueV] (..definition full-name valueC) _ (..define short-name value//type annotationsV valueV) #let [_ (log! (format "Definition " (%name full-name)))] _ (////statement.lift-generation @@ -282,8 +270,8 @@ (do ///.monad [[_ programA] (////statement.lift-analysis (////analysis.with-scope - (type.with-fresh-env - (type.with-type (type (-> (List Text) (IO Any))) + (typeA.with-fresh-env + (typeA.with-type (type (-> (List Text) (IO Any))) (analyse programC)))))] (////statement.lift-synthesis (synthesize programA)))) diff --git a/stdlib/source/program/scriptum.lux b/stdlib/source/program/scriptum.lux index e37d69d1b..1522e8f66 100644 --- a/stdlib/source/program/scriptum.lux +++ b/stdlib/source/program/scriptum.lux @@ -274,7 +274,7 @@ (def: (add-definition [name [def-type def-annotations def-value]] organization) (-> [Text Definition] Organization Organization) - (cond (macro.type? def-annotations) + (cond (type@= .Type def-type) (update@ #types (: (Mutation (List Value)) (|>> (#.Cons [name def-annotations (:coerce Type def-value)]))) |