diff options
Diffstat (limited to 'testsuite/tests/rename/should_fail/T5211.hs')
-rw-r--r-- | testsuite/tests/rename/should_fail/T5211.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T5211.hs b/testsuite/tests/rename/should_fail/T5211.hs new file mode 100644 index 0000000000..2d0e69af7b --- /dev/null +++ b/testsuite/tests/rename/should_fail/T5211.hs @@ -0,0 +1,16 @@ +{-# OPTIONS_GHC -fwarn-unused-imports #-}
+module RedundantImport where
+
+-- this import is redundant, but GHC does not spot it
+import qualified Foreign.Storable
+
+import Foreign.Storable (Storable, sizeOf, alignment, peek, poke, )
+import Foreign.Ptr (castPtr, )
+
+newtype T a = Cons a
+
+instance Storable a => Storable (T a) where
+ sizeOf (Cons a) = sizeOf a
+ alignment (Cons a) = alignment a
+ peek = fmap Cons . peek . castPtr
+ poke p (Cons a) = poke (castPtr p) a
|