mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-13 09:02:54 +00:00
Improve error messages in web-viewer.
Former-commit-id: 071be9c57d5d595b6e6f002b56d6bf791b6192f8
This commit is contained in:
parent
df214c853d
commit
4e48ca0833
1 changed files with 2 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ generateResponse c conn msg = do
|
|||
withTempFile ".hs" $ \tmpSource ->
|
||||
withTempDir $ \tmpDir -> do
|
||||
writeFile tmpSource $ unlines
|
||||
["{-# LANGUAGE Arrows, OverloadedStrings #-}"
|
||||
["{-# LANGUAGE Arrows, OverloadedStrings, CPP #-}"
|
||||
,"module Main where"
|
||||
,"import Reanimate.Arrow"
|
||||
,"import Reanimate.Combinators"
|
||||
|
|
@ -68,6 +68,7 @@ generateResponse c conn msg = do
|
|||
," width_, x1_, x2_, x_, y1_, y2_, y_)"
|
||||
,"import qualified Lucid.Svg as Lucid"
|
||||
,"main = renderSvgs animation " ++ show tmpDir
|
||||
,"#line 1 \"animation.hs\""
|
||||
] ++ T.unpack msg
|
||||
putStrLn $ "Compiling program:\n" ++ T.unpack msg
|
||||
ret <- runCmd_ "stack" ["ghc", "--", "-rtsopts", "--make", "-threaded", "-O2", tmpSource, "-o", tmpExecutable]
|
||||
|
|
|
|||
Loading…
Reference in a new issue