Commit 28241c7f authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏘
Browse files

eliminated cheat module

parent 2b63f548
system module cheat
i :: !b -> a
uniqueCopy :: !*a -> (!*a, !*a)
implementation module cheat
i :: !a -> b
i x =
code
{ .inline i
no_op
.end
}
uniqueCopy :: !*a -> (!*a, !*a)
uniqueCopy x =
code
{ .inline uniqueCopy
push_a 0
.end
}
...@@ -3,7 +3,7 @@ implementation module explicitimports ...@@ -3,7 +3,7 @@ implementation module explicitimports
import StdEnv import StdEnv
import syntax, typesupport, parse, checksupport, utilities, checktypes, transform, predef, cheat, import syntax, typesupport, parse, checksupport, utilities, checktypes, transform, predef,
compilerSwitches//, RWSDebug compilerSwitches//, RWSDebug
cUndef :== (-1) cUndef :== (-1)
......
...@@ -2,7 +2,7 @@ implementation module type ...@@ -2,7 +2,7 @@ implementation module type
import StdEnv import StdEnv
import syntax, typesupport, check, analtypes, overloading, unitype, refmark, predef, utilities, compare_constructor // , RWSDebug import syntax, typesupport, check, analtypes, overloading, unitype, refmark, predef, utilities, compare_constructor // , RWSDebug
import cheat, compilerSwitches import compilerSwitches
import generics // AA import generics // AA
:: TypeInput = :: TypeInput =
...@@ -2225,7 +2225,7 @@ where ...@@ -2225,7 +2225,7 @@ where
# (error=:{ea_file}) # (error=:{ea_file})
= errorHeading "Uniqueness error" error = errorHeading "Uniqueness error" error
(coercion_env, copy_coercion_env) (coercion_env, copy_coercion_env)
= uniqueCopy coercion_env = arrayCopy coercion_env
format format
= { form_properties = cMarkAttribute, = { form_properties = cMarkAttribute,
form_attr_position = Yes (reverse positions, copy_coercion_env) } form_attr_position = Yes (reverse positions, copy_coercion_env) }
......
...@@ -5,7 +5,7 @@ import StdEnv ...@@ -5,7 +5,7 @@ import StdEnv
import syntax, analunitypes, type, utilities, checktypes, import syntax, analunitypes, type, utilities, checktypes,
compilerSwitches //, RWSDebug compilerSwitches //, RWSDebug
import cheat // import cheat
AttrUni :== 0 AttrUni :== 0
AttrMulti :== 1 AttrMulti :== 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment