summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs')
-rw-r--r--testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs b/testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs
new file mode 100644
index 0000000000..129c2c4b56
--- /dev/null
+++ b/testsuite/tests/safeHaskell/safeLanguage/SafeLang09_A.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE FlexibleInstances #-}
+
+-- | Trusted library that unsafe plugins can use
+module SafeLang09_A where
+
+class Pos a where
+ res :: a -> Bool
+
+-- Any call to res with a list in out TCB
+-- should use this method and never a more
+-- specific one provided by an untrusted module
+instance Pos [a] where
+ res _ = True
+
+