on master help sign in
Made Applicative a subclass of Functor.
e18fac5startling
lib/Prelude/Applicative.idr+2−1
@@ -1,12 +1,13 @@
1module Prelude.Applicative
1module Prelude.Applicative
2
2
3import Builtins
3import Builtins
4+import Prelude.Functor
4
5
5---- Applicative functors/Idioms
6---- Applicative functors/Idioms
6
7
7infixl 2 <$>
8infixl 2 <$>
8
9
9−class Applicative (f : Set -> Set) where
10+class Functor f => Applicative (f : Set -> Set) where
10 pure : a -> f a
11 pure : a -> f a
11 (<$>) : f (a -> b) -> f a -> f b
12 (<$>) : f (a -> b) -> f a -> f b
12
13