[Haskell-cafe] From Rabhi's & Lapalme's book 'Algorithms - A Functional Programming Approach' I'm getting a non-exhaustive pattern match

mukesh tiwari mukeshtiwari.iiitm at gmail.com
Thu Jul 22 02:57:44 UTC 2021


g!(x, y) can return 'Nothing' as well, but you are not considering it
and therefore the non-exhaustive pattern.

Best,
Mukesh

On Thu, Jul 22, 2021 at 12:21 PM Casey Hawthorne <kc1956 at gmail.com> wrote:
>
> From Rabhi's & Lapalme's  book 'Algorithms - A Functional Programming Approach' 1999, I'm getting a non-exhaustive pattern match
>
> weight x y g = w where (Just w) = g!(x,y)
>
> I can't figure out why
>
> _______________________________________________
> 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.


More information about the Haskell-Cafe mailing list