With this PR, the top level function definitions with pattern matching will be transformed into a equivalent one starting with a match in function body
Top level function definition with no pattern:
f = expr
will remain unchanged
Top level function definition with one pattern:
f a = expr
will be desugered to:
f x = match x with
a -> expr
Top level function definition with no less than two patterns:
f (x1,x2) (y1,y2) = expr
will be desugered to:
f v1 v2 = match (v1, v2) with
((x1,x2), (y1,y2))-> expr
Note: Should fail building until pull#116 is merged
I'm going to close this, since it works on src/Front/Pattern/Desugar.hs, and that is now moved to the back-end. This desugaring should be done elsewhere.
With this PR, the top level function definitions with pattern matching will be transformed into a equivalent one starting with a match in function body
Note: Should fail building until pull#116 is merged