[project @ 2001-08-22 11:45:06 by sewardj]
[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