Skip to content

Commit

Permalink
Extract common stanza in happy-lib, fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraf812 committed Sep 17, 2024
1 parent 16b576b commit ddfb7bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
happy.cabal
lib/happy-lib.cabal
happy.cabal
2 changes: 1 addition & 1 deletion lib/frontend/src/Happy/Frontend/AttrGrammar/Mangler.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ manipulation and let binding goop
(c) 1993-2001 Andy Gill, Simon Marlow
-----------------------------------------------------------------------------

> {-# LANGUAGE PatternSignatures #-}
> {-# LANGUAGE ScopedTypeVariables #-}
> module Happy.Frontend.AttrGrammar.Mangler (rewriteAttributeGrammar) where

> import Happy.Grammar
Expand Down
38 changes: 11 additions & 27 deletions lib/happy-lib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,25 @@ source-repository head
type: git
location: https://github.com/haskell/happy.git

common common-stanza
default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns
ghc-options: -Wall -Wno-incomplete-uni-patterns

library grammar
import: common-stanza
hs-source-dirs: grammar/src

exposed-modules: Happy.Grammar
build-depends: base < 5, array

default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts
ghc-options: -Wall
other-modules:

library frontend
import: common-stanza
hs-source-dirs: frontend/src
exposed-modules: Happy.Frontend,
Happy.Frontend.AbsSyn,
Happy.Frontend.Mangler,
Happy.Frontend.PrettyGrammar

build-depends: base < 5, array, transformers, containers, mtl, happy-lib:grammar

default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts
ghc-options: -Wall -Wno-incomplete-uni-patterns
other-modules:
Happy.Frontend.ParseMonad
Happy.Frontend.ParseMonad.Class
Expand All @@ -100,46 +96,36 @@ library frontend
Happy.Frontend.AttrGrammar.Mangler

library tabular
import: common-stanza
hs-source-dirs: tabular/src

exposed-modules: Happy.Tabular,
Happy.Tabular.First,
Happy.Tabular.Info,
Happy.Tabular.LALR,
Happy.Tabular.NameSet
build-depends: base < 5, array, containers, happy-lib:grammar

default-language: Haskell98
default-extensions: CPP, MagicHash, FlexibleContexts, NamedFieldPuns
ghc-options: -Wall

library backend-lalr
import: common-stanza
hs-source-dirs: backend-lalr/src

exposed-modules: Happy.Backend.LALR,
Happy.Backend.LALR.ProduceCode
build-depends: base < 5, array, happy-lib:grammar, happy-lib:tabular

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

library backend-glr
import: common-stanza
hs-source-dirs: backend-glr/src

exposed-modules: Happy.Backend.GLR,
Happy.Backend.GLR.ProduceCode
build-depends: base < 5, array, happy-lib:grammar, happy-lib:tabular

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

library
import: common-stanza
reexported-modules: Happy.Grammar,
Happy.Frontend,
Happy.Frontend.AbsSyn,
Expand All @@ -154,7 +140,6 @@ library
Happy.Backend.LALR.ProduceCode,
Happy.Backend.GLR,
Happy.Backend.GLR.ProduceCode

build-depends: base >= 4.9 && < 5,
array >= 0.5,
containers >= 0.4.2,
Expand All @@ -165,4 +150,3 @@ library
happy-lib:frontend,
happy-lib:backend-lalr,
happy-lib:backend-glr
default-language: Haskell98

0 comments on commit ddfb7bb

Please sign in to comment.