blob: 8927ea17df3ca50a85544727f75db28e81ad43a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
module T18170c where
import Language.Haskell.TH.Lib
import GHC.Exts
import GHC.Types
import Unsafe.Coerce
-- Representation-polymorphism should be allowed here
-- as long as 'r1' is monomorphised at splice site.
repPolyApp
:: forall r1 r2 (a :: TYPE r1) (b :: TYPE r2)
. CodeQ ( (a -> b) -> a -> b )
repPolyApp = [|| \ f x -> f x ||]
|