ghcup 0.1.50.1 → 0.1.50.2
raw patch · 7 files changed
+34/−49 lines, 7 filesdep ~vtyPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: vty
API changes (from Hackage documentation)
- GHCup.Brick.Widgets.Menu: [MenuField] :: Lens' s a -> FieldInput a b n -> Label -> ErrorStatus -> n -> MenuField s n
+ GHCup.Brick.Widgets.Menu: [MenuField] :: forall s a b n. Lens' s a -> FieldInput a b n -> Label -> ErrorStatus -> n -> MenuField s n
- GHCup.Brick.Widgets.Menu: editStateL :: forall n_akUC n_akYH. Lens (EditState n_akUC) (EditState n_akYH) (Editor Text n_akUC) (Editor Text n_akYH)
+ GHCup.Brick.Widgets.Menu: editStateL :: Lens (EditState n1) (EditState n2) (Editor Text n1) (Editor Text n2)
- GHCup.Brick.Widgets.Menu: editStateOverlayOpenL :: forall n_akUC. Lens' (EditState n_akUC) Bool
+ GHCup.Brick.Widgets.Menu: editStateOverlayOpenL :: Lens' (EditState n) Bool
- GHCup.Brick.Widgets.Menu: fieldLabelL :: forall s_akLk n_akLl. Lens' (MenuField s_akLk n_akLl) Label
+ GHCup.Brick.Widgets.Menu: fieldLabelL :: Lens' (MenuField s n) Label
- GHCup.Brick.Widgets.Menu: fieldStatusL :: forall s_akLk n_akLl. Lens' (MenuField s_akLk n_akLl) ErrorStatus
+ GHCup.Brick.Widgets.Menu: fieldStatusL :: Lens' (MenuField s n) ErrorStatus
- GHCup.Brick.Widgets.Menu: handlerMenu :: forall n e s. Eq n => BrickEvent n e -> EventM n (Menu s n) ()
+ GHCup.Brick.Widgets.Menu: handlerMenu :: Eq n => BrickEvent n e -> EventM n (Menu s n) ()
- GHCup.Brick.Widgets.Menu: inputHelpL :: forall a_akCV b_akCW n_akCX. Lens' (FieldInput a_akCV b_akCW n_akCX) HelpMessage
+ GHCup.Brick.Widgets.Menu: inputHelpL :: Lens' (FieldInput a b n) HelpMessage
- GHCup.Brick.Widgets.Menu: inputStateL :: forall a_akCV b_akCW n_akCX. Lens' (FieldInput a_akCV b_akCW n_akCX) b_akCW
+ GHCup.Brick.Widgets.Menu: inputStateL :: Lens' (FieldInput a b n) b
- GHCup.Brick.Widgets.Menu: inputValidatorL :: forall a_akCV b_akCW n_akCX a_akKK. Lens (FieldInput a_akCV b_akCW n_akCX) (FieldInput a_akKK b_akCW n_akCX) (b_akCW -> Either ErrorMessage a_akCV) (b_akCW -> Either ErrorMessage a_akKK)
+ GHCup.Brick.Widgets.Menu: inputValidatorL :: Lens (FieldInput a1 b n) (FieldInput a2 b n) (b -> Either ErrorMessage a1) (b -> Either ErrorMessage a2)
- GHCup.Brick.Widgets.Menu: menuButtonsL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) [Button s_al38 n_al39]
+ GHCup.Brick.Widgets.Menu: menuButtonsL :: Lens' (Menu s n) [Button s n]
- GHCup.Brick.Widgets.Menu: menuFieldsL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) [MenuField s_al38 n_al39]
+ GHCup.Brick.Widgets.Menu: menuFieldsL :: Lens' (Menu s n) [MenuField s n]
- GHCup.Brick.Widgets.Menu: menuFocusRingL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) (FocusRing n_al39)
+ GHCup.Brick.Widgets.Menu: menuFocusRingL :: Lens' (Menu s n) (FocusRing n)
- GHCup.Brick.Widgets.Menu: menuKeyBindingsL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) MenuKeyBindings
+ GHCup.Brick.Widgets.Menu: menuKeyBindingsL :: Lens' (Menu s n) MenuKeyBindings
- GHCup.Brick.Widgets.Menu: menuNameL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) n_al39
+ GHCup.Brick.Widgets.Menu: menuNameL :: Lens' (Menu s n) n
- GHCup.Brick.Widgets.Menu: menuStateL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) s_al38
+ GHCup.Brick.Widgets.Menu: menuStateL :: Lens' (Menu s n) s
- GHCup.Brick.Widgets.Menu: menuTitleL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) Text
+ GHCup.Brick.Widgets.Menu: menuTitleL :: Lens' (Menu s n) Text
- GHCup.Brick.Widgets.Menu: menuValidatorL :: forall s_al38 n_al39. Lens' (Menu s_al38 n_al39) (s_al38 -> Maybe ErrorMessage)
+ GHCup.Brick.Widgets.Menu: menuValidatorL :: Lens' (Menu s n) (s -> Maybe ErrorMessage)
- GHCup.Brick.Widgets.Menu: selectStateEditStateL :: forall i_akQH n_akQI n_akU0. Lens (SelectState i_akQH n_akQI) (SelectState i_akQH n_akU0) (Maybe (Editor Text n_akQI)) (Maybe (Editor Text n_akU0))
+ GHCup.Brick.Widgets.Menu: selectStateEditStateL :: Lens (SelectState i n1) (SelectState i n2) (Maybe (Editor Text n1)) (Maybe (Editor Text n2))
- GHCup.Brick.Widgets.Menu: selectStateFocusRingL :: forall i_akQH n_akQI. Lens' (SelectState i_akQH n_akQI) (FocusRing Int)
+ GHCup.Brick.Widgets.Menu: selectStateFocusRingL :: Lens' (SelectState i n) (FocusRing Int)
- GHCup.Brick.Widgets.Menu: selectStateItemsL :: forall i_akQH n_akQI i_akU1. Lens (SelectState i_akQH n_akQI) (SelectState i_akU1 n_akQI) (NonEmpty (Int, (i_akQH, Bool)), Bool) (NonEmpty (Int, (i_akU1, Bool)), Bool)
+ GHCup.Brick.Widgets.Menu: selectStateItemsL :: Lens (SelectState i1 n) (SelectState i2 n) (NonEmpty (Int, (i1, Bool)), Bool) (NonEmpty (Int, (i2, Bool)), Bool)
- GHCup.Brick.Widgets.Menu: selectStateOverlayOpenL :: forall i_akQH n_akQI. Lens' (SelectState i_akQH n_akQI) Bool
+ GHCup.Brick.Widgets.Menu: selectStateOverlayOpenL :: Lens' (SelectState i n) Bool
- GHCup.Brick.Widgets.SectionList: GenericSectionList :: FocusRing n -> !Vector (GenericList n t e) -> n -> GenericSectionList n t e
+ GHCup.Brick.Widgets.SectionList: GenericSectionList :: FocusRing n -> !Vector (GenericList n t e) -> n -> GenericSectionList n (t :: Type -> Type) e
- GHCup.Brick.Widgets.SectionList: [sectionListElements] :: GenericSectionList n t e -> !Vector (GenericList n t e)
+ GHCup.Brick.Widgets.SectionList: [sectionListElements] :: GenericSectionList n (t :: Type -> Type) e -> !Vector (GenericList n t e)
- GHCup.Brick.Widgets.SectionList: [sectionListFocusRing] :: GenericSectionList n t e -> FocusRing n
+ GHCup.Brick.Widgets.SectionList: [sectionListFocusRing] :: GenericSectionList n (t :: Type -> Type) e -> FocusRing n
- GHCup.Brick.Widgets.SectionList: [sectionListName] :: GenericSectionList n t e -> n
+ GHCup.Brick.Widgets.SectionList: [sectionListName] :: GenericSectionList n (t :: Type -> Type) e -> n
- GHCup.Brick.Widgets.SectionList: data GenericSectionList n t e
+ GHCup.Brick.Widgets.SectionList: data GenericSectionList n (t :: Type -> Type) e
- GHCup.Brick.Widgets.SectionList: handleGenericListEvent :: (Foldable t, Splittable t, Ord n, ListItemSectionNameIndex n) => BrickEvent n a -> EventM n (GenericSectionList n t e) ()
+ GHCup.Brick.Widgets.SectionList: handleGenericListEvent :: forall (t :: Type -> Type) n a e. (Foldable t, Splittable t, Ord n, ListItemSectionNameIndex n) => BrickEvent n a -> EventM n (GenericSectionList n t e) ()
- GHCup.Brick.Widgets.SectionList: moveDown :: (Splittable t, Ord n, Foldable t) => EventM n (GenericSectionList n t e) ()
+ GHCup.Brick.Widgets.SectionList: moveDown :: forall (t :: Type -> Type) n e. (Splittable t, Ord n, Foldable t) => EventM n (GenericSectionList n t e) ()
- GHCup.Brick.Widgets.SectionList: moveUp :: (Splittable t, Ord n, Foldable t) => EventM n (GenericSectionList n t e) ()
+ GHCup.Brick.Widgets.SectionList: moveUp :: forall (t :: Type -> Type) n e. (Splittable t, Ord n, Foldable t) => EventM n (GenericSectionList n t e) ()
- GHCup.Brick.Widgets.SectionList: renderSectionList :: forall n t e. (Traversable t, Ord n, Show n, Eq n, Splittable t, Semigroup (t e)) => (Int -> Bool -> e -> Widget n) -> Bool -> GenericSectionList n t e -> Widget n
+ GHCup.Brick.Widgets.SectionList: renderSectionList :: forall n (t :: Type -> Type) e. (Traversable t, Ord n, Show n, Eq n, Splittable t, Semigroup (t e)) => (Int -> Bool -> e -> Widget n) -> Bool -> GenericSectionList n t e -> Widget n
- GHCup.Brick.Widgets.SectionList: sectionL :: Eq n => n -> Lens' (GenericSectionList n t e) (GenericList n t e)
+ GHCup.Brick.Widgets.SectionList: sectionL :: forall n (t :: Type -> Type) e. Eq n => n -> Lens' (GenericSectionList n t e) (GenericList n t e)
- GHCup.Brick.Widgets.SectionList: sectionListElementsL :: forall n_aMws t_aMwt e_aMwu t_aMy6 e_aMy7. Lens (GenericSectionList n_aMws t_aMwt e_aMwu) (GenericSectionList n_aMws t_aMy6 e_aMy7) (Vector (GenericList n_aMws t_aMwt e_aMwu)) (Vector (GenericList n_aMws t_aMy6 e_aMy7))
+ GHCup.Brick.Widgets.SectionList: sectionListElementsL :: forall n (t1 :: Type -> Type) e1 (t2 :: Type -> Type) e2. Lens (GenericSectionList n t1 e1) (GenericSectionList n t2 e2) (Vector (GenericList n t1 e1)) (Vector (GenericList n t2 e2))
- GHCup.Brick.Widgets.SectionList: sectionListFocusRingL :: forall n_aMws t_aMwt e_aMwu. Lens' (GenericSectionList n_aMws t_aMwt e_aMwu) (FocusRing n_aMws)
+ GHCup.Brick.Widgets.SectionList: sectionListFocusRingL :: forall n (t :: Type -> Type) e. Lens' (GenericSectionList n t e) (FocusRing n)
- GHCup.Brick.Widgets.SectionList: sectionListNameL :: forall n_aMws t_aMwt e_aMwu. Lens' (GenericSectionList n_aMws t_aMwt e_aMwu) n_aMws
+ GHCup.Brick.Widgets.SectionList: sectionListNameL :: forall n (t :: Type -> Type) e. Lens' (GenericSectionList n t e) n
- GHCup.Brick.Widgets.SectionList: sectionListSelectItem :: (Splittable t, Eq n, ListItemSectionNameIndex n, Foldable t) => n -> EventM n (GenericSectionList n t e) ()
+ GHCup.Brick.Widgets.SectionList: sectionListSelectItem :: forall (t :: Type -> Type) n e. (Splittable t, Eq n, ListItemSectionNameIndex n, Foldable t) => n -> EventM n (GenericSectionList n t e) ()
- GHCup.Brick.Widgets.SectionList: sectionListSelectedElement :: (Eq n, Splittable t, Traversable t, Semigroup (t e)) => GenericSectionList n t e -> Maybe (Int, e)
+ GHCup.Brick.Widgets.SectionList: sectionListSelectedElement :: forall n (t :: Type -> Type) e. (Eq n, Splittable t, Traversable t, Semigroup (t e)) => GenericSectionList n t e -> Maybe (Int, e)
Files
- CHANGELOG.md +5/−0
- ghcup.cabal +1/−1
- lib-tui/GHCup/Brick/Actions.hs +5/−3
- lib/GHCup/GHC.hs +12/−2
- lib/GHCup/Prompts.hs +9/−5
- lib/GHCup/Types.hs +1/−37
- scripts/bootstrap/bootstrap-haskell +1/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for ghcup +## 0.1.50.2 -- 2025-05-17++* Respect system `ld` on all platforms and disable GHCs aggressive selection of `ld.gold`, fixes [#1032](https://github.com/haskell/ghcup-hs/issues/1032)+* TUI: allow responding to prompts with Return (defaulting to Yes response) by Jan Hrček wrt [#1253](https://github.com/haskell/ghcup-hs/pull/1253)+ ## 0.1.50.1 -- 2025-03-25 * fix unwanted dynamic linking to libyaml on macOS, fixes [#1246](https://github.com/haskell/ghcup-hs/issues/1246)
ghcup.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: ghcup-version: 0.1.50.1+version: 0.1.50.2 license: LGPL-3.0-only license-file: LICENSE copyright: Julian Ospald 2024
lib-tui/GHCup/Brick/Actions.hs view
@@ -411,7 +411,9 @@ HLS -> liftE $ setHLS lVer SetHLSOnly Nothing $> () Stack -> liftE $ setStack lVer $> () GHCup -> do- promptAnswer <- getUserPromptResponse "Switching GHCup versions is not supported.\nDo you want to install the latest version? [Y/N]: "+ promptAnswer <- getUserPromptResponse+ "Switching GHCup versions is not supported.\nDo you want to install the latest version? [Y/n]: "+ PromptYes case promptAnswer of PromptYes -> do void $ liftE $ upgradeGHCup Nothing False False@@ -421,7 +423,7 @@ VRight _ -> pure $ Right () VLeft e -> case e of (V (NotInstalled tool _)) -> do- promptAnswer <- getUserPromptResponse userPrompt+ promptAnswer <- getUserPromptResponse userPrompt PromptYes case promptAnswer of PromptYes -> do res <- install' input@@ -437,7 +439,7 @@ "This Version of " <> show tool <> " you are trying to set is not installed.\n"- <> "Would you like to install it first? [Y/N]: "+ <> "Would you like to install it first? [Y/n]: " _ -> pure $ Left (prettyHFError e)
lib/GHCup/GHC.hs view
@@ -463,13 +463,24 @@ "ghc-configure" Nothing tmpInstallDest <- lift withGHCupTmpDir- lEM $ make (["DESTDIR=" <> fromGHCupPath tmpInstallDest] <> (words . T.unpack $ installTargets)) (Just $ fromGHCupPath path)+ lEM $ make (["DESTDIR=" <> fromGHCupPath tmpInstallDest] <> (T.unpack <$> withStripTarget (_tvVersion tver) _rPlatform)) (Just $ fromGHCupPath path) liftE $ catchWarn $ lEM @_ @'[ProcessError] $ darwinNotarization _rPlatform (fromGHCupPath tmpInstallDest) liftE $ mergeGHCFileTree (tmpInstallDest `appendGHCupPath` dropDrive (fromInstallDir inst)) inst tver forceInstall pure ()+ where+ installTargets' = T.words installTargets + -- https://github.com/haskell/ghcup-hs/issues/319+ withStripTarget ver plat+ | ver >= [vver|7.10.0|]+ , ver < [vver|8.3.0|]+ , Linux _ <- plat+ = "STRIP_CMD=true":installTargets'+ | otherwise+ = installTargets' + mergeGHCFileTree :: ( MonadReader env m , HasPlatformReq env , HasDirs env@@ -1404,7 +1415,6 @@ ldOverride :: Version -> Platform -> [String] ldOverride ver plat | ver >= [vver|8.2.2|]- , plat `elem` [Linux Alpine, Darwin] = ["--disable-ld-override"] | otherwise = []
lib/GHCup/Prompts.hs view
@@ -9,6 +9,7 @@ where import Control.Monad.Reader+import qualified Data.Text as T import qualified Data.Text.IO as TIO import GHCup.Prelude.Logger import GHCup.Types.Optics@@ -18,11 +19,14 @@ , MonadReader env m , MonadIO m) => PromptQuestion+ -> PromptResponse -- ^ Default reponse to use if user doesn't type explicit response (e.g. just presses Return) -> m PromptResponse--getUserPromptResponse prompt = do+getUserPromptResponse prompt defaultResponse = do logInfo prompt resp <- liftIO TIO.getLine- if resp `elem` ["YES", "yes", "y", "Y"]- then pure PromptYes- else pure PromptNo+ pure $+ if T.null resp+ then defaultResponse+ else if resp `elem` ["YES", "yes", "y", "Y"]+ then PromptYes+ else PromptNo
lib/GHCup/Types.hs view
@@ -263,43 +263,7 @@ | OpenSUSE -- not known | UnknownLinux- deriving (Eq, GHC.Generic, Ord, Show)--instance Enum LinuxDistro where- toEnum 0 = Debian- toEnum 1 = Ubuntu- toEnum 2 = Mint- toEnum 3 = Fedora- toEnum 4 = CentOS- toEnum 5 = RedHat- toEnum 6 = Alpine- toEnum 7 = AmazonLinux- toEnum 8 = Rocky- toEnum 9 = Void- toEnum 10 = Gentoo- toEnum 11 = Exherbo- toEnum 12 = OpenSUSE- toEnum 13 = UnknownLinux- toEnum _ = error "toEnum: out of bounds"-- fromEnum Debian = 0- fromEnum Ubuntu = 1- fromEnum Mint = 2- fromEnum Fedora = 3- fromEnum CentOS = 4- fromEnum RedHat = 5- fromEnum Alpine = 6- fromEnum AmazonLinux = 7- fromEnum Rocky = 8- fromEnum Void = 9- fromEnum Gentoo = 10- fromEnum Exherbo = 11- fromEnum OpenSUSE = 12- fromEnum UnknownLinux = 13--instance Bounded LinuxDistro where- minBound = Debian- maxBound = UnknownLinux+ deriving (Bounded, Eq, Enum, GHC.Generic, Ord, Show) allDistros :: [LinuxDistro] allDistros = enumFromTo minBound maxBound
scripts/bootstrap/bootstrap-haskell view
@@ -41,7 +41,7 @@ plat="$(uname -s)" arch=$(uname -m)-ghver="0.1.50.1"+ghver="0.1.50.2" : "${GHCUP_BASE_URL:=https://downloads.haskell.org/~ghcup}" export GHCUP_SKIP_UPDATE_CHECK=yes