projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2000-08-17 16:28:44 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
typecheck
/
TcPat.lhs
diff --git
a/ghc/compiler/typecheck/TcPat.lhs
b/ghc/compiler/typecheck/TcPat.lhs
index
e0cb157
..
e5b8847
100644
(file)
--- a/
ghc/compiler/typecheck/TcPat.lhs
+++ b/
ghc/compiler/typecheck/TcPat.lhs
@@
-213,9
+213,11
@@
tcPat tc_bndr pat@(RecPatIn name rpats) pat_ty
-- Check the constructor itself
tcConstructor pat name pat_ty `thenTc` \ (data_con, ex_tvs, dicts, lie_avail1, arg_tys) ->
let
-- Check the constructor itself
tcConstructor pat name pat_ty `thenTc` \ (data_con, ex_tvs, dicts, lie_avail1, arg_tys) ->
let
- field_tys = zipEqual "tcPat"
- (map fieldLabelName (dataConFieldLabels data_con))
- arg_tys
+ -- not zipEqual: if the constructor isn't really a record, then
+ -- dataConFieldLabels will be empty (and each field in the pattern
+ -- will generate an error below).
+ field_tys = zip (map fieldLabelName (dataConFieldLabels data_con))
+ arg_tys
in
-- Check the fields
in
-- Check the fields