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

Support for GHC 9.10 #64

Open
wants to merge 25 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8.1', '9.6.3', '9.4.1', '9.2.4']
ghc: ['9.10.1', '9.8.1', '9.6.3', '9.4.1', '9.2.4']

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ We want to make contributing to this project as easy and transparent as
possible.

## Our Development Process
retrie is developed internally at Facebook and then exported to GitHub by an
automated tool. Pull requests will first be imported to our internal
retrie is developed internally at Facebook and then exported to GitHub by an
automated tool. Pull requests will first be imported to our internal
repository, then synced back to GitHub.

## Pull Requests
Expand All @@ -30,7 +30,7 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.

## Coding Style
## Coding Style
* 2 spaces for indentation rather than tabs
* 80 character line length
* Avoid using whitespace to vertically align things unnecessarily.
Expand Down
8 changes: 6 additions & 2 deletions Retrie/CPP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,13 @@ insertImports
-> Located (HsModule GhcPs) -- ^ target module
-> TransformT m (Located (HsModule GhcPs))
#endif
insertImports is (L l m) = do
imps <- graftA $ filterAndFlatten (unLoc <$> hsmodName m) is
insertImports is (L l m') = do
imps' <- graftA $ filterAndFlatten (unLoc <$> hsmodName m') is
let
(L _ m) = makeDeltaAst (L l m')
imps = case imps' of
[] -> []
(h:t) -> (setEntryDP h (DifferentLine 1 1):t)
deduped = nubBy (eqImportDecl `on` unLoc) $ hsmodImports m ++ imps
return $ L l m { hsmodImports = deduped }

Expand Down
4 changes: 3 additions & 1 deletion Retrie/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import Control.Monad.IO.Class
import Data.Char (isDigit)
import Data.Either (partitionEithers)
import Data.Generics hiding (Fixity)
#if __GLASGOW_HASKELL__ < 910
import Data.List
#endif
import Data.Maybe

import Retrie.AlphaEnv
Expand Down Expand Up @@ -60,7 +62,7 @@ updateContext c i =
updExp (OpApp _ _ op _)
| Fixity source prec dir <- lookupOp op $ ctxtFixityEnv c =
withPrec c source prec dir i
#if __GLASGOW_HASKELL__ < 904
#if __GLASGOW_HASKELL__ < 904 || __GLASGOW_HASKELL__ >= 910
updExp (HsLet _ lbs _) = addInScope neverParen $ collectLocalBinders CollNoDictBinders lbs
#else
updExp (HsLet _ _ lbs _ _) = addInScope neverParen $ collectLocalBinders CollNoDictBinders lbs
Expand Down
Loading
Loading