hpack-0.37.0: A modern format for Haskell packages
Safe HaskellNone
LanguageHaskell2010

Hpack.Config

Synopsis

Documentation

NOTE: This module is exposed to allow integration of Hpack into other tools. It is not meant for general use by end users. The following caveats apply:

  • The API is undocumented, consult the source instead.
  • The exposed types and functions primarily serve Hpack's own needs, not that of a public API. Breaking changes can happen as Hpack evolves.

As an Hpack user you either want to use the hpack executable or a build tool that supports Hpack (e.g. stack or cabal2nix).

data DecodeOptions Source #

Constructors

DecodeOptions 

Fields

newtype ProgramName Source #

Constructors

ProgramName 

Fields

Instances

Instances details
IsString ProgramName Source # 
Instance details

Defined in Hpack.Error

Methods

fromString :: String -> ProgramName

Show ProgramName Source # 
Instance details

Defined in Hpack.Error

Methods

showsPrec :: Int -> ProgramName -> ShowS

show :: ProgramName -> String

showList :: [ProgramName] -> ShowS

Eq ProgramName Source # 
Instance details

Defined in Hpack.Error

Methods

(==) :: ProgramName -> ProgramName -> Bool

(/=) :: ProgramName -> ProgramName -> Bool

packageConfig :: FilePath Source #

data DecodeResult Source #

Instances

Instances details
Show DecodeResult Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> DecodeResult -> ShowS

show :: DecodeResult -> String

showList :: [DecodeResult] -> ShowS

Eq DecodeResult Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: DecodeResult -> DecodeResult -> Bool

(/=) :: DecodeResult -> DecodeResult -> Bool

package :: String -> String -> Package Source #

data Package Source #

Constructors

Package 

Fields

Instances

Instances details
Show Package Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Package -> ShowS

show :: Package -> String

showList :: [Package] -> ShowS

Eq Package Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Package -> Package -> Bool

(/=) :: Package -> Package -> Bool

newtype Dependencies Source #

Constructors

Dependencies 

Fields

Instances

Instances details
Monoid Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

Semigroup Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

IsList Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

Associated Types

type Item Dependencies 
Instance details

Defined in Hpack.Syntax.Dependencies

type Item Dependencies = (String, DependencyInfo)
Show Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

Methods

showsPrec :: Int -> Dependencies -> ShowS

show :: Dependencies -> String

showList :: [Dependencies] -> ShowS

Eq Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

Methods

(==) :: Dependencies -> Dependencies -> Bool

(/=) :: Dependencies -> Dependencies -> Bool

FromValue Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

type Item Dependencies Source # 
Instance details

Defined in Hpack.Syntax.Dependencies

type Item Dependencies = (String, DependencyInfo)

type GitRef = String Source #

type GitUrl = String Source #

data BuildTool Source #

Constructors

BuildTool String String 
LocalBuildTool String 

Instances

Instances details
Show BuildTool Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> BuildTool -> ShowS

show :: BuildTool -> String

showList :: [BuildTool] -> ShowS

Eq BuildTool Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: BuildTool -> BuildTool -> Bool

(/=) :: BuildTool -> BuildTool -> Bool

Ord BuildTool Source # 
Instance details

Defined in Hpack.Config

Methods

compare :: BuildTool -> BuildTool -> Ordering

(<) :: BuildTool -> BuildTool -> Bool

(<=) :: BuildTool -> BuildTool -> Bool

(>) :: BuildTool -> BuildTool -> Bool

(>=) :: BuildTool -> BuildTool -> Bool

max :: BuildTool -> BuildTool -> BuildTool

min :: BuildTool -> BuildTool -> BuildTool

type GhcOption = String Source #

data Verbatim Source #

Constructors

VerbatimLiteral String 
VerbatimObject (Map String VerbatimValue) 

Instances

Instances details
Show Verbatim Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Verbatim -> ShowS

show :: Verbatim -> String

showList :: [Verbatim] -> ShowS

Eq Verbatim Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Verbatim -> Verbatim -> Bool

(/=) :: Verbatim -> Verbatim -> Bool

FromValue Verbatim Source # 
Instance details

Defined in Hpack.Config

data VerbatimValue Source #

Constructors

VerbatimString String 
VerbatimNumber Scientific 
VerbatimBool Bool 
VerbatimNull 

Instances

Instances details
Show VerbatimValue Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> VerbatimValue -> ShowS

show :: VerbatimValue -> String

showList :: [VerbatimValue] -> ShowS

Eq VerbatimValue Source # 
Instance details

Defined in Hpack.Config

FromValue VerbatimValue Source # 
Instance details

Defined in Hpack.Config

data CustomSetup Source #

Instances

Instances details
Show CustomSetup Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> CustomSetup -> ShowS

show :: CustomSetup -> String

showList :: [CustomSetup] -> ShowS

Eq CustomSetup Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: CustomSetup -> CustomSetup -> Bool

(/=) :: CustomSetup -> CustomSetup -> Bool

data Section a Source #

Instances

Instances details
Foldable Section Source # 
Instance details

Defined in Hpack.Config

Methods

fold :: Monoid m => Section m -> m

foldMap :: Monoid m => (a -> m) -> Section a -> m

foldMap' :: Monoid m => (a -> m) -> Section a -> m

foldr :: (a -> b -> b) -> b -> Section a -> b

foldr' :: (a -> b -> b) -> b -> Section a -> b

foldl :: (b -> a -> b) -> b -> Section a -> b

foldl' :: (b -> a -> b) -> b -> Section a -> b

foldr1 :: (a -> a -> a) -> Section a -> a

foldl1 :: (a -> a -> a) -> Section a -> a

toList :: Section a -> [a]

null :: Section a -> Bool

length :: Section a -> Int

elem :: Eq a => a -> Section a -> Bool

maximum :: Ord a => Section a -> a

minimum :: Ord a => Section a -> a

sum :: Num a => Section a -> a

product :: Num a => Section a -> a

Traversable Section Source # 
Instance details

Defined in Hpack.Config

Methods

traverse :: Applicative f => (a -> f b) -> Section a -> f (Section b)

sequenceA :: Applicative f => Section (f a) -> f (Section a)

mapM :: Monad m => (a -> m b) -> Section a -> m (Section b)

sequence :: Monad m => Section (m a) -> m (Section a)

Functor Section Source # 
Instance details

Defined in Hpack.Config

Methods

fmap :: (a -> b) -> Section a -> Section b

(<$) :: a -> Section b -> Section a

Show a => Show (Section a) Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Section a -> ShowS

show :: Section a -> String

showList :: [Section a] -> ShowS

Eq a => Eq (Section a) Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Section a -> Section a -> Bool

(/=) :: Section a -> Section a -> Bool

data Library Source #

Instances

Instances details
Show Library Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Library -> ShowS

show :: Library -> String

showList :: [Library] -> ShowS

Eq Library Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Library -> Library -> Bool

(/=) :: Library -> Library -> Bool

data Executable Source #

Constructors

Executable 

Instances

Instances details
Show Executable Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Executable -> ShowS

show :: Executable -> String

showList :: [Executable] -> ShowS

Eq Executable Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Executable -> Executable -> Bool

(/=) :: Executable -> Executable -> Bool

data Conditional a Source #

Constructors

Conditional 

Instances

Instances details
Foldable Conditional Source # 
Instance details

Defined in Hpack.Config

Methods

fold :: Monoid m => Conditional m -> m

foldMap :: Monoid m => (a -> m) -> Conditional a -> m

foldMap' :: Monoid m => (a -> m) -> Conditional a -> m

foldr :: (a -> b -> b) -> b -> Conditional a -> b

foldr' :: (a -> b -> b) -> b -> Conditional a -> b

foldl :: (b -> a -> b) -> b -> Conditional a -> b

foldl' :: (b -> a -> b) -> b -> Conditional a -> b

foldr1 :: (a -> a -> a) -> Conditional a -> a

foldl1 :: (a -> a -> a) -> Conditional a -> a

toList :: Conditional a -> [a]

null :: Conditional a -> Bool

length :: Conditional a -> Int

elem :: Eq a => a -> Conditional a -> Bool

maximum :: Ord a => Conditional a -> a

minimum :: Ord a => Conditional a -> a

sum :: Num a => Conditional a -> a

product :: Num a => Conditional a -> a

Traversable Conditional Source # 
Instance details

Defined in Hpack.Config

Methods

traverse :: Applicative f => (a -> f b) -> Conditional a -> f (Conditional b)

sequenceA :: Applicative f => Conditional (f a) -> f (Conditional a)

mapM :: Monad m => (a -> m b) -> Conditional a -> m (Conditional b)

sequence :: Monad m => Conditional (m a) -> m (Conditional a)

Functor Conditional Source # 
Instance details

Defined in Hpack.Config

Methods

fmap :: (a -> b) -> Conditional a -> Conditional b

(<$) :: a -> Conditional b -> Conditional a

Show a => Show (Conditional a) Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Conditional a -> ShowS

show :: Conditional a -> String

showList :: [Conditional a] -> ShowS

Eq a => Eq (Conditional a) Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Conditional a -> Conditional a -> Bool

(/=) :: Conditional a -> Conditional a -> Bool

data Cond Source #

Constructors

CondBool Bool 
CondExpression String 

Instances

Instances details
Show Cond Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Cond -> ShowS

show :: Cond -> String

showList :: [Cond] -> ShowS

Eq Cond Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Cond -> Cond -> Bool

(/=) :: Cond -> Cond -> Bool

FromValue Cond Source # 
Instance details

Defined in Hpack.Config

data Flag Source #

Constructors

Flag 

Fields

Instances

Instances details
Show Flag Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Flag -> ShowS

show :: Flag -> String

showList :: [Flag] -> ShowS

Eq Flag Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Flag -> Flag -> Bool

(/=) :: Flag -> Flag -> Bool

data SourceRepository Source #

Constructors

SourceRepository 

Fields

Instances

Instances details
Show SourceRepository Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> SourceRepository -> ShowS

show :: SourceRepository -> String

showList :: [SourceRepository] -> ShowS

Eq SourceRepository Source # 
Instance details

Defined in Hpack.Config

newtype Language Source #

Constructors

Language String 

Instances

Instances details
IsString Language Source # 
Instance details

Defined in Hpack.Config

Methods

fromString :: String -> Language

Show Language Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Language -> ShowS

show :: Language -> String

showList :: [Language] -> ShowS

Eq Language Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Language -> Language -> Bool

(/=) :: Language -> Language -> Bool

FromValue Language Source # 
Instance details

Defined in Hpack.Config

data BuildType Source #

Constructors

Simple 
Configure 
Make 
Custom 

Instances

Instances details
Bounded BuildType Source # 
Instance details

Defined in Hpack.Config

Enum BuildType Source # 
Instance details

Defined in Hpack.Config

Show BuildType Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> BuildType -> ShowS

show :: BuildType -> String

showList :: [BuildType] -> ShowS

Eq BuildType Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: BuildType -> BuildType -> Bool

(/=) :: BuildType -> BuildType -> Bool

FromValue BuildType Source # 
Instance details

Defined in Hpack.Config

type GhcProfOption = String Source #

type GhcjsOption = String Source #

type CppOption = String Source #

type AsmOption = String Source #

type CcOption = String Source #

type LdOption = String Source #

newtype Path Source #

Constructors

Path 

Fields

Instances

Instances details
IsString Path Source # 
Instance details

Defined in Hpack.Config

Methods

fromString :: String -> Path

Show Path Source # 
Instance details

Defined in Hpack.Config

Methods

showsPrec :: Int -> Path -> ShowS

show :: Path -> String

showList :: [Path] -> ShowS

Eq Path Source # 
Instance details

Defined in Hpack.Config

Methods

(==) :: Path -> Path -> Bool

(/=) :: Path -> Path -> Bool

Ord Path Source # 
Instance details

Defined in Hpack.Config

Methods

compare :: Path -> Path -> Ordering

(<) :: Path -> Path -> Bool

(<=) :: Path -> Path -> Bool

(>) :: Path -> Path -> Bool

(>=) :: Path -> Path -> Bool

max :: Path -> Path -> Path

min :: Path -> Path -> Path

newtype Module Source #

Constructors

Module 

Fields

Instances

Instances details
IsString Module Source # 
Instance details

Defined in Hpack.Module

Methods

fromString :: String -> Module

Show Module Source # 
Instance details

Defined in Hpack.Module

Methods

showsPrec :: Int -> Module -> ShowS

show :: Module -> String

showList :: [Module] -> ShowS

Eq Module Source # 
Instance details

Defined in Hpack.Module

Methods

(==) :: Module -> Module -> Bool

(/=) :: Module -> Module -> Bool

Ord Module Source # 
Instance details

Defined in Hpack.Module

Methods

compare :: Module -> Module -> Ordering

(<) :: Module -> Module -> Bool

(<=) :: Module -> Module -> Bool

(>) :: Module -> Module -> Bool

(>=) :: Module -> Module -> Bool

max :: Module -> Module -> Module

min :: Module -> Module -> Module

FromValue Module Source # 
Instance details

Defined in Hpack.Module