diff options
| author | Tom Smeding <tom@tomsmeding.com> | 2026-07-02 00:08:31 +0200 |
|---|---|---|
| committer | Tom Smeding <tom@tomsmeding.com> | 2026-07-02 00:08:31 +0200 |
| commit | fab30ebbff962e1444a6a6482b9f54283bfd2f2a (patch) | |
| tree | 23616fb68d11820563b94ac2b9722e9f053e733a /test/Main.hs | |
| parent | c332a4e4b2f26cfd388e036f60dbef3162e5059d (diff) | |
Add wrong :: IORef [a] that doesn't typecheck
Diffstat (limited to 'test/Main.hs')
| -rw-r--r-- | test/Main.hs | 3 |
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)) |
