-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions #81
Add functions #81
Conversation
field/TinyLang/Field/Type.hs
Outdated
-- Types | ||
data Type uni f | ||
= BuiltIn (Some (TypeIn uni f)) | ||
| TyFun (Type uni f) (Type uni f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We parameterize Type
by uni
in Plutus, because we actually need the extensibility. We're not going to need it in Zonk any time soon and if we ever need it, it'll be straightforward to add. So just replace uni
with Uni
and have a single Type
instead of Type
+ UniType
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I simplified Type
. I was considering simplifying TypeIn
, but I will leave it as it is for now,
deriving instance Ord (UniType f) | ||
|
||
pattern Bool :: UniType f | ||
pattern Bool = UniType U.Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we often need this "quick access"? I'd be fine with using UniType Bool
explicitly instead of providing another term-level Bool
name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far we need it only in handful of places. Will see later about it.
by inlining Uni into Type definition.
Because we do not support functions in Typed.Core
Resolves #32
At the moment I started using Type instead of Uni in Raw.
Type
andUniType
.