summaryrefslogtreecommitdiff
path: root/test/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Main.hs')
-rw-r--r--test/Main.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Main.hs b/test/Main.hs
index f2ebfa2..d314ed4 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -9,6 +9,9 @@ import InitOnce
globalRef :: IORef Int
globalRef = $$(once [|| newIORef 0 ||])
+-- wrong :: Typeable a => IORef [a] -- does not typecheck: no instance Typeable a
+-- wrong = $$(once [|| newIORef [] ||])
+
{-# NOINLINE foo #-}
foo :: IO String
foo = atomicModifyIORef' globalRef (\i -> (i + 1, show i))