Commit 10517230 authored by Martin Wierich's avatar Martin Wierich
Browse files

changes in to make compiler self compatible

parent 2980941b
......@@ -482,8 +482,14 @@ instance declareVars BackendBody where
class declare a :: ModuleIndex !VarHeap a -> Backender
class declareWithIndex a :: Index ModuleIndex !VarHeap a -> Backender
//1.3
instance declare {#a} | declareWithIndex a & ArrayElem a where
declare :: ModuleIndex VarHeap {#a} -> Backender | declareWithIndex a & ArrayElem a
//3.1
/*2.0
instance declare {#a} | declareWithIndex a & Array {#} a where
declare :: ModuleIndex VarHeap {#a} -> Backender | declareWithIndex a & Array {#} a
0.2*/
declare moduleIndex varHeap array
= foldStateWithIndexA (\i -> declareWithIndex i moduleIndex varHeap) array
......
......@@ -17,7 +17,12 @@ class preprocess a :: a -> Preprocessor
:: PreprocessState
:== VarHeap
//1.3
instance preprocess {#a} | preprocess a & ArrayElem a where
//3.1
/*2.0
instance preprocess {#a} | preprocess a & Array {#} a where
0.2*/
preprocess array
= foldStateA preprocess array
......
definition module backendsupport
//1.3
from StdArray import size, size_u
//3.1
/*2.0
from StdArray import size, usize
0.2*/
from StdFunc import `bind`
from StdInt import +, ==
......
implementation module backendsupport
from StdArray import size, size_u
import StdArray
from StdFunc import `bind`
from StdInt import +, ==
......
definition module set_return_code;
//1.3
from StdString import String;
//3.1
:: *UniqueWorld :== World;
set_return_code :: !Int !UniqueWorld -> UniqueWorld;
......
......@@ -2,7 +2,7 @@ implementation module set_return_code;
import code from "set_return_code.obj";
from StdString import String;
import StdString;
:: *UniqueWorld :== World;
......
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