diff options
Diffstat (limited to 'Generate.hs')
-rw-r--r-- | Generate.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Generate.hs b/Generate.hs index 71302cc..8bc725f 100644 --- a/Generate.hs +++ b/Generate.hs | |||
@@ -22,8 +22,6 @@ instance Unquote Type | |||
22 | main :: IO () | 22 | main :: IO () |
23 | main = do | 23 | main = do |
24 | irHs <- eitherParseFile "templates/data.hs.ede" | 24 | irHs <- eitherParseFile "templates/data.hs.ede" |
25 | irEncodeHs <- eitherParseFile "templates/encode.hs.ede" | ||
26 | irDecodeHs <- eitherParseFile "templates/decode.hs.ede" | ||
27 | irPs <- eitherParseFile "templates/data.purs.ede" | 25 | irPs <- eitherParseFile "templates/data.purs.ede" |
28 | let generate name def = do | 26 | let generate name def = do |
29 | dt <- getCurrentTime | 27 | dt <- getCurrentTime |
@@ -46,8 +44,8 @@ main = do | |||
46 | 44 | ||
47 | -- Haskell | 45 | -- Haskell |
48 | either error (\x -> writeFile ("out/" ++ name ++ ".hs") $ LText.unpack x) $ irHs >>= (\t -> eitherRenderWith mylib t env) | 46 | either error (\x -> writeFile ("out/" ++ name ++ ".hs") $ LText.unpack x) $ irHs >>= (\t -> eitherRenderWith mylib t env) |
49 | either error (\x -> writeFile ("out/" ++ name ++ "Encode.hs") $ LText.unpack x) $ irEncodeHs >>= (\t -> eitherRenderWith mylib t env) | ||
50 | either error (\x -> writeFile ("out/" ++ name ++ "Decode.hs") $ LText.unpack x) $ irDecodeHs >>= (\t -> eitherRenderWith mylib t env) | ||
51 | -- Purescript | 47 | -- Purescript |
52 | either error (\x -> writeFile ("out/" ++ name ++ ".purs") $ LText.unpack x) $ irPs >>= (\t -> eitherRenderWith mylib t env) | 48 | either error (\x -> writeFile ("out/" ++ name ++ ".purs") $ LText.unpack x) $ irPs >>= (\t -> eitherRenderWith mylib t env) |
53 | generate "IR" ir | 49 | generate "IR" ir |
50 | generate "Mesh" mesh | ||
51 | generate "TypeInfo" typeInfo | ||