summaryrefslogtreecommitdiff
path: root/language-ats.cabal
blob: 7cfe50c851f6d4953ded5f960dd790d982dea2ee (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
cabal-version:   1.18
name:            language-ats
version:         1.7.10.1
license:         BSD3
license-file:    LICENSE
copyright:       Copyright: (c) 2018-2019 Vanessa McHale
maintainer:      vamchale@gmail.com
author:          Vanessa McHale
stability:       stable
synopsis:        Parser and pretty-printer for ATS.
description:
    Parser and pretty-printer for [ATS](http://www.ats-lang.org/), written with Happy and Alex.

category:        Language, Lexer, Parser, Pretty Printer, ATS
build-type:      Simple
data-files:
    test/data/*.dats
    test/data/*.sats
    test/data/*.out
    test/data/stdlib/*.sats
    test/data/stdlib/*.out
    test/data/stdlib/DATS/*.dats
    test/data/stdlib/DATS/*.out

extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
    type:     darcs
    location: https://hub.darcs.net/vmchale/ats

flag cross
    description: Set this flag if cross-compiling
    default:     False
    manual:      True

flag development
    description: Enable `-Werror`
    default:     False
    manual:      True

library
    exposed-modules:  Language.ATS
    hs-source-dirs:   src
    other-modules:
        Language.ATS.Lexer
        Language.ATS.Parser
        Language.ATS.PrettyPrint
        Language.ATS.Types
        Language.ATS.Types.Lens
        Language.ATS.Rewrite
        Paths_language_ats

    default-language: Haskell2010
    other-extensions:
        OverloadedStrings DeriveGeneric DeriveAnyClass FlexibleContexts
        PatternSynonyms StandaloneDeriving GeneralizedNewtypeDeriving
        DerivingStrategies DuplicateRecordFields DeriveFunctor
        ScopedTypeVariables

    ghc-options:      -Wall -O2
    build-depends:
        base >=4.9 && <5,
        array -any,
        recursion >=2.2.3.0,
        microlens >=0.3.0.0,
        deepseq -any,
        ansi-wl-pprint >=0.6.8,
        composition-prelude >=2.0.4.0,
        containers -any,
        transformers -any,
        these-skinny -any

    if !flag(cross)
        build-tools: happy >=1.17.1, alex -any

    if flag(development)
        ghc-options: -Werror

    if impl(ghc >=8.0)
        ghc-options:
            -Wincomplete-uni-patterns -Wincomplete-record-updates -Wcompat

test-suite language-ats-test
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   test
    default-language: Haskell2010
    ghc-options:      -threaded -rtsopts -with-rtsopts=-N -Wall
    build-depends:
        base -any,
        language-ats -any,
        hspec -any,
        hspec-dirstream -any,
        system-filepath -any

    if flag(development)
        ghc-options: -Werror

    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates

benchmark language-ats-bench
    type:             exitcode-stdio-1.0
    main-is:          Bench.hs
    hs-source-dirs:   bench
    default-language: Haskell2010
    ghc-options:      -Wall -O2
    build-depends:
        base -any,
        language-ats -any,
        criterion -any

    if flag(development)
        ghc-options: -Werror

    if impl(ghc >=8.0)
        ghc-options: -Wincomplete-uni-patterns -Wincomplete-record-updates