Commit graph

97 commits

Author SHA1 Message Date
Evan Czaplicki
4eed8e424b Fix the .cabal file, include many new files 2013-07-31 12:12:06 -07:00
Evan Czaplicki
2c96bf0c33 Get the haskell library working 2013-07-31 09:31:48 -07:00
Evan Czaplicki
5c81d14efe Update dependencies and comment out things that slow the build and are unnecessary for testing 2013-07-29 12:00:30 +02:00
Evan Czaplicki
22f7f8a43a Create a serializable interface for a module's type information
Also add a flag to print out top-level types
2013-07-21 06:08:08 +02:00
Evan Czaplicki
640f98e7d5 Rename functions and modules 2013-07-16 21:38:20 +02:00
Evan Czaplicki
e7b949df9b Begin adding testing framework to .cabal file. 2013-07-14 19:51:52 +02:00
Evan Czaplicki
cb914d91ff Get all of the Haskell files compiling with the new type checker.
Does not actually work, undefined is used in some places as a
stopgap measure.
2013-07-11 12:48:37 +02:00
Evan Czaplicki
ca77056fc9 Improve quality of error messages. 2013-07-11 00:31:56 +02:00
Evan Czaplicki
d3bd238663 Add dependency on ansi-terminal for colorful results. 2013-07-10 14:33:54 +02:00
Evan Czaplicki
d91419d4f5 Add missing dependencies to Elm.cabal. 2013-06-27 18:53:47 +02:00
Evan Czaplicki
88e8f8102a Add Parse.Literal to the Elm.cabal file 2013-06-24 06:13:43 +02:00
evancz
35981eb42f Finish parameterizing the AST and properly check errors in let expressions. 2013-06-14 19:23:58 -07:00
evancz
5e7be20d6d add filepath to docs dependencies 2013-06-13 23:02:05 -07:00
evancz
d7dcf5a9e8 Get the whole compiler building again. 2013-06-13 22:59:14 -07:00
evancz
721ce4f192 Continue reorganizing the code-base.
Remove uses of uniplate, introduces a regression in testing the ordering of Defs in let-expressions.
2013-06-13 22:45:08 -07:00
evancz
6fc30322ce Print out a bunch of extra information about type checking. 2013-06-09 11:15:03 -07:00
evancz
6e56df59a5 Switch to only generating elmo files. Turn off the CPP flags in .cabal and remove all generated JS files on each build for now. 2013-06-07 09:38:29 -07:00
Andrew Miller
6a34482849 Add support for type annotations in let 2013-06-03 19:44:45 +12:00
evancz
6b28feaa2b Switch name of Context to Located. Whoo static types :) 2013-05-29 16:20:38 -07:00
evancz
22042e2967 Fix issue 162: Let expressions would re-order its members such that functions always came after values. This meant that you could not use the functions to define any values within a let. 2013-05-28 07:06:14 -07:00
evancz
e4ea0513ac Bump version number and remove unused dependencies. 2013-05-24 11:34:09 +02:00
evancz
868e71e58b Add JSObject to the FFI parser. 2013-05-22 15:59:47 +02:00
evancz
abe95cc90e Go with changes from the dev branch. 2013-05-22 00:32:22 +02:00
evancz
af75972665 Merge branch 'dev'
Conflicts:
	Elm.cabal
	Examples/elm-js/GameSkeleton/GameSkeleton.elm
	Examples/elm-js/Pong/Pong.elm
	core-js/Signal/Input.js
2013-05-22 00:26:23 +02:00
evancz
5f1e3bd696 Switch back to putting let and case expressions in closures.
In the former case it is actually necessary, in the latter, it partially fixes a mysterious bug with Dict.diff.

Also stop using the LetBoundVars module.
2013-05-21 22:28:18 +02:00
evancz
b359fd0b47 Revise elm-docs to copy the names of type variables in type annotations directly. 2013-05-04 18:19:54 -07:00
ngunn
175f268622 Fix cabal install missing docs.json (followup)
See: 14e32add30
for discussion on first attempt

Changed Librarys.hs and LoadLibraries.hs from TemplateHaskell to usafeIO.
Avoids needing to touch LoadLibraries after we change docs.json (as the file is loaded at runtime).
Also removes need for using CPP
Drawback of using unsafeIO is fairly well known/understood + this is a classic use-case.
Added error handling to LoadLibraries.hs

Setup.hs now uses "runProcess" instead of "system" to invoke elm compiler.
This allows us to set the environment variable "Elm_datadir" which is picked up by LoadLibraries and makes sure we get the just-built version in dist/data.
Also explicitly sets the RTS file to make sure we're not using one (as we're currently building it!)
Also change the folder the compiled JavaScript ends up in to dist/js.  Writing to the source tree, then deleting isn't very nice + this should make it easier to find elm compilation errors.  cabal clean handles the file deletion, too.

I think this fixes all the defects of the first version:
1. CPP is not needed
2. touch is not needed
3. building elm-runtime.js uses dist/data/docs.json
4. running elm after install uses the installed elm-runtime.js and docs.json
5. LoadLibraries.hs is simpler.  Doesn't use CPP or TemplateHaskell.  Has error handling and a decent error message
6. cabal clean && cabal install builds everything with the right data in the right order

(tested on ghc 7.4.1)
2013-03-22 15:52:40 +00:00
ngunn
14e32add30 Fix cabal install missing docs.json
See: https://github.com/evancz/Elm/issues/120

Add build-hook to Setup.hs so that elm-doc gets build and executed before library or elm exec gets built.
Add preprocessor to Elm.cabal so LoadLibraries.hs can load docs.json from the build folder instead of installed folder
Add touch to Setup.hs otherwise LoadLibraries.hs doesn't get recompiled.  This is non-portable, but I can't find a portable way (see Setup.hs for details)

cabal clean && cabal install now works
(tested on ghc 7.4.1)
2013-03-21 13:31:55 +00:00
evancz
131a2b6818 Get sprites working in collage. temporary fix for docs.json issue. Looks like git thinks we're in the past, so a bunch of changes that have already happened as well. 2013-03-21 02:29:23 -07:00
evancz
7dbb052b22 Load json representation of types with Template Haskell, so library files are the base truth of type information.
Make minor fixes in libraries, such as adding the Char labrary and fixing the types in the Dict library.
2013-03-16 22:24:18 -07:00
evancz
194b25958b Get everything compiling again. 2013-03-16 13:00:59 -07:00
evancz
99ae5c6ba0 Finish moving the compiler down a directory. 2013-03-16 12:07:32 -07:00
evancz
1822ebc160 Move the compiler down a directory, mostly. 2013-03-16 12:04:05 -07:00
Vincent Ambo
f2e8703a2b * restructuring, part #1
I am splitting the elm package up into several packages, elm itself
which exports the Language.Elm* modules and builds the compiler
executable, elm-server which contains the standalone, Happstack-based
Elm server and elm-yesod, which provides the generateWidget function
for using Elm together with Yesod.
2012-05-28 16:43:56 +02:00
Vincent Ambo
cdef603d8c * Language.Elm.Yesod
This module provides a very simple [elm| |] quasiquoter and a
generateWidget function to use elm in combination with Yesod's widget
system.
2012-05-28 16:08:25 +02:00
evancz
c4c5e3e1a1 More version number updating
Hopefully this won't happen so much anymore.
2012-05-27 19:20:07 -05:00
evancz
44b2e45380 Updates for version 0.1.1.6
Includes ExtractNoscript in the .cabal file and updates version numbers
as necessary.
2012-05-27 17:49:20 -05:00
evancz
ea05fbe3d9 Corrections for second release.
Had some install issues on different platforms, so fixed an ambiguity
with Control.Deepseq.force and removed some compilation flags.
2012-05-23 00:50:11 -04:00
evancz
8215dacbab Prepare for second release.
Add a Haskell library so that Elm code can be compiled directly in
Haskell. Clean up file names and fix up dependencies.
2012-05-22 23:45:19 -04:00
evancz
e041457bee Update build dependencies. 2012-05-20 01:07:59 -04:00
evancz
fea475180b Remove extra README file. 2012-04-26 23:47:37 -04:00
evancz
4e1760f7c9 Fix .cabal file more. Remove dependence on Types.hs from Parse/ParsePatterns.hs. 2012-04-26 04:19:55 -04:00
evancz
a31f71df8d Add source-repository to .cabal file. Also, added upper bound to base constraint. 2012-04-26 02:55:11 -04:00
evancz
c0860aaf7c Change version numbers and updated .cabal file. 2012-04-25 01:52:06 -04:00
evancz
62640abe29 Updated version number. 2012-04-24 19:17:07 -04:00
evancz
cb7d046f77 Added version lower bounds to .cabal file. Added an import for compatibility to Binop.hs. 2012-04-21 02:15:30 -04:00
evancz
a587ff5132 Initial commit. 2012-04-19 02:32:10 -04:00