Improve suggestions on inconsistent assignment
This commit is contained in:
parent
e23772b1ed
commit
85d4844a0d
@ -102,13 +102,18 @@ gmeDoc e = case e of
|
|||||||
text "Could not find a consistent component assignment for modules:" $$
|
text "Could not find a consistent component assignment for modules:" $$
|
||||||
(nest 4 $ foldr ($+$) empty $ map ctxDoc ctx) $$
|
(nest 4 $ foldr ($+$) empty $ map ctxDoc ctx) $$
|
||||||
text "" $$
|
text "" $$
|
||||||
text "- Are you sure all these modules exist?" $$
|
(if all (Set.null . snd) ctx
|
||||||
text "- Maybe try enabling test suites and or benchmarks:" $$
|
then noComponentSuggestions
|
||||||
nest 4 (backticks $ text "cabal configure --enable-tests --enable-benchmarks") $$
|
else empty) $$
|
||||||
text "- To find out which components ghc-mod knows about try:" $$
|
text "- To find out which components ghc-mod knows about try:" $$
|
||||||
nest 4 (backticks $ text "ghc-mod debug")
|
nest 4 (backticks $ text "ghc-mod debug")
|
||||||
|
|
||||||
where
|
where
|
||||||
|
noComponentSuggestions =
|
||||||
|
text "- Are some of these modules part of a test and or benchmark?\
|
||||||
|
\ Try enabling them:" $$
|
||||||
|
nest 4 (backticks $ text "cabal configure --enable-tests [--enable-benchmarks]")
|
||||||
|
|
||||||
backticks d = char '`' <> d <> char '`'
|
backticks d = char '`' <> d <> char '`'
|
||||||
ctxDoc = moduleDoc *** compsDoc
|
ctxDoc = moduleDoc *** compsDoc
|
||||||
>>> first (<> colon) >>> uncurry (flip hang 4)
|
>>> first (<> colon) >>> uncurry (flip hang 4)
|
||||||
|
Loading…
Reference in New Issue
Block a user