1
0
forked from GitHub/gf-core

Adding the prototype GF editor for simple multilingual grammars

This commit is contained in:
hallgren
2011-02-17 14:38:46 +00:00
parent a533b68c55
commit 60980e40e4
15 changed files with 1289 additions and 0 deletions

12
src/editor/simple/save.hs Normal file
View File

@@ -0,0 +1,12 @@
import Monad(zipWithM_)
import System(getArgs)
main = save =<< getArgs
save [dir] =
do fs@[ns,_] <- readIO =<< getContents
save_all fs
putStrLn $ unwords [n++".gf"|n<-ns]
where
save_all [ns,cs] = zipWithM_ write1 ns cs
write1 n = writeFile (dir++"/"++n++".gf")