GHC.Check.PackageDb

ghc-check-0.5.0.8: detect mismatches between compile-time and run-time versions of the ghc api

Safe Haskell | None
Language | Haskell2010

GHC.Check.PackageDb

Description

Discover the GHC version via the package database. Requirements:

- the package database must be compatible, which is usually not the case across major ghc versions.
- the `ghc` package is registered, which is not always the case.

Synopsis

- data PackageVersion
- version :: PackageVersion -> Version
- getPackageVersion :: String -> Ghc (Maybe PackageVersion)
- fromVersionString :: HasCallStack => String -> PackageVersion

# Documentation

data PackageVersion #

#### Instances

Instances details

Show PackageVersion # |
Instance details Defined in GHC.Check.PackageDb Methods showsPrec :: Int -> PackageVersion -> ShowS # show :: PackageVersion -> String # showList :: [PackageVersion] -> ShowS #
Eq PackageVersion # |
Instance details Defined in GHC.Check.PackageDb Methods (==) :: PackageVersion -> PackageVersion -> Bool # (/=) :: PackageVersion -> PackageVersion -> Bool #
Lift PackageVersion # |
Instance details Defined in GHC.Check.PackageDb Methods lift :: Quote m => PackageVersion -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => PackageVersion -> Code m PackageVersion #

version :: PackageVersion -> Version #

getPackageVersion :: String -> Ghc (Maybe PackageVersion) #

`getPackageVersion p` returns the version of package `p` that will be used in the Ghc session.

fromVersionString :: HasCallStack => String -> PackageVersion #