Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lib improvements #62

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cli/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ about returning those.
import Dict exposing (Dict)
import Elm.AST.Frontend as Frontend
import Elm.Compiler.Error as Error exposing (Error(..), ParseError(..))
import Elm.Compiler.Stage.Desugar as Desugar
import Elm.Compiler.Stage.Emit.JS as EmitJS
import Elm.Compiler.Stage.InferTypes as InferTypes
import Elm.Compiler.Stage.Optimize as Optimize
import Elm.Compiler.Stage.Parse as Parse
import Elm.Data.Declaration as Declaration
import Elm.Data.FileContents exposing (FileContents)
import Elm.Data.FilePath as FilePath exposing (FilePath)
Expand All @@ -54,11 +59,6 @@ import Json.Decode as JD
import Platform
import Ports exposing (println, printlnStderr)
import Set exposing (Set)
import Stage.Desugar as Desugar
import Stage.Emit.JavaScript as EmitJS
import Stage.InferTypes as InferTypes
import Stage.Optimize as Optimize
import Stage.Parse as Parse


{-| We're essentially a Node.JS app (until we get self-hosting :P ).
Expand Down
4 changes: 3 additions & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"exposed-modules": [
"Elm.Compiler",
"Elm.Compiler.Error",
"Elm.Compiler.Stage.Emit",
"Elm.Compiler.Stage.Emit.JS",
"Elm.Data.Binding",
"Elm.Data.Declaration",
"Elm.Data.Exposing",
Expand Down Expand Up @@ -48,4 +50,4 @@
"elm-community/random-extra": "3.1.0 <= v < 4.0.0",
"elm-explorations/test": "1.2.2 <= v < 2.0.0"
}
}
}
8 changes: 5 additions & 3 deletions library-todo.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
- [ ] Elm.Compiler function type annotations don't really show the transitions between AST modules. (It all looks like LocatedExpr -> LocatedExpr). Try aliasing the types just for the sake of this module.
- [ ] desugarExpr is needlessly complicated... try creating some dummy throwaway module for that one expr? Does that change behaviour ("can't find variable x")?
- [ ] Emit helpers
- [ ] Emit.JavaScript
- [ ] Elm.Compiler.compileToJS - do the whole pipeline with default settings. Show how it's written in doc comment
- [ ] maybe show the Ellie demo/playground in library README?


- [ ] Elm.Compiler.compileToJS - do the whole pipeline with default settings. Show how it's written in doc comment. Also show it in library README.

Loading