summaryrefslogtreecommitdiff
path: root/examples/app/MkApp.hs
diff options
context:
space:
mode:
authorodanoburu <bcclaro@gmail.com>2018-06-20 12:33:05 -0300
committerodanoburu <bcclaro@gmail.com>2018-06-20 12:33:05 -0300
commitf0672679535e59c53ed68729bbb5a201ce507b02 (patch)
tree839216d85c207fc4d8fc0565466899ff4a41d5b1 /examples/app/MkApp.hs
parent8b05ed9469a970590e1b11cc4e83320d8b94e846 (diff)
parent427f8d84788fc3757fb4dacda931c878bf253fa1 (diff)
Merge remote-tracking branch 'upstream/master' into por
Diffstat (limited to 'examples/app/MkApp.hs')
-rw-r--r--examples/app/MkApp.hs27
1 files changed, 0 insertions, 27 deletions
diff --git a/examples/app/MkApp.hs b/examples/app/MkApp.hs
deleted file mode 100644
index 2537b1cc5..000000000
--- a/examples/app/MkApp.hs
+++ /dev/null
@@ -1,27 +0,0 @@
--- update the import list of every language
--- although possibly some extra definitions at the end
--- the new files are produced in ./tmp/ which has to be created first
--- usage: runghc MkApp.hs
-
-langs = words "Bul Cat Chi Dut Eng Est Fin Fre Ger Hin Ita Jpn Spa Swe Tha"
-appCnc lang = "App" ++ lang ++ ".gf"
-
-appAbs = "App.gf"
-
-main = do
- imports <- readFile appAbs >>= return . getImports
- mapM_ (\f -> readFile f >>= writeFile ("tmp/" ++ f) . (putImports imports)) (map appCnc langs)
-
-getImports = takeWhile (/= ']') . tail . dropWhile (/='[')
-
-putImports i s =
- let
- (s1,_:s2) = span (/='[') s
- (_, s3) = span (/=']') s2
- in s1 ++ "[" ++ i ++ extra s3
-
-extra s = unlines (init (lines s) ++ extraLines ++ ["}"])
-
-extraLines = [
--- " PassV2 v2 = passiveVP v2 ;"
- ] -- default: no extra