Skip to content

Commit dbae020

Browse files
Merge pull request #399 from jhrcek/GHC-46537
Document GHC-46537 Unsupported extension (closes #150)
2 parents e57ec2e + 6d3348d commit dbae020

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{-# LANGUAGE ExistentialQuantification #-}
2+
3+
module UnsupportedExtension where
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{-# LANGUAGE ExistientialQuantification #-}
2+
-- typo here ^
3+
module UnsupportedExtension where
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Unsupported extension
3+
---
4+
5+
## Error Message
6+
```
7+
Main.hs:1:14: error: [GHC-46537]
8+
Unsupported extension: ExistientialQuantification
9+
Suggested fix:
10+
Perhaps you meant ‘ExistentialQuantification’ or ‘NoExistentialQuantification’
11+
|
12+
1 | {-# LANGUAGE ExistientialQuantification #-}
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Unsupported extension
3+
summary: GHC failed to recognize name of a language extension
4+
severity: error
5+
introduced: 9.6.1
6+
---
7+
8+
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.
9+
10+
There are two likely causes:
11+
12+
1. You've made a typo, in which case GHC will likely also suggest the correct extension name to use.
13+
2. You're using older version of GHC that doesn't yet support the extension.
14+
Here's a couple of things you can try in order to troubleshoot:
15+
16+
- Find out which version of GHC you're using:
17+
18+
ghc --version
19+
20+
- List all the supported extensions that this version of GHC supports. Does the list contain your desired extension?
21+
22+
ghc --supported-extensions
23+
24+
- Search for the extension name in the latest version of the [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.

0 commit comments

Comments
 (0)