diff options
Diffstat (limited to 'stdlib/source/library/lux/meta/location.lux')
-rw-r--r-- | stdlib/source/library/lux/meta/location.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/library/lux/meta/location.lux b/stdlib/source/library/lux/meta/location.lux index c71dcd094..acb911ab8 100644 --- a/stdlib/source/library/lux/meta/location.lux +++ b/stdlib/source/library/lux/meta/location.lux @@ -4,21 +4,21 @@ [abstract [equivalence (.only Equivalence)]]]]) -(def: .public equivalence +(def .public equivalence (Equivalence Location) (implementation - (def: (= reference subject) + (def (= reference subject) (and ("lux text =" (the .#module reference) (the .#module subject)) ("lux i64 =" (the .#line reference) (the .#line subject)) ("lux i64 =" (the .#column reference) (the .#column subject)))))) -(def: .public dummy +(def .public dummy Location [.#module "" .#line 0 .#column 0]) -(def: .public here +(def .public here (macro (_ tokens compiler) (case tokens {.#End} @@ -32,7 +32,7 @@ _ {.#Left (`` (("lux in-module" (~~ (static .prelude)) wrong_syntax_error) (symbol ..here)))}))) -(def: .public (format it) +(def .public (format it) (-> Location Text) (let [separator "," [file line column] it] @@ -42,10 +42,10 @@ (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) line)) separator (`` (("lux in-module" (~~ (static .prelude)) .nat#encoded) column))))) -(def: \n +(def \n ("lux i64 char" +10)) -(def: .public (with location error) +(def .public (with location error) (-> Location Text Text) (all "lux text concat" (..format location) \n error)) |