You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we used to have something to handle this. From the single definition, it would generate three rewrites:
piece True = 1
piece False = 0
forall x. piece x = case x of
True -> 1
False -> 0
I removed it at some point because the function-to-case conversion was buggy and lead to some strange stuff. Things are more mature now, so I could try adding it back.
Does that seem like the behavior you would expect?
Current retrie picks the first piece of a piecewise function definition when trying to unfold the funciton. For example, with this code
if I execute
retrie -u "Test.piece" --target-file Test.hs
, it returnswhich is not semantically same.
The text was updated successfully, but these errors were encountered: