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

Prettyprinter and tests #67

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ package *

-- Build static linked, vanilla libraries to reduce build time.
shared: False
executable-dynamic: False
executable-dynamic: False
tests: True
59 changes: 39 additions & 20 deletions lam4-backend/lam4-backend.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ library
Base.Aeson
Base.ByteString
Base.Grisette
Lam4.Main
Lam4.Expr.Name
Lam4.Expr.ConcreteSyntax
Lam4.Expr.CommonSyntax
Lam4.Expr.Parser
Lam4.Expr.Printer
Lam4.Parser.Type
Lam4.Parser.Monad
Lam4.Expr.ConEvalAST
Expand All @@ -60,7 +62,8 @@ library
base,
containers,
foldable1-classes-compat,
lens,
lens-regex-pcre,
lens,
-- just for Control.Lens.Plated
optics,
mtl,
Expand All @@ -70,6 +73,10 @@ library
aeson,
aeson-optics,
bytestring,
cradle,
optparse-applicative,
filepath,
string-interpolate,
either,
pretty-show,
grisette >= 0.8,
Expand All @@ -94,23 +101,35 @@ library
-- bytestring,
-- lam4-backend

-- test-suite lam4-backend-test
-- import: defaults
-- default-language: GHC2021

-- -- Modules included in this executable, other than Main.
-- -- other-modules:

-- -- The interface type and version of the test suite.
-- type: exitcode-stdio-1.0

-- -- Directories containing source files.
-- hs-source-dirs: test

-- -- The entrypoint to the test suite.
-- main-is: Main.hs
test-suite lam4-backend-test
import: defaults
ghc-options: -threaded
default-language: GHC2021

-- -- Test dependencies.
-- build-depends:
-- base ^>=4.18.2.0,
-- lam4-backend
-- Modules included in this executable, other than Main.
other-modules:
PrinterSpec

-- The interface type and version of the test suite.
type:
exitcode-stdio-1.0

-- Directories containing source files.
hs-source-dirs:
test
build-tool-depends:
hspec-discover:hspec-discover
-- The entrypoint to the test suite.
main-is:
Spec.hs

-- Test dependencies.
build-depends:
lam4-backend,
base,
hspec,
hspec-golden,
filepath,
directory,
text,
bytestring
2 changes: 2 additions & 0 deletions lam4-backend/src/Lam4/Expr/ConcreteSyntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ module Lam4.Expr.ConcreteSyntax
-- * Statements
, Statement(..)
, DeonticModal(..)
, Action(..)
, PrimAction(..)

-- * Traversals
, exprSubexprs
Expand Down
Loading