Skip to content

Commit a0d3546

Browse files
committed
Remove unused packages from happy executable
1 parent afed9db commit a0d3546

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ jobs:
227227
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
228228
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy" >> cabal.project ; fi
229229
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
230+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package happy-lib" >> cabal.project ; fi
231+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
232+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package happy" >> cabal.project ; fi
233+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
230234
cat >> cabal.project <<EOF
231235
EOF
232236
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(happy|happy-lib|mtl|transformers)$/; }' >> cabal.project.local

cabal.haskell-ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
branches: master
22
error-incomplete-patterns: False
3-
error-unused-packages: False
3+
error-unused-packages: >=9
44

55
-- Specify 'constraint: ... installed' packages
66
installed: +all -transformers -mtl

happy.cabal

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ executable happy
141141
main-is: Main.lhs
142142

143143
build-depends: base >= 4.9 && < 5,
144-
array,
145-
containers >= 0.4.2,
146-
mtl >= 2.2.1,
147144
happy-lib == 2.1.7
148145

149146
default-language: Haskell98

0 commit comments

Comments
 (0)