Skip to content

Commit

Permalink
Nix.Standard: add instance sign to queryM
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Latukha committed Feb 23, 2021
1 parent f0ba9af commit 63f881c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Nix/Standard.hs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ instance ( MonadAtomicRef m
thunkId :: StdThunk m -> ThunkId m
thunkId = thunkId . _stdCited . _stdThunk

queryM :: StdThunk m -> m r -> (StdValue m -> m r) -> m r
queryM x b f = queryM (_stdCited (_stdThunk x)) b f

force :: (StdValue m -> m r) -> StdThunk m -> m r
Expand All @@ -142,7 +143,7 @@ instance ( MonadAtomicRef m
forceEff f t = forceEff f (_stdCited $ _stdThunk t)

further :: StdThunk m -> (m (StdValue m) -> m (StdValue m)) -> m (StdThunk m)
further = (fmap (StdThunk . StdCited) .) . further . _stdCited . _stdThunk
further t f = ((fmap (StdThunk . StdCited) .) $ further $ _stdCited $ _stdThunk t) f

instance ( MonadAtomicRef m
, MonadCatch m
Expand Down

0 comments on commit 63f881c

Please sign in to comment.