Evan Czaplicki
9dd5dff279
Make AST more general and try to give its phases better names
...
Also change the constructors for the Pattern ADT
2014-02-10 00:17:33 +01:00
Evan Czaplicki
a97b9951d0
Add checks for port types to ensure that only JS values go through ports and that type annotations are correct and consistent
2014-01-05 10:41:40 +01:00
Evan Czaplicki
c966776788
Add -W flag to many files, mostly getting rid of dead imports
2014-01-04 10:54:46 +01:00
Evan Czaplicki
2874797ddb
Go to original error style. I think it's nicer.
2013-12-19 14:45:52 -08:00
Evan Czaplicki
f73a6ff9f9
Add an occurs check to finally resolve #294
...
Add it in the more clever location suggested by Pottier and Remy. Also
change the style of error messages to get rid of the expected/actual
problem for now, and make hints read more smoothly.
2013-11-19 22:31:38 -08:00
Evan Czaplicki
b5979b4aaf
Add occurs check and a test to make sure it works
2013-08-19 22:39:41 -07:00
Evan Czaplicki
a3f62bdd14
style tweaks
2013-08-12 14:29:38 -07:00
Evan Czaplicki
3ef5284afd
Stop using the MultiWayIf extension
2013-07-30 22:57:13 -07:00
Evan Czaplicki
8006d8e54a
Report line numbers in type errors
2013-07-30 16:22:20 -07:00
Evan Czaplicki
b1f53d04ed
Pipe source locations through the type checker
2013-07-30 16:01:20 -07:00
Evan Czaplicki
ebcaad0004
Fix possibility of calling maximum
on empty lists
2013-07-26 19:39:12 +02:00
Evan Czaplicki
0db809ff4c
Switch formatting for language pragmas
2013-07-25 20:34:04 +02:00
Evan Czaplicki
9fe6c9a564
Change functions for creating type variables, distinguish names of different constraint type variables
2013-07-25 18:07:04 +02:00
Evan Czaplicki
666d9f8ca3
Assume all variables with the "Native." prefix exist and have type "a"
2013-07-25 01:23:30 +02:00
Evan Czaplicki
ca4502b70a
Save the current environment on CSaveEnv
2013-07-19 18:03:28 +02:00
Evan Czaplicki
26738907c6
Make error message in solver slightly more specific
2013-07-19 12:41:37 +02:00
Evan Czaplicki
901179c10f
Marginally better errors when a variable is undefined.
2013-07-17 19:30:40 +02:00
Evan Czaplicki
67ef1ec77b
Create the Type.Inference module which handles type inference from
...
start to finish. Give it a Module and it returns a dictionary mapping
top-level values to types.
2013-07-16 00:38:31 +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
ca77056fc9
Improve quality of error messages.
2013-07-11 00:31:56 +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
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
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