From 50cc5fbe7cc8abde05085944393fcec4c791402f Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 5 Sep 2017 18:36:09 -0400 Subject: - Updated new compiler's code to the recent changes in the language. - WIP: Some other changes/additions to the new compiler. --- new-luxc/source/luxc/analyser/case.lux | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'new-luxc/source/luxc/analyser/case.lux') diff --git a/new-luxc/source/luxc/analyser/case.lux b/new-luxc/source/luxc/analyser/case.lux index 30d0a2b7a..0f5b4da4e 100644 --- a/new-luxc/source/luxc/analyser/case.lux +++ b/new-luxc/source/luxc/analyser/case.lux @@ -1,6 +1,6 @@ (;module: lux - (lux (control monad + (lux (control [monad #+ do] eq) (data [bool "B/" Eq] [number] @@ -102,7 +102,7 @@ [Nat #;Nat #la;NatP] [Int #;Int #la;IntP] [Deg #;Deg #la;DegP] - [Real #;Real #la;RealP] + [Frac #;Frac #la;FracP] [Text #;Text #la;TextP]) (^ [cursor (#;Tuple (list))]) @@ -225,14 +225,14 @@ [[inputT inputA] (&common;with-unknown-type (analyse input)) outputH (analyse-pattern #;None inputT patternH (analyse bodyH)) - outputT (mapM @ - (function [[patternT bodyT]] - (analyse-pattern #;None inputT patternT (analyse bodyT))) - branchesT) - _ (case (foldM R;Monad - &&coverage;merge - (|> outputH product;left &&coverage;determine) - (L/map (|>. product;left &&coverage;determine) outputT)) + outputT (monad;map @ + (function [[patternT bodyT]] + (analyse-pattern #;None inputT patternT (analyse bodyT))) + branchesT) + _ (case (monad;fold R;Monad + &&coverage;merge + (|> outputH product;left &&coverage;determine) + (L/map (|>. product;left &&coverage;determine) outputT)) (#R;Success coverage) (if (&&coverage;total? coverage) (wrap []) -- cgit v1.2.3