diff options
| author | Krasimir Angelov <kr.angelov@gmail.com> | 2018-06-20 13:06:15 +0200 |
|---|---|---|
| committer | Krasimir Angelov <kr.angelov@gmail.com> | 2018-06-20 13:06:15 +0200 |
| commit | d8eac259e4782c03be8b22274ee6025499457ab6 (patch) | |
| tree | d632ca03451a0ce630311a0404b7833e17f0b8e8 /examples/slowApp/MkApp.hs | |
| parent | 09d576f5b4b7c450ed41e86d5cc24557a1ffba11 (diff) | |
| parent | 485938103c6f9350575b79a4d4372c0b70439e04 (diff) | |
Merge branch 'master' of https://github.com/GrammaticalFramework/GF
Diffstat (limited to 'examples/slowApp/MkApp.hs')
| -rw-r--r-- | examples/slowApp/MkApp.hs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/examples/slowApp/MkApp.hs b/examples/slowApp/MkApp.hs deleted file mode 100644 index e53392feb..000000000 --- a/examples/slowApp/MkApp.hs +++ /dev/null @@ -1,35 +0,0 @@ --- 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 - -langs = words "Bul Cat Chi Dut Eng Fin Fre Ger Hin Ita Spa Swe" -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 = -- [] -- 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 |
