aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/type
diff options
context:
space:
mode:
authorEduardo Julian2022-03-15 22:45:49 -0400
committerEduardo Julian2022-03-15 22:45:49 -0400
commitb0093a3849baaeb5e12692b2cf6ac65ba74bbd54 (patch)
tree26db4a468c2f75c64ba16e8b7dbf20f135d369fc /stdlib/source/library/lux/type
parentbc36487224f670c23002cc4575c0dba3e5dc1be1 (diff)
Leaner syntax for library/lux/control/exception.report
Diffstat (limited to 'stdlib/source/library/lux/type')
-rw-r--r--stdlib/source/library/lux/type/check.lux20
-rw-r--r--stdlib/source/library/lux/type/dynamic.lux34
-rw-r--r--stdlib/source/library/lux/type/resource.lux52
3 files changed, 53 insertions, 53 deletions
diff --git a/stdlib/source/library/lux/type/check.lux b/stdlib/source/library/lux/type/check.lux
index 02dd48227..a4312b3e8 100644
--- a/stdlib/source/library/lux/type/check.lux
+++ b/stdlib/source/library/lux/type/check.lux
@@ -31,31 +31,31 @@
(exception: .public (unknown_type_var [id Nat])
(exception.report
- ["ID" (n#encoded id)]))
+ "ID" (n#encoded id)))
(exception: .public (unbound_type_var [id Nat])
(exception.report
- ["ID" (n#encoded id)]))
+ "ID" (n#encoded id)))
(exception: .public (invalid_type_application [funcT Type
argT Type])
(exception.report
- ["Type function" (//.format funcT)]
- ["Type argument" (//.format argT)]))
+ "Type function" (//.format funcT)
+ "Type argument" (//.format argT)))
(exception: .public (cannot_rebind_var [id Nat
type Type
bound Type])
(exception.report
- ["Var" (n#encoded id)]
- ["Wanted Type" (//.format type)]
- ["Current Type" (//.format bound)]))
+ "Var" (n#encoded id)
+ "Wanted Type" (//.format type)
+ "Current Type" (//.format bound)))
(exception: .public (type_check_failed [expected Type
actual Type])
(exception.report
- ["Expected" (//.format expected)]
- ["Actual" (//.format actual)]))
+ "Expected" (//.format expected)
+ "Actual" (//.format actual)))
(type: .public Var
Nat)
@@ -337,7 +337,7 @@
(exception: .public (cannot_identify [var Var])
(exception.report
- ["Var" (n#encoded var)]))
+ "Var" (n#encoded var)))
(def: .public (identity aliases @)
(-> (List Var) Var (Check Type))
diff --git a/stdlib/source/library/lux/type/dynamic.lux b/stdlib/source/library/lux/type/dynamic.lux
index d734d5623..28c9b7e35 100644
--- a/stdlib/source/library/lux/type/dynamic.lux
+++ b/stdlib/source/library/lux/type/dynamic.lux
@@ -1,25 +1,25 @@
(.using
- [library
- [lux "*"
- ["[0]" debug]
- [control
- ["[0]" try {"+" Try}]
- ["[0]" exception {"+" exception:}]
- [parser
- ["<[0]>" code]]]
- [data
- [text
- ["%" format]]]
- [macro {"+" with_symbols}
- ["[0]" syntax {"+" syntax:}]]
- ["[0]" type
- abstract]]])
+ [library
+ [lux "*"
+ ["[0]" debug]
+ [control
+ ["[0]" try {"+" Try}]
+ ["[0]" exception {"+" exception:}]
+ [parser
+ ["<[0]>" code]]]
+ [data
+ [text
+ ["%" format]]]
+ [macro {"+" with_symbols}
+ ["[0]" syntax {"+" syntax:}]]
+ ["[0]" type
+ abstract]]])
(exception: .public (wrong_type [expected Type
actual Type])
(exception.report
- ["Expected" (%.type expected)]
- ["Actual" (%.type actual)]))
+ "Expected" (%.type expected)
+ "Actual" (%.type actual)))
(abstract: .public Dynamic
[Type Any]
diff --git a/stdlib/source/library/lux/type/resource.lux b/stdlib/source/library/lux/type/resource.lux
index 05eb845e5..4ac5a17c0 100644
--- a/stdlib/source/library/lux/type/resource.lux
+++ b/stdlib/source/library/lux/type/resource.lux
@@ -1,29 +1,29 @@
(.using
- [library
- [lux "*"
- ["[0]" meta]
- [abstract
- ["[0]" monad {"+" Monad do}
- [indexed {"+" IxMonad}]]]
- [control
- ["[0]" maybe]
- ["[0]" exception {"+" exception:}]
- ["<>" parser
- ["<[0]>" code {"+" Parser}]]]
- [data
- [text
- ["%" format {"+" format}]]
- [collection
- ["[0]" set]
- ["[0]" sequence {"+" Sequence}]
- ["[0]" list ("[1]#[0]" functor mix)]]]
- ["[0]" macro
- [syntax {"+" syntax:}]]
- [math
- [number
- ["n" nat]]]
- [type
- abstract]]])
+ [library
+ [lux "*"
+ ["[0]" meta]
+ [abstract
+ ["[0]" monad {"+" Monad do}
+ [indexed {"+" IxMonad}]]]
+ [control
+ ["[0]" maybe]
+ ["[0]" exception {"+" exception:}]
+ ["<>" parser
+ ["<[0]>" code {"+" Parser}]]]
+ [data
+ [text
+ ["%" format {"+" format}]]
+ [collection
+ ["[0]" set]
+ ["[0]" sequence {"+" Sequence}]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
+ ["[0]" macro
+ [syntax {"+" syntax:}]]
+ [math
+ [number
+ ["n" nat]]]
+ [type
+ abstract]]])
(type: .public (Procedure monad input output value)
(-> input (monad [output value])))
@@ -103,7 +103,7 @@
(exception: .public (index_cannot_be_repeated [index Nat])
(exception.report
- ["Index" (%.nat index)]))
+ "Index" (%.nat index)))
(exception: .public amount_cannot_be_zero)