0 | ||| Interface implementations for lazy values.
 1 | ||| This module should be imported when automatically
 2 | ||| deriving interface implementations of data types
 3 | ||| containing `Lazy` fields.
 4 | module Data.Lazy
 5 |
 6 | %default total
 7 |
 8 | public export
 9 | Eq a => Eq (Lazy a) where
10 |   x == y = x == y
11 |
12 | public export
13 | Ord a => Ord (Lazy a) where
14 |   compare x y = compare x y
15 |
16 | public export
17 | Semigroup a => Semigroup (Lazy a) where
18 |   x <+> y = x <+> y
19 |
20 | public export
21 | Monoid a => Monoid (Lazy a) where
22 |   neutral = neutral
23 |
24 | public export
25 | Show a => Show (Lazy a) where
26 |   showPrec p a = showPrec p a
27 |
28 | public export
29 | Num a => Num (Lazy a) where
30 |   a + b = a + b
31 |   a * b = a * b
32 |   fromInteger n = fromInteger n
33 |
34 | public export
35 | Neg a => Neg (Lazy a) where
36 |   negate a = negate a
37 |   a - b = a - b
38 |
39 | public export
40 | Abs a => Abs (Lazy a) where
41 |   abs a = abs a
42 |
43 | public export
44 | Fractional a => Fractional (Lazy a) where
45 |   a / b = a / b
46 |   recip a = recip a
47 |
48 | public export
49 | Integral a => Integral (Lazy a) where
50 |   a `mod` b = a `mod` b
51 |   a `div` b = a `div` b
52 |