summaryrefslogtreecommitdiff
path: root/testsuite/tests/rep-poly/T17817.hs
blob: b87178f909cf11bb6c111a3c79146b54d8f3e334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MagicHash #-}
module Bug where

import GHC.Exts ( TYPE, RuntimeRep(BoxedRep), Levity
                , Weak#, State#, RealWorld, mkWeak#
                )

primop :: forall (l :: Levity) (a :: TYPE ('BoxedRep l)) b c.
          a -> b -> (State# RealWorld -> (# State# RealWorld, c #))
       -> State# RealWorld -> (# State# RealWorld, Weak# b #)
primop = mkWeak#