1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Factor out common GHC extensions.

This commit is contained in:
Patrick Thomson 2019-02-19 13:54:14 -05:00
parent ce3b0a8216
commit 8418290224

View File

@ -1,3 +1,4 @@
cabal-version: 2.2
name: semantic name: semantic
version: 0.5.0 version: 0.5.0
synopsis: Framework and service for analyzing and diffing untrusted code. synopsis: Framework and service for analyzing and diffing untrusted code.
@ -8,14 +9,31 @@ maintainer: rob.rix@github.com
copyright: 2016 GitHub copyright: 2016 GitHub
category: Web category: Web
build-type: Simple build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
flag release flag release
description: Build with optimizations on (for CI or deployment builds) description: Build with optimizations on (for CI or deployment builds)
default: False default: False
-- GHC extensions shared between targets
common haskell
default-language: Haskell2010
default-extensions: DataKinds
, DeriveFoldable
, DeriveFunctor
, DeriveGeneric
, DeriveTraversable
, FlexibleContexts
, FlexibleInstances
, MonadFailDesugaring
, MultiParamTypeClasses
, OverloadedStrings
, RecordWildCards
, StandaloneDeriving
, StrictData
, TypeApplications
library library
import: haskell
hs-source-dirs: src hs-source-dirs: src
exposed-modules: exposed-modules:
-- Analyses & term annotations -- Analyses & term annotations
@ -288,21 +306,6 @@ library
, tree-sitter-ruby , tree-sitter-ruby
, tree-sitter-typescript , tree-sitter-typescript
, tree-sitter-java , tree-sitter-java
default-language: Haskell2010
default-extensions: DataKinds
, DeriveFoldable
, DeriveFunctor
, DeriveGeneric
, DeriveTraversable
, FlexibleContexts
, FlexibleInstances
, MonadFailDesugaring
, MultiParamTypeClasses
, OverloadedStrings
, RecordWildCards
, StandaloneDeriving
, StrictData
, TypeApplications
if flag(release) if flag(release)
ghc-options: -Wall -Werror -Wmissing-export-lists -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -O1 -j -DCOMPUTE_GIT_SHA ghc-options: -Wall -Werror -Wmissing-export-lists -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -O1 -j -DCOMPUTE_GIT_SHA
else else
@ -310,6 +313,7 @@ library
ghc-prof-options: -fprof-auto ghc-prof-options: -fprof-auto
executable semantic executable semantic
import: haskell
hs-source-dirs: app hs-source-dirs: app
main-is: Main.hs main-is: Main.hs
if flag(release) if flag(release)
@ -320,10 +324,9 @@ executable semantic
cpp-options: -DU_STATIC_IMPLEMENTATION=1 cpp-options: -DU_STATIC_IMPLEMENTATION=1
build-depends: base build-depends: base
, semantic , semantic
default-language: Haskell2010
default-extensions: FlexibleInstances, OverloadedStrings, RecordWildCards
test-suite test test-suite test
import: haskell
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: test hs-source-dirs: test
main-is: Spec.hs main-is: Spec.hs
@ -398,24 +401,12 @@ test-suite test
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0
else else
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 -dynamic ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 -dynamic
default-language: Haskell2010
default-extensions: DataKinds
, DeriveFunctor
, DeriveGeneric
, FlexibleContexts
, FlexibleInstances
, MonadFailDesugaring
, MultiParamTypeClasses
, OverloadedStrings
, RecordWildCards
, StandaloneDeriving
, TypeApplications
test-suite parse-examples test-suite parse-examples
import: haskell
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: test hs-source-dirs: test
main-is: Examples.hs main-is: Examples.hs
default-language: Haskell2010
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j ghc-options: -threaded -rtsopts -with-rtsopts=-N -j
build-depends: base build-depends: base
, bytestring , bytestring
@ -429,17 +420,15 @@ test-suite parse-examples
, hspec-expectations-pretty-diff , hspec-expectations-pretty-diff
, process , process
, semantic , semantic
default-extensions: RecordWildCards
, FlexibleContexts
benchmark evaluation benchmark evaluation
import: haskell
hs-source-dirs: bench/evaluation hs-source-dirs: bench/evaluation
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Main.hs main-is: Main.hs
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m -T" -static -j -O1 ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m -T" -static -j -O1
cc-options: -DU_STATIC_IMPLEMENTATION=1 cc-options: -DU_STATIC_IMPLEMENTATION=1
cpp-options: -DU_STATIC_IMPLEMENTATION=1 cpp-options: -DU_STATIC_IMPLEMENTATION=1
default-language: Haskell2010
build-depends: base build-depends: base
, criterion , criterion
, semantic , semantic