[Haskell-cafe] ghc should be able to deduce correct use of partial functions and not give a warning in such cases

George Colpitts george.colpitts at gmail.com
Tue Apr 16 13:51:23 UTC 2024


ghc should be able to deduce correct use of partial functions and not give
a warning in such cases, e.g. in 9.8.2

     if null ys then [] else [(xs,tail ys)])

gets a warning

      warning: [GHC-63394] [-Wx-partial]

but it is clear that this use of tail will never be a problem so IMHO that
line of code should not get a warning.

Does anybody know if there is a plan or enhancement request to eliminate
such warnings?

Cheers
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20240416/5a3f4e5a/attachment.html>


More information about the Haskell-Cafe mailing list