summaryrefslogtreecommitdiff
path: root/hl.hs
blob: 6273b5ff25bd264384d9b28eb2190a93d8329341 (plain)
1
2
3
4
5
6
7
8
data HL = HL Float Float

instance Eq HL where
    (==) (HL a1 b1) (HL a2 b2) = a1*b1==a2*b2

instance Show HL where
    show (HL a b) = (show a) ++ ":" ++ (show b) ++ "->"
        ++ (show $ sqrt(a**2+b**2))