Skip to content

Commit

Permalink
local
Browse files Browse the repository at this point in the history
  • Loading branch information
ejconlon committed Jan 13, 2024
1 parent 27441a5 commit 12c16dd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions minipat/src/Minipat/Proc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module Minipat.Proc
, askPM
, asksPM
, pushPM
, localPM
, throwPM
, bottomUpPM
)
Expand Down Expand Up @@ -60,8 +59,8 @@ asksPM f = ProcM (asks (f . procEnvKey))
pushPM :: c -> ProcM e b c a -> ProcM e b c a
pushPM c (ProcM m) = ProcM (local (pushProcEnv c) m)

localPM :: (c -> c) -> ProcM e b c a -> ProcM e b c a
localPM f m = askPM >>= \c -> pushPM (f c) m
-- localPM :: (c -> c) -> ProcM e b c a -> ProcM e b c a
-- localPM f m = askPM >>= \c -> pushPM (f c) m

throwPM :: e -> ProcM e b c a
throwPM e = ProcM (asks procEnvPath) >>= \bs -> ProcM (throwError (ProcErr bs e))
Expand Down

0 comments on commit 12c16dd

Please sign in to comment.