summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T22331.hs
blob: 0454c97d7d62b63729434264b226433924f4cd8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TypeFamilies #-}

module T22331 where

import Data.Coerce

data family Fool a

-- This works
joe :: Coercible (Fool a) (Fool b) => Fool a -> Fool b
joe = coerce

-- This does not
bob :: Coercible (Fool a) (Fool b) => Fool b -> Fool a
bob = coerce