1 module ShouldCompile where
3 -- !!! Another bug in overloaded n+k patts
6 main = print ((4::Int) ^^^^ (6::Int))
8 (^^^^) :: (Num a, Integral b) => a -> b -> a
10 x ^^^^ (n+1) = f x n x
13 g x n | even n = g (x*x) (n `quot` 2)
14 | otherwise = f x (n-1) (x*y)
15 _ ^^^^ _ = error "(^^^^){Prelude}: negative exponent"