Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
123 stars 63 forks source link

Application from and to perror should be compilable #649

Closed SeungheonOh closed 7 months ago

SeungheonOh commented 7 months ago

Currently, below fails at compile, applications that has either perror as function or perror as argument fails at compile time. However, since these have valid UPLC form that can be generated, this should work.

compile $ pfoo # perror 
compile $ perror # pfoo
L-as commented 7 months ago

Why make this not err? This is almost certainly a mistake if ever found in your code. You could have another application operator that doesn't err.

SeungheonOh commented 7 months ago

Application from and to an error term is a valid expression in UPLC. It's unreasonable to prevent that by throwing up during compile time, like plam id # perror shouldn't fail, it's just perror anyways. I'm not sure what mistakes can be made from here.