summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/ghci/p13.script
blob: 0336061b0c3d80b4a55f672207380e86cc33fe72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
:set -XHaskell2010
-- Test restricted functionality: Overlapping
:unset +s
:set -XSafe
:set -XFlexibleInstances

:l P13_A

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

res [1::Int, 2::Int]
-- res 'c'
-- res ['c']