
Just a miscellaneous Haskell user, but that also sounds good to me. I definitely support having a way to tell the compiler at the most specific level possible (per line, in this case) that the author is intentionally doing this and not to warn about it. I wrote in scala for years and was always unhappy that for a very long time the designers refused to support [1] ( a scala version of Java's @SuppressWarnings annotation. The suggested hack for about a decade was to use a compiler plugin. ------------------------------------------------------------------------ Unrelated/on the importance of warning about the right things: Thinking about this made me remember that C's switch fall-through-by-default behavior is so bad that you need to tell the compiler you actually want to do that. [2] [3] [1] https://stackoverflow.com/questions/3506370/is-there-an-equivalent-to-suppre... [2] https://learn.microsoft.com/en-us/cpp/code-quality/c26819?view=msvc-170 [3] https://en.cppreference.com/w/c/language/attributes/fallthrough On 1/25/23 21:24, Kazu Yamamoto (山本和彦) via Haskell-Cafe wrote:
Hi David,
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. This sounds lovely to me!
--Kazu
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.