I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
Dom.
data BitString = BitString [Bool]
deriving Show
data ConstrainedType :: * - * where
INTEGER :: ConstrainedType Int
Dominic Steinitz wrote:
I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
AFAICS, this is because when you construct a value, as in t, you have to
provide the required context (Ord in
Roberto Zunino wrote:
Dominic Steinitz wrote:
I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
AFAICS, this is because when you construct a value, as in t, you have to
provide the
On 26/05/07, Dominic Steinitz [EMAIL PROTECTED] wrote:
This seems even worse to me. A is not inhabited so how can 42 be of type A?
I think it should work. The context on the F constructor says that A
is an instance of Num, so you could only have an F value if you could
prove that A was an
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David House wrote:
On 26/05/07, Dominic Steinitz [EMAIL PROTECTED] wrote:
This seems even worse to me. A is not inhabited so how can 42 be of
type A?
I think it should work. The context on the F constructor says that A
is an instance of Num, so