@@ -7,6 +7,7 @@ import Prelude hiding ( traceM
77 , head
88 )
99import Relude.Unsafe ( head )
10+ import GHC.Exception ( ErrorCall (ErrorCall ) )
1011import Nix.Utils
1112import Control.Monad ( foldM )
1213import qualified Data.HashMap.Lazy as M
@@ -58,7 +59,7 @@ defaultToAbsolutePath origPath = do
5859 removeDotDotIndirections <$> canonicalizePath absPath
5960
6061expandHomePath :: MonadFile m => Path -> m Path
61- expandHomePath (coerce -> (' ~' : xs)) = (<> ( coerce xs) ) <$> getHomeDirectory
62+ expandHomePath (coerce -> (' ~' : xs)) = (<> coerce xs) <$> getHomeDirectory
6263expandHomePath p = pure p
6364
6465-- | Incorrectly normalize paths by rewriting patterns like @a/b/..@ to @a@.
@@ -107,7 +108,7 @@ findEnvPathM name = do
107108 absFile <-
108109 bool
109110 (pure absPath)
110- (toAbsolutePath @ t @ f $ coerce $ ( coerce absPath) </> " default.nix" )
111+ (toAbsolutePath @ t @ f $ coerce $ coerce absPath </> " default.nix" )
111112 isDir
112113 exists <- doesFileExist absFile
113114 pure $
@@ -126,7 +127,7 @@ findPathBy
126127findPathBy finder ls name = do
127128 mpath <- foldM go mempty ls
128129 maybe
129- (throwError $ ErrorCall $ " file ''" <> ( coerce name) <> " '' was not found in the Nix search path (add it's using $NIX_PATH or -I)" )
130+ (throwError $ ErrorCall $ " file ''" <> coerce name <> " '' was not found in the Nix search path (add it's using $NIX_PATH or -I)" )
130131 pure
131132 mpath
132133 where
@@ -161,8 +162,8 @@ findPathBy finder ls name = do
161162 mp
162163
163164 tryPath :: Path -> Maybe Path -> m (Maybe Path )
164- tryPath p (Just n) | n' : ns <- splitDirectories (coerce name), n == ( coerce n') =
165- finder $ p <///> ( coerce $ joinPath ns)
165+ tryPath p (Just n) | n' : ns <- splitDirectories (coerce name), n == coerce n' =
166+ finder $ p <///> coerce ( joinPath ns)
166167 tryPath p _ = finder $ p <///> name
167168
168169 resolvePath s =
0 commit comments