summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_compile/cg006.hs
blob: 4ae3f5a2e9e070887de1d5fb698904d91e012c36 (plain)
1
2
3
4
5
6
7
8
{-# LANGUAGE MagicHash #-}
module ShouldCompile where

-- exposed a bug in the NCG in 6.4.2
import GHC.Base
class Unboxable a where
    writeUnboxable :: MutableByteArray# RealWorld -> a -> State# RealWorld -> State# RealWorld
    writeUnboxable arr a s  =  writeInt8Array# arr 0# (intToInt8# (getTag 0)) s