Skip to content

Commit 4281382

Browse files
Merge #845 Update http-client & parser-combinators
2 parents 5b6af80 + 522e448 commit 4281382

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

hnix.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ library
414414
, hashing >= 0.1.0 && < 0.2
415415
, hnix-store-core >= 0.4.0 && < 0.5
416416
, hnix-store-remote >= 0.4.0 && < 0.5
417-
, http-client >= 0.5.14 && < 0.6 || >= 0.6.4 && < 0.7
417+
, http-client >= 0.5.14 && < 0.6 || >= 0.6.4 && < 0.8
418418
, http-client-tls >= 0.3.5 && < 0.4
419419
, http-types >= 0.12.2 && < 0.13
420420
, lens-family >= 1.2.2 && < 2.2
@@ -427,7 +427,7 @@ library
427427
, mtl >= 2.2.2 && < 2.3
428428
, neat-interpolation >= 0.4 && < 0.6
429429
, optparse-applicative >= 0.14.3 && < 0.17
430-
, parser-combinators >= 1.0.1 && < 1.3
430+
, parser-combinators >= 1.0.1 && < 1.4
431431
, prettyprinter >= 1.7.0 && < 1.8
432432
, process >= 1.6.3 && < 1.7
433433
, ref-tf >= 0.4.0 && < 0.5

src/Nix/Fresh.hs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE DeriveFunctor #-}
3-
{-# LANGUAGE FlexibleContexts #-}
43
{-# LANGUAGE FlexibleInstances #-}
54
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
65
{-# LANGUAGE MultiParamTypeClasses #-}
7-
{-# LANGUAGE RankNTypes #-}
86
{-# LANGUAGE TypeFamilies #-}
97
{-# LANGUAGE UndecidableInstances #-}
108

@@ -13,21 +11,35 @@
1311

1412
module Nix.Fresh where
1513

16-
import Control.Applicative
17-
import Control.Monad.Base
18-
import Control.Monad.Catch
14+
import Control.Applicative ( Alternative )
15+
import Control.Monad.Base ( MonadBase(..) )
16+
import Control.Monad.Catch ( MonadCatch
17+
, MonadMask
18+
, MonadThrow
19+
)
1920
import Control.Monad.Except
21+
( MonadFix
22+
, MonadIO
23+
, MonadPlus
24+
, MonadTrans(..)
25+
)
2026
#if !MIN_VERSION_base(4,13,0)
2127
import Control.Monad.Fail
2228
#endif
23-
import Control.Monad.Reader
29+
import Control.Monad.Reader ( ReaderT(..)
30+
, MonadReader(ask)
31+
)
2432
import Control.Monad.Ref
25-
import Control.Monad.ST
26-
import Data.Typeable
33+
( MonadAtomicRef(..)
34+
, MonadRef(writeRef, readRef)
35+
)
36+
import Control.Monad.ST ( ST )
37+
import Data.Typeable ( Typeable )
2738

2839
import Nix.Var
2940
import Nix.Thunk
3041

42+
3143
newtype FreshIdT i m a = FreshIdT { unFreshIdT :: ReaderT (Var m i) m a }
3244
deriving
3345
( Functor
@@ -72,7 +84,7 @@ runFreshIdT i m = runReaderT (unFreshIdT m) i
7284
-- Orphan instance needed by Infer.hs and Lint.hs
7385

7486
-- Since there's no forking, it's automatically atomic.
75-
-- NOTE: MonadAtomicRef (ST s) can be upstreamed to `ref-tf`
87+
-- 2021-02-09: NOTE: Submitted upstream: https://github.com/mainland/ref-tf/pull/4
7688
instance MonadAtomicRef (ST s) where
7789
atomicModifyRef r f = do
7890
v <- readRef r

0 commit comments

Comments
 (0)