-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document GHC-46537 Unsupported extension (closes #150)
- Loading branch information
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
message-index/messages/GHC-46537/example1/after/UnsupportedExtension.hs
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,3 @@ | ||
{-# LANGUAGE ExistentialQuantification #-} | ||
|
||
module UnsupportedExtension where |
3 changes: 3 additions & 0 deletions
3
message-index/messages/GHC-46537/example1/before/UnsupportedExtension.hs
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,3 @@ | ||
{-# LANGUAGE ExistientialQuantification #-} | ||
-- typo here ^ | ||
module UnsupportedExtension where |
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,14 @@ | ||
--- | ||
title: Unsupported extension | ||
--- | ||
|
||
## Error Message | ||
``` | ||
Main.hs:1:14: error: [GHC-46537] | ||
Unsupported extension: ExistientialQuantification | ||
Suggested fix: | ||
Perhaps you meant ‘ExistentialQuantification’ or ‘NoExistentialQuantification’ | ||
| | ||
1 | {-# LANGUAGE ExistientialQuantification #-} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
``` |
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,24 @@ | ||
--- | ||
title: Unsupported extension | ||
summary: GHC failed to recognize name of a language extension | ||
severity: error | ||
introduced: 9.6.1 | ||
--- | ||
|
||
This error is reported when GHC fails to recognize the name of a language extension, provided via `{-# LANGUAGE ... #-}` pragma at the top of a `.hs` file. | ||
|
||
There are two likely causes: | ||
|
||
1. You've made a typo, in which case ghc will likely also suggest the correct extension name to use. | ||
2. You're using older version of GHC which doesn't yet support given extension. | ||
Here's a couple of things you can try to troubleshoot: | ||
|
||
- Find out what version of GHC you're using: | ||
|
||
ghc --version | ||
|
||
- List all the supported extension that this version of GHC supports. Does the list contain your desired extension? | ||
|
||
ghc --supported-extensions | ||
|
||
- Search for the extension name in the latest version of [GHC User's Guide](https://downloads.haskell.org/ghc/latest/docs/users_guide/exts.html). Most extensions have a `since` annotation which tells you in which version of GHC the extension was introduced. |