{-# LANGUAGE NoImplicitPrelude #-}

-- | Functions related to Stack's @update@ command.

module Stack.Update
  ( updateCmd
  ) where

import          Stack.Prelude
import          Stack.Runners ( ShouldReexec (..), withConfig )
import          Stack.Types.Runner ( Runner )

-- | Function underlying the @stack update@ command. Update the package index.

updateCmd :: () -> RIO Runner ()
updateCmd :: () -> RIO Runner ()
updateCmd () = forall a. ShouldReexec -> RIO Config a -> RIO Runner a
withConfig ShouldReexec
NoReexec (forall (f :: * -> *) a. Functor f => f a -> f ()
void (forall env.
(HasPantryConfig env, HasLogFunc env) =>
Maybe Utf8Builder -> RIO env DidUpdateOccur
updateHackageIndex forall a. Maybe a
Nothing))