Ticket #61 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Desugaring pattern matches with guards is broken

Reported by: benl Owned by: benl
Priority: blocker Milestone: 0.1.3
Component: Source Desugarer Version: 0.1.2
Keywords: Cc:

Description

For this program:

main () = f (1, 2)
 
f :: (Int, Int) -> ()
f (a, b) | a == b	= putStr "yep"
f (a, b)		= putStr "no

We get a pattern matching failure instead of "nope".

After the desugarer appends two cases from the two equations for 'f', it still needs to merge the common tuple match.

Test is T61-GuardDesugar

Change History

Changed 5 years ago by benl

  • owner set to benl
  • status changed from new to assigned

Changed 5 years ago by benl

  • version set to 0.1.2

Changed 5 years ago by anonymous

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.