From 3175ae85d62ff6f692b8cc127f56c6569041d788 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 1 May 2017 18:15:14 -0400 Subject: - WIP: Some initial implementations for some re-written infrastructure. --- new-luxc/source/luxc/base.lux | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 new-luxc/source/luxc/base.lux (limited to 'new-luxc/source/luxc/base.lux') 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])) + +(type: #export Path Text) + +(type: #export Mode + #Release + #Debug) + +(def: #export (fail message) + (All [a] (-> Text (Lux a))) + (do Monad + [[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)))) -- cgit v1.2.3