[commit: ghc] wip/T9732: Update documentation of matcher type (bbbd75c)
git at git.haskell.org
git at git.haskell.org
Thu Nov 6 13:11:11 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9732
Link : http://ghc.haskell.org/trac/ghc/changeset/bbbd75c6b7d26c04c00daecc5dfe63736aedf88c/ghc
>---------------------------------------------------------------
commit bbbd75c6b7d26c04c00daecc5dfe63736aedf88c
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Thu Nov 6 20:31:03 2014 +0800
Update documentation of matcher type
>---------------------------------------------------------------
bbbd75c6b7d26c04c00daecc5dfe63736aedf88c
compiler/basicTypes/PatSyn.lhs | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/compiler/basicTypes/PatSyn.lhs b/compiler/basicTypes/PatSyn.lhs
index 9efd69d..af77d36 100644
--- a/compiler/basicTypes/PatSyn.lhs
+++ b/compiler/basicTypes/PatSyn.lhs
@@ -130,11 +130,19 @@ data PatSyn
-- See Note [Matchers and wrappers for pattern synonyms]
psMatcher :: Id,
- -- Matcher function, of type
- -- forall r univ_tvs. req_theta
- -- => res_ty
- -- -> (forall ex_tvs. prov_theta -> arg_tys -> r)
- -- -> r -> r
+ -- Matcher function. If psArgs is empty, then it has type
+ -- forall (r :: ?) univ_tvs. req_theta
+ -- => res_ty
+ -- -> (forall ex_tvs. prov_theta -> Void# -> r)
+ -- -> (Void# -> r)
+ -- -> r
+ --
+ -- Otherwise:
+ -- forall (r :: ?) univ_tvs. req_theta
+ -- => res_ty
+ -- -> (forall ex_tvs. prov_theta -> arg_tys -> r)
+ -- -> (Void# -> r)
+ -- -> r
psWrapper :: Maybe Id
-- Nothing => uni-directional pattern synonym
More information about the ghc-commits
mailing list