blob: 7295090439a844714a37ee17bf5a6226cc6d6033 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
{-# LANGUAGE TypeFamilies, GADTs, RankNTypes, ScopedTypeVariables #-}
module ShouldFail where
type family Const a
type instance Const a = ()
data T a where T :: a -> T (Const a)
coerce :: forall a b . a -> b
coerce x = case T x :: T (Const b) of
T y -> y
|