Peter Arrenbrecht <[EMAIL PROTECTED]> wrote: > ERROR file:.\cube.hs:11 - Type error in explicitly typed binding > *** Term : [(i,v) : ps] > *** Type : [[(a,b)]] > *** Does not match : [(Int,Double)]
> [10] test :: [(Int, Double)] -> Int > [11] test [(i,v):ps] = i The error message does contain the answer. Your pattern [(i,v):ps] represents a singleton list containing a list of pairs. That is a list of lists. What the explicit type signature reveals to be your intention was a single-level list of pairs. To fix, use round parens around the pattern, not square brackets: ((i,v):ps) Regards, Malcolm _______________________________________________ Hugs-Users mailing list Hugs-Users@haskell.org http://www.haskell.org/mailman/listinfo/hugs-users