summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T7944.hs
blob: 7fa0e2d279ef738cbc273b3a8da8ea12bd006aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module T7944 where

import GHC.Exts

-- Force specialisation of "go"

-- This is more or less just an ordinary fold
go :: SPEC -> [a] -> IntMap a -> IntMap a
go SPEC [] m = m
go SPEC (_:xs) m
 = go SPEC xs
 -- This would be the "worker function" of the fold
 $ Unary m


-- Both constructors are necessary, despite only one being used
data IntMap a = Nil | Unary (IntMap a)