-
Notifications
You must be signed in to change notification settings - Fork 483
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
Is there nil :: BuiltinList a value? #4294
Comments
Polymorphic builtin types are generally quite limited: don't use them unless you have to. If you're interested, you can read https://github.com/input-output-hk/plutus/blob/master/plutus-core/plutus-core/src/PlutusCore/Constant/Typed.hs#L317 |
Wouldn't nil :: forall. BuiltinProxy a -> BuiltinList a
nil _ = BuiltinList []
{-# NOINLINE nil #-}
newtype BuiltinProxy a = BuiltinProxy BuiltinUnit work? EDIT: looks like that's what proposed at the end of that comment. I think you should investigate that. EDIT2: The builtin type is obscure. Does it means types in |
otoh, I think |
No.
Lots of other higher-priority tasks. It does sound like it would be nice to add
Yes.
It's an oversight that |
I meant there doesn't seem to be a problem to make a binding for polymorphic (IMO making error a |
Ah, yeah, that wouldn't be a problem. But then we'd have some builtins in the universe and some as constructors and that is silly. Why have the whole extensible built-in functions machinery, if we're going to hardcode particular builtins anyway.
Why not? Maybe some hypothetical blockchain doesn't want the implicit |
Can builtin functions be partial at the moment? |
Yes, we have lots of those: |
An update: at some point we've realized that this point from the original message:
should've crossed our minds when we added the monomorphic However while it may seem like a good idea to try use Relevant docs are here (same link as above, except not broken). Low priority, but something that is worth looking into at some point. |
We've added a somewhat general |
Describe the feature you'd like
It's possible to write such term, just making an empty list constant.
But if I want to use
plutus-tx
, how I would get such value?PlutusTx.Builtins.Internal
has specialized variants, and these don't seem right. (Why useBuiltinFun
whenConstant
would be enough?)Describe alternatives you've considered
No response
The text was updated successfully, but these errors were encountered: