Ticket #5458 (closed bug: fixed)
Phantom types confuse SpecConstr
Description
This program
type T a = Int
f :: T a -> Bool -> [Int]
f x b = case b of
True -> f x b
False -> x : f x (x > 19)
gave a Lint error in SpecConstr (use -O2). Reason: the specialised function was abstracted over x, but x's type mentions a phantom type variable a, and that wasn't being abstracted over.
Phantom type variables are a nuisance. A simple fix is to de-synonym the type of the abstracted variables.
Change History
Note: See
TracTickets for help on using
tickets.
