cabal-version: 3.0
build-type: Simple
name: ghc-lib-parser
version: 9.12.2.20250320
license: BSD-3-Clause
license-file: LICENSE
category: Development
author: The GHC Team and Digital Asset
maintainer: Digital Asset
synopsis: The GHC API, decoupled from GHC versions
description: A package equivalent to the @ghc@ package, but which can be loaded on many compiler versions.
homepage: https://github.com/digital-asset/ghc-lib
bug-reports: https://github.com/digital-asset/ghc-lib/issues
data-dir: ghc-lib/stage0/lib
data-files:
    settings
    llvm-targets
    llvm-passes
extra-source-files:
    ghc/ghc-bin.cabal
    libraries/template-haskell/template-haskell.cabal
    libraries/ghc-heap/ghc-heap.cabal
    libraries/ghc-boot-th/ghc-boot-th.cabal
    libraries/ghc-boot/ghc-boot.cabal
    libraries/ghci/ghci.cabal
    compiler/ghc.cabal
    libraries/ghc-platform/ghc-platform.cabal
    ghc-lib/stage0/rts/build/include/ghcautoconf.h
    ghc-lib/stage0/rts/build/include/ghcplatform.h
    ghc-lib/stage0/rts/build/include/GhclibDerivedConstants.h
    ghc-lib/stage0/compiler/build/primop-code-size.hs-incl
    ghc-lib/stage0/compiler/build/primop-commutable.hs-incl
    ghc-lib/stage0/compiler/build/primop-data-decl.hs-incl
    ghc-lib/stage0/compiler/build/primop-fixity.hs-incl
    ghc-lib/stage0/compiler/build/primop-effects.hs-incl
    ghc-lib/stage0/compiler/build/primop-list.hs-incl
    ghc-lib/stage0/compiler/build/primop-out-of-line.hs-incl
    ghc-lib/stage0/compiler/build/primop-primop-info.hs-incl
    ghc-lib/stage0/compiler/build/primop-strictness.hs-incl
    ghc-lib/stage0/compiler/build/primop-tag.hs-incl
    ghc-lib/stage0/compiler/build/primop-vector-tycons.hs-incl
    ghc-lib/stage0/compiler/build/primop-vector-tys-exports.hs-incl
    ghc-lib/stage0/compiler/build/primop-vector-tys.hs-incl
    ghc-lib/stage0/compiler/build/primop-vector-uniques.hs-incl
    ghc-lib/stage0/compiler/build/primop-docs.hs-incl
    ghc-lib/stage0/compiler/build/primop-is-work-free.hs-incl
    ghc-lib/stage0/compiler/build/primop-is-cheap.hs-incl
    ghc-lib/stage0/compiler/build/primop-deprecations.hs-incl
    ghc-lib/stage0/compiler/build/GHC/Platform/Constants.hs
    ghc-lib/stage0/compiler/build/GHC/Settings/Config.hs
    ghc-lib/stage0/libraries/ghc-boot/build/GHC/Version.hs
    ghc-lib/stage0/libraries/ghc-boot/build/GHC/Platform/Host.hs
    compiler/GHC/Parser.y
    compiler/GHC/Parser/Lexer.x
    compiler/GHC/Parser/HaddockLex.x
    compiler/GHC/Parser.hs-boot
    rts/include/stg/MachRegs/arm32.h
    rts/include/stg/MachRegs/arm64.h
    rts/include/stg/MachRegs/loongarch64.h
    rts/include/stg/MachRegs/ppc.h
    rts/include/stg/MachRegs/riscv64.h
    rts/include/stg/MachRegs/s390x.h
    rts/include/stg/MachRegs/wasm32.h
    rts/include/stg/MachRegs/x86.h
    libraries/containers/containers/include/containers.h
    rts/include/ghcconfig.h
    compiler/MachRegs.h
    compiler/CodeGen.Platform.h
    compiler/Bytecodes.h
    compiler/ClosureTypes.h
    compiler/FunTypes.h
    compiler/Unique.h
source-repository head
    type: git
    location: git@github.com:digital-asset/ghc-lib.git
flag threaded-rts
  default: True
  manual: True
  description: Pass -DTHREADED_RTS to the C toolchain
library
    default-language: GHC2021
    exposed: False
    include-dirs:
        rts/include
        rts/include/stg
        ghc-lib/stage0/lib
        ghc-lib/stage0/compiler/build
        compiler
        libraries/containers/containers/include
    if impl(ghc >= 8.8.1)
        ghc-options: -fno-safe-haskell
    if flag(threaded-rts)
        ghc-options: -fobject-code -package=ghc-boot-th -optc-DTHREADED_RTS
        cc-options: -DTHREADED_RTS
        cpp-options: -DTHREADED_RTS   -DBOOTSTRAP_TH
    else
        ghc-options: -fobject-code -package=ghc-boot-th
        cpp-options:   -DBOOTSTRAP_TH
    if !os(windows)
        build-depends: unix
    else
        build-depends: Win32
    build-depends:
        base >= 4.19 && < 4.22,
        ghc-prim > 0.2 && < 0.14,
        containers >= 0.6.2.1 && < 0.8,
        bytestring >= 0.11.4 && < 0.13,
        time >= 1.4 && < 1.15,
        filepath >= 1.5 && < 1.6,
        os-string >= 2.0.1 && < 2.1,
        exceptions == 0.10.*,
        parsec,
        binary == 0.8.*,
        directory >= 1 && < 1.4,
        array >= 0.1 && < 0.6,
        deepseq >= 1.4 && < 1.6,
        pretty == 1.1.*,
        transformers >= 0.5 && < 0.7,
        process >= 1 && < 1.7
    if impl(ghc >= 9.10)
      build-depends: ghc-internal
    build-tool-depends: alex:alex >= 3.1, happy:happy == 1.20.* || == 2.0.2 || >= 2.1.2 && < 2.2
    other-extensions:
        BangPatterns
        CPP
        DataKinds
        DefaultSignatures
        DeriveDataTypeable
        DeriveFoldable
        DeriveFunctor
        DeriveGeneric
        DeriveTraversable
        DisambiguateRecordFields
        ExistentialQuantification
        ExplicitForAll
        FlexibleContexts
        FlexibleInstances
        GADTs
        GeneralizedNewtypeDeriving
        InstanceSigs
        MagicHash
        MultiParamTypeClasses
        NamedFieldPuns
        NondecreasingIndentation
        RankNTypes
        RecordWildCards
        RoleAnnotations
        ScopedTypeVariables
        StandaloneDeriving
        Trustworthy
        TupleSections
        TypeFamilies
        TypeSynonymInstances
        UnboxedTuples
        UndecidableInstances
    default-extensions:
        MonoLocalBinds
        NoImplicitPrelude
    if impl(ghc >= 9.2.2)
      cmm-sources:
            libraries/ghc-heap/cbits/HeapPrim.cmm
    else
      c-sources:
            libraries/ghc-heap/cbits/HeapPrim.cmm
    c-sources:
        compiler/cbits/genSym.c
        compiler/cbits/cutils.c
        compiler/cbits/keepCAFsForGHCi.c
    hs-source-dirs:
        ghc-lib/stage0/libraries/ghc-boot/build
        ghc-lib/stage0/compiler/build
        libraries/ghc-platform/src
        libraries/template-haskell
        libraries/ghc-platform
        libraries/ghc-boot-th
        libraries/ghc-boot
        libraries/ghc-heap
        libraries/ghci
        compiler
    autogen-modules:
        GHC.Parser.Lexer
        GHC.Parser
    exposed-modules:
        GHC.BaseDir
        GHC.Builtin.Names
        GHC.Builtin.PrimOps
        GHC.Builtin.PrimOps.Ids
        GHC.Builtin.Types
        GHC.Builtin.Types.Literals
        GHC.Builtin.Types.Prim
        GHC.Builtin.Uniques
        GHC.ByteCode.Types
        GHC.Cmm
        GHC.Cmm.BlockId
        GHC.Cmm.CLabel
        GHC.Cmm.Dataflow.Block
        GHC.Cmm.Dataflow.Graph
        GHC.Cmm.Dataflow.Label
        GHC.Cmm.Expr
        GHC.Cmm.MachOp
        GHC.Cmm.Node
        GHC.Cmm.Reg
        GHC.Cmm.Switch
        GHC.Cmm.Type
        GHC.Cmm.Utils
        GHC.CmmToAsm.CFG.Weight
        GHC.CmmToLlvm.Config
        GHC.CmmToLlvm.Version
        GHC.CmmToLlvm.Version.Bounds
        GHC.CmmToLlvm.Version.Type
        GHC.Core
        GHC.Core.Class
        GHC.Core.Coercion
        GHC.Core.Coercion.Axiom
        GHC.Core.Coercion.Opt
        GHC.Core.ConLike
        GHC.Core.DataCon
        GHC.Core.FVs
        GHC.Core.FamInstEnv
        GHC.Core.InstEnv
        GHC.Core.Lint
        GHC.Core.Lint.Interactive
        GHC.Core.Make
        GHC.Core.Map.Expr
        GHC.Core.Map.Type
        GHC.Core.Multiplicity
        GHC.Core.Opt.Arity
        GHC.Core.Opt.CallerCC
        GHC.Core.Opt.CallerCC.Types
        GHC.Core.Opt.ConstantFold
        GHC.Core.Opt.Monad
        GHC.Core.Opt.OccurAnal
        GHC.Core.Opt.Pipeline.Types
        GHC.Core.Opt.Simplify
        GHC.Core.Opt.Simplify.Env
        GHC.Core.Opt.Simplify.Inline
        GHC.Core.Opt.Simplify.Iteration
        GHC.Core.Opt.Simplify.Monad
        GHC.Core.Opt.Simplify.Utils
        GHC.Core.Opt.Stats
        GHC.Core.PatSyn
        GHC.Core.Ppr
        GHC.Core.Predicate
        GHC.Core.Reduction
        GHC.Core.RoughMap
        GHC.Core.Rules
        GHC.Core.Rules.Config
        GHC.Core.Seq
        GHC.Core.SimpleOpt
        GHC.Core.Stats
        GHC.Core.Subst
        GHC.Core.Tidy
        GHC.Core.TyCo.Compare
        GHC.Core.TyCo.FVs
        GHC.Core.TyCo.Ppr
        GHC.Core.TyCo.Rep
        GHC.Core.TyCo.Subst
        GHC.Core.TyCo.Tidy
        GHC.Core.TyCon
        GHC.Core.TyCon.Env
        GHC.Core.TyCon.RecWalk
        GHC.Core.Type
        GHC.Core.Unfold
        GHC.Core.Unfold.Make
        GHC.Core.Unify
        GHC.Core.UsageEnv
        GHC.Core.Utils
        GHC.CoreToIface
        GHC.Data.Bag
        GHC.Data.Bool
        GHC.Data.BooleanFormula
        GHC.Data.EnumSet
        GHC.Data.FastMutInt
        GHC.Data.FastString
        GHC.Data.FastString.Env
        GHC.Data.FiniteMap
        GHC.Data.FlatBag
        GHC.Data.Graph.Directed
        GHC.Data.Graph.UnVar
        GHC.Data.IOEnv
        GHC.Data.List.Infinite
        GHC.Data.List.SetOps
        GHC.Data.Maybe
        GHC.Data.OrdList
        GHC.Data.OsPath
        GHC.Data.Pair
        GHC.Data.ShortText
        GHC.Data.SizedSeq
        GHC.Data.SmallArray
        GHC.Data.Stream
        GHC.Data.Strict
        GHC.Data.StringBuffer
        GHC.Data.TrieMap
        GHC.Data.Unboxed
        GHC.Data.Word64Map
        GHC.Data.Word64Map.Internal
        GHC.Data.Word64Map.Lazy
        GHC.Data.Word64Map.Strict
        GHC.Data.Word64Map.Strict.Internal
        GHC.Data.Word64Set
        GHC.Data.Word64Set.Internal
        GHC.Driver.Backend
        GHC.Driver.Backend.Internal
        GHC.Driver.Backpack.Syntax
        GHC.Driver.CmdLine
        GHC.Driver.Config
        GHC.Driver.Config.Core.Lint
        GHC.Driver.Config.Diagnostic
        GHC.Driver.Config.Logger
        GHC.Driver.Config.Parser
        GHC.Driver.DynFlags
        GHC.Driver.Env
        GHC.Driver.Env.KnotVars
        GHC.Driver.Env.Types
        GHC.Driver.Errors
        GHC.Driver.Errors.Ppr
        GHC.Driver.Errors.Types
        GHC.Driver.Flags
        GHC.Driver.Hooks
        GHC.Driver.LlvmConfigCache
        GHC.Driver.Monad
        GHC.Driver.Phases
        GHC.Driver.Pipeline.Monad
        GHC.Driver.Pipeline.Phases
        GHC.Driver.Plugins
        GHC.Driver.Plugins.External
        GHC.Driver.Ppr
        GHC.Driver.Session
        GHC.Exts.Heap
        GHC.Exts.Heap.ClosureTypes
        GHC.Exts.Heap.Closures
        GHC.Exts.Heap.Constants
        GHC.Exts.Heap.FFIClosures
        GHC.Exts.Heap.FFIClosures_ProfilingDisabled
        GHC.Exts.Heap.FFIClosures_ProfilingEnabled
        GHC.Exts.Heap.InfoTable
        GHC.Exts.Heap.InfoTable.Types
        GHC.Exts.Heap.InfoTableProf
        GHC.Exts.Heap.ProfInfo.PeekProfInfo
        GHC.Exts.Heap.ProfInfo.PeekProfInfo_ProfilingDisabled
        GHC.Exts.Heap.ProfInfo.PeekProfInfo_ProfilingEnabled
        GHC.Exts.Heap.ProfInfo.Types
        GHC.Exts.Heap.Utils
        GHC.ForeignSrcLang
        GHC.ForeignSrcLang.Type
        GHC.Hs
        GHC.Hs.Basic
        GHC.Hs.Binds
        GHC.Hs.Decls
        GHC.Hs.Doc
        GHC.Hs.DocString
        GHC.Hs.Dump
        GHC.Hs.Expr
        GHC.Hs.Extension
        GHC.Hs.ImpExp
        GHC.Hs.Instances
        GHC.Hs.Lit
        GHC.Hs.Pat
        GHC.Hs.Specificity
        GHC.Hs.Type
        GHC.Hs.Utils
        GHC.HsToCore.Errors.Ppr
        GHC.HsToCore.Errors.Types
        GHC.HsToCore.Pmc.Ppr
        GHC.HsToCore.Pmc.Solver.Types
        GHC.HsToCore.Pmc.Types
        GHC.Iface.Decl
        GHC.Iface.Errors.Ppr
        GHC.Iface.Errors.Types
        GHC.Iface.Ext.Fields
        GHC.Iface.Recomp.Binary
        GHC.Iface.Syntax
        GHC.Iface.Type
        GHC.JS.Ident
        GHC.JS.JStg.Monad
        GHC.JS.JStg.Syntax
        GHC.JS.Make
        GHC.JS.Ppr
        GHC.JS.Syntax
        GHC.JS.Transform
        GHC.LanguageExtensions
        GHC.LanguageExtensions.Type
        GHC.Lexeme
        GHC.Linker.Config
        GHC.Linker.Static.Utils
        GHC.Linker.Types
        GHC.Parser
        GHC.Parser.Annotation
        GHC.Parser.CharClass
        GHC.Parser.Errors.Basic
        GHC.Parser.Errors.Ppr
        GHC.Parser.Errors.Types
        GHC.Parser.HaddockLex
        GHC.Parser.Header
        GHC.Parser.Lexer
        GHC.Parser.PostProcess
        GHC.Parser.PostProcess.Haddock
        GHC.Parser.String
        GHC.Parser.Types
        GHC.Platform
        GHC.Platform.AArch64
        GHC.Platform.ARM
        GHC.Platform.ArchOS
        GHC.Platform.Constants
        GHC.Platform.LoongArch64
        GHC.Platform.NoRegs
        GHC.Platform.PPC
        GHC.Platform.Profile
        GHC.Platform.RISCV64
        GHC.Platform.Reg
        GHC.Platform.Reg.Class
        GHC.Platform.Reg.Class.NoVectors
        GHC.Platform.Reg.Class.Separate
        GHC.Platform.Reg.Class.Unified
        GHC.Platform.Regs
        GHC.Platform.S390X
        GHC.Platform.Wasm32
        GHC.Platform.Ways
        GHC.Platform.X86
        GHC.Platform.X86_64
        GHC.Prelude
        GHC.Prelude.Basic
        GHC.Runtime.Context
        GHC.Runtime.Eval.Types
        GHC.Runtime.Heap.Layout
        GHC.Runtime.Interpreter.Types
        GHC.Serialized
        GHC.Settings
        GHC.Settings.Config
        GHC.Settings.Constants
        GHC.Settings.Utils
        GHC.Stg.InferTags.TagSig
        GHC.Stg.Lift.Types
        GHC.Stg.Syntax
        GHC.StgToCmm.CgUtils
        GHC.StgToCmm.Config
        GHC.StgToCmm.Types
        GHC.StgToJS.Linker.Types
        GHC.StgToJS.Object
        GHC.StgToJS.Symbols
        GHC.StgToJS.Types
        GHC.SysTools.BaseDir
        GHC.SysTools.Terminal
        GHC.Tc.Errors.Hole.FitTypes
        GHC.Tc.Errors.Hole.Plugin
        GHC.Tc.Errors.Ppr
        GHC.Tc.Errors.Types
        GHC.Tc.Errors.Types.PromotionErr
        GHC.Tc.Solver.InertSet
        GHC.Tc.Solver.Types
        GHC.Tc.Types
        GHC.Tc.Types.BasicTypes
        GHC.Tc.Types.Constraint
        GHC.Tc.Types.CtLoc
        GHC.Tc.Types.ErrCtxt
        GHC.Tc.Types.Evidence
        GHC.Tc.Types.LclEnv
        GHC.Tc.Types.Origin
        GHC.Tc.Types.Rank
        GHC.Tc.Types.TH
        GHC.Tc.Types.TcRef
        GHC.Tc.Utils.TcType
        GHC.Tc.Zonk.Monad
        GHC.Types.Annotations
        GHC.Types.Avail
        GHC.Types.Basic
        GHC.Types.Breakpoint
        GHC.Types.CompleteMatch
        GHC.Types.CostCentre
        GHC.Types.CostCentre.State
        GHC.Types.Cpr
        GHC.Types.DefaultEnv
        GHC.Types.Demand
        GHC.Types.Error
        GHC.Types.Error.Codes
        GHC.Types.FieldLabel
        GHC.Types.Fixity
        GHC.Types.Fixity.Env
        GHC.Types.ForeignCall
        GHC.Types.ForeignStubs
        GHC.Types.GREInfo
        GHC.Types.Hint
        GHC.Types.Hint.Ppr
        GHC.Types.HpcInfo
        GHC.Types.IPE
        GHC.Types.Id
        GHC.Types.Id.Info
        GHC.Types.Id.Make
        GHC.Types.Literal
        GHC.Types.Meta
        GHC.Types.Name
        GHC.Types.Name.Cache
        GHC.Types.Name.Env
        GHC.Types.Name.Occurrence
        GHC.Types.Name.Ppr
        GHC.Types.Name.Reader
        GHC.Types.Name.Set
        GHC.Types.PkgQual
        GHC.Types.ProfAuto
        GHC.Types.RepType
        GHC.Types.SafeHaskell
        GHC.Types.SaneDouble
        GHC.Types.SourceError
        GHC.Types.SourceFile
        GHC.Types.SourceText
        GHC.Types.SptEntry
        GHC.Types.SrcLoc
        GHC.Types.Target
        GHC.Types.Tickish
        GHC.Types.TyThing
        GHC.Types.TyThing.Ppr
        GHC.Types.TypeEnv
        GHC.Types.Unique
        GHC.Types.Unique.DFM
        GHC.Types.Unique.DSM
        GHC.Types.Unique.DSet
        GHC.Types.Unique.FM
        GHC.Types.Unique.Map
        GHC.Types.Unique.SDFM
        GHC.Types.Unique.Set
        GHC.Types.Unique.Supply
        GHC.Types.Var
        GHC.Types.Var.Env
        GHC.Types.Var.Set
        GHC.UniqueSubdir
        GHC.Unit
        GHC.Unit.Database
        GHC.Unit.Env
        GHC.Unit.External
        GHC.Unit.Finder.Types
        GHC.Unit.Home
        GHC.Unit.Home.ModInfo
        GHC.Unit.Info
        GHC.Unit.Module
        GHC.Unit.Module.Deps
        GHC.Unit.Module.Env
        GHC.Unit.Module.Graph
        GHC.Unit.Module.Imported
        GHC.Unit.Module.Location
        GHC.Unit.Module.ModDetails
        GHC.Unit.Module.ModGuts
        GHC.Unit.Module.ModIface
        GHC.Unit.Module.ModSummary
        GHC.Unit.Module.Status
        GHC.Unit.Module.Warnings
        GHC.Unit.Module.WholeCoreBindings
        GHC.Unit.Parser
        GHC.Unit.Ppr
        GHC.Unit.State
        GHC.Unit.Types
        GHC.Utils.Binary
        GHC.Utils.Binary.Typeable
        GHC.Utils.BufHandle
        GHC.Utils.CliOption
        GHC.Utils.Constants
        GHC.Utils.Containers.Internal.BitUtil
        GHC.Utils.Containers.Internal.StrictPair
        GHC.Utils.Encoding
        GHC.Utils.Encoding.UTF8
        GHC.Utils.Error
        GHC.Utils.Exception
        GHC.Utils.FV
        GHC.Utils.Fingerprint
        GHC.Utils.GlobalVars
        GHC.Utils.IO.Unsafe
        GHC.Utils.Json
        GHC.Utils.Lexeme
        GHC.Utils.Logger
        GHC.Utils.Misc
        GHC.Utils.Monad
        GHC.Utils.Monad.State.Strict
        GHC.Utils.Outputable
        GHC.Utils.Panic
        GHC.Utils.Panic.Plain
        GHC.Utils.Ppr
        GHC.Utils.Ppr.Colour
        GHC.Utils.TmpFs
        GHC.Utils.Trace
        GHC.Utils.Word64
        GHC.Version
        GHCi.BreakArray
        GHCi.FFI
        GHCi.Message
        GHCi.RemoteTypes
        GHCi.ResolvedBCO
        GHCi.TH.Binary
        Language.Haskell.Syntax
        Language.Haskell.Syntax.Basic
        Language.Haskell.Syntax.Binds
        Language.Haskell.Syntax.Decls
        Language.Haskell.Syntax.Expr
        Language.Haskell.Syntax.Extension
        Language.Haskell.Syntax.ImpExp
        Language.Haskell.Syntax.Lit
        Language.Haskell.Syntax.Module.Name
        Language.Haskell.Syntax.Pat
        Language.Haskell.Syntax.Specificity
        Language.Haskell.Syntax.Type
    if impl(ghc < 9.12.1)
      hs-source-dirs:
        libraries/ghc-internal/src
        libraries/ghc-boot-th-internal
      exposed-modules:
            GHC.Internal.ForeignSrcLang
            GHC.Internal.LanguageExtensions
            GHC.Internal.Lexeme
            GHC.Internal.TH.Syntax
            GHC.Internal.TH.Ppr
            GHC.Internal.TH.PprLib
            GHC.Internal.TH.Lib.Map