-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We used to have two indications of a builtins type: - `Sig i o`, which just provided the arity - `BuiltinType i`, which is a closure that checks the type However, since `Sig` just indicates the arity, it doesn't give us quite enough information to render the capabilities doc as described in #224. In this refactor, I extended `Sig` to `TypeRepr` and made it hold more information: an actual deep embedding of the types. I also moved this new type into `BuiltinType` (which is now a record). This allows convenient construction of _both_ `TypeRepr` and the checker closure using `🡒` and `out`.
- Loading branch information
1 parent
3c0bc89
commit 880789c
Showing
15 changed files
with
249 additions
and
270 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ module Fregot.Builtins | |
( ToVal (..) | ||
, FromVal (..) | ||
|
||
, Sig (..) | ||
|
||
, Args (..) | ||
, toArgs | ||
|
||
|
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.