This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree 2 files changed +24
-9
lines changed
2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Module Data.Inject
4
4
5
- ### Type Classes
5
+ #### ` Inject `
6
6
7
- class Inject f g where
8
- inj :: forall a. f a -> g a
9
- prj :: forall a. g a -> Maybe (f a)
7
+ ``` purescript
8
+ class Inject f g where
9
+ inj :: forall a. f a -> g a
10
+ prj :: forall a. g a -> Maybe (f a)
11
+ ```
10
12
11
13
12
- ### Type Class Instances
14
+ #### ` injectReflexive `
13
15
14
- instance injectLeft :: Inject f (Coproduct f g)
16
+ ``` purescript
17
+ instance injectReflexive :: Inject f f
18
+ ```
15
19
16
- instance injectReflexive :: Inject f f
17
20
18
- instance injectRight :: (Inject f g) => Inject f (Coproduct h g)
21
+ #### ` injectLeft `
22
+
23
+ ``` purescript
24
+ instance injectLeft :: Inject f (Coproduct f g)
25
+ ```
26
+
27
+
28
+ #### ` injectRight `
29
+
30
+ ``` purescript
31
+ instance injectRight :: (Inject f g) => Inject f (Coproduct h g)
32
+ ```
33
+
19
34
20
35
21
36
Original file line number Diff line number Diff line change 14
14
" dist"
15
15
],
16
16
"dependencies" : {
17
- "purescript-coproducts" : " ~0.2 .0" ,
17
+ "purescript-coproducts" : " ~0.3 .0" ,
18
18
"purescript-either" : " ~0.1.4" ,
19
19
"purescript-maybe" : " ~0.2.1"
20
20
}
You can’t perform that action at this time.
0 commit comments