Skip to content

Commit

Permalink
Remove unused type variables
Browse files Browse the repository at this point in the history
  • Loading branch information
garyb committed Sep 16, 2015
1 parent de404c2 commit a46b635
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/Control/Comonad/Env/Class.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Laws:

- `ask (local f x) = f (ask x)`
- `extract (local _ x) = extract a`
- `extend g (local f x) = extend (g <<< local f) x`
- `extend g (local f x) = extend (g <<< local f) x`

##### Instances
``` purescript
Expand All @@ -33,7 +33,7 @@ instance comonadEnvEnvT :: (Comonad w) => ComonadEnv e (EnvT e w)
#### `asks`

``` purescript
asks :: forall e1 e2 w a. (ComonadEnv e1 w) => (e1 -> e2) -> w e1 -> e2
asks :: forall e1 e2 w. (ComonadEnv e1 w) => (e1 -> e2) -> w e1 -> e2
```

Get a value which depends on the environment.
Expand Down
2 changes: 1 addition & 1 deletion docs/Control/Comonad/Traced/Class.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Get a value which depends on the current position.
#### `censor`

``` purescript
censor :: forall w a t b. (Functor w) => (t -> t) -> TracedT t w a -> TracedT t w a
censor :: forall w a t. (Functor w) => (t -> t) -> TracedT t w a -> TracedT t w a
```

Apply a function to the current position.
Expand Down
2 changes: 1 addition & 1 deletion docs/Control/Monad/Reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run a computation in the `Reader` monad.
#### `withReader`

``` purescript
withReader :: forall r1 r2 a b. (r2 -> r1) -> Reader r1 a -> Reader r2 a
withReader :: forall r1 r2 a. (r2 -> r1) -> Reader r1 a -> Reader r2 a
```

Change the type of the context in a `Reader` monad action.
Expand Down
2 changes: 1 addition & 1 deletion docs/Control/Monad/Reader/Trans.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Change the type of the result in a `ReaderT` monad action.
#### `withReaderT`

``` purescript
withReaderT :: forall r1 r2 m a b. (r2 -> r1) -> ReaderT r1 m a -> ReaderT r2 m a
withReaderT :: forall r1 r2 m a. (r2 -> r1) -> ReaderT r1 m a -> ReaderT r2 m a
```

Change the type of the context in a `ReaderT` monad action.
Expand Down
2 changes: 1 addition & 1 deletion docs/Control/Monad/Writer/Class.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Laws:
#### `tell`

``` purescript
tell :: forall w m a. (Monoid w, Monad m, MonadWriter w m) => w -> m Unit
tell :: forall w m. (Monoid w, Monad m, MonadWriter w m) => w -> m Unit
```

Append a value to the accumulator.
Expand Down
6 changes: 3 additions & 3 deletions src/Control/Comonad/Env/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import Data.Tuple
-- |
-- | - `ask (local f x) = f (ask x)`
-- | - `extract (local _ x) = extract a`
-- | - `extend g (local f x) = extend (g <<< local f) x`
-- | - `extend g (local f x) = extend (g <<< local f) x`
class (Comonad w) <= ComonadEnv e w where
ask :: forall a. w a -> e
local :: forall a. (e -> e) -> w a -> w a

-- | Get a value which depends on the environment.
asks :: forall e1 e2 w a. (ComonadEnv e1 w) => (e1 -> e2) -> w e1 -> e2
asks :: forall e1 e2 w. (ComonadEnv e1 w) => (e1 -> e2) -> w e1 -> e2
asks f x = f $ ask x

instance comonadEnvTuple :: ComonadEnv e (Tuple e) where
Expand Down
6 changes: 3 additions & 3 deletions src/Control/Comonad/Traced/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class (Comonad w) <= ComonadTraced t w where
-- | Extracts a value at a relative position which depends on the current value.
tracks :: forall w a t. (Comonad w, ComonadTraced t w) => (a -> t) -> w a -> a
tracks f w = track (f $ extract w) w

-- | Get the current position.
listen :: forall w a t. (Functor w) => TracedT t w a -> TracedT t w (Tuple a t)
listen tr = TracedT ((\f t -> Tuple (f t) t) <$> runTracedT tr)
Expand All @@ -44,8 +44,8 @@ listens :: forall w a t b. (Functor w) => (t -> b) -> TracedT t w a -> TracedT t
listens f tr = TracedT ((\g t -> Tuple (g t) (f t)) <$> runTracedT tr)

-- | Apply a function to the current position.
censor :: forall w a t b. (Functor w) => (t -> t) -> TracedT t w a -> TracedT t w a
censor :: forall w a t. (Functor w) => (t -> t) -> TracedT t w a -> TracedT t w a
censor f tr = TracedT ((>>>) f <$> runTracedT tr)

instance comonadTracedTracedT :: (Comonad w, Monoid t) => ComonadTraced t (TracedT t w) where
track t tr = extract (runTracedT tr) t
track t tr = extract (runTracedT tr) t
4 changes: 2 additions & 2 deletions src/Control/Monad/Reader.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- | This module defines the `Reader` monad.

module Control.Monad.Reader
module Control.Monad.Reader
( Reader()
, runReader
, mapReader
Expand All @@ -24,7 +24,7 @@ runReader :: forall r a. Reader r a -> r -> a
runReader m = runIdentity <<< runReaderT m

-- | Change the type of the context in a `Reader` monad action.
withReader :: forall r1 r2 a b. (r2 -> r1) -> Reader r1 a -> Reader r2 a
withReader :: forall r1 r2 a. (r2 -> r1) -> Reader r1 a -> Reader r2 a
withReader = withReaderT

-- | Change the type of the result in a `Reader` monad action.
Expand Down
6 changes: 3 additions & 3 deletions src/Control/Monad/Reader/Trans.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- | This module defines the reader monad transformer, `ReaderT`.

module Control.Monad.Reader.Trans
module Control.Monad.Reader.Trans
( ReaderT(..), runReaderT, withReaderT, mapReaderT
, module Control.Monad.Trans
, module Control.Monad.Reader.Class
Expand Down Expand Up @@ -42,7 +42,7 @@ mapReaderT :: forall r m1 m2 a b. (m1 a -> m2 b) -> ReaderT r m1 a -> ReaderT r
mapReaderT f m = ReaderT $ f <<< runReaderT m

-- | Change the type of the context in a `ReaderT` monad action.
withReaderT :: forall r1 r2 m a b. (r2 -> r1) -> ReaderT r1 m a -> ReaderT r2 m a
withReaderT :: forall r1 r2 m a. (r2 -> r1) -> ReaderT r1 m a -> ReaderT r2 m a
withReaderT f m = ReaderT $ runReaderT m <<< f

instance functorReaderT :: (Functor m) => Functor (ReaderT r m) where
Expand Down Expand Up @@ -90,7 +90,7 @@ instance monadReaderReaderT :: (Monad m) => MonadReader r (ReaderT r m) where

instance monadStateReaderT :: (MonadState s m) => MonadState s (ReaderT r m) where
state f = lift (state f)

instance monadWriterReaderT :: (Monad m, MonadWriter w m) => MonadWriter w (ReaderT r m) where
writer wd = lift (writer wd)
listen = mapReaderT listen
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Monad/Writer/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class (Monad m) <= MonadWriter w m where
pass :: forall a. m (Tuple a (w -> w)) -> m a

-- | Append a value to the accumulator.
tell :: forall w m a. (Monoid w, Monad m, MonadWriter w m) => w -> m Unit
tell :: forall w m. (Monoid w, Monad m, MonadWriter w m) => w -> m Unit
tell w = writer $ Tuple unit w

-- | Read a value which depends on the modifications made to the accumulator during an action.
Expand Down

0 comments on commit a46b635

Please sign in to comment.