summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T17817_elab.hs
blob: 7c0b09a98cf48cf24e9d6de71fa8282025ae1099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Same as T17817, but we compile with -fprint-typechecker-elaboration.
{-# 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#