stack-1.3.2: The Haskell Tool Stack

Safe Haskell | None
Language | Haskell2010

Stack.Types.Compiler

Synopsis

- data WhichCompiler
  - = Ghc
  - | Ghcjs
- data CompilerVersion
  - = GhcVersion !Version
  - | GhcjsVersion !Version !Version
- parseCompilerVersion :: Text -> Maybe CompilerVersion
- compilerVersionText :: CompilerVersion -> Text
- compilerVersionString :: CompilerVersion -> String
- whichCompiler :: CompilerVersion -> WhichCompiler
- isWantedCompiler :: VersionCheck -> CompilerVersion -> CompilerVersion -> Bool
- getGhcVersion :: CompilerVersion -> Version
- compilerExeName :: WhichCompiler -> String
- haddockExeName :: WhichCompiler -> String

# Documentation

data WhichCompiler #

Variety of compiler to use.

Constructors

Ghc |
Ghcjs |

Instances

Eq WhichCompiler # |
Methods (==) :: WhichCompiler -> WhichCompiler -> Bool # (/=) :: WhichCompiler -> WhichCompiler -> Bool #
Ord WhichCompiler # |
Methods compare :: WhichCompiler -> WhichCompiler -> Ordering # (<) :: WhichCompiler -> WhichCompiler -> Bool # (<=) :: WhichCompiler -> WhichCompiler -> Bool # (>) :: WhichCompiler -> WhichCompiler -> Bool # (>=) :: WhichCompiler -> WhichCompiler -> Bool # max :: WhichCompiler -> WhichCompiler -> WhichCompiler # min :: WhichCompiler -> WhichCompiler -> WhichCompiler #
Show WhichCompiler # |
Methods showsPrec :: Int -> WhichCompiler -> ShowS # show :: WhichCompiler -> String # showList :: [WhichCompiler] -> ShowS #

data CompilerVersion #

Specifies a compiler and its version number(s).

Note that despite having this datatype, stack isn't in a hurry to support compilers other than GHC.

NOTE: updating this will change its binary serialization. The version number in the `BinarySchema` instance for `MiniBuildPlan` should be updated.

Constructors

GhcVersion !Version |
GhcjsVersion !Version !Version |

Instances

Eq CompilerVersion # |
Methods (==) :: CompilerVersion -> CompilerVersion -> Bool # (/=) :: CompilerVersion -> CompilerVersion -> Bool #
Data CompilerVersion # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CompilerVersion -> c CompilerVersion # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CompilerVersion # toConstr :: CompilerVersion -> Constr # dataTypeOf :: CompilerVersion -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CompilerVersion) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CompilerVersion) # gmapT :: (forall b. Data b => b -> b) -> CompilerVersion -> CompilerVersion # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CompilerVersion -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CompilerVersion -> r # gmapQ :: (forall d. Data d => d -> u) -> CompilerVersion -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CompilerVersion -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CompilerVersion -> m CompilerVersion # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CompilerVersion -> m CompilerVersion # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CompilerVersion -> m CompilerVersion #
Ord CompilerVersion # |
Methods compare :: CompilerVersion -> CompilerVersion -> Ordering # (<) :: CompilerVersion -> CompilerVersion -> Bool # (<=) :: CompilerVersion -> CompilerVersion -> Bool # (>) :: CompilerVersion -> CompilerVersion -> Bool # (>=) :: CompilerVersion -> CompilerVersion -> Bool # max :: CompilerVersion -> CompilerVersion -> CompilerVersion # min :: CompilerVersion -> CompilerVersion -> CompilerVersion #
Show CompilerVersion # |
Methods showsPrec :: Int -> CompilerVersion -> ShowS # show :: CompilerVersion -> String # showList :: [CompilerVersion] -> ShowS #
Generic CompilerVersion # |
Associated Types type Rep CompilerVersion :: * -> * # Methods from :: CompilerVersion -> Rep CompilerVersion x # to :: Rep CompilerVersion x -> CompilerVersion #
FromJSON CompilerVersion # |
Methods parseJSON :: Value -> Parser CompilerVersion # parseJSONList :: Value -> Parser [CompilerVersion] #
FromJSONKey CompilerVersion # |
Methods fromJSONKey :: FromJSONKeyFunction CompilerVersion # fromJSONKeyList :: FromJSONKeyFunction [CompilerVersion] #
ToJSON CompilerVersion # |
Methods toJSON :: CompilerVersion -> Value # toEncoding :: CompilerVersion -> Encoding # toJSONList :: [CompilerVersion] -> Value # toEncodingList :: [CompilerVersion] -> Encoding #
NFData CompilerVersion # |
Methods rnf :: CompilerVersion -> () #
Store CompilerVersion # |
Methods size :: Size CompilerVersion # poke :: CompilerVersion -> Poke () # peek :: Peek CompilerVersion #
type Rep CompilerVersion # |
type Rep CompilerVersion = D1 (MetaData "CompilerVersion" "Stack.Types.Compiler" "stack-1.3.2-BJTOe4yfRNq2cDDPL8b7LK" False) ((:+:) (C1 (MetaCons "GhcVersion" PrefixI False) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedUnpack) (Rec0 Version))) (C1 (MetaCons "GhcjsVersion" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedUnpack) (Rec0 Version)) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedUnpack) (Rec0 Version)))))

parseCompilerVersion :: Text -> Maybe CompilerVersion #

compilerVersionText :: CompilerVersion -> Text #

compilerVersionString :: CompilerVersion -> String #

whichCompiler :: CompilerVersion -> WhichCompiler #

isWantedCompiler :: VersionCheck -> CompilerVersion -> CompilerVersion -> Bool #

getGhcVersion :: CompilerVersion -> Version #

compilerExeName :: WhichCompiler -> String #

haddockExeName :: WhichCompiler -> String #