quangis / transforge

Describe processes as type transformations, with inference that supports subtypes and parametric polymorphism. Create and query corresponding transformation graphs.
GNU General Public License v3.0
2 stars 0 forks source link

Could not satisfy subtype `Top` <= `Nom`. #108

Closed nsbgn closed 2 years ago

nsbgn commented 2 years ago

Solutions 83, 84, 87, 111, 112 (and more) from https://github.com/quangis/quangis-workflow-generator have the following issue:

Could not satisfy subtype Top <= Nom.

This suggests to me that parsing as _ as Top type was probably a mistake.

nsbgn commented 2 years ago

My intuition seems correct as the following simple test will reproduce the problem:

A = TypeOperator()
(A ** A).apply(Top)

This should fail, and it does. You can't apply a function that takes an A to a value that can be essentially anything. But of course, had we tried to supply a variable, this would have been fine. So we must parse _ as a variable and revert 8d2135e84d1504311787590df34ff8f73f2b4ab5, which was a shortsighted solution.

nsbgn commented 2 years ago

The tool descriptions still error out with 'encountered variable'