summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeLanguage/SafeLang10_B.hs
blob: d9a8f63f506b14beb24e96c00772d1f5fcbec06d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Safe #-}

-- Untrusted plugin! Don't wan't it changing behaviour of our
-- trusted code
module SafeLang10_B where

import SafeLang10_A

instance {-# OVERLAPPABLE #-} Pos a where
    res _ = False

instance {-# OVERLAPPING #-} Pos [Int] where
    res _ = error "This curry is poisoned!"

function :: Int
function = 3