Skip to content

Commit 43e216a

Browse files
committed
Merge pull request #12 from joneshf/master
Added `($>)` and `(<$)`.
2 parents fe8fd04 + 016bb39 commit 43e216a

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# v0.2.0 Breaking change note
2-
3-
If you are have a conflict between `<|>` in `Prelude` and `Control.Alt` please update your `psc` to 0.5.4.1.
4-
5-
---
6-
71
# Module Documentation
82

93
## Module Control.Alt
@@ -94,6 +88,15 @@ If you are have a conflict between `<|>` in `Prelude` and `Control.Alt` please u
9488
duplicate :: forall a w. (Extend w) => w a -> w (w a)
9589

9690

91+
## Module Control.Functor
92+
93+
### Values
94+
95+
($>) :: forall f a b. (Functor f) => f a -> b -> f b
96+
97+
(<$) :: forall f a b. (Functor f) => a -> f b -> f a
98+
99+
97100
## Module Control.Lazy
98101

99102
### Type Classes
@@ -147,4 +150,4 @@ If you are have a conflict between `<|>` in `Prelude` and `Control.Alt` please u
147150
### Type Classes
148151

149152
class (Alt f) <= Plus f where
150-
empty :: forall a. f a
153+
empty :: forall a. f a

src/Control/Functor.purs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module Control.Functor where
2+
3+
infixl 4 <$
4+
infixl 4 $>
5+
6+
(<$) :: forall f a b. (Functor f) => a -> f b -> f a
7+
(<$) x f = const x <$> f
8+
9+
($>) :: forall f a b. (Functor f) => f a -> b -> f b
10+
($>) f x = const x <$> f

0 commit comments

Comments
 (0)