summaryrefslogtreecommitdiff
path: root/libraries/ghc-prim/ghc-prim.cabal
blob: 1f09b45fca9f542b0375327184f16056b8a8c1a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name:           ghc-prim
version:        0.5.0.0
-- NOTE: Don't forget to update ./changelog.md
license:        BSD3
license-file:   LICENSE
category:       GHC
maintainer:     libraries@haskell.org
bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=ghc-prim
synopsis:       GHC primitives
cabal-version:  >=1.10
build-type:     Custom
description:
    This package contains the primitive types and operations supplied by GHC.

extra-source-files: changelog.md

source-repository head
    type:     git
    location: http://git.haskell.org/ghc.git
    subdir:   libraries/ghc-prim

flag include-ghc-prim
    Description: Include GHC.Prim in exposed-modules
    default: False

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

Library
    default-language: Haskell2010
    other-extensions:
        BangPatterns
        CPP
        DeriveGeneric
        MagicHash
        MultiParamTypeClasses
        NoImplicitPrelude
        StandaloneDeriving
        Trustworthy
        TypeFamilies
        UnboxedTuples
        UnliftedFFITypes

    build-depends: rts == 1.0.*

    exposed-modules:
        GHC.CString
        GHC.Classes
        GHC.Debug
        GHC.IntWord64
        GHC.Magic
        GHC.PrimopWrappers
        GHC.Tuple
        GHC.Types

    if flag(include-ghc-prim)
        exposed-modules: GHC.Prim

    c-sources:
        cbits/atomic.c
        cbits/bswap.c
        cbits/clz.c
        cbits/ctz.c
        cbits/debug.c
        cbits/longlong.c
        cbits/popcnt.c
        cbits/word2float.c

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