Commit Graph

3454 Commits

Author SHA1 Message Date
Iavor Diatchki
bdb0e12519 Relax the requirement that schemes match exactly. 2022-05-27 14:49:12 -07:00
Iavor Diatchki
bfc1633378 Change representation of type parameters: now they are abstrct types instead of type variables 2022-05-26 15:10:58 -07:00
Iavor Diatchki
77247be0af Actually emit the constraints arising from the signature
newGoal just makes a goal!
2022-05-26 10:25:36 -07:00
Iavor Diatchki
d8d100dac7 Correct the module path when renaming 2022-05-25 14:54:05 -07:00
Iavor Diatchki
8328a21203 Updates to checking module parameter types 2022-05-25 14:42:21 -07:00
Iavor Diatchki
07e3014fd7 Add forgotten primitives to the definitions of a module 2022-05-25 11:40:54 -07:00
Iavor Diatchki
62c9cdca84 Check value parameters 2022-05-25 11:11:30 -07:00
Iavor Diatchki
99d8140263 Add constraints 2022-05-24 17:12:04 -07:00
Iavor Diatchki
c74442dd4e Checkpoing: checking type-level module parmameters 2022-05-24 16:25:32 -07:00
Iavor Diatchki
c0b0eae431 Correct error locations when resolving instances 2022-04-14 14:58:02 -07:00
Iavor Diatchki
297d41049e Do more validation on instances in renamer 2022-04-14 14:50:21 -07:00
Iavor Diatchki
a20f31cac9 Stuff to get information about modules
This is in prep for type-checking functor instantiations
2022-04-14 12:39:58 -07:00
Iavor Diatchki
858126e303 Just a comment 2022-04-14 10:56:18 -07:00
Iavor Diatchki
bd5ff17404 Correct the original name when instantiating 2022-04-14 10:45:42 -07:00
Iavor Diatchki
43b837f902 Updates to interfaces
Interfaces are mostly flat, except for functors
   - this means that one can work with them without needing to know
     about nested modules
   - added a new type `IfaceNames` to record the nesting structure of names
     this is needed when the interfaces are used in imports
   - functors are kept hierarchical.  that's because the names in functors
     are not really in scope until they get instantiated.
2022-04-14 10:45:25 -07:00
Iavor Diatchki
d4ec64fedc Pass in loaded modules to the type checker 2022-04-12 10:52:46 -07:00
Iavor Diatchki
c4cb1c222e Placeholder, and comments 2022-04-11 16:24:38 -07:00
Iavor Diatchki
9388335652 Make the instance map contain instantiation for all nested things.
(this somehow got undone in last commit)
2022-04-11 15:51:46 -07:00
Iavor Diatchki
9a9a403dcd Nicer pretty prinitng of instances 2022-04-11 15:51:22 -07:00
Iavor Diatchki
7ac34cf3fd Redo to not use modExports 2022-04-11 15:34:39 -07:00
Iavor Diatchki
ef4372f2f0 Comments 2022-04-11 15:34:25 -07:00
Iavor Diatchki
84653f7aa6 Don't crash if recordImport sees a local name--it's a dummy due to an error 2022-04-11 15:33:46 -07:00
Iavor Diatchki
94315bb1c8 Add functions that return Maybe instead of crashing 2022-04-11 15:32:44 -07:00
Iavor Diatchki
c98e69b640 Separate cases for different flavors of module 2022-04-11 10:48:59 -07:00
Iavor Diatchki
a6d0b8fb4b Clarification 2022-04-11 10:48:38 -07:00
Iavor Diatchki
0c2a62af03 Important thing to fix 2022-04-11 10:48:15 -07:00
Iavor Diatchki
bf16f74883 Only export public names 2022-04-11 10:37:12 -07:00
Iavor Diatchki
dfd9697cb7 Store functor instantiations in the AST and other fixes 2022-04-11 09:46:40 -07:00
Iavor Diatchki
a59d1ef12b More pretty printing improvements 2022-04-08 14:02:48 -07:00
Iavor Diatchki
f8be29e8f1 Renamer fixes and missing bits 2022-04-08 13:09:14 -07:00
Iavor Diatchki
4fd9834a79 Don't discard module instnaces 2022-04-08 13:07:54 -07:00
Iavor Diatchki
921b813f83 Bugfix, use the correct module state 2022-04-08 13:07:40 -07:00
Iavor Diatchki
464b505ed5 Pretty prinitng fixes 2022-04-08 13:07:18 -07:00
Iavor Diatchki
938ebf6525 Find public declarations 2022-04-08 13:06:59 -07:00
Iavor Diatchki
ad9e8f7cf5 Access resolved only after it's been computed. 2022-04-07 15:40:09 -07:00
Iavor Diatchki
b97459584e Eliminate WithExtra, and just use the RenamerMonad 2022-04-07 15:35:44 -07:00
Iavor Diatchki
cff5ed4766 Checkpoint: more integration 2022-04-07 13:58:13 -07:00
Iavor Diatchki
c56ca1252d Checkpoint: compute scoping relations 2022-04-06 14:55:04 -07:00
Iavor Diatchki
3a1b757fb5 Tweaks to fit Imports with Renamer 2022-04-06 10:12:53 -07:00
Iavor Diatchki
841b768249 Use Renamer.Error in Renamer.Binds 2022-04-06 08:42:44 -07:00
Iavor Diatchki
906faaaf07 Change modBuilder to be more compatible with the Renamer monad 2022-04-06 08:31:12 -07:00
Iavor Diatchki
94676856c5 Propagate and convert information about loaded modules. 2022-04-05 16:44:53 -07:00
Iavor Diatchki
5ba4f69bea Comments 2022-04-05 13:34:16 -07:00
Iavor Diatchki
a89ffe6572 Entry point to import analyizer 2022-04-05 13:01:22 -07:00
Iavor Diatchki
6573cc61da Incremental progress:
* Move code for adding implicit imports to a separate module
  * Use the correct original name module path when instantiating functors
2022-04-05 09:49:57 -07:00
Iavor Diatchki
7bf3f66c7a Write down the plan for the renamer algorithm 2022-04-04 16:09:31 -07:00
Iavor Diatchki
42a62e9728 Comments and fixes to the fix-point algorithm. 2022-04-04 15:15:06 -07:00
Iavor Diatchki
26a1e32676 More precise types. Keep track in what order we resolved imports for next pass 2022-03-03 13:33:25 -08:00
Iavor Diatchki
7fbc42985c Separate new and old modules, keep track of signatures, so they get properly instantiated 2022-03-02 15:41:02 -08:00
Iavor Diatchki
6023083385 Compute module definitions in a form suitable for the import loop
computiation
2022-03-01 16:05:03 -08:00