@@ -568,14 +568,14 @@ exceptionMessageCabalInstall e = case e of
568
568
PackageNameAmbiguousErr ambiguities ->
569
569
unlines
570
570
[ " There is no package named '"
571
- ++ prettyShow name
572
- ++ " '. "
573
- ++ ( if length matches > 1
574
- then " However, the following package names exist: "
575
- else " However, the following package name exists: "
576
- )
577
- ++ intercalate " , " [" '" ++ prettyShow m ++ " '" | m <- matches]
578
- ++ " ."
571
+ ++ prettyShow name
572
+ ++ " '. "
573
+ ++ ( if length matches > 1
574
+ then " However, the following package names exist: "
575
+ else " However, the following package name exists: "
576
+ )
577
+ ++ intercalate " , " [" '" ++ prettyShow m ++ " '" | m <- matches]
578
+ ++ " ."
579
579
| (name, matches) <- ambiguities
580
580
]
581
581
ExtractTarballPackageErr err -> err
@@ -669,49 +669,49 @@ exceptionMessageCabalInstall e = case e of
669
669
UnrecognisedTarget targets ->
670
670
unlines
671
671
[ " Unrecognised target '"
672
- ++ target
673
- ++ " '.\n "
674
- ++ " Expected a "
675
- ++ intercalate " or " expected
676
- ++ " , rather than '"
677
- ++ got
678
- ++ " '."
672
+ ++ target
673
+ ++ " '.\n "
674
+ ++ " Expected a "
675
+ ++ intercalate " or " expected
676
+ ++ " , rather than '"
677
+ ++ got
678
+ ++ " '."
679
679
| (target, expected, got) <- targets
680
680
]
681
681
NoSuchTargetSelectorErr targets ->
682
682
unlines
683
683
[ " Unknown target '"
684
- ++ target
685
- ++ " '.\n "
686
- ++ unlines
687
- [ ( case inside of
688
- Just (kind, " " ) ->
689
- " The " ++ kind ++ " has no "
690
- Just (kind, thing) ->
691
- " The " ++ kind ++ " " ++ thing ++ " has no "
692
- Nothing -> " There is no "
693
- )
694
- ++ intercalate
695
- " or "
696
- [ mungeThing thing ++ " '" ++ got ++ " '"
697
- | (thing, got, _alts) <- nosuch'
698
- ]
699
- ++ " ."
700
- ++ if null alternatives
701
- then " "
702
- else
703
- " \n Perhaps you meant "
704
- ++ intercalate
705
- " ;\n or "
706
- [ " the " ++ thing ++ " '" ++ intercalate " ' or '" alts ++ " '?"
707
- | (thing, alts) <- alternatives
708
- ]
709
- | (inside, nosuch') <- groupByContainer nosuch
710
- , let alternatives =
711
- [ (thing, alts)
712
- | (thing, _got, alts@ (_ : _)) <- nosuch'
684
+ ++ target
685
+ ++ " '.\n "
686
+ ++ unlines
687
+ [ ( case inside of
688
+ Just (kind, " " ) ->
689
+ " The " ++ kind ++ " has no "
690
+ Just (kind, thing) ->
691
+ " The " ++ kind ++ " " ++ thing ++ " has no "
692
+ Nothing -> " There is no "
693
+ )
694
+ ++ intercalate
695
+ " or "
696
+ [ mungeThing thing ++ " '" ++ got ++ " '"
697
+ | (thing, got, _alts) <- nosuch'
713
698
]
714
- ]
699
+ ++ " ."
700
+ ++ if null alternatives
701
+ then " "
702
+ else
703
+ " \n Perhaps you meant "
704
+ ++ intercalate
705
+ " ;\n or "
706
+ [ " the " ++ thing ++ " '" ++ intercalate " ' or '" alts ++ " '?"
707
+ | (thing, alts) <- alternatives
708
+ ]
709
+ | (inside, nosuch') <- groupByContainer nosuch
710
+ , let alternatives =
711
+ [ (thing, alts)
712
+ | (thing, _got, alts@ (_ : _)) <- nosuch'
713
+ ]
714
+ ]
715
715
| (target, nosuch) <- targets
716
716
, let groupByContainer =
717
717
map
@@ -731,16 +731,16 @@ exceptionMessageCabalInstall e = case e of
731
731
TargetSelectorAmbiguousErr targets ->
732
732
unlines
733
733
[ " Ambiguous target '"
734
- ++ target
735
- ++ " '. It could be:\n "
736
- ++ unlines
737
- [ " "
738
- ++ ut
739
- ++ " ("
740
- ++ bt
741
- ++ " )"
742
- | (ut, bt) <- amb
743
- ]
734
+ ++ target
735
+ ++ " '. It could be:\n "
736
+ ++ unlines
737
+ [ " "
738
+ ++ ut
739
+ ++ " ("
740
+ ++ bt
741
+ ++ " )"
742
+ | (ut, bt) <- amb
743
+ ]
744
744
| (target, amb) <- targets
745
745
]
746
746
TargetSelectorNoCurrentPackageErr target ->
@@ -787,11 +787,11 @@ exceptionMessageCabalInstall e = case e of
787
787
++ " be unambiguous but matches the following targets:\n "
788
788
++ unlines
789
789
[ " '"
790
- ++ rendering
791
- ++ " ', matching:"
792
- ++ concatMap
793
- (" \n - " ++ )
794
- matches
790
+ ++ rendering
791
+ ++ " ', matching:"
792
+ ++ concatMap
793
+ (" \n - " ++ )
794
+ matches
795
795
| (rendering, matches) <- renderingsAndMatches
796
796
]
797
797
++ " \n Note: Cabal expects to be able to make a single fully "
@@ -887,7 +887,7 @@ exceptionMessageCabalInstall e = case e of
887
887
renderCabalFileParseError cbfError
888
888
ProjectConfigParseFailure pcfError ->
889
889
renderProjectConfigParseError pcfError
890
- CleanActionNotPackage ->
890
+ CleanActionNotPackage ->
891
891
" Not a cabal project or package directory; skipping project cleanup."
892
892
893
893
instance Exception (VerboseException CabalInstallException ) where
0 commit comments