parsing error message that could be improved
This is just barely a bug. The following code uses do notation and gets a left arrow in the wrong direction:
tcRho (TupleE exps) (Check exp_ty)
= do { tys <- unTupleType exp_ty
; checkTuple (text "term" <+> ppr (TupleE exps)) exps tys
; exps' -> mapM (uncurry checkRho) (zip exps tys)
; return $ ftuple exps'
}
The error message is: TxPgm.hs:323:44: Parse error in pattern
The suggestion of 'pattern' is surprising here, and so is the position of the error message. I know parsing is a black art, and I don't know what technology GHC is using, but if this message could be improved that would be a Good Thing.
Norman