Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge happy-* library packages into a single happy library component (#292) #293

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 1 addition & 41 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ jobs:
- name: initial cabal.project for sdist
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/packages/tabular" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/packages/frontend" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/packages/backend-lalr" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/packages/backend-glr" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/packages/grammar" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
cat cabal.project
- name: sdist
Expand All @@ -196,42 +191,17 @@ jobs:
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
- name: generate cabal.project
run: |
PKGDIR_happy_tabular="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-tabular-[0-9.]*')"
echo "PKGDIR_happy_tabular=${PKGDIR_happy_tabular}" >> "$GITHUB_ENV"
PKGDIR_happy_frontend="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-frontend-[0-9.]*')"
echo "PKGDIR_happy_frontend=${PKGDIR_happy_frontend}" >> "$GITHUB_ENV"
PKGDIR_happy_backend_lalr="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-backend-lalr-[0-9.]*')"
echo "PKGDIR_happy_backend_lalr=${PKGDIR_happy_backend_lalr}" >> "$GITHUB_ENV"
PKGDIR_happy_backend_glr="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-backend-glr-[0-9.]*')"
echo "PKGDIR_happy_backend_glr=${PKGDIR_happy_backend_glr}" >> "$GITHUB_ENV"
PKGDIR_happy_grammar="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-grammar-[0-9.]*')"
echo "PKGDIR_happy_grammar=${PKGDIR_happy_grammar}" >> "$GITHUB_ENV"
PKGDIR_happy="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/happy-[0-9.]*')"
echo "PKGDIR_happy=${PKGDIR_happy}" >> "$GITHUB_ENV"
rm -f cabal.project cabal.project.local
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_happy_tabular}" >> cabal.project
echo "packages: ${PKGDIR_happy_frontend}" >> cabal.project
echo "packages: ${PKGDIR_happy_backend_lalr}" >> cabal.project
echo "packages: ${PKGDIR_happy_backend_glr}" >> cabal.project
echo "packages: ${PKGDIR_happy_grammar}" >> cabal.project
echo "packages: ${PKGDIR_happy}" >> cabal.project
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy-tabular" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy-frontend" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy-backend-lalr" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy-backend-glr" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy-grammar" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package happy" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(containers|happy|happy-backend-glr|happy-backend-lalr|happy-frontend|happy-grammar|happy-tabular|mtl|transformers)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(containers|happy|mtl|transformers)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
Expand Down Expand Up @@ -259,16 +229,6 @@ jobs:
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: cabal check
run: |
cd ${PKGDIR_happy_tabular} || false
${CABAL} -vnormal check
cd ${PKGDIR_happy_frontend} || false
${CABAL} -vnormal check
cd ${PKGDIR_happy_backend_lalr} || false
${CABAL} -vnormal check
cd ${PKGDIR_happy_backend_glr} || false
${CABAL} -vnormal check
cd ${PKGDIR_happy_grammar} || false
${CABAL} -vnormal check
cd ${PKGDIR_happy} || false
${CABAL} -vnormal check
- name: haddock
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
packages:
packages/*/happy-*.cabal
./
packages: .
File renamed without changes.
File renamed without changes.
File renamed without changes.
66 changes: 55 additions & 11 deletions happy.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -132,27 +132,71 @@ extra-source-files:
tests/rank2.y
tests/shift01.y

data-dir: data

data-files:
GLR_Base.hs
GLR_Lib.hs
HappyTemplate.hs

source-repository head
type: git
location: https://github.com/haskell/happy.git

executable happy
library
hs-source-dirs: src

exposed-modules:
Happy.Grammar
Happy.Frontend,
Happy.Frontend.AbsSyn,
Happy.Frontend.Mangler,
Happy.Frontend.PrettyGrammar
Happy.Tabular,
Happy.Tabular.First,
Happy.Tabular.Info,
Happy.Tabular.LALR,
Happy.Tabular.NameSet
Happy.Backend.LALR,
Happy.Backend.LALR.ProduceCode
Happy.Backend.GLR,
Happy.Backend.GLR.ProduceCode
build-depends:
base >= 4.9 && < 5,
array,
containers >= 0.4.2,
transformers >= 0.5.6.2,
mtl >= 2.2.2

default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns
ghc-options: -Wall -Wno-incomplete-uni-patterns
other-modules:
Happy.Frontend.ParseMonad
Happy.Frontend.ParseMonad.Class
Happy.Frontend.Mangler.Monad
Happy.Frontend.Parser
Happy.Frontend.Lexer
Happy.Frontend.ParamRules
Happy.Frontend.AttrGrammar
Happy.Frontend.AttrGrammar.Parser
Happy.Frontend.AttrGrammar.Mangler
Paths_happy

executable happy
hs-source-dirs: app
main-is: Main.lhs

build-depends: base >= 4.9 && < 5,
array,
containers >= 0.4.2,
mtl >= 2.2.1,
happy-grammar == 2.0,
happy-tabular == 2.0,
happy-frontend == 2.0,
happy-backend-lalr == 2.0,
happy-backend-glr == 2.0
build-depends:
base >= 4.9 && < 5,
array,
containers >= 0.4.2,
mtl >= 2.2.1,
happy

default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns
ghc-options: -Wall -Wno-incomplete-uni-patterns
ghc-options: -Wall
other-modules:
Paths_happy

Expand Down
1 change: 0 additions & 1 deletion packages/backend-glr/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions packages/backend-glr/Setup.hs

This file was deleted.

60 changes: 0 additions & 60 deletions packages/backend-glr/happy-backend-glr.cabal

This file was deleted.

1 change: 0 additions & 1 deletion packages/backend-lalr/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions packages/backend-lalr/Setup.hs

This file was deleted.

59 changes: 0 additions & 59 deletions packages/backend-lalr/happy-backend-lalr.cabal

This file was deleted.

1 change: 0 additions & 1 deletion packages/frontend/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions packages/frontend/Setup.hs

This file was deleted.

68 changes: 0 additions & 68 deletions packages/frontend/happy-frontend.cabal

This file was deleted.

1 change: 0 additions & 1 deletion packages/grammar/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions packages/grammar/Setup.hs

This file was deleted.

Loading