Rename lots of modules

This commit is contained in:
Julian Ospald 2021-11-05 22:57:15 +01:00
parent 34910f853b
commit 7f542646dd
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
41 changed files with 130 additions and 113 deletions

View File

@ -13,8 +13,8 @@ import GHCup.Errors
import GHCup.Types.Optics ( getDirs )
import GHCup.Types hiding ( LeanAppState(..) )
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Utils.Prelude ( decUTF8Safe )
import GHCup.Logger
import GHCup.Prelude ( decUTF8Safe )
import GHCup.System.Process
import Brick

View File

@ -12,9 +12,9 @@ module GHCup.OptParse.ChangeLog where
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Logger
import GHCup.OptParse.Common
import GHCup.Utils.String.QQ
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )
@ -34,7 +34,7 @@ import GHCup.Types.Optics
import GHCup.Utils
import Data.Versions
import URI.ByteString (serializeURIRef')
import GHCup.Utils.Prelude
import GHCup.Prelude
import GHCup.System.Process (exec)
import Data.Char (toLower)

View File

@ -14,9 +14,9 @@ import GHCup.Platform
import GHCup.Types
import GHCup.Types.Optics
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Utils.MegaParsec
import GHCup.Utils.Prelude
import GHCup.Logger
import GHCup.MegaParsec
import GHCup.Prelude
import Control.Exception.Safe
#if !MIN_VERSION_base(4,13,0)

View File

@ -16,9 +16,9 @@ import GHCup.Errors
import GHCup.Types
import GHCup.Types.Optics
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Logger
import GHCup.OptParse.Common
import GHCup.Utils.String.QQ
import GHCup.QQ.String
import GHCup.System.Process
#if !MIN_VERSION_base(4,13,0)

View File

@ -14,9 +14,9 @@ module GHCup.OptParse.Config where
import GHCup.Errors
import GHCup.Types
import GHCup.Utils
import GHCup.Utils.Prelude
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Prelude
import GHCup.Logger
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -17,9 +17,9 @@ import GHCup
import GHCup.Errors
import GHCup.Version
import GHCup.Types
import GHCup.Utils.Prelude
import GHCup.Utils.Dirs
import GHCup.Utils.Logger
import GHCup.Prelude
import GHCup.Directories
import GHCup.Logger
import GHCup.System.Process
#if !MIN_VERSION_base(4,13,0)

View File

@ -14,8 +14,8 @@ module GHCup.OptParse.GC where
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -17,8 +17,8 @@ import GHCup.OptParse.Common
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.QQ.String
import GHCup.System.Process
import Codec.Archive

View File

@ -11,7 +11,7 @@ module GHCup.OptParse.List where
import GHCup
import GHCup.Utils.Prelude
import GHCup.Prelude
import GHCup.Types
import GHCup.OptParse.Common

View File

@ -14,7 +14,7 @@ module GHCup.OptParse.Nuke where
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Logger
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -14,9 +14,9 @@ module GHCup.OptParse.Prefetch where
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Logger
import GHCup.OptParse.Common
import GHCup.Utils.String.QQ
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )
@ -33,7 +33,7 @@ import Text.PrettyPrint.HughesPJClass ( prettyShow )
import qualified Data.Text as T
import Control.Exception.Safe (MonadMask)
import GHCup.Utils.Prelude
import GHCup.Prelude
import GHCup.Download (getDownloadsF)

View File

@ -18,9 +18,9 @@ import GHCup.Errors
import GHCup.Types
import GHCup.Types.Optics
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Logger
import GHCup.OptParse.Common
import GHCup.Utils.String.QQ
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -17,8 +17,8 @@ import GHCup.OptParse.Common
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -10,7 +10,7 @@ module GHCup.OptParse.ToolRequirements where
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Logger
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )
@ -28,7 +28,7 @@ import qualified Data.Text.IO as T
import Control.Exception.Safe (MonadMask)
import GHCup.Types.Optics
import GHCup.Platform
import GHCup.Utils.Prelude
import GHCup.Prelude
import GHCup.Requirements
import System.IO

View File

@ -16,8 +16,8 @@ module GHCup.OptParse.UnSet where
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -14,7 +14,7 @@ module GHCup.OptParse.Upgrade where
import GHCup
import GHCup.Errors
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Logger
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -17,8 +17,8 @@ import GHCup
import GHCup.Errors
import GHCup.OptParse.Common
import GHCup.Types
import GHCup.Utils.Logger
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -21,9 +21,9 @@ import GHCup.Errors
import GHCup.Platform
import GHCup.Types
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Utils.Prelude
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.Prelude
import GHCup.QQ.String
import GHCup.Version
import Cabal.Plan ( findPlanJson, SearchPlanJson(..) )

View File

@ -52,7 +52,7 @@ library
exposed-modules:
GHCup
GHCup.Download
GHCup.Download.Utils
GHCup.Download.Common
GHCup.Errors
GHCup.Platform
GHCup.Requirements
@ -60,15 +60,16 @@ library
GHCup.Types.JSON
GHCup.Types.Optics
GHCup.Utils
GHCup.Utils.Dirs
GHCup.Directories
GHCup.System.Process
GHCup.System.Directory
GHCup.System.Process.Common
GHCup.Utils.Logger
GHCup.Utils.MegaParsec
GHCup.Utils.Prelude
GHCup.Utils.String.QQ
GHCup.Utils.Version.QQ
GHCup.System.Console
GHCup.Logger
GHCup.MegaParsec
GHCup.Prelude
GHCup.QQ.String
GHCup.QQ.Version
GHCup.Version
hs-source-dirs: lib
@ -154,8 +155,8 @@ library
cpp-options: -DIS_WINDOWS
other-modules:
GHCup.System.Process.Windows
GHCup.Utils.Prelude.Windows
GHCup.Utils.Windows
GHCup.Prelude.Windows
GHCup.System.Console.Windows
build-depends:
, bzlib
@ -165,8 +166,8 @@ library
else
other-modules:
GHCup.System.Process.Posix
GHCup.Utils.Posix
GHCup.Utils.Prelude.Posix
GHCup.System.Console.Posix
GHCup.Prelude.Posix
System.Console.Terminal.Common
System.Console.Terminal.Posix

View File

@ -33,10 +33,10 @@ import GHCup.Types
import GHCup.Types.JSON ( )
import GHCup.Types.Optics
import GHCup.Utils
import GHCup.Utils.Logger
import GHCup.Utils.Prelude
import GHCup.Utils.String.QQ
import GHCup.Utils.Version.QQ
import GHCup.Logger
import GHCup.Prelude
import GHCup.QQ.String
import GHCup.QQ.Version
import GHCup.Version
import GHCup.System.Directory
import GHCup.System.Process
@ -96,7 +96,7 @@ import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Encoding as E
import qualified Text.Megaparsec as MP
import GHCup.Utils.MegaParsec
import GHCup.MegaParsec
import Control.Concurrent (threadDelay)

View File

@ -5,7 +5,7 @@
{-# LANGUAGE ViewPatterns #-}
{-|
Module : GHCup.Utils.Dirs
Module : GHCup.Directories
Description : Definition of GHCup directories
Copyright : (c) Julian Ospald, 2020
License : LGPL-3.0
@ -13,7 +13,7 @@ Maintainer : hasufell@hasufell.de
Stability : experimental
Portability : portable
-}
module GHCup.Utils.Dirs
module GHCup.Directories
( getAllDirs
, ghcupBaseDir
, ghcupConfigFile
@ -35,9 +35,9 @@ import GHCup.Errors
import GHCup.Types
import GHCup.Types.JSON ( )
import GHCup.Types.Optics
import GHCup.Utils.MegaParsec
import GHCup.Utils.Logger
import GHCup.Utils.Prelude
import GHCup.MegaParsec
import GHCup.Logger
import GHCup.Prelude
import Control.Exception.Safe
import Control.Monad

View File

@ -27,16 +27,16 @@ module GHCup.Download where
#if defined(INTERNAL_DOWNLOADER)
import GHCup.Download.IOStreams
import GHCup.Download.Utils
import GHCup.Download.Common
#endif
import GHCup.Errors
import GHCup.Types
import GHCup.Types.Optics
import GHCup.Types.JSON ( )
import GHCup.Utils.Dirs
import GHCup.Directories
import GHCup.System.Process
import GHCup.Utils.Logger
import GHCup.Utils.Prelude
import GHCup.Logger
import GHCup.Prelude
import GHCup.Version
import Control.Applicative

View File

@ -4,13 +4,13 @@
{-# LANGUAGE TypeFamilies #-}
module GHCup.Download.Utils where
module GHCup.Download.Common where
import GHCup.Errors
import GHCup.Types.Optics
import GHCup.Types.JSON ( )
import GHCup.Utils.Prelude
import GHCup.Prelude
import Control.Applicative
import Control.Monad

View File

@ -7,10 +7,10 @@
module GHCup.Download.IOStreams where
import GHCup.Download.Utils
import GHCup.Download.Common
import GHCup.Errors
import GHCup.Types.JSON ( )
import GHCup.Utils.Prelude
import GHCup.Prelude
import Control.Applicative
import Control.Exception.Safe

View File

@ -4,7 +4,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : GHCup.Utils.Logger
Module : GHCup.Logger
Description : logger definition
Copyright : (c) Julian Ospald, 2020
License : LGPL-3.0
@ -14,12 +14,12 @@ Portability : portable
Here we define our main logger.
-}
module GHCup.Utils.Logger where
module GHCup.Logger where
import GHCup.Types
import GHCup.Types.Optics
import {-# SOURCE #-} GHCup.System.Directory
import GHCup.Utils.String.QQ
import GHCup.QQ.String
import Control.Exception.Safe
import Control.Monad
@ -34,7 +34,7 @@ import System.IO.Error
import Text.Regex.Posix
import qualified Data.ByteString as B
import GHCup.Utils.Prelude
import GHCup.Prelude
import qualified Data.Text as T
logInfo :: ( MonadReader env m

View File

@ -3,7 +3,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module GHCup.Utils.Logger where
module GHCup.Logger where
import GHCup.Types

View File

@ -2,7 +2,7 @@
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : GHCup.Utils.MegaParsec
Module : GHCup.MegaParsec
Description : MegaParsec utilities
Copyright : (c) Julian Ospald, 2020
License : LGPL-3.0
@ -10,7 +10,7 @@ Maintainer : hasufell@hasufell.de
Stability : experimental
Portability : portable
-}
module GHCup.Utils.MegaParsec where
module GHCup.MegaParsec where
import GHCup.Types

View File

@ -24,9 +24,9 @@ import GHCup.Types
import GHCup.Types.Optics
import GHCup.Types.JSON ( )
import GHCup.System.Process
import GHCup.Utils.Logger
import GHCup.Utils.Prelude
import GHCup.Utils.String.QQ
import GHCup.Logger
import GHCup.Prelude
import GHCup.QQ.String
#if !MIN_VERSION_base(4,13,0)
import Control.Monad.Fail ( MonadFail )

View File

@ -7,7 +7,7 @@
{-# LANGUAGE TypeOperators #-}
{-|
Module : GHCup.Utils.Prelude
Module : GHCup.Prelude
Description : MegaParsec utilities
Copyright : (c) Julian Ospald, 2020
License : LGPL-3.0
@ -17,12 +17,12 @@ Portability : portable
GHCup specific prelude. Lots of Excepts functionality.
-}
module GHCup.Utils.Prelude
(module GHCup.Utils.Prelude,
module GHCup.Prelude
(module GHCup.Prelude,
#if defined(IS_WINDOWS)
module GHCup.Utils.Prelude.Windows
module GHCup.Prelude.Windows
#else
module GHCup.Utils.Prelude.Posix
module GHCup.Prelude.Posix
#endif
)
where
@ -30,11 +30,11 @@ where
import GHCup.Types
import GHCup.Errors
import GHCup.Types.Optics
import {-# SOURCE #-} GHCup.Utils.Logger
import {-# SOURCE #-} GHCup.Logger
#if defined(IS_WINDOWS)
import GHCup.Utils.Prelude.Windows
import GHCup.Prelude.Windows
#else
import GHCup.Utils.Prelude.Posix
import GHCup.Prelude.Posix
#endif
import Control.Applicative

View File

@ -1,4 +1,4 @@
module GHCup.Utils.Prelude.Posix where
module GHCup.Prelude.Posix where
import System.Directory
import System.Posix.Files

View File

@ -1,4 +1,4 @@
module GHCup.Utils.Prelude.Windows where
module GHCup.Prelude.Windows where
import qualified System.Win32.File as Win32

View File

@ -1,7 +1,7 @@
{-# LANGUAGE TemplateHaskell #-}
{-|
Module : GHCup.Utils.String.QQ
Module : GHCup.QQ.String
Description : String quasi quoters
Copyright : (c) Audrey Tang <audreyt@audreyt.org> 2019, Julian Ospald <hasufell@posteo.de> 2020
License : LGPL-3.0
@ -30,7 +30,7 @@ Any instance of the IsString type is permitted.
(For GHC versions 6, write "[$s||]" instead of "[s||]".)
-}
module GHCup.Utils.String.QQ
module GHCup.QQ.String
( s
)
where

View File

@ -8,7 +8,7 @@
{-|
Module : GHCup.Utils.Version.QQ
Module : GHCup.QQ.Version
Description : Version quasi-quoters
Copyright : (c) Julian Ospald, 2020
License : LGPL-3.0
@ -16,7 +16,7 @@ Maintainer : hasufell@hasufell.de
Stability : experimental
Portability : portable
-}
module GHCup.Utils.Version.QQ where
module GHCup.QQ.Version where
import Data.Data
import Data.Text ( Text )

View File

@ -0,0 +1,16 @@
{-# LANGUAGE CPP #-}
module GHCup.System.Console (
#if IS_WINDOWS
module GHCup.System.Console.Windows
#else
module GHCup.System.Console.Posix
#endif
) where
#if IS_WINDOWS
import GHCup.System.Console.Windows
#else
import GHCup.System.Console.Posix
#endif

View File

@ -1,4 +1,4 @@
module GHCup.Utils.Posix where
module GHCup.System.Console.Posix where
-- | Enables ANSI support on windows, does nothing on unix.

View File

@ -3,7 +3,7 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module GHCup.Utils.Windows where
module GHCup.System.Console.Windows where
import Control.Exception.Safe

View File

@ -5,7 +5,7 @@
module GHCup.System.Directory where
import GHCup.Utils.Prelude
import GHCup.Prelude
import Control.Monad.Reader
import Data.Maybe

View File

@ -15,8 +15,8 @@ Some of these functions use sophisticated logging.
-}
module GHCup.System.Process.Posix where
import GHCup.Utils.Prelude
import GHCup.Utils.Logger
import GHCup.Prelude
import GHCup.Logger
import GHCup.Types
import GHCup.Types.Optics
import GHCup.System.Process.Common

View File

@ -16,7 +16,7 @@ Some of these functions use sophisticated logging.
module GHCup.System.Process.Windows where
import {-# SOURCE #-} GHCup.Utils ( getLinkTarget, pathIsLink )
import GHCup.Utils.Dirs
import GHCup.Directories
import GHCup.Types
import GHCup.Types.Optics
import GHCup.System.Directory

View File

@ -22,9 +22,9 @@ Portability : portable
module GHCup.Types.JSON where
import GHCup.Types
import GHCup.Utils.MegaParsec
import GHCup.Utils.Prelude
import GHCup.Utils.Logger () -- TH is broken shite and needs GHCup.Utils.Logger for linking, although we don't depend on the file.
import GHCup.MegaParsec
import GHCup.Prelude
import GHCup.Logger () -- TH is broken shite and needs GHCup.Logger for linking, although we don't depend on the file.
-- This is due to the boot file.
import Control.Applicative ( (<|>) )

View File

@ -20,32 +20,32 @@ This module contains GHCup helpers specific to
installation and introspection of files/versions etc.
-}
module GHCup.Utils
( module GHCup.Utils.Dirs
( module GHCup.Directories
, module GHCup.Utils
#if defined(IS_WINDOWS)
, module GHCup.Utils.Windows
, module GHCup.System.Console.Windows
#else
, module GHCup.Utils.Posix
, module GHCup.System.Console.Posix
#endif
)
where
#if defined(IS_WINDOWS)
import GHCup.Utils.Windows
import GHCup.System.Console.Windows
#else
import GHCup.Utils.Posix
import GHCup.System.Console.Posix
#endif
import GHCup.Download
import GHCup.Errors
import GHCup.Types
import GHCup.Types.Optics
import GHCup.Types.JSON ( )
import GHCup.Utils.Dirs
import GHCup.Utils.Logger
import GHCup.Utils.MegaParsec
import GHCup.Utils.Prelude
import GHCup.Utils.String.QQ
import GHCup.Directories
import GHCup.Logger
import GHCup.MegaParsec
import GHCup.Prelude
import GHCup.QQ.String
import GHCup.System.Directory
import GHCup.System.Process
@ -98,14 +98,14 @@ import qualified Data.List.NonEmpty as NE
-- >>> import System.Directory
-- >>> import URI.ByteString
-- >>> import qualified Data.Text as T
-- >>> import GHCup.Utils.Prelude
-- >>> import GHCup.Prelude
-- >>> import GHCup.Download
-- >>> import GHCup.Version
-- >>> import GHCup.Errors
-- >>> import GHCup.Types
-- >>> import GHCup.Types.Optics
-- >>> import Optics
-- >>> import GHCup.Utils.Version.QQ
-- >>> import GHCup.QQ.Version
-- >>> import qualified Data.Text.Encoding as E
-- >>> import Control.Monad.Reader
-- >>> import Haskus.Utils.Variant.Excepts