hnix 0.7.1 → 0.8.0
raw patch · 11 files changed
+56/−44 lines, 11 filesdep +somedep −dependent-sumdep ~aesondep ~hnix-store-coredep ~http-clientPVP ok
version bump matches the API change (PVP)
Dependencies added: some
Dependencies removed: dependent-sum
Dependency ranges changed: aeson, hnix-store-core, http-client, pretty-show, these
API changes (from Hackage documentation)
- Nix.Frames: [Handler] :: forall a e. Exception e => (e -> IO a) -> Handler a
- Nix.Frames: [SomeAsyncException] :: forall e. Exception e => e -> SomeAsyncException
- Nix.Frames: [SomeException] :: forall e. Exception e => e -> SomeException
- Nix.Frames: data (:~:) (a :: k) (b :: k) :: forall k. () => k -> k -> Type
- Nix.Frames: data (:~~:) (a :: k1) (b :: k2) :: forall k1 k2. () => k1 -> k2 -> Type
- Nix.Frames: pattern ErrorCall :: () => () => String -> ErrorCall
- Nix.Utils: data Constant a (b :: k) :: forall k. () => Type -> k -> Type
- Nix.Value: pattern NVThunk :: forall (f :: Type -> Type) a. () => () => a -> Free f a
- Nix.Var: instance Data.GADT.Compare.GEq (GHC.STRef.STRef s)
- Nix.Var: instance Data.GADT.Compare.GEq GHC.IORef.IORef
+ Nix.Atoms: NURI :: Text -> NAtom
+ Nix.Frames: Handler :: (e -> IO a) -> Handler a
+ Nix.Frames: SomeAsyncException :: e -> SomeAsyncException
+ Nix.Frames: SomeException :: e -> SomeException
+ Nix.Frames: data (a :: k1) :~~: (b :: k2)
+ Nix.Frames: data Proxy (t :: k)
+ Nix.Frames: pattern ErrorCall :: String -> ErrorCall
+ Nix.Utils: class Monad m => MonadFail (m :: Type -> Type)
+ Nix.Utils: data Constant a (b :: k)
+ Nix.Value: pattern NVThunk :: forall f a. a -> Free f a
+ Nix.Var: instance Data.GADT.Internal.GEq (GHC.STRef.STRef s)
+ Nix.Var: instance Data.GADT.Internal.GEq GHC.IORef.IORef
- Nix.Cited: cited :: Functor f => (t -> f a) -> NCited m v t -> f (NCited m v a)
+ Nix.Cited: cited :: forall f t a (m :: Type -> Type) v. Functor f => (t -> f a) -> NCited m v t -> f (NCited m v a)
- Nix.Cited: lexicalScope :: Functor f => (Scopes m1 v -> f (Scopes m2 v)) -> Provenance m1 v -> f (Provenance m2 v)
+ Nix.Cited: lexicalScope :: forall f (m1 :: Type -> Type) v (m2 :: Type -> Type). Functor f => (Scopes m1 v -> f (Scopes m2 v)) -> Provenance m1 v -> f (Provenance m2 v)
- Nix.Cited: originExpr :: Functor f => (NExprLocF (Maybe v) -> f (NExprLocF (Maybe v))) -> Provenance m v -> f (Provenance m v)
+ Nix.Cited: originExpr :: forall f v (m :: Type -> Type). Functor f => (NExprLocF (Maybe v) -> f (NExprLocF (Maybe v))) -> Provenance m v -> f (Provenance m v)
- Nix.Cited: provenance :: Functor f => ([Provenance m1 v1] -> f [Provenance m2 v2]) -> NCited m1 v1 a -> f (NCited m2 v2 a)
+ Nix.Cited: provenance :: forall f (m1 :: Type -> Type) v1 (m2 :: Type -> Type) v2 a. Functor f => ([Provenance m1 v1] -> f [Provenance m2 v2]) -> NCited m1 v1 a -> f (NCited m2 v2 a)
- Nix.Expr.Types: Antiquoted :: !r -> Antiquoted
+ Nix.Expr.Types: Antiquoted :: !r -> Antiquoted (v :: *) (r :: *)
- Nix.Expr.Types: EscapedNewline :: Antiquoted
+ Nix.Expr.Types: EscapedNewline :: Antiquoted (v :: *) (r :: *)
- Nix.Expr.Types: Plain :: !v -> Antiquoted
+ Nix.Expr.Types: Plain :: !v -> Antiquoted (v :: *) (r :: *)
- Nix.Frames: Proxy :: Proxy
+ Nix.Frames: Proxy :: Proxy (t :: k)
- Nix.Frames: [HRefl] :: forall k1 k2 (a :: k1) (b :: k2). () => a :~~: a
+ Nix.Frames: [HRefl] :: forall k1 (a :: k1). a :~~: a
- Nix.Frames: [Refl] :: forall k (a :: k) (b :: k). () => a :~: a
+ Nix.Frames: [Refl] :: forall k (a :: k). a :~: a
- Nix.Frames: assert :: () => Bool -> a -> a
+ Nix.Frames: assert :: Bool -> a -> a
- Nix.Frames: bracket :: () => IO a -> (a -> IO b) -> (a -> IO c) -> IO c
+ Nix.Frames: bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
- Nix.Frames: bracketOnError :: () => IO a -> (a -> IO b) -> (a -> IO c) -> IO c
+ Nix.Frames: bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c
- Nix.Frames: bracket_ :: () => IO a -> IO b -> IO c -> IO c
+ Nix.Frames: bracket_ :: IO a -> IO b -> IO c -> IO c
- Nix.Frames: catches :: () => IO a -> [Handler a] -> IO a
+ Nix.Frames: catches :: IO a -> [Handler a] -> IO a
- Nix.Frames: eqT :: (Typeable a, Typeable b) => Maybe (a :~: b)
+ Nix.Frames: eqT :: forall k (a :: k) (b :: k). (Typeable a, Typeable b) => Maybe (a :~: b)
- Nix.Frames: finally :: () => IO a -> IO b -> IO a
+ Nix.Frames: finally :: IO a -> IO b -> IO a
- Nix.Frames: gcast :: (Typeable a, Typeable b) => c a -> Maybe (c b)
+ Nix.Frames: gcast :: forall k (a :: k) (b :: k) c. (Typeable a, Typeable b) => c a -> Maybe (c b)
- Nix.Frames: gcast1 :: (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a))
+ Nix.Frames: gcast1 :: forall k1 k2 c (t :: k2 -> k1) (t' :: k2 -> k1) (a :: k2). (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a))
- Nix.Frames: gcast2 :: (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b))
+ Nix.Frames: gcast2 :: forall k1 k2 k3 c (t :: k2 -> k3 -> k1) (t' :: k2 -> k3 -> k1) (a :: k2) (b :: k3). (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b))
- Nix.Frames: interruptible :: () => IO a -> IO a
+ Nix.Frames: interruptible :: IO a -> IO a
- Nix.Frames: ioError :: () => IOError -> IO a
+ Nix.Frames: ioError :: IOError -> IO a
- Nix.Frames: mask :: () => ((forall a. () => IO a -> IO a) -> IO b) -> IO b
+ Nix.Frames: mask :: ((forall a. () => IO a -> IO a) -> IO b) -> IO b
- Nix.Frames: mask_ :: () => IO a -> IO a
+ Nix.Frames: mask_ :: IO a -> IO a
- Nix.Frames: onException :: () => IO a -> IO b -> IO a
+ Nix.Frames: onException :: IO a -> IO b -> IO a
- Nix.Frames: throw :: Exception e => e -> a
+ Nix.Frames: throw :: forall (r :: RuntimeRep) (a :: TYPE r) e. Exception e => e -> a
- Nix.Frames: typeRep :: Typeable a => proxy a -> TypeRep
+ Nix.Frames: typeRep :: forall k proxy (a :: k). Typeable a => proxy a -> TypeRep
- Nix.Frames: uninterruptibleMask :: () => ((forall a. () => IO a -> IO a) -> IO b) -> IO b
+ Nix.Frames: uninterruptibleMask :: ((forall a. () => IO a -> IO a) -> IO b) -> IO b
- Nix.Frames: uninterruptibleMask_ :: () => IO a -> IO a
+ Nix.Frames: uninterruptibleMask_ :: IO a -> IO a
- Nix.Lint: TBuiltin :: String -> (Symbolic m -> m r) -> NTypeF r
+ Nix.Lint: TBuiltin :: String -> (Symbolic m -> m r) -> NTypeF (m :: * -> *) r
- Nix.Lint: TClosure :: Params () -> NTypeF r
+ Nix.Lint: TClosure :: Params () -> NTypeF (m :: * -> *) r
- Nix.Lint: TConstant :: [TAtom] -> NTypeF r
+ Nix.Lint: TConstant :: [TAtom] -> NTypeF (m :: * -> *) r
- Nix.Lint: TList :: r -> NTypeF r
+ Nix.Lint: TList :: r -> NTypeF (m :: * -> *) r
- Nix.Lint: TPath :: NTypeF r
+ Nix.Lint: TPath :: NTypeF (m :: * -> *) r
- Nix.Lint: TSet :: Maybe (HashMap Text r) -> NTypeF r
+ Nix.Lint: TSet :: Maybe (HashMap Text r) -> NTypeF (m :: * -> *) r
- Nix.Lint: TStr :: NTypeF r
+ Nix.Lint: TStr :: NTypeF (m :: * -> *) r
- Nix.Standard: StdThunk :: StdCited m (NThunkF m (StdValue m)) -> StdThunk
+ Nix.Standard: StdThunk :: StdCited m (NThunkF m (StdValue m)) -> StdThunk (m :: * -> *)
- Nix.Standard: [_stdThunk] :: StdThunk -> StdCited m (NThunkF m (StdValue m))
+ Nix.Standard: [_stdThunk] :: StdThunk (m :: * -> *) -> StdCited m (NThunkF m (StdValue m))
- Nix.Utils: (!!) :: () => [a] -> Int -> a
+ Nix.Utils: (!!) :: [a] -> Int -> a
- Nix.Utils: ($!) :: () => (a -> b) -> a -> b
+ Nix.Utils: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Nix.Utils: ($) :: () => (a -> b) -> a -> b
+ Nix.Utils: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Nix.Utils: (%~) :: () => Setter s t a b -> (a -> b) -> s -> t
+ Nix.Utils: (%~) :: Setter s t a b -> (a -> b) -> s -> t
- Nix.Utils: (&&~) :: () => Setter s t Bool Bool -> Bool -> s -> t
+ Nix.Utils: (&&~) :: Setter s t Bool Bool -> Bool -> s -> t
- Nix.Utils: (&) :: () => s -> (s -> t) -> t
+ Nix.Utils: (&) :: s -> (s -> t) -> t
- Nix.Utils: (++) :: () => [a] -> [a] -> [a]
+ Nix.Utils: (++) :: [a] -> [a] -> [a]
- Nix.Utils: (.) :: () => (b -> c) -> (a -> b) -> a -> c
+ Nix.Utils: (.) :: (b -> c) -> (a -> b) -> a -> c
- Nix.Utils: (.~) :: () => Setter s t a b -> b -> s -> t
+ Nix.Utils: (.~) :: Setter s t a b -> b -> s -> t
- Nix.Utils: (^.) :: () => s -> FoldLike a s t a b -> a
+ Nix.Utils: (^.) :: s -> FoldLike a s t a b -> a
- Nix.Utils: (^..) :: () => s -> Fold s t a b -> [a]
+ Nix.Utils: (^..) :: s -> Fold s t a b -> [a]
- Nix.Utils: (^?) :: () => s -> Fold s t a b -> Maybe a
+ Nix.Utils: (^?) :: s -> Fold s t a b -> Maybe a
- Nix.Utils: (||~) :: () => Setter s t Bool Bool -> Bool -> s -> t
+ Nix.Utils: (||~) :: Setter s t Bool Bool -> Bool -> s -> t
- Nix.Utils: allOf :: () => Fold s t a b -> (a -> Bool) -> s -> Bool
+ Nix.Utils: allOf :: Fold s t a b -> (a -> Bool) -> s -> Bool
- Nix.Utils: anyOf :: () => Fold s t a b -> (a -> Bool) -> s -> Bool
+ Nix.Utils: anyOf :: Fold s t a b -> (a -> Bool) -> s -> Bool
- Nix.Utils: asTypeOf :: () => a -> a -> a
+ Nix.Utils: asTypeOf :: a -> a -> a
- Nix.Utils: break :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Nix.Utils: break :: (a -> Bool) -> [a] -> ([a], [a])
- Nix.Utils: const :: () => a -> b -> a
+ Nix.Utils: const :: a -> b -> a
- Nix.Utils: curry :: () => ((a, b) -> c) -> a -> b -> c
+ Nix.Utils: curry :: ((a, b) -> c) -> a -> b -> c
- Nix.Utils: cycle :: () => [a] -> [a]
+ Nix.Utils: cycle :: [a] -> [a]
- Nix.Utils: degrating :: () => Grate s t a b -> ((s -> a) -> b) -> t
+ Nix.Utils: degrating :: Grate s t a b -> ((s -> a) -> b) -> t
- Nix.Utils: drop :: () => Int -> [a] -> [a]
+ Nix.Utils: drop :: Int -> [a] -> [a]
- Nix.Utils: dropWhile :: () => (a -> Bool) -> [a] -> [a]
+ Nix.Utils: dropWhile :: (a -> Bool) -> [a] -> [a]
- Nix.Utils: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
+ Nix.Utils: either :: (a -> c) -> (b -> c) -> Either a b -> c
- Nix.Utils: error :: HasCallStack => [Char] -> a
+ Nix.Utils: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- Nix.Utils: errorWithoutStackTrace :: () => [Char] -> a
+ Nix.Utils: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- Nix.Utils: fail :: Monad m => String -> m a
+ Nix.Utils: fail :: MonadFail m => String -> m a
- Nix.Utils: filter :: () => (a -> Bool) -> [a] -> [a]
+ Nix.Utils: filter :: (a -> Bool) -> [a] -> [a]
- Nix.Utils: firstOf :: () => Fold s t a b -> s -> Maybe a
+ Nix.Utils: firstOf :: Fold s t a b -> s -> Maybe a
- Nix.Utils: flip :: () => (a -> b -> c) -> b -> a -> c
+ Nix.Utils: flip :: (a -> b -> c) -> b -> a -> c
- Nix.Utils: fst :: () => (a, b) -> a
+ Nix.Utils: fst :: (a, b) -> a
- Nix.Utils: head :: () => [a] -> a
+ Nix.Utils: head :: [a] -> a
- Nix.Utils: id :: () => a -> a
+ Nix.Utils: id :: a -> a
- Nix.Utils: init :: () => [a] -> [a]
+ Nix.Utils: init :: [a] -> [a]
- Nix.Utils: ioError :: () => IOError -> IO a
+ Nix.Utils: ioError :: IOError -> IO a
- Nix.Utils: iterate :: () => (a -> a) -> a -> [a]
+ Nix.Utils: iterate :: (a -> a) -> a -> [a]
- Nix.Utils: last :: () => [a] -> a
+ Nix.Utils: last :: [a] -> a
- Nix.Utils: lastOf :: () => Fold s t a b -> s -> Maybe a
+ Nix.Utils: lastOf :: Fold s t a b -> s -> Maybe a
- Nix.Utils: map :: () => (a -> b) -> [a] -> [b]
+ Nix.Utils: map :: (a -> b) -> [a] -> [b]
- Nix.Utils: matching :: () => Traversal s t a b -> s -> Either t a
+ Nix.Utils: matching :: Traversal s t a b -> s -> Either t a
- Nix.Utils: maybe :: () => b -> (a -> b) -> Maybe a -> b
+ Nix.Utils: maybe :: b -> (a -> b) -> Maybe a -> b
- Nix.Utils: nullOf :: () => Fold s t a b -> s -> Bool
+ Nix.Utils: nullOf :: Fold s t a b -> s -> Bool
- Nix.Utils: over :: () => Setter s t a b -> (a -> b) -> s -> t
+ Nix.Utils: over :: Setter s t a b -> (a -> b) -> s -> t
- Nix.Utils: readParen :: () => Bool -> ReadS a -> ReadS a
+ Nix.Utils: readParen :: Bool -> ReadS a -> ReadS a
- Nix.Utils: repeat :: () => a -> [a]
+ Nix.Utils: repeat :: a -> [a]
- Nix.Utils: replicate :: () => Int -> a -> [a]
+ Nix.Utils: replicate :: Int -> a -> [a]
- Nix.Utils: reset :: () => Resetter s t a b -> b -> s -> t
+ Nix.Utils: reset :: Resetter s t a b -> b -> s -> t
- Nix.Utils: reverse :: () => [a] -> [a]
+ Nix.Utils: reverse :: [a] -> [a]
- Nix.Utils: review :: () => GrateLike (Constant () :: Type -> Type) s t a b -> b -> t
+ Nix.Utils: review :: GrateLike (Constant () :: Type -> Type) s t a b -> b -> t
- Nix.Utils: scanl :: () => (b -> a -> b) -> b -> [a] -> [b]
+ Nix.Utils: scanl :: (b -> a -> b) -> b -> [a] -> [b]
- Nix.Utils: scanl1 :: () => (a -> a -> a) -> [a] -> [a]
+ Nix.Utils: scanl1 :: (a -> a -> a) -> [a] -> [a]
- Nix.Utils: scanr :: () => (a -> b -> b) -> b -> [a] -> [b]
+ Nix.Utils: scanr :: (a -> b -> b) -> b -> [a] -> [b]
- Nix.Utils: scanr1 :: () => (a -> a -> a) -> [a] -> [a]
+ Nix.Utils: scanr1 :: (a -> a -> a) -> [a] -> [a]
- Nix.Utils: seq :: () => a -> b -> b
+ Nix.Utils: seq :: a -> b -> b
- Nix.Utils: set :: () => Setter s t a b -> b -> s -> t
+ Nix.Utils: set :: Setter s t a b -> b -> s -> t
- Nix.Utils: snd :: () => (a, b) -> b
+ Nix.Utils: snd :: (a, b) -> b
- Nix.Utils: span :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Nix.Utils: span :: (a -> Bool) -> [a] -> ([a], [a])
- Nix.Utils: splitAt :: () => Int -> [a] -> ([a], [a])
+ Nix.Utils: splitAt :: Int -> [a] -> ([a], [a])
- Nix.Utils: tail :: () => [a] -> [a]
+ Nix.Utils: tail :: [a] -> [a]
- Nix.Utils: take :: () => Int -> [a] -> [a]
+ Nix.Utils: take :: Int -> [a] -> [a]
- Nix.Utils: takeWhile :: () => (a -> Bool) -> [a] -> [a]
+ Nix.Utils: takeWhile :: (a -> Bool) -> [a] -> [a]
- Nix.Utils: to :: () => (s -> a) -> Getter s t a b
+ Nix.Utils: to :: (s -> a) -> Getter s t a b
- Nix.Utils: toListOf :: () => Fold s t a b -> s -> [a]
+ Nix.Utils: toListOf :: Fold s t a b -> s -> [a]
- Nix.Utils: type FoldLike r s t a b = LensLike (Constant r :: Type -> Type) s t a b
+ Nix.Utils: type FoldLike r s t a b = LensLike Constant r :: Type -> Type s t a b
- Nix.Utils: type FoldLike' r s a = LensLike' (Constant r :: Type -> Type) s a
+ Nix.Utils: type FoldLike' r s a = LensLike' Constant r :: Type -> Type s a
- Nix.Utils: uncurry :: () => (a -> b -> c) -> (a, b) -> c
+ Nix.Utils: uncurry :: (a -> b -> c) -> (a, b) -> c
- Nix.Utils: undefined :: HasCallStack => a
+ Nix.Utils: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- Nix.Utils: under :: () => Resetter s t a b -> (a -> b) -> s -> t
+ Nix.Utils: under :: Resetter s t a b -> (a -> b) -> s -> t
- Nix.Utils: until :: () => (a -> Bool) -> (a -> a) -> a -> a
+ Nix.Utils: until :: (a -> Bool) -> (a -> a) -> a -> a
- Nix.Utils: unzip :: () => [(a, b)] -> ([a], [b])
+ Nix.Utils: unzip :: [(a, b)] -> ([a], [b])
- Nix.Utils: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
+ Nix.Utils: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- Nix.Utils: view :: () => FoldLike a s t a b -> s -> a
+ Nix.Utils: view :: FoldLike a s t a b -> s -> a
- Nix.Utils: views :: () => FoldLike r s t a b -> (a -> r) -> s -> r
+ Nix.Utils: views :: FoldLike r s t a b -> (a -> r) -> s -> r
- Nix.Utils: zip :: () => [a] -> [b] -> [(a, b)]
+ Nix.Utils: zip :: [a] -> [b] -> [(a, b)]
- Nix.Utils: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
+ Nix.Utils: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- Nix.Utils: zipWith :: () => (a -> b -> c) -> [a] -> [b] -> [c]
+ Nix.Utils: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- Nix.Utils: zipWith3 :: () => (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ Nix.Utils: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
- Nix.Utils: zipWithOf :: () => Grate s t a b -> (a -> a -> b) -> s -> s -> t
+ Nix.Utils: zipWithOf :: Grate s t a b -> (a -> a -> b) -> s -> s -> t
- Nix.Utils.Fix1: Fix1 :: t (Fix1 t) a -> Fix1
+ Nix.Utils.Fix1: Fix1 :: t (Fix1 t) a -> Fix1 (t :: (k -> *) -> k -> *) (a :: k)
- Nix.Utils.Fix1: Fix1T :: t (Fix1T t m) m a -> Fix1T
+ Nix.Utils.Fix1: Fix1T :: t (Fix1T t m) m a -> Fix1T (t :: (k -> *) -> (* -> *) -> k -> *) (m :: * -> *) (a :: k)
- Nix.Utils.Fix1: [unFix1T] :: Fix1T -> t (Fix1T t m) m a
+ Nix.Utils.Fix1: [unFix1T] :: Fix1T (t :: (k -> *) -> (* -> *) -> k -> *) (m :: * -> *) (a :: k) -> t (Fix1T t m) m a
- Nix.Utils.Fix1: [unFix1] :: Fix1 -> t (Fix1 t) a
+ Nix.Utils.Fix1: [unFix1] :: Fix1 (t :: (k -> *) -> k -> *) (a :: k) -> t (Fix1 t) a
- Nix.Value: _NVConstantF :: Applicative f => (NAtom -> f NAtom) -> NValueF p m r -> f (NValueF p m r)
+ Nix.Value: _NVConstantF :: forall f p (m :: Type -> Type) r. Applicative f => (NAtom -> f NAtom) -> NValueF p m r -> f (NValueF p m r)
- Nix.Value: _NVListF :: Applicative f => ([r] -> f [r]) -> NValueF p m r -> f (NValueF p m r)
+ Nix.Value: _NVListF :: forall f r p (m :: Type -> Type). Applicative f => ([r] -> f [r]) -> NValueF p m r -> f (NValueF p m r)
- Nix.Value: _NVPathF :: Applicative f => (FilePath -> f FilePath) -> NValueF p m r -> f (NValueF p m r)
+ Nix.Value: _NVPathF :: forall f p (m :: Type -> Type) r. Applicative f => (FilePath -> f FilePath) -> NValueF p m r -> f (NValueF p m r)
- Nix.Value: _NVSetF :: Applicative f => ((AttrSet r, AttrSet SourcePos) -> f (AttrSet r, AttrSet SourcePos)) -> NValueF p m r -> f (NValueF p m r)
+ Nix.Value: _NVSetF :: forall f r p (m :: Type -> Type). Applicative f => ((AttrSet r, AttrSet SourcePos) -> f (AttrSet r, AttrSet SourcePos)) -> NValueF p m r -> f (NValueF p m r)
- Nix.Value: _NVStrF :: Applicative f => (NixString -> f NixString) -> NValueF p m r -> f (NValueF p m r)
+ Nix.Value: _NVStrF :: forall f p (m :: Type -> Type) r. Applicative f => (NixString -> f NixString) -> NValueF p m r -> f (NValueF p m r)
- Nix.Value: nValue :: Functor f1 => (f2 (NValueF (NValue t1 f2 m1) m1 a1) -> f1 (f3 (NValueF (NValue t2 f3 m2) m2 a2))) -> NValue' t1 f2 m1 a1 -> f1 (NValue' t2 f3 m2 a2)
+ Nix.Value: nValue :: forall f1 f2 t1 (m1 :: Type -> Type) a1 f3 t2 (m2 :: Type -> Type) a2. Functor f1 => (f2 (NValueF (NValue t1 f2 m1) m1 a1) -> f1 (f3 (NValueF (NValue t2 f3 m2) m2 a2))) -> NValue' t1 f2 m1 a1 -> f1 (NValue' t2 f3 m2 a2)
- Nix.Value: pattern NVSet :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => AttrSet (Free (NValue' t w m) a) -> AttrSet SourcePos -> Free (NValue' t w m) a
+ Nix.Value: pattern NVSet :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => AttrSet (Free (NValue' t w m) a) -> AttrSet SourcePos -> Free (NValue' t w m) a
- Nix.Value: pattern NVPath :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => FilePath -> Free (NValue' t w m) a
+ Nix.Value: pattern NVPath :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => FilePath -> Free (NValue' t w m) a
- Nix.Value: pattern NVConstant :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => NAtom -> Free (NValue' t w m) a
+ Nix.Value: pattern NVConstant :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => NAtom -> Free (NValue' t w m) a
- Nix.Value: pattern NVStr :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => NixString -> Free (NValue' t w m) a
+ Nix.Value: pattern NVStr :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => NixString -> Free (NValue' t w m) a
- Nix.Value: pattern NVClosure :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => Params () -> (NValue t w m -> m (Free (NValue' t w m) a)) -> Free (NValue' t w m) a
+ Nix.Value: pattern NVClosure :: forall (w :: Type -> Type) t m a. Comonad w => Params () -> (NValue t w m -> m (Free (NValue' t w m) a)) -> Free (NValue' t w m) a
- Nix.Value: pattern NVBuiltin :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => String -> (NValue t w m -> m (Free (NValue' t w m) a)) -> Free (NValue' t w m) a
+ Nix.Value: pattern NVBuiltin :: forall (w :: Type -> Type) t m a. Comonad w => String -> (NValue t w m -> m (Free (NValue' t w m) a)) -> Free (NValue' t w m) a
- Nix.Value: pattern NVList :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => [Free (NValue' t w m) a] -> Free (NValue' t w m) a
+ Nix.Value: pattern NVList :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => [Free (NValue' t w m) a] -> Free (NValue' t w m) a
- Nix.Value: pattern NVList' :: forall (w :: Type -> Type) t (m :: Type -> Type) a. Comonad w => () => [a] -> NValue' t w m a
+ Nix.Value: pattern NVList' :: forall w t m a. Comonad w => [a] -> NValue' t w m a
Files
- README.md +24/−19
- hnix.cabal +7/−8
- main/Repl.hs +1/−1
- src/Nix.hs +4/−6
- src/Nix/Atoms.hs +4/−1
- src/Nix/Builtins.hs +6/−4
- src/Nix/Lint.hs +6/−5
- src/Nix/Type/Infer.hs +1/−0
- src/Nix/Value.hs +1/−0
- src/Nix/Var.hs +1/−0
- src/Nix/XML.hs +1/−0
README.md view
@@ -2,7 +2,9 @@ [](https://travis-ci.org/haskell-nix/hnix) [](https://gitter.im/haskell-nix/Lobby)-<sup>([Hackage Matrix Builder](https://matrix.hackage.haskell.org/package/hnix))</sup>+[](https://hackage.haskell.org/package/hnix)+[](https://matrix.hackage.haskell.org/package/hnix)+[](https://packdeps.haskellers.com/feed?needle=hnix) Haskell parser, evaluator and type checker for the Nix language. @@ -13,18 +15,18 @@ ## Getting Started -```bash+``` $ git clone --recursive https://github.com/haskell-nix/hnix.git ... $ cd hnix $ nix-shell-$ cabal new-configure --enable-tests-$ cabal new-build-$ cabal new-test+$ cabal v2-configure --enable-tests+$ cabal v2-build+$ cabal v2-test # To run all of the tests, which takes up to a minute:-$ env ALL_TESTS=yes cabal new-test+$ env ALL_TESTS=yes cabal v2-test # To run only specific tests (see `tests/Main.hs` for a list)-$ env NIXPKGS_TESTS=yes PRETTY_TESTS=1 cabal new-test+$ env NIXPKGS_TESTS=yes PRETTY_TESTS=1 cabal v2-test $ ./dist/build/hnix/hnix --help ``` @@ -35,8 +37,8 @@ ``` $ nix-shell-$ cabal configure --enable-tests --enable-profiling --flags=profiling --flags=tracing-$ cabal build+$ cabal v2-configure --enable-tests --enable-profiling --flags=profiling --flags=tracing+$ cabal v2-build $ ./dist/build/hnix/hnix -v5 --trace <args> +RTS -xc ``` @@ -49,9 +51,9 @@ ``` $ nix-shell --arg doBenchmarks true-$ cabal configure --enable-tests --enable-benchmarks-$ cabal build-$ cabal bench+$ cabal v2-configure --enable-tests --enable-benchmarks+$ cabal v2-build+$ cabal v2-bench ``` ## Building with profiling enabled@@ -60,8 +62,8 @@ ``` $ nix-shell-$ cabal configure --enable-tests --enable-profiling --flags=profiling-$ cabal build+$ cabal v2-configure --enable-tests --enable-profiling --flags=profiling+$ cabal v2-build $ ./dist/build/hnix/hnix <args> +RTS -p ``` @@ -81,8 +83,10 @@ If you're on macOS, you can use the binary cache at Cachix to avoid building the specific dependencies used by hnix. Just use these commands: - nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/db557aab7b690f5e0e3348459f2e4dc8fd0d9298- cachix use hnix+```+$ nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/db557aab7b690f5e0e3348459f2e4dc8fd0d9298+$ cachix use hnix+``` ## How you can help @@ -96,9 +100,10 @@ [Gitter](https://gitter.im/haskell-nix/Lobby). When you're ready to submit a pull request, test it with:+ ```-git submodule update --init --recursive-nix-shell --run "LANGUAGE_TESTS=yes cabal test"+$ git submodule update --init --recursive+$ nix-shell --run "LANGUAGE_TESTS=yes cabal v2-test" ``` Make sure that all the tests that were passing prior to your PR are still@@ -111,5 +116,5 @@ command: ```-./result/bin/hnix --eval -E "import <nixpkgs> {}" --find+$ ./result/bin/hnix --eval -E "import <nixpkgs> {}" --find ```
hnix.cabal view
@@ -1,5 +1,5 @@ name: hnix-version: 0.7.1+version: 0.8.0 synopsis: Haskell implementation of the Nix language description: Haskell implementation of the Nix language. category: System, Data, Nix@@ -850,7 +850,7 @@ src ghc-options: -Wall -fprint-potential-instances build-depends:- aeson >= 1.4.2 && < 1.5+ aeson >= 1.4.2 && < 1.6 , array >=0.4 && <0.6 , base >=4.11 && <5 , binary >= 0.8.5 && < 0.9@@ -860,7 +860,6 @@ , contravariant >= 1.5 && < 1.6 , data-fix >= 0.2.0 && < 0.3 , deepseq >=1.4.3 && <1.5- , dependent-sum >= 0.4 && < 0.5 || >= 0.6.2.0 && < 0.7 , deriving-compat >=0.3 && <0.6 , directory >= 1.3.1 && < 1.4 , exceptions >= 0.10.0 && < 0.11@@ -868,8 +867,8 @@ , free >= 5.1 && < 5.2 , hashable >=1.2.5 && < 1.4 , hashing >= 0.1.0 && < 0.2- , hnix-store-core >= 0.1.0 && < 0.2- , http-client >= 0.5.14 && < 0.6 || >= 0.6.4 && < 0.7+ , hnix-store-core >= 0.1.0 && < 0.3+ , http-client >= 0.5.14 && < 0.6 || >= 0.6.4 && < 0.8 , http-client-tls >= 0.3.5 && < 0.4 , http-types >= 0.12.2 && < 0.13 , interpolate >= 0.2.0 && < 0.3@@ -891,11 +890,12 @@ , semialign >= 1 && < 1.2 , semialign-indexed >= 1 && < 1.2 , semigroups >=0.18 && <0.19 || >= 0.19.1 && < 0.20+ , some >= 1.0.1 && < 1.1 , split >= 0.2.3 && < 0.3 , syb >= 0.7 && < 0.8 , template-haskell , text >= 1.2.3 && < 1.3- , these >= 1.0.1 && < 1.1+ , these >= 1.0.1 && < 1.2 , time >= 1.8.0 && < 1.9 || >= 1.9.3 && < 1.10 , transformers >= 0.5.5 && < 0.6 , transformers-base >= 0.4.5 && < 0.5@@ -915,7 +915,7 @@ , cryptohash-sha256 >= 0.11.101 && < 0.12 , cryptohash-sha512 >= 0.11.100 && < 0.12 , haskeline >= 0.7.4.2 && < 0.8- , pretty-show >= 1.9.5 && < 1.10+ , pretty-show >= 1.9.5 && < 1.11 , serialise >= 0.2.1 && < 0.3 -- if !flag(profiling) -- build-depends:@@ -995,7 +995,6 @@ , cryptohash-sha512 , data-fix , deepseq >=1.4.3 && <1.5- , dependent-sum , directory , exceptions , filepath
main/Repl.hs view
@@ -53,7 +53,7 @@ import Control.Monad.State.Strict import System.Console.Haskeline.MonadException-import System.Console.Repline+import System.Console.Repline hiding ( options ) import System.Environment import System.Exit
src/Nix.hs view
@@ -110,7 +110,10 @@ args <- traverse (traverse eval') $ map (second parseArg) (arg opts) ++ map (second mkStr) (argstr opts)- compute evaluator expr (argmap args) handler+ evaluator mpath expr >>= \f -> demand f $ \f' ->+ processResult handler =<< case f' of+ NVClosure _ g -> g (argmap args)+ _ -> pure f where parseArg s = case parseNixText s of Success x -> x@@ -119,11 +122,6 @@ eval' = (normalForm =<<) . nixEvalExpr mpath argmap args = nvSet (M.fromList args) mempty-- compute ev x args p = ev mpath x >>= \f -> demand f $ \f' ->- processResult p =<< case f' of- NVClosure _ g -> g args- _ -> pure f processResult :: forall e t f m a
src/Nix/Atoms.hs view
@@ -22,9 +22,11 @@ -- they appear in both the parsed AST (in the form of literals) and -- the evaluated form. data NAtom+ -- | An URI like @https://example.com@.+ = NURI Text -- | An integer. The c nix implementation currently only supports -- integers that fit in the range of 'Int64'.- = NInt Integer+ | NInt Integer -- | A floating point number | NFloat Float -- | Booleans.@@ -40,6 +42,7 @@ -- | Translate an atom into its nix representation. atomText :: NAtom -> Text+atomText (NURI t) = t atomText (NInt i) = pack (show i) atomText (NFloat f) = pack (showNixFloat f) where
src/Nix/Builtins.hs view
@@ -191,10 +191,11 @@ strict = derivationStrict drvAttrs; - commonAttrs = drvAttrs // (builtins.listToAttrs outputsList) //- { all = map (x: x.value) outputsList;- inherit drvAttrs;- };+ commonAttrs = drvAttrs+ // (builtins.listToAttrs outputsList)+ // { all = map (x: x.value) outputsList;+ inherit drvAttrs;+ }; outputToAttrListElement = outputName: { name = outputName;@@ -1347,6 +1348,7 @@ typeOf :: MonadNix e t f m => NValue t f m -> m (NValue t f m) typeOf v = demand v $ toValue . principledMakeNixStringWithoutContext . \case NVConstant a -> case a of+ NURI _ -> "string" NInt _ -> "int" NFloat _ -> "float" NBool _ -> "bool"
src/Nix/Lint.hs view
@@ -300,13 +300,14 @@ go f l c = [(Text.pack "file", f), (Text.pack "line", l), (Text.pack "col", c)] - evalConstant c = mkSymbolic [TConstant [go c]]+ evalConstant c = mkSymbolic [go c] where go = \case- NInt _ -> TInt- NFloat _ -> TFloat- NBool _ -> TBool- NNull -> TNull+ NURI _ -> TStr+ NInt _ -> TConstant [TInt]+ NFloat _ -> TConstant [TFloat]+ NBool _ -> TConstant [TBool]+ NNull -> TConstant [TNull] evalString = const $ mkSymbolic [TStr] evalLiteralPath = const $ mkSymbolic [TPath]
src/Nix/Type/Infer.hs view
@@ -442,6 +442,7 @@ evalConstant c = return $ Judgment As.empty [] (go c) where go = \case+ NURI _ -> typeString NInt _ -> typeInt NFloat _ -> typeFloat NBool _ -> typeBool
src/Nix/Value.hs view
@@ -413,6 +413,7 @@ valueType :: NValueF a m r -> ValueType valueType = \case NVConstantF a -> case a of+ NURI _ -> TString NoContext NInt _ -> TInt NFloat _ -> TFloat NBool _ -> TBool
src/Nix/Var.hs view
@@ -12,6 +12,7 @@ import Data.IORef import Data.Maybe import Data.STRef+import Type.Reflection ((:~:)(Refl)) import Unsafe.Coerce
src/Nix/XML.hs view
@@ -30,6 +30,7 @@ phi :: NValue' t f m (WithStringContext Element) -> WithStringContext Element phi = \case NVConstant' a -> case a of+ NURI t -> return $ mkElem "string" "value" (Text.unpack t) NInt n -> return $ mkElem "int" "value" (show n) NFloat f -> return $ mkElem "float" "value" (show f) NBool b -> return $ mkElem "bool" "value" (if b then "true" else "false")