|
| 1 | +cabal-version: 2.4 |
| 2 | +name: scheme |
| 3 | +version: 0.1 |
| 4 | +synopsis: Write You a Scheme |
| 5 | +description: Write You a Scheme v2. |
| 6 | +author: Adam Wespiser |
| 7 | +maintainer: Adam Wespiser <adamwespiser@gmail.com> |
| 8 | +license: MIT |
| 9 | +license-file: LICENSE |
| 10 | +copyright: 2021 Adam Wespiser |
| 11 | +build-type: Simple |
| 12 | +extra-doc-files: |
| 13 | + README.md |
| 14 | + TODO.md |
| 15 | + |
| 16 | +tested-with: GHC ==8.10.4 |
| 17 | + |
| 18 | +source-repository head |
| 19 | + type: git |
| 20 | + location: https://github.com/write-you-a-scheme-v2/scheme.git |
| 21 | + |
| 22 | +common common-options |
| 23 | + build-depends: base >=4.8 && <5.0 |
| 24 | + other-modules: Paths_scheme |
| 25 | + autogen-modules: Paths_scheme |
| 26 | + ghc-options: |
| 27 | + -Wall -Wextra -Wcompat -Widentities -Wincomplete-uni-patterns |
| 28 | + -Wincomplete-record-updates -Wredundant-constraints |
| 29 | + -Wnoncanonical-monad-instances |
| 30 | + |
| 31 | + ghc-options: |
| 32 | + -fno-warn-unused-do-bind -fno-warn-unused-binds |
| 33 | + -fno-warn-type-defaults -fno-warn-type-defaults |
| 34 | + -fno-warn-name-shadowing -fwarn-duplicate-exports |
| 35 | + -fwarn-dodgy-exports -fwarn-dodgy-imports |
| 36 | + -fwarn-incomplete-patterns -fwarn-incomplete-record-updates |
| 37 | + -fwarn-missing-fields -fwarn-missing-methods -fwarn-orphans |
| 38 | + -fwarn-overlapping-patterns -fwarn-unused-imports -fwarn-tabs |
| 39 | + -fwarn-unrecognised-pragmas |
| 40 | +-- -fno-warn-unused-matches |
| 41 | + |
| 42 | + -- -Werror |
| 43 | + if impl(ghc >=8.2) |
| 44 | + ghc-options: -fhide-source-paths |
| 45 | + |
| 46 | + if impl(ghc >=8.4) |
| 47 | + ghc-options: -Wmissing-export-lists -Wpartial-fields |
| 48 | + |
| 49 | + if impl(ghc >=8.8) |
| 50 | + ghc-options: -fwrite-ide-info -hiedir=.hie |
| 51 | + |
| 52 | + -- ghc-options: -Wmissing-deriving-strategies -fwrite-ide-info -hiedir=.hie |
| 53 | + |
| 54 | + if impl(ghc >=8.10) |
| 55 | + ghc-options: -Wunused-packages |
| 56 | + |
| 57 | + default-extensions: OverloadedStrings |
| 58 | + default-language: Haskell2010 |
| 59 | + |
| 60 | +library |
| 61 | + import: common-options |
| 62 | + exposed-modules: |
| 63 | + Cli |
| 64 | + Eval |
| 65 | + LispVal |
| 66 | + Parser |
| 67 | + Prim |
| 68 | + Repl |
| 69 | + |
| 70 | + hs-source-dirs: src/ |
| 71 | + build-depends: |
| 72 | + , containers |
| 73 | + , directory |
| 74 | + , haskeline |
| 75 | + , HTTP |
| 76 | + , mtl |
| 77 | + , optparse-applicative |
| 78 | + , parsec |
| 79 | + , text |
| 80 | + |
| 81 | +executable docs |
| 82 | + import: common-options |
| 83 | + main-is: Build.hs |
| 84 | + build-depends: shake |
| 85 | + |
| 86 | +executable scheme |
| 87 | + import: common-options |
| 88 | + main-is: Main.hs |
| 89 | + hs-source-dirs: exec |
| 90 | + ghc-options: -threaded -rtsopts -with-rtsopts=-N |
| 91 | + build-depends: scheme |
| 92 | + |
| 93 | +test-suite test |
| 94 | + import: common-options |
| 95 | + type: exitcode-stdio-1.0 |
| 96 | + main-is: Main.hs |
| 97 | + hs-source-dirs: test-hs/Spec/ |
| 98 | + ghc-options: -threaded -rtsopts -with-rtsopts=-N |
| 99 | + build-depends: |
| 100 | + , base >=4.8 && <5.0 |
| 101 | + , hspec |
| 102 | + , scheme |
| 103 | + , text |
| 104 | + |
| 105 | +test-suite test-golden |
| 106 | + import: common-options |
| 107 | + type: exitcode-stdio-1.0 |
| 108 | + main-is: Main.hs |
| 109 | + other-modules: Paths_scheme |
| 110 | + autogen-modules: Paths_scheme |
| 111 | + hs-source-dirs: test-hs/Golden |
| 112 | + ghc-options: -threaded -rtsopts -with-rtsopts=-N |
| 113 | + build-depends: |
| 114 | + , bytestring |
| 115 | + , scheme |
| 116 | + , tasty |
| 117 | + , tasty-golden |
| 118 | + , text |
0 commit comments