Get everything compiling again.

This commit is contained in:
evancz 2013-03-16 13:00:59 -07:00
parent 99ae5c6ba0
commit 194b25958b
3 changed files with 15 additions and 12 deletions

View file

@ -128,12 +128,13 @@ Executable elm
Executable elm-doc
Main-is: Docs.hs
Hs-Source-Dirs: compiler, compiler/Model
Hs-Source-Dirs: compiler, compiler/Model, compiler/Transform
other-modules: Ast,
Context,
Parse.Library,
Parse.Modules,
Parse.Types,
Rename,
Types.Types
Build-depends: base >=4.2 && <5,

View file

@ -59,14 +59,14 @@ buildRuntime lbi = do
createDirectoryIfMissing False rtsDir -- dist should already exist
writeFile rts "Elm = {}; Elm.Native = {}; Elm.Native.Graphics = {};\n\
\Elm.Graphics = {}; ElmRuntime = {}; ElmRuntime.Render = {}\n"
mapM_ appendJS =<< getFiles ".js" "../libraries"
mapM_ (appendElm lbi) =<< getFiles ".elm" "../libraries"
mapM_ appendJS =<< getFiles ".js" "../runtime"
mapM_ appendJS =<< getFiles ".js" "libraries"
mapM_ (appendElm lbi) =<< getFiles ".elm" "libraries"
mapM_ appendJS =<< getFiles ".js" "runtime"
putStrLn "\n+------------------------------------------+\
\\n| Success building runtime and libraries! |\
\\n+------------------------------------------+\n"
buildTypes lbi = do
files <- getFiles ".elm" "../libraries"
files <- getFiles ".elm" "libraries"
system ((show $ elm_doc lbi) ++ " " ++ unwords files ++ " > " ++ types)
putStrLn "Custom build step completed: elm-doc"

View file

@ -21,7 +21,9 @@ data BasicForm
| FElement Element
| FGroup [Form]
fill style shape = Form [] (FShape (Right style) shape)
ident = Matrix.identity
fill style shape = Form ident (FShape (Right style) shape)
filled : Color -> Shape -> Form
filled color shape = fill (Solid color) shape
@ -33,18 +35,18 @@ gradient : Gradient -> Shape -> Form
gradient grad shape = fill (Gradient grad) shape
outline : LineStyle -> Shape -> Form
outline style shape = Form [] (FShape (Left style) shape)
outline style shape = Form ident (FShape (Left style) shape)
outline : LineStyle -> Path -> Form
trace style path = Form [] (FPath style path)
trace : LineStyle -> Path -> Form
trace style path = Form ident (FPath style path)
sprite : Int -> Int -> (Int,Int) -> String -> Form
sprite w h pos src = Form [] (FImage w h pos src)
sprite w h pos src = Form ident (FImage w h pos src)
toForm : Element -> Form
toForm e = Form [] (FElement e)
toForm e = Form ident (FElement e)
group fs = Form [] (FGroup fs)
group fs = Form ident (FGroup fs)
rotate t f = { form = f.form, transform = Matrix.rotate t f.transform }
scale s f = { form = f.form, transform = Matrix.scale s s f.transform }