1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Stub in a package for analysis.

This commit is contained in:
Rob Rix 2019-10-11 12:42:49 -04:00
parent 6bac8d2770
commit 71a6331c7a
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7
6 changed files with 112 additions and 0 deletions

View File

@ -1,4 +1,5 @@
packages: .
semantic-analysis
semantic-core
semantic-java
semantic-json
@ -11,6 +12,9 @@ jobs: $ncpus
package semantic
ghc-options: -Werror
package semantic-analysis
ghc-options: -Werror
package semantic-core
ghc-options: -Werror

21
semantic-analysis/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,18 @@
# semantic-analysis
Program analysis by abstract definitional interpretation.
## Development
This project consists of a Haskell package named `semantic-analysis`. The librarys sources are in [`src`][].
Development of `semantic-analysis` is typically done using `cabal v2-build`:
```shell
cabal v2-build # build the library
cabal v2-repl # load the package into ghci
cabal v2-test # build and run the doctests
```
[`src`]: https://github.com/github/semantic/tree/master/semantic-analysis/src

View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

View File

@ -0,0 +1,55 @@
cabal-version: 2.4
name: semantic-analysis
version: 0.0.0.0
synopsis: Program analysis by abstract definitional interpretation.
description: Program analysis abstractions and implementations by abstract definitional interpretation.
homepage: https://github.com/github/semantic/tree/master/semantic-analysis#readme
bug-reports: https://github.com/github/semantic/issues
license: MIT
license-file: LICENSE
author: The Semantic authors
maintainer: opensource+semantic@github.com
copyright: (c) 2019 GitHub, Inc.
category: Language
build-type: Simple
stability: alpha
extra-source-files: README.md
tested-with:
GHC == 8.6.5
common common
default-language: Haskell2010
ghc-options:
-Weverything
-Wno-missing-local-signatures
-Wno-missing-import-lists
-Wno-implicit-prelude
-Wno-safe
-Wno-unsafe
-Wno-name-shadowing
-Wno-monomorphism-restriction
-Wno-missed-specialisations
-Wno-all-missed-specialisations
-Wno-star-is-type
if (impl(ghc >= 8.8))
ghc-options: -Wno-missing-deriving-strategies
library
import: common
hs-source-dirs: src
-- exposed-modules:
build-depends:
base >= 4.12 && < 5
test-suite doctest
import: common
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Doctest.hs
build-depends:
base >=4.9 && <4.13
, doctest >=0.7 && <1.0
, QuickCheck
, semantic-analysis

View File

@ -0,0 +1,12 @@
module Main
( main
) where
import System.Environment
import Test.DocTest
main :: IO ()
main = do
args <- getArgs
autogen <- fmap (<> "/build/doctest/autogen") <$> lookupEnv "HASKELL_DIST_DIR"
doctest (maybe id ((:) . ("-i" <>)) autogen ("-isemantic-analysis/src" : "--fast" : if null args then ["semantic-analysis/src"] else args))