diff options
author | Eduardo Julian | 2019-04-19 01:27:10 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-19 01:27:10 -0400 |
commit | 0ed7cb3a7d07cf92be57a8f26355212bcee0325d (patch) | |
tree | 935d5ff38d6494971b2d2661e60513401a94cf26 /stdlib/source/lux/tool | |
parent | 692f9751f36fbfc4a5f1148c7b1fadc03495fa6b (diff) |
Renamed both "Poly" and "Lexer" to "Parser" in order to normalize naming a bit.
Diffstat (limited to 'stdlib/source/lux/tool')
-rw-r--r-- | stdlib/source/lux/tool/interpreter/type.lux | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/stdlib/source/lux/tool/interpreter/type.lux b/stdlib/source/lux/tool/interpreter/type.lux index 19f94af1b..b9d4ebb5b 100644 --- a/stdlib/source/lux/tool/interpreter/type.lux +++ b/stdlib/source/lux/tool/interpreter/type.lux @@ -3,7 +3,8 @@ [control [monad (#+ do)] ["ex" exception (#+ exception:)] - ["p" parser] + ["p" parser + ["<.>" type (#+ Parser)]] pipe] [data ["." error (#+ Error)] @@ -22,7 +23,7 @@ ["." type] ["." macro ["." code] - ["." poly (#+ Poly)]]]) + ["." poly]]]) (exception: #export (cannot-represent-value {type Type}) (ex.report ["Type" (%type type)])) @@ -30,7 +31,7 @@ (type: Representation (-> Any Text)) (def: primitive-representation - (Poly Representation) + (Parser Representation) (`` ($_ p.either (do p.monad [_ (poly.exactly Any)] @@ -49,7 +50,7 @@ [Text %t]))))) (def: (special-representation representation) - (-> (Poly Representation) (Poly Representation)) + (-> (Parser Representation) (Parser Representation)) (`` ($_ p.either (~~ (template [<type> <formatter>] [(do p.monad @@ -80,7 +81,7 @@ (format "(#.Some " (elemR elemV) ")")))))))) (def: (record-representation tags representation) - (-> (List Name) (Poly Representation) (Poly Representation)) + (-> (List Name) (Parser Representation) (Parser Representation)) (do p.monad [membersR+ (poly.tuple (p.many representation)) _ (p.assert "Number of tags does not match record type size." @@ -102,7 +103,7 @@ (format "{" record-body "}")))))) (def: (variant-representation tags representation) - (-> (List Name) (Poly Representation) (Poly Representation)) + (-> (List Name) (Parser Representation) (Parser Representation)) (do p.monad [casesR+ (poly.variant (p.many representation)) #let [num-tags (list.size tags)] @@ -130,7 +131,7 @@ (recur tail variantV))))))))) (def: (tagged-representation compiler representation) - (-> Lux (Poly Representation) (Poly Representation)) + (-> Lux (Parser Representation) (Parser Representation)) (do p.monad [[name anonymous] poly.named] (case (macro.run compiler (macro.tags-of name)) @@ -148,7 +149,7 @@ (p.fail error)))) (def: (tuple-representation representation) - (-> (Poly Representation) (Poly Representation)) + (-> (Parser Representation) (Parser Representation)) (do p.monad [membersR+ (poly.tuple (p.many representation))] (wrap (function (_ tupleV) @@ -167,7 +168,7 @@ (format "[" tuple-body "]")))))) (def: (representation compiler) - (-> Lux (Poly Representation)) + (-> Lux (Parser Representation)) (p.rec (function (_ representation) ($_ p.either |