summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/OpaqueNoSpecConstr.hs
blob: e0c1617923b9de421149a21a0480d43bd201970b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module OpaqueNoSpecConstr where

import GHC.Exts ( SpecConstrAnnotation(..) )

data SPEC = SPEC | SPEC2
{-# ANN type SPEC ForceSpecConstr #-}

-- Would normally induce a SpecConstr on the constructors of SPEC
loop :: SPEC -> [Int] -> [Int] -> [Int]
loop SPEC z [] = z
loop SPEC z (x:xs) = loop SPEC (x:z) xs
{-# OPAQUE loop #-}