[Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Michael Orlitzky
I'm cleaning up some old projects, and hit this: src/Octet.hs:47:27: Warning: Pattern match(es) are non-exhaustive In a record-update construct: Patterns not matched: Octet.None But in the source, I've checked for that case: class Maskable a where apply_mask :: a - Maskbits -

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Antoine Latter
On Mon, Dec 26, 2011 at 1:21 PM, Michael Orlitzky mich...@orlitzky.com wrote: I'm cleaning up some old projects, and hit this:  src/Octet.hs:47:27:    Warning: Pattern match(es) are non-exhaustive    In a record-update construct: Patterns not matched: Octet.None But in the source, I've

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Michael Orlitzky
On 12/26/11 13:42, Antoine Latter wrote: Am I overlooking something, or did I already match Octet.None? What is your definition of the 'Octet' type? -- An Octet consists of eight bits. For our purposes, the most -- significant bit will come first. That is, b1 is in the 2^7 -- place while

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Antoine Latter
On Mon, Dec 26, 2011 at 2:19 PM, Michael Orlitzky mich...@orlitzky.com wrote: On 12/26/11 13:42, Antoine Latter wrote: Am I overlooking something, or did I already match Octet.None? What is your definition of the 'Octet' type? -- An Octet consists of eight bits. For our purposes, the most

Re: [Haskell-cafe] Non-exhaustive pattern match warning (incorrect?)

2011-12-26 Thread Michael Orlitzky
On 12/26/2011 03:17 PM, Antoine Latter wrote: The error is warning you that the record update 'oct { b8 = bit }' can fail at run-time if 'oct' is None. Since it looks like you've checked for that you shouldn't have a problem, but the compiler doesn't know that. Thanks, that's what I thought