Commit graph

23 commits

Author SHA1 Message Date
Evan Czaplicki
7093436b13 Switch to SrcTypes after type inference, not in compiler 2013-08-21 14:23:11 -07: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
70f1242bd0 Check that main is a Signal or (Signal Element), add tests for this case 2013-08-19 17:47:37 -07:00
Evan Czaplicki
51bc878b51 Use new Located datastructure, add source strings where appropriate 2013-08-03 11:41:33 -07:00
Evan Czaplicki
b1f53d04ed Pipe source locations through the type checker 2013-07-30 16:01:20 -07:00
Evan Czaplicki
ec24738e9c Get rid of dead code 2013-07-29 19:25:58 +02:00
Evan Czaplicki
eb96d7ad8d Get rid of current canonicalization code 2013-07-29 11:53:45 +02:00
Evan Czaplicki
da346ea6a1 Show type errors in the order they appear in the source file 2013-07-27 00:53:34 +02:00
Evan Czaplicki
2a5bee06fc Include type aliases from dependencies 2013-07-26 17:35:48 +02:00
Evan Czaplicki
0f85a2fcfa Resolve type aliases in instantiator 2013-07-26 15:08:04 +02:00
Evan Czaplicki
6948858f78 Allow multiple different imports of the same module, clean up canonicalize code 2013-07-26 12:56:36 +02:00
Evan Czaplicki
0681fbe583 Get rid of dead function and give instantiateTypeWithContext a shorter name 2013-07-26 12:22:15 +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
8ffcf9e80e Prettier printing for infix operator definitions 2013-07-23 15:43:21 +02:00
Evan Czaplicki
802be96e57 Fix issue in which patterns could become too general 2013-07-23 15:32:08 +02:00
Evan Czaplicki
138e99cc81 Begin to canonicalize imported values and types 2013-07-22 14:42:45 +02:00
Evan Czaplicki
81522b306a Make cross-module types aware of user-specified aliases 2013-07-22 00:23:26 +02:00
Evan Czaplicki
c140d690fc First draft of cross-module type checking
Currently, all top-level types are imported. No alias resolution
happens so you need to use "import open M" atm.
2013-07-21 22:50:48 +02:00
Evan Czaplicki
b0f96a2eab Switch from [Def t v] to (LExpr t v) for program representation 2013-07-19 18:02:24 +02:00
Evan Czaplicki
a3a7b3ef62 Refactor type environment
Migrate some functions to Environment.hs, add built-in types like _List
and _Tuple2.
2013-07-17 19:29:27 +02:00
Evan Czaplicki
8145e600fc Create MetadataModule for more refined information about modules
Used in most places to break a module into more orthogonal components.
Some of this data needs to be serialized into the interface files.
2013-07-16 21:42:37 +02:00
Evan Czaplicki
ce357b3d0d Switch to reporting errors with [Doc] for prettier layout. 2013-07-16 14:52:50 +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