[Haskell-cafe] incomplete-uni-patterns
Henning Thielemann
lemming at henning-thielemann.de
Thu Jan 26 09:32:23 UTC 2023
On Thu, 26 Jan 2023, David Feuer wrote:
> It seems to me that instead of working around this, we should add a pragma to suppress the warning at
> the pattern site. Maybe something like
> let
> {-# PARTIAL_MATCH #-}
> Just a = blah blah
>
> That way GHC can see that you noticed the partial match and that you're okay with it.
Not necessary.
You can just do:
case mayb of
Just a -> do real things
Nothing -> error "problem arised"
More information about the Haskell-Cafe
mailing list