projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add bang patterns
[ghc-hetmet.git]
/
ghc
/
compiler
/
typecheck
/
TcPat.lhs
diff --git
a/ghc/compiler/typecheck/TcPat.lhs
b/ghc/compiler/typecheck/TcPat.lhs
index
ae55767
..
ce9e99b
100644
(file)
--- a/
ghc/compiler/typecheck/TcPat.lhs
+++ b/
ghc/compiler/typecheck/TcPat.lhs
@@
-274,6
+274,10
@@
tc_pat pstate (ParPat pat) pat_ty thing_inside
= do { (pat', tvs, res) <- tc_lpat pstate pat pat_ty thing_inside
; return (ParPat pat', tvs, res) }
= do { (pat', tvs, res) <- tc_lpat pstate pat pat_ty thing_inside
; return (ParPat pat', tvs, res) }
+tc_pat pstate (BangPat pat) pat_ty thing_inside
+ = do { (pat', tvs, res) <- tc_lpat pstate pat pat_ty thing_inside
+ ; return (BangPat pat', tvs, res) }
+
-- There's a wrinkle with irrefuatable patterns, namely that we
-- must not propagate type refinement from them. For example
-- data T a where { T1 :: Int -> T Int; ... }
-- There's a wrinkle with irrefuatable patterns, namely that we
-- must not propagate type refinement from them. For example
-- data T a where { T1 :: Int -> T Int; ... }