packages feed

simple-nix 0.1.0.3 → 0.1.0.4

raw patch · 3 files changed

+33/−3 lines, 3 filesdep +hspecdep +hspec-expectationsPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependencies added: hspec, hspec-expectations

API changes (from Hackage documentation)

+ Nix.Expr: dot :: NixExpr -> [NixString] -> NixExpr
+ Nix.Expr: simpleKwargs :: [Name] -> FuncArgs
+ Nix.Expr: simpleSet :: [(Name, NixExpr)] -> NixExpr
+ Nix.Expr: simpleSetRec :: [(Name, NixExpr)] -> NixExpr

Files

simple-nix.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                simple-nix-version:             0.1.0.3+version:             0.1.0.4 synopsis:            Simple parsing/pretty printing for Nix expressions -- description: homepage:            https://github.com/adnelson/simple-nix@@ -19,7 +19,6 @@ library   exposed-modules:     Nix, Nix.Expr, Nix.Parser, Nix.LicenseType   other-modules:       Nix.Common-  -- other-extensions:   build-depends:       base >=4.8 && <4.9                      , classy-prelude                      , text@@ -31,4 +30,22 @@                      , text-render >=0.1.0.2                      , system-filepath   hs-source-dirs:      src+  default-language:    Haskell2010++test-suite spec+  type:                exitcode-stdio-1.0+  main-is:             Spec.hs+  build-depends:       base >=4.8 && <4.9+                     , classy-prelude+                     , text+                     , mtl+                     , unordered-containers+                     , parsec+                     , MissingH+                     , error-list+                     , text-render >=0.1.0.2+                     , system-filepath+                     , hspec+                     , hspec-expectations+  hs-source-dirs:      src, test   default-language:    Haskell2010
src/Nix/Expr.hs view
@@ -51,13 +51,25 @@   fromString = Plain . fromString  instance IsString NixExpr where-  fromString = OneLineString . fromString+  fromString = Var . fromString  (=$=) :: Name -> NixExpr -> NixAssign k =$= v = Assign [Plain k] v  str :: Text -> NixExpr str = OneLineString . Plain++dot :: NixExpr -> [NixString] -> NixExpr+dot e pth = Dot e pth Nothing++simpleKwargs :: [Name] -> FuncArgs+simpleKwargs ns = Kwargs (H.fromList $ map (\n -> (n, Nothing)) ns) False Nothing++simpleSet :: [(Name, NixExpr)] -> NixExpr+simpleSet = Set False . map (uncurry (=$=))++simpleSetRec :: [(Name, NixExpr)] -> NixExpr+simpleSetRec = Set True . map (uncurry (=$=))  -- | Shortcut for a simple kwarg set. toKwargs :: [(Name, Maybe NixExpr)] -> FuncArgs
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}