Skip to content

Force complete pattern in ghcide #4209

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
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
2 changes: 2 additions & 0 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ flag pedantic

common warnings
ghc-options:
-Werror=incomplete-patterns
-Wall
-Wincomplete-uni-patterns
-Wunused-packages
Expand All @@ -43,6 +44,7 @@ common warnings
-fno-ignore-asserts

library
import: warnings
default-language: GHC2021
build-depends:
, aeson
Expand Down
1 change: 1 addition & 0 deletions ghcide/src/Development/IDE/GHC/CoreFile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ tcIfaceId = fmap getIfaceId . tcIfaceDecl False <=< unmangle_decl_name
name' <- newIfaceName (mkVarOcc $ getOccString name)
pure $ ifid{ ifName = name' }
| otherwise = pure ifid
unmangle_decl_name _ifid = error $ "tcIfaceId: got non IfaceId: "
-- invariant: 'IfaceId' is always a 'IfaceId' constructor
getIfaceId (AnId identifier) = identifier
getIfaceId _ = error "tcIfaceId: got non Id"
Expand Down
1 change: 1 addition & 0 deletions ghcide/src/Development/IDE/GHC/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ instance NFData Unlinked where
rnf (DotA f) = rnf f
rnf (DotDLL f) = rnf f
rnf (BCOs a b) = seqCompiledByteCode a `seq` liftRnf rwhnf b
rnf _ = error "rnf: not implemented for Unlinked"
instance Show PackageFlag where show = unpack . printOutputable
instance Show InteractiveImport where show = unpack . printOutputable
instance Show PackageName where show = unpack . printOutputable
Expand Down
1 change: 0 additions & 1 deletion ghcide/src/Development/IDE/LSP/Notifications.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import Numeric.Natural
data Log
= LogShake Shake.Log
| LogFileStore FileStore.Log
| LogOpenTextDocument !Uri
| LogOpenedTextDocument !Uri
| LogModifiedTextDocument !Uri
| LogSavedTextDocument !Uri
Expand Down
Loading