cabal-debian-4.36.1: Create a Debianization for a Cabal package

Safe HaskellNone





newestAvailable :: FilePath -> BinPkgName -> Either String DebianVersion Source #

Memoized version of newestAvailable'

compilerFlavorOption :: forall a. (CompilerFlavor -> a -> a) -> OptDescr (a -> a) Source #

General function to build a command line option that reads most of the possible values for CompilerFlavor.

hvrCabalVersion :: Version -> Version Source #

What version of Cabal goes with this version of GHC?

hvrHappyVersion :: Version -> Version Source #

What version of Happy goes with this version of GHC?

hvrAlexVersion :: Version -> Version Source #

What version of Alex goes with this version of GHC?

hvrCompilerPATH :: Version -> String -> String Source #

Return the a string containing the PATH environment variable value suitable for using some version of ghc from hvr's compiler repo.

isHVRCompilerPackage :: CompilerFlavor -> BinPkgName -> Maybe Version Source #

Up until now cabal-debian only worked with Debian's or Ubuntu's ghc debs, which have binary package names ghc, ghc-prof, ghc-doc, etc. This type is intended to add support for Herbert Valerio Riedel's (hvr's) repository of several different versions of ghc and supporting tools happy, alex and cabal. These have different binary package names, and the packages put the executables in different locations than the Debian (and Ubuntu) packages. This option is activated when a directory such as optghc8.0.1bin is present in $PATH and a ghc executable is found there.

This function decides whether a deb name is that of one of debian/ubuntu's ghc packages or one of hvr's. If it is an hvr package it returns the version number embedded in its name.

withModifiedPATH :: MonadIO m => (String -> String) -> m a -> m a Source #

compilerPackageName :: CompilerFlavor -> PackageType -> Maybe BinPkgName Source #

Compute the compiler package names by finding out what package contains the corresponding executable.

getCompilerInfo :: MonadIO m => FilePath -> CompilerFlavor -> WithProcAndSys m (Either String CompilerInfo) Source #

IO based alternative to newestAvailableCompilerId - install the compiler into the chroot if necessary and ask it for its version number. This has the benefit of working for ghcjs, which doesn't make the base ghc version available in the version number.

Orphan instances