3c3acd699a416802435c9e5ce4cb4a06333d3eb4
[ghc-hetmet.git] / ghc / tests / codeGen / should_compile / cg001.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 module ShouldCompile where
4
5 import PrelGHC
6
7 data STRef s a = STRef (MutVar# s a)
8
9 -- ghc 4.08 had a problem with returning a MutVar#.
10
11 from :: STRef s a -> MutVar# s a
12 from (STRef x) = x
13
14 to :: MutVar# s a -> STRef s a
15 to x = STRef x