summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/ghci016.hs
blob: 0c86f02d0f41d8665bb714d4ef6b587cbc4bf274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- Test for trac #552

module Test where

default (T)

data T = T
    deriving (Eq, Show)

instance Num T where
    fromInteger _ = T
    (+)    = error "urk"
    (*)    = error "urk"
    abs    = error "urk"
    signum = error "urk"
    negate = error "urk"

-- Typing 3 at the ghci prompt should print T