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

Update modNameChunksText to match modNameToText behavior #1791

Merged
merged 1 commit into from
Jan 23, 2025
Merged
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
3 changes: 1 addition & 2 deletions src/Cryptol/Utils/Ident.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
-- anonnymous argument.
modNameArg :: ModName -> ModName
modNameArg (ModName m fl) =
case fl of

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.4.8, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.6.5, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.8.2, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 9.4.8, false)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (windows-2019, 9.4.8, true)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (macos-13, 9.4.8, true)

Pattern match(es) are non-exhaustive

Check warning on line 175 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (macos-14, 9.4.8, true)

Pattern match(es) are non-exhaustive
NormalName -> ModName m AnonModArgName
AnonModArgName -> panic "modNameArg" ["Name is not normal"]
AnonIfaceModName -> panic "modNameArg" ["Name is not normal"]
Expand All @@ -182,7 +182,7 @@
-- anonnymous interface.
modNameIfaceMod :: ModName -> ModName
modNameIfaceMod (ModName m fl) =
case fl of

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.4.8, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.6.5, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 9.8.2, 3.10.3.0, true)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 9.4.8, false)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (windows-2019, 9.4.8, true)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (macos-13, 9.4.8, true)

Pattern match(es) are non-exhaustive

Check warning on line 185 in src/Cryptol/Utils/Ident.hs

View workflow job for this annotation

GitHub Actions / build (macos-14, 9.4.8, true)

Pattern match(es) are non-exhaustive
NormalName -> ModName m AnonIfaceModName
AnonModArgName -> panic "modNameIfaceMod" ["Name is not normal"]
AnonIfaceModName -> panic "modNameIfaceMod" ["Name is not normal"]
Expand Down Expand Up @@ -226,8 +226,7 @@
(a,b)
| T.null b -> Just (maybeAnonText fl str, b)
| otherwise -> Just (a,T.drop (T.length modSep) b)
modNameChunksText (ModMain _) = panic "modNameChunksText"
["Cannot get chunks of main module name"]
modNameChunksText (ModMain _) = ["Main"]

-- | Break up a module name on the separators, `String` version
modNameChunks :: ModName -> [String]
Expand Down
Loading