diff options
author | Eduardo Julian | 2017-05-01 18:15:14 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-05-01 18:15:14 -0400 |
commit | 3175ae85d62ff6f692b8cc127f56c6569041d788 (patch) | |
tree | 83340fd6cb5c287f13080d7ead386b1d161b8e77 /new-luxc/source/luxc/base.lux | |
parent | 94cca1d49c0d3f6d328a81eaf6ce9660a6f149c1 (diff) |
- WIP: Some initial implementations for some re-written infrastructure.
Diffstat (limited to 'new-luxc/source/luxc/base.lux')
-rw-r--r-- | new-luxc/source/luxc/base.lux | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/base.lux b/new-luxc/source/luxc/base.lux new file mode 100644 index 000000000..ce872e9da --- /dev/null +++ b/new-luxc/source/luxc/base.lux @@ -0,0 +1,21 @@ +(;module: + lux + (lux (control monad) + (data text/format) + [macro #+ Monad<Lux>])) + +(type: #export Path Text) + +(type: #export Mode + #Release + #Debug) + +(def: #export (fail message) + (All [a] (-> Text (Lux a))) + (do Monad<Lux> + [[file line col] macro;cursor + #let [location (format file + "," (|> line nat-to-int %i) + "," (|> col nat-to-int %i))]] + (macro;fail (format "@ " location + "\n" message)))) |