haskell / haskell/lsp

fromJust being called on Nothing

Open
#390 0 comments 2 reactions 0 assignees View on GitHub
type: bug type: refactor
Dominant language
Haskell
Stars
423
Forks
105
PR merge metrics
No merged PRs in 30d

Description

While working on getting Wingman ported to GHC 9, some of my tests are failing with:

```
tests: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
fromJust, called at src/Language/LSP/Test.hs:335:20 in lsp-test-0.14.0.2-29re4UM6EdpFi5JGbWhWu:Language.LSP.Test
```

I don't have a repro, but the fact that this can happen at all is a good argument against using `fromJust`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.