Skip to content

Commit

Permalink
Merge pull request #12 from joneshf/master
Browse files Browse the repository at this point in the history
Added `($>)` and `(<$)`.
  • Loading branch information
paf31 committed Nov 13, 2014
2 parents fe8fd04 + 016bb39 commit 43e216a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# v0.2.0 Breaking change note

If you are have a conflict between `<|>` in `Prelude` and `Control.Alt` please update your `psc` to 0.5.4.1.

---

# Module Documentation

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


## Module Control.Functor

### Values

($>) :: forall f a b. (Functor f) => f a -> b -> f b

(<$) :: forall f a b. (Functor f) => a -> f b -> f a


## Module Control.Lazy

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

class (Alt f) <= Plus f where
empty :: forall a. f a
empty :: forall a. f a
10 changes: 10 additions & 0 deletions src/Control/Functor.purs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Control.Functor where

infixl 4 <$
infixl 4 $>

(<$) :: forall f a b. (Functor f) => a -> f b -> f a
(<$) x f = const x <$> f

($>) :: forall f a b. (Functor f) => f a -> b -> f b
($>) f x = const x <$> f

0 comments on commit 43e216a

Please sign in to comment.