Skip to content

Constraint scoping is wrong when using top-level splices

I claim this program should work:

top :: Ord a => a -> a -> Ordering                                              
top = $$([|| compare ||])   

because the following program works

top :: (a -> a -> Ordering) -> a -> a -> Ordering                               
top c = $$([|| c ||])  

Related to #17220

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information