-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Tool for creating completely configured production Haskell projects. -- -- Tool for creating completely configured production Haskell projects. -- See README.md for details. @package summoner @version 1.0.4 -- | This module contains functions for colorful printing into terminal. module Summoner.Ansi -- | ANSI colors: come in various intensities, which are controlled by -- ColorIntensity data Color :: * Black :: Color Red :: Color Green :: Color Yellow :: Color Blue :: Color Magenta :: Color Cyan :: Color White :: Color putStrFlush :: Text -> IO () -- | Takes list of formatting options, prints text using this format -- options. beautyPrint :: [IO ()] -> Text -> IO () -- | Starts bold printing. bold :: IO () boldText :: Text -> IO () boldDefault :: Text -> IO () italic :: IO () -- | Resets all previous settings. reset :: IO () prompt :: IO Text setColor :: Color -> IO () successMessage :: Text -> IO () warningMessage :: Text -> IO () errorMessage :: Text -> IO () infoMessage :: Text -> IO () skipMessage :: Text -> IO () module Summoner.License newtype License License :: Text -> License [unLicense] :: License -> Text customizeLicense :: Text -> Text -> Text -> Text -> Text licenseNames :: [License] githubLicenseQueryNames :: [(License, Text)] instance GHC.Show.Show Summoner.License.License instance GHC.Classes.Ord Summoner.License.License instance GHC.Classes.Eq Summoner.License.License instance Data.String.IsString Summoner.License.License instance Data.Aeson.Types.FromJSON.FromJSON Summoner.License.License -- | This module contains various function to work with commands. module Summoner.Process deleteFile :: FilePath -> IO () instance (a ~ Data.Text.Internal.Text, b ~ ()) => Data.String.IsString ([a] -> GHC.Types.IO b) module Summoner.ProjectData -- | Data needed for project creation. data ProjectData ProjectData :: Text -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [GhcVer] -> Text -> Maybe CustomPrelude -> [Text] -> ProjectData -- | repository name [repo] :: ProjectData -> Text -- | github username [owner] :: ProjectData -> Text -- | project description [description] :: ProjectData -> Text -- | full name [nm] :: ProjectData -> Text -- | e-mail [email] :: ProjectData -> Text -- | year [year] :: ProjectData -> Text -- | project category [category] :: ProjectData -> Text -- | type of license [license] :: ProjectData -> Text -- | license text [licenseText] :: ProjectData -> Text -- | github repository [github] :: ProjectData -> Bool -- | Travis CI integration [travis] :: ProjectData -> Bool -- | AppVeyor CI integration [appVey] :: ProjectData -> Bool -- | build script [script] :: ProjectData -> Bool -- | is library [isLib] :: ProjectData -> Bool -- | is executable [isExe] :: ProjectData -> Bool -- | add tests [test] :: ProjectData -> Bool -- | add benchmarks [bench] :: ProjectData -> Bool -- | ghc versions [testedVersions] :: ProjectData -> [GhcVer] -- | Base library to use [base] :: ProjectData -> Text -- | custom prelude to be used [prelude] :: ProjectData -> Maybe CustomPrelude -- | default extensions [extensions] :: ProjectData -> [Text] -- | Represents some selected set of GHC versions. data GhcVer Ghc7103 :: GhcVer Ghc801 :: GhcVer Ghc802 :: GhcVer Ghc822 :: GhcVer -- | Supported by summoner GHC versions for project templates. supportedGhcVers :: [GhcVer] -- | Converts numeric dot-separated GHC version into GhcVer. parseGhcVer :: Text -> Maybe GhcVer -- | Converts GhcVer into dot-separated string. showGhcVer :: GhcVer -> Text -- | Returns latest known LTS resolver for all GHC versions except default -- one. latestLts :: GhcVer -> Text baseNopreludeVer :: GhcVer -> Text -- | Used for detecting the user decision during CLI input. data Decision Yes :: Decision Nop :: Decision Idk :: Decision data CustomPrelude Prelude :: Text -> Text -> CustomPrelude [cpPackage] :: CustomPrelude -> Text [cpModule] :: CustomPrelude -> Text data Answer Y :: Answer N :: Answer yesOrNo :: Text -> Maybe Answer instance GHC.Show.Show Summoner.ProjectData.ProjectData instance GHC.Show.Show Summoner.ProjectData.CustomPrelude instance GHC.Enum.Bounded Summoner.ProjectData.GhcVer instance GHC.Enum.Enum Summoner.ProjectData.GhcVer instance GHC.Show.Show Summoner.ProjectData.GhcVer instance GHC.Classes.Ord Summoner.ProjectData.GhcVer instance GHC.Classes.Eq Summoner.ProjectData.GhcVer instance GHC.Generics.Generic Summoner.ProjectData.Decision instance GHC.Enum.Bounded Summoner.ProjectData.Decision instance GHC.Enum.Enum Summoner.ProjectData.Decision instance GHC.Classes.Eq Summoner.ProjectData.Decision instance GHC.Show.Show Summoner.ProjectData.Decision instance Data.Semigroup.Semigroup Summoner.ProjectData.Decision instance GHC.Base.Monoid Summoner.ProjectData.Decision instance Generics.Deriving.Semigroup.GSemigroup Summoner.ProjectData.Decision instance Generics.Deriving.Monoid.GMonoid Summoner.ProjectData.Decision -- | This module contains some default values to use. module Summoner.Default defaultGHC :: GhcVer defaultTomlFile :: String defaultConfigFile :: IO FilePath currentYear :: IO Text endLine :: Text module Summoner.Text -- | Creates module name from the name of the package Ex: -- my-lovely-projectMyLovelyProject packageToModule :: Text -> Text -- | Converts every element of list into Text and then joins every -- element into single Text like intercalate. intercalateMap :: Text -> (a -> Text) -> [a] -> Text headToUpper :: Text -> Text -- | This module contains function to proper questioning in terminal. module Summoner.Question printQuestion :: Text -> [Text] -> IO () choose :: Text -> [Text] -> IO Text chooseYesNo :: Text -> IO a -> IO a -> IO a chooseYesNoBool :: Text -> IO Bool query :: Text -> IO Text queryDef :: Text -> Text -> IO Text queryManyRepeatOnFail :: forall a. (Text -> Maybe a) -> IO [a] checkUniqueName :: Text -> IO Text trueMessage :: Text -> IO Bool falseMessage :: Text -> IO Bool module Summoner.Tree -- | Describes simple structure of filesystem tree. data TreeFs -- | Name of directory (relative) and its containing entries Dir :: FilePath -> [TreeFs] -> TreeFs -- | File name (relative) and file content File :: FilePath -> Text -> TreeFs -- | Walks through directory tree and write file contents, creating all -- intermediate directories. traverseTree :: TreeFs -> IO () -- | Pretty shows the directory tree content. showTree :: TreeFs -> Text -- | This module contains functions for stack template creation. module Summoner.Template -- | Creating template file to use in `stack new` command createStackTemplate :: ProjectData -> TreeFs module Summoner.Validation -- | Validation is Either with a Left that is a Monoid data Validation e a Failure :: e -> Validation e a Success :: a -> Validation e a instance (GHC.Show.Show a, GHC.Show.Show e) => GHC.Show.Show (Summoner.Validation.Validation e a) instance (GHC.Classes.Ord a, GHC.Classes.Ord e) => GHC.Classes.Ord (Summoner.Validation.Validation e a) instance (GHC.Classes.Eq a, GHC.Classes.Eq e) => GHC.Classes.Eq (Summoner.Validation.Validation e a) instance GHC.Base.Functor (Summoner.Validation.Validation e) instance Data.Semigroup.Semigroup e => Data.Semigroup.Semigroup (Summoner.Validation.Validation e a) instance Data.Semigroup.Semigroup e => GHC.Base.Applicative (Summoner.Validation.Validation e) -- | Summoner configurations. module Summoner.Config -- | Potentially incomplete configuration. data ConfigP (p :: Phase) Config :: p :- Text -> p :- Text -> p :- Text -> p :- License -> p :- [GhcVer] -> Decision -> Decision -> Decision -> Decision -> Decision -> Decision -> Decision -> Decision -> Decision -> Last CustomPrelude -> [Text] -> ConfigP [cOwner] :: ConfigP -> p :- Text [cFullName] :: ConfigP -> p :- Text [cEmail] :: ConfigP -> p :- Text [cLicense] :: ConfigP -> p :- License [cGhcVer] :: ConfigP -> p :- [GhcVer] [cGitHub] :: ConfigP -> Decision [cTravis] :: ConfigP -> Decision [cAppVey] :: ConfigP -> Decision [cPrivate] :: ConfigP -> Decision [cScript] :: ConfigP -> Decision [cLib] :: ConfigP -> Decision [cExe] :: ConfigP -> Decision [cTest] :: ConfigP -> Decision [cBench] :: ConfigP -> Decision [cPrelude] :: ConfigP -> Last CustomPrelude [cExtensions] :: ConfigP -> [Text] -- | Incomplete configurations. type PartialConfig = ConfigP 'Partial -- | Complete configurations. type Config = ConfigP 'Final -- | Default Config configurations. defaultConfig :: PartialConfig -- | Make sure that all the required configurations options were specified. finalise :: PartialConfig -> Validation [Text] Config -- | Read configuration from the given file and return it in data type. loadFileConfig :: MonadIO m => FilePath -> m PartialConfig instance GHC.Generics.Generic (Summoner.Config.ConfigP p) instance (Generics.Deriving.Semigroup.GSemigroup (p Summoner.Config.:- Data.Text.Internal.Text), Generics.Deriving.Semigroup.GSemigroup (p Summoner.Config.:- Summoner.License.License), Generics.Deriving.Semigroup.GSemigroup (p Summoner.Config.:- [Summoner.ProjectData.GhcVer])) => Generics.Deriving.Semigroup.GSemigroup (Summoner.Config.ConfigP p) instance (Generics.Deriving.Monoid.GMonoid (p Summoner.Config.:- Data.Text.Internal.Text), Generics.Deriving.Monoid.GMonoid (p Summoner.Config.:- Summoner.License.License), Generics.Deriving.Monoid.GMonoid (p Summoner.Config.:- [Summoner.ProjectData.GhcVer])) => Generics.Deriving.Monoid.GMonoid (Summoner.Config.ConfigP p) instance GHC.Show.Show Summoner.Config.LoadTomlException instance GHC.Exception.Exception Summoner.Config.LoadTomlException instance Data.Semigroup.Semigroup Summoner.Config.PartialConfig instance GHC.Base.Monoid Summoner.Config.PartialConfig -- | This module introduces functional for project creation. module Summoner.Project -- | Generate the project. generateProject :: Text -> Config -> IO () -- | This module contains functions and data types to parse CLI inputs. module Summoner.CLI summon :: IO () module Summoner