[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_fail / tcfail044.hs
1 --!!! tcfail044: duplicated type variable in instance decls
2 --
3 module Main where
4
5 instance (Eq a) => Eq (a->a)
6  
7
8 instance (Num a) => Num (a->a) where
9     f + g    = \x -> f x + g x
10     negate f = \x -> - (f x)
11     f * g    = \x -> f x * g x
12     fromInteger n = \x -> fromInteger n
13
14 ss :: Float -> Float
15 cc :: Float -> Float
16 tt :: Float -> Float
17
18 ss = sin * sin
19 cc = cos * cos
20 tt = ss + cc
21
22 main _ = [AppendChan stdout ((show (tt 0.4))++ "  "++(show (tt 1.652)))]