summaryrefslogtreecommitdiff
path: root/examples/app/MkApp.hs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/app/MkApp.hs')
-rw-r--r--examples/app/MkApp.hs16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/app/MkApp.hs b/examples/app/MkApp.hs
index 29caf2fd5..7704ffcb7 100644
--- a/examples/app/MkApp.hs
+++ b/examples/app/MkApp.hs
@@ -1,4 +1,5 @@
-- update the import list of every language
+-- although possibly some extra definitions at the end
-- the new files are produced in ./tmp/
-- usage: runghc MkApp.hs
@@ -17,5 +18,18 @@ putImports i s =
let
(s1,_:s2) = span (/='[') s
(_, s3) = span (/=']') s2
- in s1 ++ "[" ++ i ++ s3
+ in s1 ++ "[" ++ i ++ extra s3
+extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
+
+extraLines = -- [] -- default: no extra
+
+ [
+ "",
+ "ComplV2V v np vp = mkVP v np vp ;",
+ "ComplV2A v np vp = mkVP v np vp ;",
+ "ComplV2Q v np vp = mkVP v np vp ;",
+ "ComplV2S v np vp = mkVP v np vp ;",
+ "ComplV3 v np vp = mkVP v np vp ;",
+ ""
+ ] \ No newline at end of file