summaryrefslogtreecommitdiff
path: root/ddl
diff options
context:
space:
mode:
Diffstat (limited to 'ddl')
-rw-r--r--ddl/Generate.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/ddl/Generate.hs b/ddl/Generate.hs
index c407510..bf0d016 100644
--- a/ddl/Generate.hs
+++ b/ddl/Generate.hs
@@ -70,13 +70,13 @@ main = do
70 _ -> writeFile fname txt 70 _ -> writeFile fname txt
71 71
72 -- Haskell 72 -- Haskell
73 either error (\x -> writeFile ("out/" ++ name ++ ".hs") $ LText.unpack x) $ dataHs >>= (\t -> eitherRenderWith mylib t env) 73 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".hs") $ LText.unpack x) $ dataHs >>= (\t -> eitherRenderWith mylib t env)
74 -- Purescript 74 -- Purescript
75 either error (\x -> writeFile ("out/" ++ name ++ ".purs") $ LText.unpack x) $ dataPs >>= (\t -> eitherRenderWith mylib t env) 75 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".purs") $ LText.unpack x) $ dataPs >>= (\t -> eitherRenderWith mylib t env)
76 -- C++ 76 -- C++
77 either error (\x -> writeFile ("out/" ++ name ++ "2.hpp") $ LText.unpack x) $ dataHpp2 >>= (\t -> eitherRenderWith mylib t env) 77 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ "2.hpp") $ LText.unpack x) $ dataHpp2 >>= (\t -> eitherRenderWith mylib t env)
78 either error (\x -> writeFile ("out/" ++ name ++ ".hpp") $ LText.unpack x) $ dataHpp >>= (\t -> eitherRenderWith mylib t env) 78 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".hpp") $ LText.unpack x) $ dataHpp >>= (\t -> eitherRenderWith mylib t env)
79 either error (\x -> writeFile ("out/" ++ name ++ ".cpp") $ LText.unpack x) $ dataCpp >>= (\t -> eitherRenderWith mylib t env) 79 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".cpp") $ LText.unpack x) $ dataCpp >>= (\t -> eitherRenderWith mylib t env)
80 -- Java 80 -- Java
81 let toPath a = flip map a $ \case 81 let toPath a = flip map a $ \case
82 '.' -> '/' 82 '.' -> '/'
@@ -91,10 +91,10 @@ main = do
91 fname = "out/java/" ++ toPath name ++ "/" ++ dataName d ++ ".java" 91 fname = "out/java/" ++ toPath name ++ "/" ++ dataName d ++ ".java"
92 dir = takeDirectory fname 92 dir = takeDirectory fname
93 createDirectoryIfMissing True dir 93 createDirectoryIfMissing True dir
94 either error (\x -> writeFile fname $ LText.unpack x) $ dataJava >>= (\t -> eitherRenderWith mylib t env) 94 either error (\x -> writeFileIfDiffer fname $ LText.unpack x) $ dataJava >>= (\t -> eitherRenderWith mylib t env)
95 either error (\x -> writeFile ("out/java/" ++ toPath name ++ "/JSON.java") $ LText.unpack x) $ jsonJava >>= (\t -> eitherRenderWith mylib t env) 95 either error (\x -> writeFileIfDiffer ("out/java/" ++ toPath name ++ "/JSON.java") $ LText.unpack x) $ jsonJava >>= (\t -> eitherRenderWith mylib t env)
96 -- C# 96 -- C#
97 either error (\x -> writeFile ("out/" ++ name ++ ".cs") $ LText.unpack x) $ dataCs >>= (\t -> eitherRenderWith mylib t env) 97 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".cs") $ LText.unpack x) $ dataCs >>= (\t -> eitherRenderWith mylib t env)
98 -- Swift 98 -- Swift
99 either error (\x -> writeFile ("out/" ++ name ++ ".swift") $ LText.unpack x) $ dataSwift >>= (\t -> eitherRenderWith mylib t env) 99 either error (\x -> writeFileIfDiffer ("out/" ++ name ++ ".swift") $ LText.unpack x) $ dataSwift >>= (\t -> eitherRenderWith mylib t env)
100 mapM_ generate $ execWriter modules 100 mapM_ generate $ execWriter modules