File tree 3 files changed +20
-3
lines changed
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Type Class Instances
6
6
7
+ instance altArray :: Alt Prim.Array
8
+
7
9
instance alternativeArray :: Alternative Prim.Array
8
10
9
11
instance applicativeArray :: Applicative Prim.Array
16
18
17
19
instance monadArray :: Monad Prim.Array
18
20
21
+ instance monadPlusArray :: MonadPlus Prim.Array
22
+
23
+ instance plusArray :: Plus Prim.Array
24
+
19
25
instance semigroupArray :: Semigroup [a]
20
26
21
27
Original file line number Diff line number Diff line change 18
18
" package.json"
19
19
],
20
20
"dependencies" : {
21
- "purescript-maybe" : " *"
21
+ "purescript-maybe" : " ~0.2.0" ,
22
+ "purescript-control" : " ~0.2.0"
22
23
}
23
24
}
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ module Data.Array
42
42
, span
43
43
) where
44
44
45
+ import Control.Alt
46
+ import Control.Plus
47
+ import Control.Alternative
48
+ import Control.MonadPlus
45
49
import Data.Maybe
46
50
import Prelude.Unsafe (unsafeIndex )
47
51
@@ -363,6 +367,12 @@ instance monadArray :: Monad []
363
367
instance semigroupArray :: Semigroup [a ] where
364
368
(<>) = append
365
369
366
- instance alternativeArray :: Alternative [] where
367
- empty = []
370
+ instance altArray :: Alt [] where
368
371
(<|>) = append
372
+
373
+ instance plusArray :: Plus [] where
374
+ empty = []
375
+
376
+ instance alternativeArray :: Alternative []
377
+
378
+ instance monadPlusArray :: MonadPlus []
You can’t perform that action at this time.
0 commit comments