Hey all, I'm just trying to problem solve something here. I want to have a type alias which consists of a tag union where the tag payload includes a function.
However, I've tried defining this type several ways without success. One example error message is as follows:
I am partway through parsing a type in parentheses, but I got stuck
here:
5│ FromOne (\a -> return) a
for the code:
ZeroArity return : [
FromOne (\a -> return) a
FromTwo (\a, b -> return) a b
]
Is there anyway to include a function as a tag payload?
No \
That is only for function definitions
Ahhh.. of course! Derp 🤦🏻♂️
ZeroArity a b return : [
FromOne (a -> return),
FromTwo (a, b -> return),
]
We need a better error for that. Totally worth filing a bug
Last updated: Jul 06 2025 at 12:14 UTC