summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T19709b.hs
blob: afc9ed576983bc9dec9e7cf121eecddc80787a6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE TemplateHaskell, ExplicitForAll, PolyKinds, TypeApplications #-}

module T19709b where

import GHC.Exts
import Language.Haskell.TH

$( let levfun :: forall (r :: RuntimeRep) (a :: TYPE r). a -> ()
       levfun = error "e1"  -- NB: this, so far, is OK: no levity-polymorphic binder

   in levfun (error @Any "e2")  -- but this is very naughty: levity-polymorphic argument
      `seq` return [] )