Skip to content

Getting cabal build working with modern GHC #79

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

Open
wants to merge 4 commits into
base: master
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
11 changes: 9 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
packages: language-python/
language-python-test/
packages:
language-python
language-python-test


with-compiler: ghc-9.8.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hardwire the compiler version here?


tests: True

Empty file modified language-python-test/Setup.lhs
100755 → 100644
Empty file.
9 changes: 5 additions & 4 deletions language-python-test/language-python-test.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: language-python-test
version: 0.6.0
version: 0.6.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this PR contain a version bump?
The released version is 0.5.8

cabal-version: >= 1.8
synopsis: testing code for the language-python library
description: A few executables to test the language-python library.
Expand All @@ -14,6 +14,7 @@ build-type: Simple
stability: experimental

tested-with:
GHC == 9.8.4
GHC == 9.6.1
GHC == 9.4.4
GHC == 9.2.7
Expand All @@ -35,18 +36,18 @@ Executable language-python-roundtrip
./src
main-is: RoundTrip.hs
other-modules:
build-depends: base == 4.*, language-python == 0.6.0
build-depends: base == 4.*, language-python == 0.6.2

Executable language-python-tokens
hs-source-dirs:
./src
main-is: Tokens.hs
other-modules:
build-depends: base == 4.*, language-python == 0.6.0
build-depends: base == 4.*, language-python == 0.6.2

Executable language-python-parse-pretty
hs-source-dirs:
./src
main-is: ParsePretty.hs
other-modules:
build-depends: base == 4.*, language-python == 0.6.0
build-depends: base == 4.*, language-python == 0.6.2
Empty file modified language-python-test/test/CPython_test_suite_v2/UserString.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/base64.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/cProfile.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/cgi.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/fractions.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/keyword.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/mailbox.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/make_test.sh
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/mimify.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/pdb.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/platform.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/profile.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/pydoc.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/quopri.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/runpy.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/smtpd.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/smtplib.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/symbol.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/tabnanny.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/token.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v2/uu.py
100755 → 100644
Empty file.
Empty file modified language-python-test/test/CPython_test_suite_v3/make_test.sh
100755 → 100644
Empty file.
Empty file.
Empty file modified language-python-test/test/make_utf8.sh
100755 → 100644
Empty file.
Empty file modified language-python/Setup.lhs
100755 → 100644
Empty file.
8 changes: 5 additions & 3 deletions language-python/language-python.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: language-python
version: 0.6.0
version: 0.6.2
cabal-version: >= 1.8
synopsis: Parsing and pretty printing of Python code.
description: language-python is a Haskell library for lexical analysis, parsing
Expand All @@ -16,6 +16,7 @@ stability: experimental
extra-source-files: Changelog.md

tested-with:
GHC == 9.8.4
GHC == 9.6.1
GHC == 9.4.4
GHC == 9.2.7
Expand All @@ -41,9 +42,10 @@ Library
pretty == 1.1.*,
array >= 0.4 && < 0.6,
transformers >= 0.3 && < 0.7,
monads-tf == 0.1.*,
monads-tf == 0.3.*,
utf8-string >= 1 && < 2
build-tools: happy, alex
build-tools: happy >= 1.20, alex
build-tool-depends: happy:happy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One should not have both build-tools (the old, deprecated way) and build-tool-depends.

exposed-modules:
Language.Python.Common
Language.Python.Common.ParseError
Expand Down
5 changes: 3 additions & 2 deletions language-python/src/Language/Python/Version2/Parser/Parser.y
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}

#undef __GLASGOW_HASKELL__
#define __GLASGOW_HASKELL__ 709
-----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Version2.Parser.Parser
Expand Down
5 changes: 3 additions & 2 deletions language-python/src/Language/Python/Version3/Parser/Parser.y
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}

#undef __GLASGOW_HASKELL__
#define __GLASGOW_HASKELL__ 709
-----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Version3.Parser.Parser
Expand Down
5 changes: 4 additions & 1 deletion language-python/stack.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
resolver: lts-10.2
resolver: lts-23.19

packages:
- .

extra-deps: []

system-ghc: false
install-ghc: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hardwire these settings here?
E.g. I always work with the opposite settings.


# Override default flag values for local packages and extra-deps
# flags: {}

Expand Down