Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
nalchevanidze committed Jun 30, 2024
1 parent 960e28e commit 3cb2055
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion hconf/src/HConf/Config/Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ instance Check Build where
checkPkgNames :: (FromConf m [PkgDir], Log m) => Maybe [PkgDir] -> m ()
checkPkgNames ls = do
known <- packages
log (show (known, ls))
let unknown = maybeList ls \\ known
unless (null unknown) (throwError ("unknown packages: " <> show unknown))

Expand Down
6 changes: 3 additions & 3 deletions hconf/src/HConf/Core/PkgDir.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ where

import Data.Aeson (FromJSON (..), ToJSON (toJSON))
import Data.Aeson.Types (Value (..))
import Data.List (dropWhileEnd)
import Data.Text (intercalate)
import HConf.Utils.Core (Msg (..), withString)
import Relude hiding (Undefined, intercalate)
import System.FilePath.Glob (glob)
import System.FilePath.Posix
( joinPath,
normalise,
splitFileName,
splitFileName, splitDirectories,
)
import Data.List (stripPrefix)

data PkgDir = PkgDir
{ root :: Maybe FilePath,
Expand Down Expand Up @@ -58,7 +58,7 @@ cabalFile name = pkgFile (toString name <> ".cabal")

resolveDir :: String -> Maybe String
resolveDir "./" = Nothing
resolveDir name = Just $ dropWhileEnd (/= '/') name
resolveDir name = Just $ joinPath $ splitDirectories $ fromMaybe name (stripPrefix "./" name)

parseDir :: FilePath -> PkgDir
parseDir x =
Expand Down

0 comments on commit 3cb2055

Please sign in to comment.