Skip to content

Commit 8bab54e

Browse files
committed
Tighten up effect types on modifyScope and modifyThis
Fix #19. Since these run immediately, there is no need to expose the unsafeInterleaveEff.
1 parent c78613a commit 8bab54e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

MODULE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@
813813

814814
id :: forall a. Scope a -> String
815815

816-
modifyScope :: forall e f a b. ({ | a } -> Eff f { | b }) -> Scope a -> ReadWriteEff e Unit
816+
modifyScope :: forall e a b. ({ | a } -> Eff e { | b }) -> Scope a -> ReadWriteEff e Unit
817817

818818
newScope :: forall e a b. Boolean -> Scope a -> ScopeEff e (Scope b)
819819

@@ -855,7 +855,7 @@
855855

856856
extendThis :: forall e a b. { | b } -> This a -> WriteEff e
857857

858-
modifyThis :: forall e f a b. ({ | a } -> Eff f { | b }) -> This a -> ReadWriteEff e Unit
858+
modifyThis :: forall e a b. ({ | a } -> Eff e { | b }) -> This a -> ReadWriteEff e Unit
859859

860860
readThis :: forall e a. This a -> ReadEff e a
861861

src/Angular/Scope.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ type ReadWriteEff e r = Eff (ngrscope :: NgReadScope, ngwscope :: NgWriteScope |
7979

8080
type ScopeEff e r = Eff (ngscope :: NgScope | e) r
8181

82-
modifyScope :: forall e f a b. ({ | a} -> Eff f { | b }) -> Scope a -> ReadWriteEff e Unit
82+
modifyScope :: forall e a b. ({ | a} -> Eff e { | b }) -> Scope a -> ReadWriteEff e Unit
8383
modifyScope k s = do
8484
s' <- readScope s
8585
w <- unsafeInterleaveEff $ k s'

src/Angular/This.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ writeThis = runFn3 writeThisFn
3333
extendThis :: forall e a b. { | b } -> This a -> WriteEff e
3434
extendThis = runFn2 extendThisFn
3535

36-
modifyThis :: forall e f a b. ({ | a } -> Eff f { | b }) -> This a -> ReadWriteEff e Unit
36+
modifyThis :: forall e a b. ({ | a } -> Eff e { | b }) -> This a -> ReadWriteEff e Unit
3737
modifyThis k t = do
3838
t' <- readThis t
3939
w <- unsafeInterleaveEff $ k t'

0 commit comments

Comments
 (0)