summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs')
-rw-r--r--testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs
new file mode 100644
index 0000000000..5b9954c12e
--- /dev/null
+++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE OverlappingInstances #-}
+{-# LANGUAGE Safe #-}
+
+-- Untrusted plugin! Don't wan't it changing behaviour of our
+-- trusted code
+module SafeLang10_B where
+
+import SafeLang10_A
+
+instance Pos a where
+ res _ = False
+
+instance Pos [Int] where
+ res _ = error "This curry is poisoned!"
+
+function :: Int
+function = 3
+
+