@@ -34,8 +34,8 @@ import Data.Aeson hiding (Error)
34
34
import Data.Bifunctor
35
35
import qualified Data.ByteString.Base16 as B16
36
36
import qualified Data.ByteString.Char8 as B
37
- import Data.Default
38
37
import Data.Char (isLower )
38
+ import Data.Default
39
39
import Data.Either.Extra
40
40
import Data.Function
41
41
import Data.Hashable
@@ -943,7 +943,7 @@ renderCradleError cradle nfp (CradleError _ _ec ms) =
943
943
944
944
-- | Information included in Multi Cradle error messages
945
945
data MultiCradleErr = MultiCradleErr
946
- { mcPwd :: FilePath
946
+ { mcPwd :: FilePath
947
947
, mcFilePath :: FilePath
948
948
, mcPrefixes :: [(FilePath , String )]
949
949
} deriving (Show )
@@ -978,15 +978,10 @@ parseMultiCradleErr ms = do
978
978
guard (listToMaybe (reverse s) == Just end)
979
979
pure $ drop 1 $ take (length s - 1 ) s
980
980
981
-
982
-
983
-
984
-
985
-
986
981
multiCradleErrMessage :: MultiCradleErr -> [String ]
987
982
multiCradleErrMessage e =
988
- [ " Loading the module '" <> moduleFileName <> " ' failed. It seems that it is not listed in your .cabal file!"
989
- , " Perhaps you need to add `" <> moduleName <> " ` to other-modules or exposed-modules" -- named 'example' in example.cabal ."
983
+ [ " Loading the module '" <> moduleFileName <> " ' failed. It may not be listed in your .cabal file!"
984
+ , " Perhaps you need to add `" <> moduleName <> " ` to other-modules or exposed-modules."
990
985
, " For more information, visit: https://cabal.readthedocs.io/en/3.4/developing-packages.html#modules-included-in-the-package"
991
986
, " "
992
987
] <> map prefix (mcPrefixes e)
@@ -997,11 +992,6 @@ multiCradleErrMessage e =
997
992
isSourceFolder p = all isLower $ take 1 p
998
993
prefix (f, r) = f <> " - " <> r
999
994
1000
-
1001
-
1002
-
1003
-
1004
-
1005
995
-- See Note [Multi Cradle Dependency Info]
1006
996
type DependencyInfo = Map. Map FilePath (Maybe UTCTime )
1007
997
type HieMap = Map. Map (Maybe FilePath ) (HscEnv , [RawComponentInfo ])
0 commit comments