1 {- This program shows up a bug in the handling of
2 the monomorphism restriction in an earlier version of
3 ghc. With ghc 0.18 and before, f gets a type with
4 an unbound type variable, which shows up in the
5 interface file. Reason: it was being monomorphised.
13 g :: Num a => Bool -> a -> b -> a
14 g b x y = if b then x+x else x-x
16 -- Everything is ok if this signature is put in
17 -- but the program should be perfectly legal without it.
18 -- f :: Num a => a -> b -> a
22 -- This use of f binds the overloaded monomorphic