diff options
Diffstat (limited to 'testsuite/tests/deSugar/should_run/DsStaticPointers.hs')
-rw-r--r-- | testsuite/tests/deSugar/should_run/DsStaticPointers.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/deSugar/should_run/DsStaticPointers.hs b/testsuite/tests/deSugar/should_run/DsStaticPointers.hs new file mode 100644 index 0000000000..7bc0265a41 --- /dev/null +++ b/testsuite/tests/deSugar/should_run/DsStaticPointers.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE StaticPointers #-} + +import Data.Typeable +import GHC.StaticPtr + +main = putStr $ unlines $ map show names + where + names = + [ -- unStaticPtr $ static g + staticName $ (static id :: StaticPtr (Int -> Int)) + -- , unStaticPtr $ static (&&) + , staticName $ (static t_field :: StaticPtr (T Int -> Int)) + ] + +g :: Int -> Int +g = id + +data T a = T { t_field :: a } + deriving Typeable |