File tree Expand file tree Collapse file tree 6 files changed +11
-10
lines changed Expand file tree Collapse file tree 6 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -1407,7 +1407,7 @@ findFileNix nvaset nvfilepath =
14071407 case (aset, filePath) of
14081408 (NVList x, NVStr ns) ->
14091409 do
1410- mres <- findPath @ t @ f @ m x ( toString ( stringIgnoreContext ns))
1410+ mres <- findPath @ t @ f @ m x $ toString $ stringIgnoreContext ns
14111411
14121412 pure $ nvPath mres
14131413
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import Control.Monad.Ref ( MonadAtomicRef(..)
2020
2121import Nix.Thunk
2222
23-
23+ -- 2021-06-02: NOTE: Remove singleton newtype accessor in favour of free coerce
2424newtype FreshIdT i m a = FreshIdT { unFreshIdT :: ReaderT (Ref m i ) m a }
2525 deriving
2626 ( Functor
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ instance (MonadEffects t f m, MonadDataContext f m)
3333 findEnvPath = lift . findEnvPath @ t @ f @ m
3434 findPath vs path = do
3535 i <- FreshIdT ask
36- let vs' = fmap ( unliftNValue (runFreshIdT i)) vs
36+ let vs' = unliftNValue (runFreshIdT i) <$> vs
3737 lift $ findPath @ t @ f @ m vs' path
3838 importPath path = do
3939 i <- FreshIdT ask
Original file line number Diff line number Diff line change @@ -283,14 +283,14 @@ reduce (NLet_ ann binds body) =
283283
284284 -- let names = gatherNames body'
285285 -- binds' <- traverse sequence binds <&> \b -> flip filter b $ \case
286- -- NamedVar (StaticKey name _ :| mempty ) _ ->
286+ -- NamedVar (StaticKey name _ :| [] ) _ ->
287287 -- name `S.member` names
288288 -- _ -> True
289289 pure $ Fix $ NLet_ ann binds' body'
290290 -- where
291291 -- go m [] = pure m
292292 -- go m (x:xs) = case x of
293- -- NamedVar (StaticKey name _ :| mempty ) def -> do
293+ -- NamedVar (StaticKey name _ :| [] ) def -> do
294294 -- v <- pushScope m def
295295 -- go (M.insert name v m) xs
296296 -- _ -> go m xs
Original file line number Diff line number Diff line change @@ -110,12 +110,13 @@ coerceToString call ctsm clevel = go
110110 err v = throwError $ ErrorCall $ " Expected a string, but saw: " <> show v
111111 castToNixString = pure . makeNixStringWithoutContext
112112
113- nixStringUnwords = intercalateNixString ( makeNixStringWithoutContext " " )
113+ nixStringUnwords = intercalateNixString $ makeNixStringWithoutContext " "
114114
115115 storePathToNixString :: StorePath -> NixString
116- storePathToNixString sp = makeNixStringWithSingletonContext
117- t
118- (StringContext t DirectPath )
116+ storePathToNixString sp =
117+ makeNixStringWithSingletonContext
118+ t
119+ (StringContext t DirectPath )
119120 where
120121 t = toText $ unStorePath sp
121122
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ freeVars e = case unFix e of
6565 (Set. unions $ freeVars <$> mapMaybe snd set)
6666 (Set. difference
6767 (maybe mempty one varname)
68- (Set. fromList $ fmap fst set)
68+ (Set. fromList $ fst <$> set)
6969 )
7070 (NLet bindings expr ) ->
7171 freeVars expr <>
You can’t perform that action at this time.
0 commit comments