summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T19665.hs
blob: a6ba719718be9bcdda717f44385016dadf71f28c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE ScopedTypeVariables, TypeApplications, TypeFamilies,
             RoleAnnotations, FlexibleContexts, AllowAmbiguousTypes #-}

-- See Note [Deriveds do rewrite Deriveds] in GHC.Tc.Types.Constraint
-- for commentary.

module T19665 where

import Data.Coerce

data T a
type role T nominal

type family F a

g :: forall b a. (F a ~ T a, Coercible (F a) (T b)) => ()
g = ()

f :: forall a. (F a ~ T a) => ()
f = g @a