Replies: 2 comments 1 reply
-
I guess you can create a Wait.. Nevermind. Just realized that you used the same name of your module pkl files 🙈 |
Beta Was this translation helpful? Give feedback.
-
... sets of a few low-level alarm bells, though. Are you absolutely sure people need to
Your presumption is correct. We're working on improving that, but It's Complicated™.
Why is this ugly? Okay, you bind a name, which you might have been able to do without, but is that prohibitive? |
Beta Was this translation helpful? Give feedback.
-
I'm currently working on a Pkl-based DSL for an internal tool at work, where we have many
abstract class
es with concrete implementations the user is intended to pull in. I want to make it easier for our users to do this. Consider the following:I first tried doing this:
However Pkl told me that I can't use
local
s as types. Then I triedtypealias
, like this:This one fails with a cryptic "No viable alternative" error, which I presume comes from ANTLR. Right now, I have to resort to this:
Which works, but is ugly. Would it be possible to allow
import()
calls intypealias
es? Is it a good idea?Beta Was this translation helpful? Give feedback.
All reactions