Skip to content

Commit bb24c13

Browse files
committed
Remove Ref instance
1 parent 85a15d0 commit bb24c13

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
instance foldableMaybe :: Foldable Maybe
2020

21-
instance foldableRef :: Foldable Ref
22-
2321
instance foldableTuple :: Foldable (Tuple a)
2422

2523

@@ -94,8 +92,6 @@
9492

9593
instance traversableMaybe :: Traversable Maybe
9694

97-
instance traversableRef :: Traversable Ref
98-
9995
instance traversableTuple :: Traversable (Tuple a)
10096

10197

src/Data/Foldable.purs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
module Data.Foldable where
22

3-
import Prelude
43
import Control.Apply
54
import Data.Either
6-
import Data.Eq
75
import Data.Maybe
86
import Data.Monoid
97
import Data.Monoid.First
@@ -41,13 +39,6 @@ instance foldableMaybe :: Foldable Maybe where
4139
foldMap f Nothing = mempty
4240
foldMap f (Just x) = f x
4341

44-
instance foldableRef :: Foldable Ref where
45-
foldr f z (Ref x) = x `f` z
46-
47-
foldl f z (Ref x) = z `f` x
48-
49-
foldMap f (Ref x) = f x
50-
5142
instance foldableTuple :: Foldable (Tuple a) where
5243
foldr f z (Tuple _ x) = x `f` z
5344

src/Data/Traversable.purs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Data.Traversable
1+
module Data.Traversable
22
( Traversable
33
, traverse
44
, sequence
@@ -8,10 +8,8 @@ module Data.Traversable
88
, mapAccumR
99
) where
1010

11-
import Prelude
1211
import Data.Array (zipWith)
1312
import Data.Either
14-
import Data.Eq
1513
import Data.Foldable
1614
import Data.Maybe
1715
import Data.Tuple
@@ -34,11 +32,6 @@ instance traversableEither :: Traversable (Either a) where
3432
sequence (Left x) = pure (Left x)
3533
sequence (Right x) = Right <$> x
3634

37-
instance traversableRef :: Traversable Ref where
38-
traverse f (Ref x) = Ref <$> f x
39-
40-
sequence (Ref x) = Ref <$> x
41-
4235
instance traversableMaybe :: Traversable Maybe where
4336
traverse _ Nothing = pure Nothing
4437
traverse f (Just x) = Just <$> f x
@@ -85,7 +78,7 @@ stateR (StateR k) = k
8578
instance functorStateR :: Functor (StateR s) where
8679
(<$>) f k = StateR $ \s -> case stateR k s of
8780
Tuple s1 a -> Tuple s1 (f a)
88-
81+
8982
instance applyStateR :: Apply (StateR s) where
9083
(<*>) f x = StateR $ \s -> case stateR x s of
9184
Tuple s1 x' -> case stateR f s1 of

0 commit comments

Comments
 (0)