blob: eb9b72512b2fa2f65dc3037a19ea4cfd3ebded9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE RoleAnnotations, RankNTypes, ScopedTypeVariables #-}
import Data.Coerce (coerce, Coercible)
newtype List a = List [a]
data T f = T (f Int)
newtype NT1 a = NT1 (a -> Int)
newtype NT2 a = NT2 (a -> Int)
foo :: T NT1 -> T NT2
foo = coerce
main = return ()
|