summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T7173.hs
blob: 231b18bc192789f9e581d035af062a8d68e950cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module T7173 where


-- se and sb are mutually recursive
--   se takes a numeric parameter (which it ignores)
--   sb passes it a constant 10
--
-- so sb :: Num a => ...type not involving a...
--
-- So the ambiguity check must default ambiguous p, 
-- rather than complaining that sb is ambiguous.

showEnv' env t = se 10 env t 
 where
   se p env (Bind n b sc) = sb env n b
   sb env n t             = se 10 env t

data TT n = Bind n (TT n) (TT n)