Skip to content

Commit 9f873ca

Browse files
Merge #934: Cabal: dep: relude: require >= 1.0; upd Nixpkgs rev
Was pretty careful with use of reexports. Library builds great with `0.7` relude, thou before release I cleaned-up the Cabal dependencies, which introduced dependency on reexports provided in `relude`, which indeed were introduced in `1.0`. To extimate the constraints, checked the bounds introduced to what HNix had. The package bounds are on stable packages and have big timescale bounds, nothing got restricted. Thou it added another structural dependency. In reality pretty ready to see & evaluate the new base & prelude.
2 parents 8aee668 + f4ea5dc commit 9f873ca

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
# , nixos-20.03 # Last stable release, gets almost no updates to recipes, gets only required backports
9292
# ...
9393
# }
94-
, rev ? "39e6bf76474ce742eb027a88c4da6331f0a1526f"
94+
, rev ? "65d6153aec85c8cb46023f0a7248628f423ca4ee"
9595

9696
, pkgs ?
9797
if builtins.compareVersions builtins.nixVersion "2.0" > 0
@@ -188,7 +188,6 @@ let
188188

189189
overrides = self: super: {
190190

191-
ref-tf = super.ref-tf_0_5;
192191
semialign = super.semialign_1_2;
193192
relude = super.relude_1_0_0_1;
194193

hnix.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ library
441441
, process >= 1.6.3 && < 1.7
442442
, ref-tf >= 0.5 && < 0.6
443443
, regex-tdfa >= 1.2.3 && < 1.4
444-
, relude >= 0.7.0 && < 1.1.0
444+
, relude >= 1.0.0 && < 1.1.0
445445
, scientific >= 0.3.6 && < 0.4
446446
, semialign >= 1 && < 1.3
447447
, serialise >= 0.2.1 && < 0.3

src/Nix/Expr/Types.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,10 @@ ekey _ _ f e = fromMaybe e <$> f Nothing
662662
stripPositionInfo :: NExpr -> NExpr
663663
stripPositionInfo = transport phi
664664
where
665-
transport f (Fix x) = Fix $ fmap (transport f) (f x)
665+
transport f (Fix x) = Fix $ transport f <$> f x
666666

667-
phi (NSet recur binds) = NSet recur $ fmap go binds
668-
phi (NLet binds body) = NLet (fmap go binds) body
667+
phi (NSet recur binds) = NSet recur $ go <$> binds
668+
phi (NLet binds body) = NLet (go <$> binds) body
669669
phi x = x
670670

671671
go (NamedVar path r _pos) = NamedVar path r nullPos

src/Nix/Parser.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,23 +557,23 @@ type Parser = ParsecT Void Text (State SourcePos)
557557
type Result a = Either (Doc Void) a
558558

559559
parseFromFileEx :: MonadFile m => Parser a -> FilePath -> m (Result a)
560-
parseFromFileEx p path =
560+
parseFromFileEx parser file =
561561
do
562-
txt <- decodeUtf8 <$> readFile path
562+
input <- decodeUtf8 <$> readFile file
563563

564564
pure $
565565
either
566566
(Left . pretty . errorBundlePretty)
567-
Right
568-
$ (`evalState` initialPos path) $ runParserT p path txt
567+
pure
568+
$ (`evalState` initialPos file) $ runParserT parser file input
569569

570570
parseFromText :: Parser a -> Text -> Result a
571-
parseFromText p txt =
572-
let file = "<string>" in
571+
parseFromText parser input =
572+
let stub = "<string>" in
573573
either
574574
(Left . pretty . errorBundlePretty)
575-
Right
576-
$ (`evalState` initialPos file) $ (`runParserT` file) p txt
575+
pure
576+
$ (`evalState` initialPos stub) $ (`runParserT` stub) parser input
577577

578578
{- Parser.Operators -}
579579

0 commit comments

Comments
 (0)