ghc-prim.cabal 2.31 KB
Newer Older
1
cabal-version:  2.1
2
name:           ghc-prim
Ben Gamari's avatar
Ben Gamari committed
3
version:        0.5.3
4
-- NOTE: Don't forget to update ./changelog.md
Oleg Grenrus's avatar
Oleg Grenrus committed
5
license:        BSD-3-Clause
6
license-file:   LICENSE
7
category:       GHC
8
maintainer:     libraries@haskell.org
9
bug-reports:    https://gitlab.haskell.org/ghc/ghc/issues/new
10
synopsis:       GHC primitives
11
build-type:     Custom
12
description:
13
    This package contains the primitive types and operations supplied by GHC.
14

15 16
extra-source-files: changelog.md

17
source-repository head
18
    type:     git
19 20
    location: http://git.haskell.org/ghc.git
    subdir:   libraries/ghc-prim
21

22 23 24
custom-setup
    setup-depends: base >= 4 && < 5, Cabal >= 1.23

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
Library
    default-language: Haskell2010
    other-extensions:
        BangPatterns
        CPP
        DeriveGeneric
        MagicHash
        MultiParamTypeClasses
        NoImplicitPrelude
        StandaloneDeriving
        Trustworthy
        TypeFamilies
        UnboxedTuples
        UnliftedFFITypes

    build-depends: rts == 1.0.*

42
    exposed-modules:
Ian Lynagh's avatar
Ian Lynagh committed
43
        GHC.CString
44
        GHC.Classes
45
        GHC.Debug
46
        GHC.IntWord64
Ian Lynagh's avatar
Ian Lynagh committed
47
        GHC.Magic
48
        GHC.PrimopWrappers
49
        GHC.Tuple
50
        GHC.Types
51

52 53 54
    virtual-modules:
        GHC.Prim

55 56 57 58 59 60 61 62 63 64 65 66 67 68
    -- OS Specific
    if os(windows)
        -- Windows requires some extra libraries for linking because the RTS
        -- is no longer re-exporting them (see #11223)
        -- msvcrt: standard C library. The RTS will automatically include this,
        --         but is added for completeness.
        -- mingwex: provides C99 compatibility. libm is a stub on MingW.
        -- mingw32: Unfortunately required because of a resource leak between
        --          mingwex and mingw32. the __math_err symbol is defined in
        --          mingw32 which is required by mingwex.
        -- user32: provides access to apis to modify user components (UI etc)
        --         on Windows. Required because of mingw32.
        extra-libraries: user32, mingw32, mingwex

69
    c-sources:
70
        cbits/atomic.c
71
        cbits/bswap.c
72 73
        cbits/clz.c
        cbits/ctz.c
74
        cbits/debug.c
75
        cbits/longlong.c
76 77
        cbits/pdep.c
        cbits/pext.c
78
        cbits/popcnt.c
tibbe's avatar
tibbe committed
79
        cbits/word2float.c
80

81
    -- We need to set the unit ID to ghc-prim (without a version number)
82
    -- as it's magic.
83
    ghc-options: -this-unit-id ghc-prim