File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1056,10 +1056,18 @@ getExternalSetupMethod verbosity options pkg bt = do
1056
1056
buildTypeScript cabalLibVersion = case bt of
1057
1057
Simple -> " import Distribution.Simple; main = defaultMain\n "
1058
1058
Configure
1059
- | cabalLibVersion >= mkVersion [1 , 3 , 10 ] -> " import Distribution.Simple; main = defaultMainWithSetupHooks autoconfSetupHooks\n "
1060
- | otherwise -> " import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks\n "
1059
+ | cabalLibVersion >= mkVersion [3 , 13 , 0 ]
1060
+ -> " import Distribution.Simple; main = defaultMainWithSetupHooks autoconfSetupHooks\n "
1061
+ | cabalLibVersion >= mkVersion [1 , 3 , 10 ]
1062
+ -> " import Distribution.Simple; main = defaultMainWithHooks autoconfUserHooks\n "
1063
+ | otherwise
1064
+ -> " import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks\n "
1061
1065
Make -> " import Distribution.Make; main = defaultMain\n "
1062
- Hooks -> " import Distribution.Simple; import SetupHooks; main = defaultMainWithSetupHooks setupHooks\n "
1066
+ Hooks
1067
+ | cabalLibVersion >= mkVersion [3 , 13 , 0 ]
1068
+ -> " import Distribution.Simple; import SetupHooks; main = defaultMainWithSetupHooks setupHooks\n "
1069
+ | otherwise
1070
+ -> error " buildTypeScript Hooks with Cabal < 3.13"
1063
1071
Custom -> error " buildTypeScript Custom"
1064
1072
-- TODO: should all of these include {-# LANGUAGE NoImplicitPrelude #-}?
1065
1073
-- What happens if there is no base dependency declared in the Cabal file?
You can’t perform that action at this time.
0 commit comments