Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Aug 8, 2023
1 parent 6a98874 commit 6bb1da8
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import Data.Aeson hiding (Error)
import Data.Bifunctor
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Char8 as B
import Data.Default
import Data.Char (isLower)
import Data.Default
import Data.Either.Extra
import Data.Function
import Data.Hashable
Expand Down Expand Up @@ -943,7 +943,7 @@ renderCradleError cradle nfp (CradleError _ _ec ms) =

-- | Information included in Multi Cradle error messages
data MultiCradleErr = MultiCradleErr
{ mcPwd :: FilePath
{ mcPwd :: FilePath
, mcFilePath :: FilePath
, mcPrefixes :: [(FilePath, String)]
} deriving (Show)
Expand Down Expand Up @@ -978,15 +978,10 @@ parseMultiCradleErr ms = do
guard (listToMaybe (reverse s) == Just end)
pure $ drop 1 $ take (length s - 1) s






multiCradleErrMessage :: MultiCradleErr -> [String]
multiCradleErrMessage e =
[ "Loading the module '" <> moduleFileName <> "' failed. It seems that it is not listed in your .cabal file!"
, "Perhaps you need to add `"<> moduleName <> "` to other-modules or exposed-modules" -- named 'example' in example.cabal."
[ "Loading the module '" <> moduleFileName <> "' failed. It may not be listed in your .cabal file!"
, "Perhaps you need to add `"<> moduleName <> "` to other-modules or exposed-modules."
, "For more information, visit: https://cabal.readthedocs.io/en/3.4/developing-packages.html#modules-included-in-the-package"
, ""
] <> map prefix (mcPrefixes e)
Expand All @@ -997,11 +992,6 @@ multiCradleErrMessage e =
isSourceFolder p = all isLower $ take 1 p
prefix (f, r) = f <> " - " <> r






-- See Note [Multi Cradle Dependency Info]
type DependencyInfo = Map.Map FilePath (Maybe UTCTime)
type HieMap = Map.Map (Maybe FilePath) (HscEnv, [RawComponentInfo])
Expand Down

0 comments on commit 6bb1da8

Please sign in to comment.