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

Add docs for GHC-87491 #433

Merged
merged 1 commit into from
Jun 22, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE ImportQualifiedPost #-}

module ImportQualifiedPost where

import Prelude qualified
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE Haskell2010 #-}

module ImportQualifiedPost where

import Prelude qualified
17 changes: 17 additions & 0 deletions message-index/messages/GHC-87491/example1/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Found 'qualified' after the module
---

This file is written in `Haskell2010` which doesn't have the
`ImportQualifiedPost` extension. To fix this you need to either turn on
`ImportQualifiedPost`, or change the `qualified` keyword to be prefix.

## Error Message
```
ImportQualifiedPost:5:16: error: [GHC-87491]
Found `qualified' in postpositive position.
Suggested fix: Perhaps you intended to use ImportQualifiedPost
|
5 | import Prelude qualified
| ^^^^^^^^^
```
12 changes: 12 additions & 0 deletions message-index/messages/GHC-87491/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Found 'qualified' after the module
summary: qualified after the module requires the ImportQualifiedPost extension.
severity: error
introduced: 8.10.1
---

The [`ImportQualifiedPost extension`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/import_qualified_post.html),
allows you to put the `qualified` keyword after the module in imports, without
this it must be before the module.
This is part of the [`GHC2021`](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#extension-GHC2021)
extension set.