summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T19586.hs
blob: 7cce9f368d7b35e989dab7acd717217575308c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Don't warn about specialization failures for class ops.

{-# OPTIONS_GHC -O -Wall-missed-specialisations #-}
module T19586 where

type MyConstraint a b = (Show a, Enum b, Show b)

foo :: MyConstraint a b => Int -> a -> b -> (String, String)
foo 0 x y = (show x, show . succ $ y)
foo n x y = foo (n-1) x y


bar :: Int -> Char -> (String, String)
bar x y = foo x x y