forked from GitHub/gf-core
Adding the prototype GF editor for simple multilingual grammars
This commit is contained in:
12
src/editor/simple/save.hs
Normal file
12
src/editor/simple/save.hs
Normal 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")
|
||||
Reference in New Issue
Block a user