-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into thread-safe-whitespace
- Loading branch information
Showing
8 changed files
with
79 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Conditional Compilation | ||
To improve documentation of re-exports (such as `<|>`), we use CPP macros that re-define these re-exports only during a `haddock` pass. | ||
We achieve this with the `__HADDOCK_VERSION__` macro, so we can write things like, | ||
```haskell | ||
#ifdef __HADDOCK_VERSION__ | ||
{-| Some custom docs | ||
-} | ||
infixl 3 <|> | ||
(<|>) :: Parsec a -- ^ custom docs. | ||
-> Parsec a -- ^ custom docs. | ||
-> Parsec a -- ^ custom docs. | ||
(<|>) = (Applicative.<|>) | ||
#endif | ||
``` | ||
|
||
If we were to perform the redefinition for the actual library, then users would have conflicting types between | ||
`Text.Gigaparsec.<|>` and the applicative `<|>`. | ||
Moreover, the haskell compiler will treat these as different, and we may lose some specialisation improvements/optimisations. | ||
|
||
One side-effect of this is that `<|>` within the `gigaparsec` library must be imported from `Applicative`, not from `Text.Gigaparsec`, | ||
otherwise the `haddock` phase of compilation will fail in cases where `<|>` is used in a type that is not `Parsec`. | ||
This is a small price to pay for better documentation :) | ||
This does not affect external users. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
As we want to support multiple GHC versions, we need to take care of how to handle the versions of different dependencies. | ||
|
||
|
||
### GHC vs Base | ||
https://wiki.haskell.org/Base_package | ||
| GHC | Base | | ||
| --- | ---- | | ||
| 8.10.1 | 4.14.0.0 | | ||
| 8.10.2 | 4.14.1.0 | | ||
| 8.10.7 | 4.14.3.0 | | ||
| 9.0.1 | 4.15.0.0 | | ||
| 9.0.2 | 4.15.1.0 | | ||
| 9.2.1 | 4.16.0.0 | | ||
| 9.2.2 | 4.16.1.0 | | ||
| 9.2.5 | 4.16.4.0 | | ||
| 9.4.1 | 4.17.0.0 | | ||
| 9.6.1 | 4.18.0.0 | | ||
| 9.8.1 | 4.19.0.0 | | ||
| 9.10 | 4.20.0.0 | | ||
|
||
|
||
# Template Haskell | ||
Minimum TH version to support will be 2.16. | ||
|
||
### Template Haskell Type Constructors | ||
| Constructor | Since | Min Base | Min GHC | | ||
| ---- | --- | --- | --- | | ||
| `ForallT` | always | | ||
| `AppT` | always | | ||
| `SigT` | always | | ||
| `VarT` | always | | ||
| `InfixT` | 2.11 | 4.7 | 8.0 | ||
| `UInfixT` | 2.11 | 4.7 | 8.0 | ||
| `ParensT` | 2.11 | 4.7 | 8.0 | ||
| `AppKindT` | 2.15 | 4.11 | 8.8 | ||
| `ImplicitParamT` | 2.15 | 4.11 | 8.8 | ||
| `ForallVisT` | 2.16 | 4.11 | 8.10.1 | ||
| `PromotedInfixT` | 2.19 | 4.11 | 9.4 | ||
| `PromotedUInfixT` | 2.19 | 4.11 | 9.4 | ||
|
||
Some important version differences: | ||
|
||
| TH Version | Issue | Notes | | ||
| --- | --- | --- | | ||
| 2.17 | `TyVarBndr` now has a `flag` parameter, this is a breaking change | | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters