Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 53598bd

Browse files
committed
Revert "Give fromScope a parameter to bind over the contents of the scope."
This reverts commit d998f66.
1 parent 66c0bff commit 53598bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

semantic-core/src/Data/Scope.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ instance HFunctor (Scope a) where
5656
hmap f = Scope . f . fmap (fmap f) . unScope
5757

5858
instance (Eq a, Eq b, forall a . Eq a => Eq (f a), Monad f) => Eq (Scope a f b) where
59-
(==) = (==) `on` fromScope sequenceA
59+
(==) = (==) `on` fromScope
6060

6161
instance (Ord a, Ord b, forall a . Eq a => Eq (f a)
6262
, forall a . Ord a => Ord (f a), Monad f) => Ord (Scope a f b) where
63-
compare = compare `on` fromScope sequenceA
63+
compare = compare `on` fromScope
6464

6565
deriving instance (Show a, Show b, forall a . Show a => Show (f a)) => Show (Scope a f b)
6666

@@ -78,8 +78,8 @@ instance RightModule (Scope a) where
7878
Scope m >>=* f = Scope (fmap (>>= f) <$> m)
7979

8080

81-
fromScope :: Monad f => (Incr a (f b) -> f c) -> Scope a f b -> f c
82-
fromScope f = unScope >=> f
81+
fromScope :: Monad f => Scope a f b -> f (Incr a b)
82+
fromScope = unScope >=> sequenceA
8383

8484
toScope :: Applicative f => f (Incr a b) -> Scope a f b
8585
toScope = Scope . fmap (fmap pure)

0 commit comments

Comments
 (0)