summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T16059e.hs
blob: ba4bff5f8c0b4ef0670b7fdb1bd099f47c84888b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE Haskell2010 #-}
module T16059e where

import T16059b

type Const a b = a

-- This is accepted, since the rank-n type `Foo` never makes it into the type
-- of `f` post-expansion...
f :: Const Int Foo -> Int
f _ = 42

-- ...but this *is* rejected, since `Foo` does make it into the type of `g`
-- post-expansion.
g :: Const Foo Foo -> Int
g _ = f 27