logo       

Re: Some random newbie questions: msg#00071

lang.haskell.cafe

Subject: Re: Some random newbie questions

On Thu, 6 Jan 2005, Benjamin Pierce wrote:

* As far as I can determine, there is no way to check pattern matches for
exhaustiveness. Coming from OCaml, this feels like losing a significant
safety net! How do people program so as not to be getting dynamic match
failures all the time?


Where not sure, a wildcard pattern at the end of the pattern list catches things. Myself I was always more irritated that I couldn't type things in such a way that the typechecker would catch it.

I've clearly got a lot to learn about space usage in Haskell... can
someone give me a hint about what is the problem here and how it might
best be corrected?


Having given the code but the briefest glance, I suspect laziness is biting you? If so, others will be able to give you good pointers - I've not really had to deal with it myself (seq and strict constructors are probably good places to start from what I hear though).

--
flippa@xxxxxxxxxxx

Ivanova is always right. I will listen to Ivanova. I will not ignore Ivanova's recomendations. Ivanova is God. And, if this ever happens again, Ivanova will personally rip your lungs out!


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise