diff options
author | Eduardo Julian | 2018-05-15 19:52:04 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-15 19:52:04 -0400 |
commit | 4242e4d3b18eb532ae18e8b38e85ad1ee1988e02 (patch) | |
tree | 96f25b4ed5e428eea5c8bb4532a228b84d1f1b7b /new-luxc/test | |
parent | bb2ec42843ba0f13adafe1f2f4a7b2820fbcaafa (diff) |
- Migrated primitive analysis to stdlib.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/lang/analysis/primitive.lux | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/primitive.lux b/new-luxc/test/test/luxc/lang/analysis/primitive.lux deleted file mode 100644 index aa3e30aab..000000000 --- a/new-luxc/test/test/luxc/lang/analysis/primitive.lux +++ /dev/null @@ -1,61 +0,0 @@ -(.module: - lux - (lux [io] - (control [monad #+ do] - pipe) - (data (text format) - ["e" error]) - ["r" math/random] - [macro] - (macro [code]) - (lang [type "type/" Eq<Type>]) - test) - (luxc ["&" lang] - (lang ["&." module] - ["~" analysis] - (analysis [".A" expression] - ["@" primitive] - ["@." common]))) - (// common) - (test/luxc common)) - -(context: "Primitives" - (<| (times +100) - (do @ - [%bool% r.bool - %nat% r.nat - %int% r.int - %deg% r.deg - %frac% r.frac - %text% (r.text +5)] - (`` ($_ seq - (test "Can analyse unit." - (|> (@common.with-unknown-type - @.analyse-unit) - (macro.run (io.run init-jvm)) - (case> (^ (#e.Success [_type (^code [])])) - (type/= Top _type) - - _ - false)) - ) - (~~ (do-template [<desc> <type> <tag> <value> <analyser>] - [(test (format "Can analyse " <desc> ".") - (|> (@common.with-unknown-type - (<analyser> <value>)) - (macro.run (io.run init-jvm)) - (case> (#e.Success [_type [_ (<tag> value)]]) - (and (type/= <type> _type) - (is? <value> value)) - - _ - false)) - )] - - ["bool" Bool #.Bool %bool% @.analyse-bool] - ["nat" Nat #.Nat %nat% @.analyse-nat] - ["int" Int #.Int %int% @.analyse-int] - ["deg" Deg #.Deg %deg% @.analyse-deg] - ["frac" Frac #.Frac %frac% @.analyse-frac] - ["text" Text #.Text %text% @.analyse-text] - ))))))) |