gelisam / klister

an implementation of stuck macros
BSD 3-Clause "New" or "Revised" License
132 stars 11 forks source link

Fix variable binding in type patterns #147

Closed gelisam closed 2 years ago

gelisam commented 2 years ago

When using the pattern (-> a b), both a and b were bound to the same type! The cause was using list comprehension instead of parallel list comprehension ([(x,y) | x <- ..., y <- ...] instead of [(x,y) | x <- ... | y <- ...]), thus resulting in the list [(x1,y1), (x1,y2), (x2,y1), (x2,y2)] instead of [(x1,y1), (x2,y2)].

david-christiansen commented 2 years ago

Nice catch!