diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/analysis/structure.lux | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux index aebbe75ba..a630a8fab 100644 --- a/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux +++ b/stdlib/source/lux/tool/compiler/phase/analysis/structure.lux @@ -13,7 +13,7 @@ [number ["." nat]] [text - format] + ["%" format (#+ format)]] [collection ["." list ("#@." functor)] ["." dictionary (#+ Dictionary)]]] @@ -31,58 +31,58 @@ ["/" analysis (#+ Tag Analysis Operation Phase)]]]]) (exception: #export (invalid-variant-type {type Type} {tag Tag} {code Code}) - (ex.report ["Type" (%type type)] - ["Tag" (%n tag)] - ["Expression" (%code code)])) + (ex.report ["Type" (%.type type)] + ["Tag" (%.nat tag)] + ["Expression" (%.code code)])) (template [<name>] [(exception: #export (<name> {type Type} {members (List Code)}) - (ex.report ["Type" (%type type)] - ["Expression" (%code (` [(~+ members)]))]))] + (ex.report ["Type" (%.type type)] + ["Expression" (%.code (` [(~+ members)]))]))] [invalid-tuple-type] [cannot-analyse-tuple] ) (exception: #export (not-a-quantified-type {type Type}) - (%type type)) + (%.type type)) (template [<name>] [(exception: #export (<name> {type Type} {tag Tag} {code Code}) - (ex.report ["Type" (%type type)] - ["Tag" (%n tag)] - ["Expression" (%code code)]))] + (ex.report ["Type" (%.type type)] + ["Tag" (%.nat tag)] + ["Expression" (%.code code)]))] [cannot-analyse-variant] [cannot-infer-numeric-tag] ) (exception: #export (record-keys-must-be-tags {key Code} {record (List [Code Code])}) - (ex.report ["Key" (%code key)] - ["Record" (%code (code.record record))])) + (ex.report ["Key" (%.code key)] + ["Record" (%.code (code.record record))])) (template [<name>] [(exception: #export (<name> {key Name} {record (List [Name Code])}) - (ex.report ["Tag" (%code (code.tag key))] - ["Record" (%code (code.record (list@map (function (_ [keyI valC]) - [(code.tag keyI) valC]) - record)))]))] + (ex.report ["Tag" (%.code (code.tag key))] + ["Record" (%.code (code.record (list@map (function (_ [keyI valC]) + [(code.tag keyI) valC]) + record)))]))] [cannot-repeat-tag] ) (exception: #export (tag-does-not-belong-to-record {key Name} {type Type}) - (ex.report ["Tag" (%code (code.tag key))] - ["Type" (%type type)])) + (ex.report ["Tag" (%.code (code.tag key))] + ["Type" (%.type type)])) (exception: #export (record-size-mismatch {expected Nat} {actual Nat} {type Type} {record (List [Name Code])}) - (ex.report ["Expected" (|> expected .int %i)] - ["Actual" (|> actual .int %i)] - ["Type" (%type type)] - ["Expression" (%code (|> record - (list@map (function (_ [keyI valueC]) - [(code.tag keyI) valueC])) - code.record))])) + (ex.report ["Expected" (%.nat expected)] + ["Actual" (%.nat actual)] + ["Type" (%.type type)] + ["Expression" (%.code (|> record + (list@map (function (_ [keyI valueC]) + [(code.tag keyI) valueC])) + code.record))])) (def: #export (sum analyse tag valueC) (-> Phase Nat Code (Operation Analysis)) |