This repository was archived by the owner on Oct 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 22
33## Module Data.Inject
44
5- ### Type Classes
5+ #### ` Inject `
66
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+ ```
1012
1113
12- ### Type Class Instances
14+ #### ` injectReflexive `
1315
14- instance injectLeft :: Inject f (Coproduct f g)
16+ ``` purescript
17+ instance injectReflexive :: Inject f f
18+ ```
1519
16- instance injectReflexive :: Inject f f
1720
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+
1934
2035
2136
Original file line number Diff line number Diff line change 1414 " dist"
1515 ],
1616 "dependencies" : {
17- "purescript-coproducts" : " ~0.2 .0" ,
17+ "purescript-coproducts" : " ~0.3 .0" ,
1818 "purescript-either" : " ~0.1.4" ,
1919 "purescript-maybe" : " ~0.2.1"
2020 }
You can’t perform that action at this time.
0 commit comments