Evan Czaplicki
4208b5c9de
Remove some debugging stuff and generally clean up the code.
...
There was one potential error in which a debug needed to be a liftIO,
the computation it performed was not optional.
2013-07-12 11:05:03 +02:00
Evan Czaplicki
b0387821b4
Fix error in generalization in which some variables would escape their
...
rank. Problem was that young variables were not all being marked as
young.
This resolved a soundness issue described in the post on
"How OCaml type checker works".
2013-07-12 11:00:35 +02:00
Evan Czaplicki
dabada1d98
Make constraint pretty printing prettier.
2013-07-11 23:30:18 +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
abaa76943e
Add Max's server changes to the changelog.
2013-07-11 12:17:49 +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
b5887f41c9
Get type inference working in the basic case. Begin working on
...
printing errors in a prettier way.
2013-07-10 14:31:57 +02:00
Evan Czaplicki
f87e316847
Make pretty printing properly parenthesize higher order functions.
...
Not the best implementation, but it is simple and works well.
2013-07-09 21:59:58 +02:00
Evan Czaplicki
497d478d26
Get the solver working on basic programs. It outputs pretty types for the
...
variables in the program. Need to test further and start doing some benchmarking.
2013-07-09 21:52:05 +02:00
Evan Czaplicki
ca62ee64a9
Create type pools, have an organized model of state to flow through
...
the State Transformer during constraint solving and variable unification.
2013-07-09 10:25:50 +02:00
Evan Czaplicki
0b2b98db65
Update changelog for pretty printing
2013-07-09 00:07:54 +02:00
Evan Czaplicki
4c51159f2a
Create a Type.Pool module specifically for variable pools. Start using
...
a state transformer to thread the pool and errors through.
2013-07-08 20:03:08 +02:00
Evan Czaplicki
2ef18826de
Start adding constraint generation for declarations.
2013-07-08 18:23:18 +02:00
Evan Czaplicki
5cc99f5542
Remove the old type-checker code.
2013-07-08 16:58:09 +02:00
Evan Czaplicki
0ed72056b6
Add pretty printing for type constraints.
...
Convert source-syntax types into type-checker types and print them
with pretty type variables.
Generate constraints for let-expressions using type annotations.
Build test function to turn strings into type constraints.
2013-07-08 16:47:44 +02:00
Evan Czaplicki
96fd5bfd78
Update program parser to use Parse.Declarations
2013-07-07 22:11:16 +02:00
Evan Czaplicki
d29ca3beeb
Create a Parse.Declaration file for all declarations. Get rid of special
...
purpose Parse.Foreign library.
2013-07-07 22:06:56 +02:00
Evan Czaplicki
e4ca96731d
Create a source syntax for types that will get converted into the internal type representation during type checking.
2013-07-07 18:13:40 +02:00
Evan Czaplicki
f2b3ed7027
Start using the PrettyPrint library to show expressions, literals, and patterns.
2013-07-07 12:56:34 +02:00
Evan Czaplicki
078692ad8c
Get Optimize.hs updated for the newer AST.
2013-07-07 12:55:08 +02:00
Evan Czaplicki
b87b84556c
Move the Environment.hs and Fragment.hs files down a directory.
2013-07-07 12:54:05 +02:00
Evan Czaplicki
ca8441ff2f
Continue getting the new type-checker in order.
2013-07-07 12:52:48 +02:00
Evan Czaplicki
947b82ed09
Switch more files over to new Expressions
2013-07-04 17:31:22 +02:00
Evan Czaplicki
5c68f6bb73
Convert more files to the new Expression format that relies more on
...
patterns. Seems to clean things up so far.
Also, begin adding a module that resorts definitions to make sure
that each definition comes after the ones it depends on. This will
also make it possible to disallow recursive values statically.
2013-07-04 17:24:04 +02:00
Evan Czaplicki
69ed7631fe
Start switching over to an AST that uses patterns in lambdas and
...
pulls the arguments out of Definitions (placing them in lambdas).
2013-07-04 11:36:08 +02:00
Evan Czaplicki
351c33c486
Start generating constraints for let-expressions. Account for mutual recursion,
...
but will throw a runtime error if a user has given type annotations.
2013-07-03 19:51:38 +02:00
Evan Czaplicki
cdb63bd8d1
Start writing a new type checker based on the ATAPL chapter on efficient type-inference.
2013-07-03 14:35:51 +02:00
Evan Czaplicki
74d3c35131
Fix optimization bug with > sign.
2013-07-02 16:58:19 +02:00
Evan Czaplicki
60de915824
Merge branch 'dev' of https://github.com/evancz/Elm into dev
2013-07-01 20:05:49 +02:00
Evan Czaplicki
d700acfeac
Fix substitutions for ExplicitList.
2013-07-01 20:00:37 +02:00
Evan Czaplicki
f32390c299
Merge pull request #184 from A1kmm/dont-print-constraints-during-unify
...
Don't print constraints during unify
2013-07-01 00:47:43 -07:00
Andrew Miller
89cecdbe54
Also fix merge to remove extra newline
2013-07-01 08:48:54 +12:00
Andrew Miller
57d108421d
Fix up previous merge
2013-07-01 08:47:00 +12:00
Andrew Miller
1b4aca9685
Turn off debug code that printed all constraints during unify.
...
This debug code is very noisy and makes it hard to test the dev
branch because you can't see warnings buried in all the debug
output.
2013-07-01 08:43:00 +12:00
Andrew Miller
a2e9bef5fb
Merge branch 'dev' of github.com:/A1kmm/Elm into dev
2013-07-01 07:33:03 +12:00
Evan Czaplicki
25671f524d
update changelog
2013-06-27 18:56:27 +02:00
Evan Czaplicki
9d68c10683
Add support for triple-quoted multi-line strings
2013-06-27 18:55:01 +02:00
Evan Czaplicki
d91419d4f5
Add missing dependencies to Elm.cabal.
2013-06-27 18:53:47 +02:00
Andrew Miller
8705c28e6c
Merge branch 'dev' of git+ssh://github.com/A1kmm/Elm into dev
2013-06-25 07:37:12 +12:00
Evan Czaplicki
e63b12d036
Fix some style weirdness in Setup.hs
2013-06-24 06:14:08 +02:00
Evan Czaplicki
88e8f8102a
Add Parse.Literal to the Elm.cabal file
2013-06-24 06:13:43 +02:00
Andrew Miller
d3b88f8b1a
Add missing other-modules entry Parse.Literal
2013-06-24 12:54:47 +12:00
Evan Czaplicki
5c1089a77b
Fix bugs in Automaton discovered by Jeff
2013-06-23 16:36:44 +02:00
Evan Czaplicki
0d41af8421
Update changelog
2013-06-23 04:50:40 -07:00
Evan Czaplicki
340c2e7efa
Switch to using px to set text height instead of em.
2013-06-23 04:48:32 -07:00
Evan Czaplicki
da9c49338a
Fix pattern matching aliases so that it works in all cases. Previously it was totally broken.
2013-06-23 04:18:27 -07:00
Evan Czaplicki
cee9f6a9d9
Add two dummy files to make it possible to build the compiler from
...
within emacs. This makes it faster to type-check things and start
testing functions.
2013-06-23 02:43:58 -07:00
Evan Czaplicki
48e7584e95
Update the change log
2013-06-23 01:36:48 -07:00
Evan Czaplicki
e80ea9e430
Add support for pattern matching on literals.
2013-06-23 01:36:23 -07:00