summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T14561.hs
blob: 4be0812c685338e6665de947d8ece2e24989ec6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE MagicHash #-}

module T14561 where

import GHC.Types
import Unsafe.Coerce

badId :: forall r (a :: TYPE r). a -> a
badId = unsafeCoerce#
-- Un-saturated application of a levity-polymorphic
-- function that must be eta-expanded

goodId :: forall (a :: Type). a -> a
goodId = unsafeCoerce#
-- But this one is OK