Skip to content

Add documentation for GHC-21926 #514

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

Merged
merged 6 commits into from
Feb 22, 2025
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
11 changes: 11 additions & 0 deletions message-index/messages/GHC-21926/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Version number or non-alphanumeric character in package name
summary: Package imports may only consist of alphanumeric characters, and must omit the version.
severity: error
introduced: 9.6.1
extension: PackageImports
---

Version number or non-alphanumeric character in the package. Each of dash-separated components of package name must consist of alphanumeric characters (as defined by `Data.Char.isAlphaNum`), at least one of which is not a digit.
Note that you will also see this error if the package name consists only of digits.
The package name in this case refers to the one mentioned in an import when using the `PackageImports` language extension.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE PackageImports #-}

module NonAlphanumericCharacterNameInPackage where

import "some-existing-package" Package.With.Non.Alphanumeric.Characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE PackageImports #-}

module NonAlphanumericCharacterNameInPackage where

import "&*$^%!@()" Package.With.Non.Alphanumeric.Characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Non-alphanumeric characters in the package name
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE PackageImports #-}

module VersionNameInPackage where

import "some-package" Package.With.Version
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{-# LANGUAGE PackageImports #-}

module VersionNameInPackage where

import "some-package-0.1.2.3" Package.With.Version
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Version number in package name
---