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

Cabal 3.12, small changes, and release new version #96

Merged
merged 5 commits into from
Apr 29, 2024
Merged
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
push:
branches: [main]
workflow_dispatch:

jobs:
build:
Expand All @@ -26,7 +27,7 @@ jobs:
- uses: actions/checkout@v3
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2.7
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
`extensions` uses [PVP Versioning][1].
The changelog is available [on GitHub][2].

## 0.1.0.2 — Apr 29, 2024

* Add support for GHC-9.8

* Support `Cabal` `3.12` (only)

## 0.1.0.1 — Oct 15, 2023

* Add support for GHC-9.6
Expand Down
4 changes: 2 additions & 2 deletions extensions.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: extensions
version: 0.1.0.1
version: 0.1.0.2
synopsis: Parse Haskell Language Extensions
description: Parse Haskell Language Extensions.
See [README.md](https://github.com/kowainik/extensions#extensions) for more details.
Expand Down Expand Up @@ -93,7 +93,7 @@ library
-- this causes problems in practice let's
-- revisit this decision and come up with
-- another approach.
, Cabal ^>= 3.10
, Cabal ^>= 3.12
, containers ^>= 0.6
, directory ^>= 1.3
, filepath ^>= 1.4
Expand Down
11 changes: 10 additions & 1 deletion src/Extensions/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,22 @@ toGhcExtension = \case
Cabal.DeepSubsumption -> Nothing
Cabal.TypeData -> Nothing
#endif
#if __GLASGOW_HASKELL__ >= 908
Cabal.TypeAbstractions -> Just TypeAbstractions
#else
Cabal.TypeAbstractions -> Nothing
#endif
#if __GLASGOW_HASKELL__ >= 910
-- This branch cannot be satisfied yet but we're including it so
-- we don't forget to enablel RequiredTypeArguments when it
-- we don't forget to enable RequiredTypeArguments when it
-- becomes available.
Cabal.RequiredTypeArguments -> Just RequiredTypeArguments
Cabal.ExtendedLiterals -> Just ExtendedLiterals
Cabal.ListTuplePuns -> Just ListTuplePuns
#else
Cabal.RequiredTypeArguments -> Nothing
Cabal.ExtendedLiterals -> Nothing
Cabal.ListTuplePuns -> Nothing
#endif
-- GHC extensions, parsed by both Cabal and GHC, but don't have an Extension constructor
Cabal.Safe -> Nothing
Expand Down
Loading