From 4242e4d3b18eb532ae18e8b38e85ad1ee1988e02 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 15 May 2018 19:52:04 -0400 Subject: - Migrated primitive analysis to stdlib. --- .../test/test/luxc/lang/analysis/primitive.lux | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 new-luxc/test/test/luxc/lang/analysis/primitive.lux (limited to 'new-luxc/test') 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]) - 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 [ ] - [(test (format "Can analyse " ".") - (|> (@common.with-unknown-type - ( )) - (macro.run (io.run init-jvm)) - (case> (#e.Success [_type [_ ( value)]]) - (and (type/= _type) - (is? 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] - ))))))) -- cgit v1.2.3