module Stackctl.Prelude ( module X , decodeUtf8 , maybeLens ) where import RIO as X hiding ( LogLevel (..) , LogSource , logDebug , logDebugS , logError , logErrorS , logInfo , logInfoS , logOther , logOtherS , logWarn , logWarnS ) import Blammo.Logging as X import Control.Error.Util as X (hush, note) import Data.Aeson as X (ToJSON (..), object) import Data.Text as X (pack, unpack) import System.FilePath as X ( dropExtension , takeBaseName , takeDirectory , (<.>) , (</>) ) import UnliftIO.Directory as X (withCurrentDirectory) {-# ANN module ("HLint: ignore Avoid restricted alias" :: String) #-} decodeUtf8 :: ByteString -> Text decodeUtf8 :: ByteString -> Text decodeUtf8 = OnDecodeError -> ByteString -> Text decodeUtf8With OnDecodeError lenientDecode maybeLens :: a -> Lens' (Maybe a) a maybeLens :: forall a. a -> Lens' (Maybe a) a maybeLens a x = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b lens (forall a. a -> Maybe a -> a fromMaybe a x) forall a b. (a -> b) -> a -> b $ forall a b. a -> b -> a const forall a. a -> Maybe a Just