Skip to content

Commit

Permalink
[#76] Modernise project
Browse files Browse the repository at this point in the history
Resolves #76
  • Loading branch information
chshersh committed Sep 2, 2019
1 parent 285ac3f commit 03a8815
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 126 deletions.
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: haskell
git:
depth: 5

cabal: "head"
cabal: "3.0"

cache:
directories:
Expand All @@ -17,21 +17,21 @@ matrix:

# Cabal
- ghc: 8.4.4
- ghc: 8.6.3
- ghc: 8.6.5

# stack
- ghc: 8.6.3
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
- ghc: 8.4.4
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack-8.4.4.yaml"
- ghc: 8.6.5
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"

install:
- |
if [ -z "$STACK_YAML" ]; then
ghc --version
cabal --version
cabal new-update
cabal new-build --enable-tests --enable-benchmarks
cabal update
cabal build --enable-tests --enable-benchmarks
else
# install stack
curl -sSL https://get.haskellstack.org/ | sh
Expand All @@ -44,7 +44,7 @@ install:
script:
- |
if [ -z "$STACK_YAML" ]; then
cabal new-test --enable-tests
cabal test --enable-tests
else
stack test --system-ghc
fi
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The changelog is available [on GitHub][2].

* [#72](https://github.com/holmusk/elm-street/issues/72):
Use consistent encoders and decoders for unary constructors.
* [#76](https://github.com/holmusk/elm-street/issues/76):
Support GHC-8.6.5. Use common stanzas.

## 0.0.1 — Mar 29, 2019

Expand Down
2 changes: 1 addition & 1 deletion backend/Main.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Main where
module Main (main) where

import Network.Wai.Handler.Warp (run)

Expand Down
147 changes: 35 additions & 112 deletions elm-street.cabal
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cabal-version: 2.0
cabal-version: 2.4
name: elm-street
version: 0.0.2.0
synopsis: Crossing the road between Haskell and Elm
Expand All @@ -11,35 +11,22 @@ homepage: https://github.com/Holmusk/elm-street
bug-reports: https://github.com/Holmusk/elm-street/issues
license: MPL-2.0
license-file: LICENSE
author: Holmusk
maintainer: tech@holmusk.com
author: Veronika Romashkina, Dmitrii Kovanikov
maintainer: Holmusk <tech@holmusk.com>
copyright: 2019 Holmusk
category: Language, Compiler, Elm
build-type: Simple
extra-doc-files: README.md
, CHANGELOG.md
tested-with: GHC == 8.4.4, GHC == 8.6.3
tested-with: GHC == 8.4.4
GHC == 8.6.5

source-repository head
type: git
location: https://github.com/Holmusk/elm-street.git

library
hs-source-dirs: src
exposed-modules: Elm
Elm.Aeson
Elm.Ast
Elm.Generate
Elm.Generic
Elm.Print

common common-options
build-depends: base >= 4.11.1.0 && < 4.13
, aeson >= 1.3
, directory ^>= 1.3
, filepath ^>= 1.4
, prettyprinter ^>= 1.2.1
, text ^>= 1.2
, time

ghc-options: -Wall
-Wincomplete-uni-patterns
Expand All @@ -64,136 +51,72 @@ library
StandaloneDeriving
TupleSections
TypeApplications
TypeOperators
ViewPatterns

library
import: common-options
hs-source-dirs: src
exposed-modules: Elm
Elm.Aeson
Elm.Ast
Elm.Generate
Elm.Generic
Elm.Print

build-depends: aeson >= 1.3
, directory ^>= 1.3
, filepath ^>= 1.4
, prettyprinter ^>= 1.2.1
, text ^>= 1.2
, time

library types
import: common-options
hs-source-dirs: types
exposed-modules: Types

build-depends: base >= 4.11 && < 4.13
, aeson
build-depends: aeson
, elm-street
, text
, time

ghc-options: -Wall
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wcompat
-Widentities
-Wredundant-constraints
-fhide-source-paths
-Wmissing-export-lists
-Wpartial-fields

default-language: Haskell2010
default-extensions: ConstraintKinds
DeriveGeneric
GeneralizedNewtypeDeriving
InstanceSigs
KindSignatures
LambdaCase
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns

executable generate-elm
import: common-options
hs-source-dirs: generate-elm
main-is: Main.hs

build-depends: base
, elm-street
build-depends: elm-street
, types

ghc-options: -Wall
-threaded
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wcompat
-Widentities
-Wredundant-constraints
-fhide-source-paths

default-language: Haskell2010

executable run-backend
import: common-options
hs-source-dirs: backend
main-is: Main.hs
other-modules: Api

build-depends: base
, servant >= 0.14 && < 0.17
build-depends: servant >= 0.14 && < 0.17
, servant-server >= 0.14 && < 0.17
, types
, wai ^>= 3.2
, warp ^>= 3.2

ghc-options: -Wall
-threaded
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wcompat
-Widentities
-Wredundant-constraints
-fhide-source-paths

default-language: Haskell2010
default-extensions: ConstraintKinds
DeriveGeneric
GeneralizedNewtypeDeriving
InstanceSigs
KindSignatures
LambdaCase
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
TypeOperators
ViewPatterns

test-suite elm-street-test
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs

build-depends: base >= 4.11.1.0 && < 4.13
, elm-street

build-depends: elm-street

ghc-options: -Wall
-threaded
ghc-options: -threaded
-rtsopts
-with-rtsopts=-N
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wcompat
-Widentities
-Wredundant-constraints
-fhide-source-paths
-Wmissing-export-lists
-Wpartial-fields

default-language: Haskell2010
default-extensions: ConstraintKinds
DeriveGeneric
GeneralizedNewtypeDeriving
InstanceSigs
KindSignatures
LambdaCase
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns
3 changes: 0 additions & 3 deletions stack-8.4.4.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
resolver: lts-12.26

ghc-options:
"$locals": -fhide-source-paths
4 changes: 1 addition & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
resolver: lts-13.7
resolver: lts-14.4

ghc-options:
"$locals": -fhide-source-paths

0 comments on commit 03a8815

Please sign in to comment.