repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of gitlab.science.ru.nl:mlubbers/mTask
[mTask.git]
/
mTaskMakeSymbols.icl
diff --git
a/mTaskMakeSymbols.icl
b/mTaskMakeSymbols.icl
index
58b65e1
..
6781ce8
100644
(file)
--- a/
mTaskMakeSymbols.icl
+++ b/
mTaskMakeSymbols.icl
@@
-1,9
+1,11
@@
module mTaskMakeSymbols
//import iTasks
module mTaskMakeSymbols
//import iTasks
-import gdynamic, gCons, GenEq, StdMisc, StdArray, GenBimap
+import Generics.gCons
+import GenEq, StdMisc, StdArray, GenBimap
import GenPrint
import mTask
import GenPrint
import mTask
+import mTaskInterpret
import StdEnum
import StdFile
import StdEnum
import StdFile
@@
-18,10
+20,6
@@
from Data.Func import $
import Data.List
from Text import class Text(join,toUpperCase), instance Text String
import Data.List
from Text import class Text(join,toUpperCase), instance Text String
-derive consIndex BC
-derive consName BC
-derive gconses BC, AnalogPin
-
(<+) infixr 5 :: a b -> String | toString a & toString b
(<+) a b = toString a +++ toString b
(<+) infixr 5 :: a b -> String | toString a & toString b
(<+) a b = toString a +++ toString b
@@
-31,7
+29,7
@@
toDefine i b = "#define " <+ toUpperCase (consName{|*|} b) <+ " " <+ i
Start w
# (io, w) = stdio w
# io = io <<< "#ifndef MTASK_H\n#define MTASK_H\n"
Start w
# (io, w) = stdio w
# io = io <<< "#ifndef MTASK_H\n#define MTASK_H\n"
-# io = io <<< join "\n"
$ zipWith toDefine [1..] conses
+# io = io <<< join "\n"
(zipWith toDefine [0..] conses{|*|})
# (ok, w) = fclose (io <<< "\n#endif\n") w
| not ok = abort "Couldn't close stdio"
= w
# (ok, w) = fclose (io <<< "\n#endif\n") w
| not ok = abort "Couldn't close stdio"
= w