From 2bbb53ae1a87fb6c99827d46ada636ef88997be7 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Fri, 13 Sep 2024 16:04:50 +0200 Subject: [PATCH] Merge `happy-*` library packages into a single `happy` library component (#292) See #292. Fixes #292. --- .github/workflows/haskell-ci.yml | 42 +----------- {src => app}/Main.lhs | 0 .../AttrGrammarParser.ly | 0 .../frontend/boot-src => boot-src}/Parser.ly | 0 .../frontend/bootstrap.sh => bootstrap.sh | 0 cabal.project | 4 +- .../backend-glr/data => data}/GLR_Base.hs | 0 .../backend-glr/data => data}/GLR_Lib.hs | 0 .../data => data}/HappyTemplate.hs | 0 happy.cabal | 66 +++++++++++++++--- packages/backend-glr/LICENSE | 1 - packages/backend-glr/Setup.hs | 2 - packages/backend-glr/happy-backend-glr.cabal | 60 ---------------- packages/backend-lalr/LICENSE | 1 - packages/backend-lalr/Setup.hs | 2 - .../backend-lalr/happy-backend-lalr.cabal | 59 ---------------- packages/frontend/LICENSE | 1 - packages/frontend/Setup.hs | 2 - packages/frontend/happy-frontend.cabal | 68 ------------------- packages/grammar/LICENSE | 1 - packages/grammar/Setup.hs | 2 - packages/grammar/happy-grammar.cabal | 50 -------------- packages/tabular/LICENSE | 1 - packages/tabular/Setup.hs | 2 - packages/tabular/happy-tabular.cabal | 56 --------------- .../src => src}/Happy/Backend/GLR.hs | 4 +- .../Happy/Backend/GLR/ProduceCode.lhs | 2 +- .../src => src}/Happy/Backend/LALR.hs | 2 +- .../Happy/Backend/LALR/ProduceCode.lhs | 2 +- .../frontend/src => src}/Happy/Frontend.hs | 0 .../src => src}/Happy/Frontend/AbsSyn.lhs | 0 .../Happy/Frontend/AttrGrammar.lhs | 0 .../Happy/Frontend/AttrGrammar/Mangler.lhs | 0 .../Happy/Frontend/AttrGrammar/Parser.hs | 0 .../src => src}/Happy/Frontend/Lexer.lhs | 0 .../src => src}/Happy/Frontend/Mangler.lhs | 0 .../Happy/Frontend/Mangler/Monad.lhs | 0 .../src => src}/Happy/Frontend/ParamRules.hs | 0 .../src => src}/Happy/Frontend/ParseMonad.hs | 0 .../Happy/Frontend/ParseMonad/Class.hs | 0 .../src => src}/Happy/Frontend/Parser.hs | 0 .../Happy/Frontend/PrettyGrammar.hs | 0 .../grammar/src => src}/Happy/Grammar.lhs | 0 .../tabular/src => src}/Happy/Tabular.lhs | 0 .../src => src}/Happy/Tabular/First.lhs | 0 .../src => src}/Happy/Tabular/Info.lhs | 0 .../src => src}/Happy/Tabular/LALR.lhs | 0 .../src => src}/Happy/Tabular/NameSet.hs | 0 48 files changed, 62 insertions(+), 368 deletions(-) rename {src => app}/Main.lhs (100%) rename {packages/frontend/boot-src => boot-src}/AttrGrammarParser.ly (100%) rename {packages/frontend/boot-src => boot-src}/Parser.ly (100%) rename packages/frontend/bootstrap.sh => bootstrap.sh (100%) rename {packages/backend-glr/data => data}/GLR_Base.hs (100%) rename {packages/backend-glr/data => data}/GLR_Lib.hs (100%) rename {packages/backend-lalr/data => data}/HappyTemplate.hs (100%) delete mode 120000 packages/backend-glr/LICENSE delete mode 100644 packages/backend-glr/Setup.hs delete mode 100644 packages/backend-glr/happy-backend-glr.cabal delete mode 120000 packages/backend-lalr/LICENSE delete mode 100644 packages/backend-lalr/Setup.hs delete mode 100644 packages/backend-lalr/happy-backend-lalr.cabal delete mode 120000 packages/frontend/LICENSE delete mode 100644 packages/frontend/Setup.hs delete mode 100644 packages/frontend/happy-frontend.cabal delete mode 120000 packages/grammar/LICENSE delete mode 100644 packages/grammar/Setup.hs delete mode 100644 packages/grammar/happy-grammar.cabal delete mode 120000 packages/tabular/LICENSE delete mode 100644 packages/tabular/Setup.hs delete mode 100644 packages/tabular/happy-tabular.cabal rename {packages/backend-glr/src => src}/Happy/Backend/GLR.hs (51%) rename {packages/backend-glr/src => src}/Happy/Backend/GLR/ProduceCode.lhs (99%) rename {packages/backend-lalr/src => src}/Happy/Backend/LALR.hs (98%) rename {packages/backend-lalr/src => src}/Happy/Backend/LALR/ProduceCode.lhs (99%) rename {packages/frontend/src => src}/Happy/Frontend.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/AbsSyn.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/AttrGrammar.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/AttrGrammar/Mangler.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/AttrGrammar/Parser.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/Lexer.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/Mangler.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/Mangler/Monad.lhs (100%) rename {packages/frontend/src => src}/Happy/Frontend/ParamRules.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/ParseMonad.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/ParseMonad/Class.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/Parser.hs (100%) rename {packages/frontend/src => src}/Happy/Frontend/PrettyGrammar.hs (100%) rename {packages/grammar/src => src}/Happy/Grammar.lhs (100%) rename {packages/tabular/src => src}/Happy/Tabular.lhs (100%) rename {packages/tabular/src => src}/Happy/Tabular/First.lhs (100%) rename {packages/tabular/src => src}/Happy/Tabular/Info.lhs (100%) rename {packages/tabular/src => src}/Happy/Tabular/LALR.lhs (100%) rename {packages/tabular/src => src}/Happy/Tabular/NameSet.hs (100%) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 07b7c7cd..fe39ad19 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -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 @@ -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 <> 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 @@ -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 diff --git a/src/Main.lhs b/app/Main.lhs similarity index 100% rename from src/Main.lhs rename to app/Main.lhs diff --git a/packages/frontend/boot-src/AttrGrammarParser.ly b/boot-src/AttrGrammarParser.ly similarity index 100% rename from packages/frontend/boot-src/AttrGrammarParser.ly rename to boot-src/AttrGrammarParser.ly diff --git a/packages/frontend/boot-src/Parser.ly b/boot-src/Parser.ly similarity index 100% rename from packages/frontend/boot-src/Parser.ly rename to boot-src/Parser.ly diff --git a/packages/frontend/bootstrap.sh b/bootstrap.sh similarity index 100% rename from packages/frontend/bootstrap.sh rename to bootstrap.sh diff --git a/cabal.project b/cabal.project index 1f3ee959..e6fdbadb 100644 --- a/cabal.project +++ b/cabal.project @@ -1,3 +1 @@ -packages: - packages/*/happy-*.cabal - ./ +packages: . diff --git a/packages/backend-glr/data/GLR_Base.hs b/data/GLR_Base.hs similarity index 100% rename from packages/backend-glr/data/GLR_Base.hs rename to data/GLR_Base.hs diff --git a/packages/backend-glr/data/GLR_Lib.hs b/data/GLR_Lib.hs similarity index 100% rename from packages/backend-glr/data/GLR_Lib.hs rename to data/GLR_Lib.hs diff --git a/packages/backend-lalr/data/HappyTemplate.hs b/data/HappyTemplate.hs similarity index 100% rename from packages/backend-lalr/data/HappyTemplate.hs rename to data/HappyTemplate.hs diff --git a/happy.cabal b/happy.cabal index b4cb264b..609174c5 100644 --- a/happy.cabal +++ b/happy.cabal @@ -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 diff --git a/packages/backend-glr/LICENSE b/packages/backend-glr/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/backend-glr/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/backend-glr/Setup.hs b/packages/backend-glr/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/backend-glr/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/backend-glr/happy-backend-glr.cabal b/packages/backend-glr/happy-backend-glr.cabal deleted file mode 100644 index ed89af01..00000000 --- a/packages/backend-glr/happy-backend-glr.cabal +++ /dev/null @@ -1,60 +0,0 @@ -name: happy-backend-glr -version: 2.0 -license: BSD2 -license-file: LICENSE -copyright: (c) Andy Gill, Simon Marlow -author: Andy Gill and Simon Marlow -maintainer: Simon Marlow -bug-reports: https://github.com/haskell/happy/issues -stability: stable -homepage: https://www.haskell.org/happy/ -category: Development -cabal-version: >= 1.10 -build-type: Simple -synopsis: A GLR backend for happy - -Description: - Happy is a parser generator for Haskell. - Happy-Backend-GLR is a backend which creates - GLR-based Haskell code. - - -tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 - GHC == 8.6.5 - GHC == 8.4.4 - GHC == 8.2.2 - GHC == 8.0.2 --- GHC == 7.10.3 --- GHC == 7.8.4 --- GHC == 7.6.3 --- GHC == 7.4.2 --- GHC == 7.0.4 - -data-dir: data - -data-files: - GLR_Base.hs - GLR_Lib.hs - -library - hs-source-dirs: src - - exposed-modules: Happy.Backend.GLR, - Happy.Backend.GLR.ProduceCode - build-depends: base < 5, - array, - happy-grammar == 2.0, - happy-tabular == 2.0 - - default-language: Haskell98 - default-extensions: CPP, MagicHash, FlexibleContexts - ghc-options: -Wall -Wincomplete-uni-patterns - other-modules: Paths_happy_backend_glr diff --git a/packages/backend-lalr/LICENSE b/packages/backend-lalr/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/backend-lalr/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/backend-lalr/Setup.hs b/packages/backend-lalr/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/backend-lalr/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/backend-lalr/happy-backend-lalr.cabal b/packages/backend-lalr/happy-backend-lalr.cabal deleted file mode 100644 index 8ec6a312..00000000 --- a/packages/backend-lalr/happy-backend-lalr.cabal +++ /dev/null @@ -1,59 +0,0 @@ -name: happy-backend-lalr -version: 2.0 -license: BSD2 -license-file: LICENSE -copyright: (c) Andy Gill, Simon Marlow -author: Andy Gill and Simon Marlow -maintainer: Simon Marlow -bug-reports: https://github.com/haskell/happy/issues -stability: stable -homepage: https://www.haskell.org/happy/ -category: Development -cabal-version: >= 1.10 -build-type: Simple -synopsis: A table-based backend for happy - -Description: - Happy is a parser generator for Haskell. - Happy-Backend-LALR is responsible for code-generation: - It converts action and goto tables into LALR Haskell code. - - -tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 - GHC == 8.6.5 - GHC == 8.4.4 - GHC == 8.2.2 - GHC == 8.0.2 --- GHC == 7.10.3 --- GHC == 7.8.4 --- GHC == 7.6.3 --- GHC == 7.4.2 --- GHC == 7.0.4 - -data-dir: data - -data-files: - HappyTemplate.hs - -library - hs-source-dirs: src - - exposed-modules: Happy.Backend.LALR, - Happy.Backend.LALR.ProduceCode - build-depends: base < 5, - array, - happy-grammar == 2.0, - happy-tabular == 2.0 - - default-language: Haskell98 - default-extensions: CPP, MagicHash, FlexibleContexts - ghc-options: -Wall -Wincomplete-uni-patterns - other-modules: Paths_happy_backend_lalr diff --git a/packages/frontend/LICENSE b/packages/frontend/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/frontend/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/frontend/Setup.hs b/packages/frontend/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/frontend/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/frontend/happy-frontend.cabal b/packages/frontend/happy-frontend.cabal deleted file mode 100644 index fbfda50a..00000000 --- a/packages/frontend/happy-frontend.cabal +++ /dev/null @@ -1,68 +0,0 @@ -name: happy-frontend -version: 2.0 -license: BSD2 -license-file: LICENSE -copyright: (c) Andy Gill, Simon Marlow -author: Andy Gill and Simon Marlow -maintainer: Simon Marlow -bug-reports: https://github.com/haskell/happy/issues -stability: stable -homepage: https://www.haskell.org/happy/ -category: Development -cabal-version: >= 1.10 -build-type: Simple -synopsis: A yacc-like frontend for happy - -Description: - Happy is a parser generator for Haskell. - Happy-Frontend is responsible for parsing .y- and .ly-files - and mangling them into a Grammar datatype. - These .y- and .ly-files work similar to yacc's .y-files, but - have some Haskell-specific features. - -tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 - GHC == 8.6.5 - GHC == 8.4.4 - GHC == 8.2.2 - GHC == 8.0.2 --- GHC == 7.10.3 --- GHC == 7.8.4 --- GHC == 7.6.3 --- GHC == 7.4.2 --- GHC == 7.0.4 - -library - hs-source-dirs: src - exposed-modules: Happy.Frontend, - Happy.Frontend.AbsSyn, - Happy.Frontend.Mangler, - Happy.Frontend.PrettyGrammar - - build-depends: base < 5, - array, - containers >= 0.4.2, - transformers >= 0.5.6.2, - mtl >= 2.2.2, - happy-grammar == 2.0 - - default-language: Haskell98 - default-extensions: CPP, MagicHash, FlexibleContexts - ghc-options: -Wall -Wincomplete-uni-patterns -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 diff --git a/packages/grammar/LICENSE b/packages/grammar/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/grammar/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/grammar/Setup.hs b/packages/grammar/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/grammar/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/grammar/happy-grammar.cabal b/packages/grammar/happy-grammar.cabal deleted file mode 100644 index 139b0378..00000000 --- a/packages/grammar/happy-grammar.cabal +++ /dev/null @@ -1,50 +0,0 @@ -name: happy-grammar -version: 2.0 -license: BSD2 -license-file: LICENSE -copyright: (c) Andy Gill, Simon Marlow -author: Andy Gill and Simon Marlow -maintainer: Simon Marlow -bug-reports: https://github.com/haskell/happy/issues -stability: stable -homepage: https://www.haskell.org/happy/ -category: Development -cabal-version: >= 1.10 -build-type: Simple -synopsis: happy's Grammar datatype - -Description: - Happy is a parser generator for Haskell. - Happy-Grammar exposes the cross-package Grammar datatype, - which represents a grammar as can be parsed and processed by happy. - -tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 - GHC == 8.6.5 - GHC == 8.4.4 - GHC == 8.2.2 - GHC == 8.0.2 --- GHC == 7.10.3 --- GHC == 7.8.4 --- GHC == 7.6.3 --- GHC == 7.4.2 --- GHC == 7.0.4 - -library - hs-source-dirs: src - - exposed-modules: Happy.Grammar - build-depends: base < 5, - array - - default-language: Haskell98 - default-extensions: CPP, MagicHash, FlexibleContexts - ghc-options: -Wall - other-modules: diff --git a/packages/tabular/LICENSE b/packages/tabular/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/tabular/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/tabular/Setup.hs b/packages/tabular/Setup.hs deleted file mode 100644 index 9a994af6..00000000 --- a/packages/tabular/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/packages/tabular/happy-tabular.cabal b/packages/tabular/happy-tabular.cabal deleted file mode 100644 index 87bcc916..00000000 --- a/packages/tabular/happy-tabular.cabal +++ /dev/null @@ -1,56 +0,0 @@ -name: happy-tabular -version: 2.0 -license: BSD2 -license-file: LICENSE -copyright: (c) Andy Gill, Simon Marlow -author: Andy Gill and Simon Marlow -maintainer: Simon Marlow -bug-reports: https://github.com/haskell/happy/issues -stability: stable -homepage: https://www.haskell.org/happy/ -category: Development -cabal-version: >= 1.10 -build-type: Simple -synopsis: Action and goto tables for happy - -Description: - Happy is a parser generator for Haskell. - Happy-Tabular converts `Grammar`s, coming from - a frontend, into LALR action and goto tables, - which are further processed by a backend. - -tested-with: - GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 - GHC == 9.4.8 - GHC == 9.2.8 - GHC == 9.0.2 - GHC == 8.10.7 - GHC == 8.8.4 - GHC == 8.6.5 - GHC == 8.4.4 - GHC == 8.2.2 - GHC == 8.0.2 --- GHC == 7.10.3 --- GHC == 7.8.4 --- GHC == 7.6.3 --- GHC == 7.4.2 --- GHC == 7.0.4 - -library - hs-source-dirs: src - - exposed-modules: Happy.Tabular, - Happy.Tabular.First, - Happy.Tabular.Info, - Happy.Tabular.LALR, - Happy.Tabular.NameSet - build-depends: base < 5, - array, - containers >= 0.4.2, - happy-grammar == 2.0 - - default-language: Haskell98 - default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns - ghc-options: -Wall diff --git a/packages/backend-glr/src/Happy/Backend/GLR.hs b/src/Happy/Backend/GLR.hs similarity index 51% rename from packages/backend-glr/src/Happy/Backend/GLR.hs rename to src/Happy/Backend/GLR.hs index e11351ce..7ed5e6a8 100644 --- a/packages/backend-glr/src/Happy/Backend/GLR.hs +++ b/src/Happy/Backend/GLR.hs @@ -1,6 +1,6 @@ module Happy.Backend.GLR where -import Paths_happy_backend_glr +import Paths_happy glrBackendDataDir :: IO String -glrBackendDataDir = getDataDir \ No newline at end of file +glrBackendDataDir = getDataDir diff --git a/packages/backend-glr/src/Happy/Backend/GLR/ProduceCode.lhs b/src/Happy/Backend/GLR/ProduceCode.lhs similarity index 99% rename from packages/backend-glr/src/Happy/Backend/GLR/ProduceCode.lhs rename to src/Happy/Backend/GLR/ProduceCode.lhs index 9cef6e49..108335e2 100644 --- a/packages/backend-glr/src/Happy/Backend/GLR/ProduceCode.lhs +++ b/src/Happy/Backend/GLR/ProduceCode.lhs @@ -17,7 +17,7 @@ This module is designed as an extension to the Haskell parser generator Happy. > , Options > ) where -> import Paths_happy_backend_glr ( version ) +> import Paths_happy ( version ) > import Happy.Grammar > import Happy.Tabular.LALR > import Data.Array ( Array, (!), array, assocs ) diff --git a/packages/backend-lalr/src/Happy/Backend/LALR.hs b/src/Happy/Backend/LALR.hs similarity index 98% rename from packages/backend-lalr/src/Happy/Backend/LALR.hs rename to src/Happy/Backend/LALR.hs index 2e234202..4e98b055 100644 --- a/packages/backend-lalr/src/Happy/Backend/LALR.hs +++ b/src/Happy/Backend/LALR.hs @@ -1,6 +1,6 @@ module Happy.Backend.LALR where -import Paths_happy_backend_lalr +import Paths_happy import Data.Char lalrBackendDataDir :: IO String diff --git a/packages/backend-lalr/src/Happy/Backend/LALR/ProduceCode.lhs b/src/Happy/Backend/LALR/ProduceCode.lhs similarity index 99% rename from packages/backend-lalr/src/Happy/Backend/LALR/ProduceCode.lhs rename to src/Happy/Backend/LALR/ProduceCode.lhs index 942f2382..45ca928f 100644 --- a/packages/backend-lalr/src/Happy/Backend/LALR/ProduceCode.lhs +++ b/src/Happy/Backend/LALR/ProduceCode.lhs @@ -6,7 +6,7 @@ The code generator. > module Happy.Backend.LALR.ProduceCode (produceParser) where -> import Paths_happy_backend_lalr ( version ) +> import Paths_happy ( version ) > import Data.Version ( showVersion ) > import Happy.Grammar > import Happy.Tabular.LALR diff --git a/packages/frontend/src/Happy/Frontend.hs b/src/Happy/Frontend.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend.hs rename to src/Happy/Frontend.hs diff --git a/packages/frontend/src/Happy/Frontend/AbsSyn.lhs b/src/Happy/Frontend/AbsSyn.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/AbsSyn.lhs rename to src/Happy/Frontend/AbsSyn.lhs diff --git a/packages/frontend/src/Happy/Frontend/AttrGrammar.lhs b/src/Happy/Frontend/AttrGrammar.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/AttrGrammar.lhs rename to src/Happy/Frontend/AttrGrammar.lhs diff --git a/packages/frontend/src/Happy/Frontend/AttrGrammar/Mangler.lhs b/src/Happy/Frontend/AttrGrammar/Mangler.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/AttrGrammar/Mangler.lhs rename to src/Happy/Frontend/AttrGrammar/Mangler.lhs diff --git a/packages/frontend/src/Happy/Frontend/AttrGrammar/Parser.hs b/src/Happy/Frontend/AttrGrammar/Parser.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/AttrGrammar/Parser.hs rename to src/Happy/Frontend/AttrGrammar/Parser.hs diff --git a/packages/frontend/src/Happy/Frontend/Lexer.lhs b/src/Happy/Frontend/Lexer.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/Lexer.lhs rename to src/Happy/Frontend/Lexer.lhs diff --git a/packages/frontend/src/Happy/Frontend/Mangler.lhs b/src/Happy/Frontend/Mangler.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/Mangler.lhs rename to src/Happy/Frontend/Mangler.lhs diff --git a/packages/frontend/src/Happy/Frontend/Mangler/Monad.lhs b/src/Happy/Frontend/Mangler/Monad.lhs similarity index 100% rename from packages/frontend/src/Happy/Frontend/Mangler/Monad.lhs rename to src/Happy/Frontend/Mangler/Monad.lhs diff --git a/packages/frontend/src/Happy/Frontend/ParamRules.hs b/src/Happy/Frontend/ParamRules.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/ParamRules.hs rename to src/Happy/Frontend/ParamRules.hs diff --git a/packages/frontend/src/Happy/Frontend/ParseMonad.hs b/src/Happy/Frontend/ParseMonad.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/ParseMonad.hs rename to src/Happy/Frontend/ParseMonad.hs diff --git a/packages/frontend/src/Happy/Frontend/ParseMonad/Class.hs b/src/Happy/Frontend/ParseMonad/Class.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/ParseMonad/Class.hs rename to src/Happy/Frontend/ParseMonad/Class.hs diff --git a/packages/frontend/src/Happy/Frontend/Parser.hs b/src/Happy/Frontend/Parser.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/Parser.hs rename to src/Happy/Frontend/Parser.hs diff --git a/packages/frontend/src/Happy/Frontend/PrettyGrammar.hs b/src/Happy/Frontend/PrettyGrammar.hs similarity index 100% rename from packages/frontend/src/Happy/Frontend/PrettyGrammar.hs rename to src/Happy/Frontend/PrettyGrammar.hs diff --git a/packages/grammar/src/Happy/Grammar.lhs b/src/Happy/Grammar.lhs similarity index 100% rename from packages/grammar/src/Happy/Grammar.lhs rename to src/Happy/Grammar.lhs diff --git a/packages/tabular/src/Happy/Tabular.lhs b/src/Happy/Tabular.lhs similarity index 100% rename from packages/tabular/src/Happy/Tabular.lhs rename to src/Happy/Tabular.lhs diff --git a/packages/tabular/src/Happy/Tabular/First.lhs b/src/Happy/Tabular/First.lhs similarity index 100% rename from packages/tabular/src/Happy/Tabular/First.lhs rename to src/Happy/Tabular/First.lhs diff --git a/packages/tabular/src/Happy/Tabular/Info.lhs b/src/Happy/Tabular/Info.lhs similarity index 100% rename from packages/tabular/src/Happy/Tabular/Info.lhs rename to src/Happy/Tabular/Info.lhs diff --git a/packages/tabular/src/Happy/Tabular/LALR.lhs b/src/Happy/Tabular/LALR.lhs similarity index 100% rename from packages/tabular/src/Happy/Tabular/LALR.lhs rename to src/Happy/Tabular/LALR.lhs diff --git a/packages/tabular/src/Happy/Tabular/NameSet.hs b/src/Happy/Tabular/NameSet.hs similarity index 100% rename from packages/tabular/src/Happy/Tabular/NameSet.hs rename to src/Happy/Tabular/NameSet.hs