Skip to content

Commit

Permalink
Make sure to format all cabal files, sort dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Dec 17, 2021
1 parent aa9ea5e commit 63ec971
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 56 deletions.
29 changes: 15 additions & 14 deletions extract-hackage-info/extract-hackage-info.cabal
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
cabal-version: 2.4
name: extract-hackage-info
version: 0.0.0.0
author: Thomas Bagrel <thomas.bagrel@tweag.io>
maintainer: Thomas Bagrel <thomas.bagrel@tweag.io>
name: extract-hackage-info
version: 0.0.0.0
maintainer: Thomas Bagrel <thomas.bagrel@tweag.io>
author: Thomas Bagrel <thomas.bagrel@tweag.io>

executable extract-hackage-info
main-is: Main.hs
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -O2 -Wall -rtsopts
build-depends:
aeson >=1.0 && <3.0,
base >=4.12 && <5.0,
bytestring >=0.10 && <0.11,
containers >=0.6 && <0.7,
directory >=1.0 && <2.0,
filepath >=1.2 && <1.5,
ghc-lib-parser >=9.2 && <9.3,
optparse-applicative >=0.14 && <0.17,
ormolu,
pcre2 >=2.0 && <3.0,
tagsoup >=0.14 && <0.15,
text >=0.2 && <1.3,
containers >=0.6 && <0.7,
aeson >= 1.0 && <3.0,
pcre2 >= 2.0 && < 3.0,
directory >= 1.0 && < 2.0,
tagsoup >= 0.14 && < 0.15,
text-format >= 0.3 && < 0.4,
ghc-lib-parser >=9.2 && <9.3,
bytestring >= 0.10 && < 0.11
ghc-options: -O2 -Wall -rtsopts
if !impl(ghc == 8.10.*)
text-format >=0.3 && <0.4

if !impl(ghc >=8.10 && <8.11)
buildable: False
2 changes: 2 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set -e
export LANG="C.UTF-8"

cabal format
pushd extract-hackage-info && cabal format && popd
pushd ormolu-live && cabal format && popd

ormolu -m inplace $(find app -type f -name "*.hs")
ormolu -m inplace $(find src -type f -name "*.hs-boot" -o -name "*.hs")
Expand Down
78 changes: 44 additions & 34 deletions ormolu-live/ormolu-live.cabal
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
cabal-version: 2.4
name: ormolu-live
version: 0.0.0.0
author: Alexander Esgen <alexander.esgen@tweag.io>
maintainer: Alexander Esgen <alexander.esgen@tweag.io>
name: ormolu-live
version: 0.0.0.0
maintainer: Alexander Esgen <alexander.esgen@tweag.io>
author: Alexander Esgen <alexander.esgen@tweag.io>

executable ormolu-live
ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -fno-warn-name-shadowing -Wmissing-deriving-strategies -Wunused-packages
ghcjs-options: -dedupe
default-extensions: BlockArguments CPP DeriveGeneric DerivingStrategies FlexibleContexts LambdaCase NamedFieldPuns OverloadedLabels OverloadedStrings RecordWildCards TemplateHaskell TypeApplications ViewPatterns
main-is: Main.hs
build-depends:
base
, text ^>= 1.2
, unliftio ^>= 0.2
, ormolu
, ghc-lib-parser
, ghc-syntax-highlighter
, miso ^>= 1.8
, lens ^>= 5.0
, generic-lens ^>= 2.2
, gitrev >=1.3 && <1.4
if !impl(ghcjs)
main-is: Main.hs
hs-source-dirs: src
other-modules: Language.Javascript.JSaddle.Warp.Extra
default-language: Haskell2010
default-extensions:
BlockArguments CPP DeriveGeneric DerivingStrategies
FlexibleContexts LambdaCase NamedFieldPuns OverloadedLabels
OverloadedStrings RecordWildCards TemplateHaskell TypeApplications
ViewPatterns

ghc-options:
-Wall -Wincomplete-record-updates -Wincomplete-uni-patterns
-fno-warn-name-shadowing -Wmissing-deriving-strategies
-Wunused-packages

ghcjs-options: -dedupe
build-depends:
jsaddle ^>= 0.9
, jsaddle-warp ^>= 0.9
, websockets ^>= 0.12
, warp ^>= 3.3
, wai-app-static ^>= 3.1
hs-source-dirs: src
other-modules:
Language.Javascript.JSaddle.Warp.Extra
default-language: Haskell2010
if !impl(ghc == 8.10.*)
buildable: False
if impl(ghcjs)
-- remove stack size limit (necessary for the linking step)
ghc-options: +RTS -K0 -RTS
base,
generic-lens ^>=2.2,
ghc-lib-parser,
ghc-syntax-highlighter,
gitrev >=1.3 && <1.4,
lens ^>=5.0,
miso ^>=1.8,
ormolu,
text ^>=1.2,
unliftio ^>=0.2

if !impl(ghcjs >=0)
build-depends:
jsaddle ^>=0.9,
jsaddle-warp ^>=0.9,
wai-app-static ^>=3.1,
warp ^>=3.3,
websockets ^>=0.12

if !impl(ghc >=8.10 && <8.11)
buildable: False

if impl(ghcjs >=0)
ghc-options: +RTS -K0 -RTS
16 changes: 8 additions & 8 deletions ormolu.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,25 @@ library
other-modules: GHC.DynFlags
default-language: Haskell2010
build-depends:
Cabal >=3.6 && <3.7,
Diff >=0.4 && <1.0,
MemoTrie >=0.6 && <0.7,
aeson >=1.0 && <3.0,
ansi-terminal >=0.10 && <1.0,
array >=0.5 && <0.6,
base >=4.14 && <5.0,
bytestring >=0.2 && <0.12,
containers >=0.5 && <0.7,
directory ^>=1.3,
dlist >=0.8 && <2.0,
array >=0.5 && <0.6,
exceptions >=0.6 && <0.11,
filepath >=1.2 && <1.5,
ghc-lib-parser >=9.2 && <9.3,
mtl >=2.0 && <3.0,
syb >=0.7 && <0.8,
text >=0.2 && <1.3,
filepath >=1.2 && <1.5,
directory ^>=1.3,
Cabal >=3.6 && <3.7,
aeson >=1.0 && <3.0,
template-haskell,
th-lift-instances >=0.1 && <0.2,
MemoTrie >=0.6 && <0.7
text >=0.2 && <1.3,
th-lift-instances >=0.1 && <0.2

mixins: ghc-lib-parser hiding (Language.Haskell.TH.Syntax)

Expand Down

0 comments on commit 63ec971

Please sign in to comment.