-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move (most of) the type definitions for jkind into Types
Jkinds are morally mutually recursive with types, since jkinds can contain types (in the with-bounds) and types can be bounded on jkinds (eg for Tvar and Tunivar). We previously "broke up" this recursion with a type parameter for type_expr on the bits of Jkind.t that contain type_exprs, and by defining two modules, Jkind_types and Jkind - the first with the type parameter, and the second with the parameter instantiated to Types.type_expr. This has caused a lot of headache and confusion, is hard to follow (you lose jump-to-definition, among other things) and generally puts friction on algorithms for kinds that need to do things with type_exprs (which we're about to do a lot more, for normalizing of jkinds). Instead, this commit starts the (multi-stage) process of splitting up jkind, starting by just moving the type definitions (omitting sort and layout so far) into types.ml, in the same recursive type declaration as type_expr. This simplifies things a /lot/, without really losing much in terms of things being broken up (the algorithms are still just defined in jkind.ml)!
- Loading branch information
1 parent
5ce9f8b
commit eee30df
Showing
8 changed files
with
511 additions
and
584 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.