Commit graph

22 commits

Author SHA1 Message Date
Evan Czaplicki
b1f53d04ed Pipe source locations through the type checker 2013-07-30 16:01:20 -07:00
Evan Czaplicki
c6868f1bd6 cosmetic change 2013-07-30 11:57:58 -07:00
Evan Czaplicki
3da8a71d00 Add ability to collect App1's into a Type constructor
Useful for determining if something is a Tuple or List
2013-07-30 08:29:52 -07:00
Evan Czaplicki
f8fe8e4495 Properly convert Type.Type to SourceSyntax.Type 2013-07-29 20:23:42 +02:00
Evan Czaplicki
576e979483 Simplify code to generate record constraints 2013-07-27 00:14:38 +02:00
Evan Czaplicki
2a51470fc1 Implement unification for records 2013-07-26 19:04:43 +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
4e7ef5f177 Add definitions for functions that act on numbers and comparables
This will get moved into Elm code eventually
2013-07-25 14:54:21 +02:00
Evan Czaplicki
82ca695dca Add support for "number" type which can be either an Int or Float 2013-07-25 01:24:16 +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
23758290d9 Improve pretty printing for types 2013-07-19 19:17:51 +02:00
Evan Czaplicki
807076ad57 Add CSaveEnv, optimize CAnd, make it prettier
CSaveEnv is a special constraint that indicates that the current
environment should be saved for later use.

(/\) now optimizes away arguments that are already CTrue.
2013-07-19 17:48:41 +02:00
Evan Czaplicki
45b43e8757 When creating a named var, allow it to be flexible. 2013-07-19 13:25:51 +02:00
Evan Czaplicki
90c5c7d21c Add terse way to do type application 2013-07-17 19:26:42 +02:00
Evan Czaplicki
dabada1d98 Make constraint pretty printing prettier. 2013-07-11 23:30:18 +02:00
Evan Czaplicki
ca77056fc9 Improve quality of error messages. 2013-07-11 00:31:56 +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
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
ca8441ff2f Continue getting the new type-checker in order. 2013-07-07 12:52:48 +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