From 452eaacb49baed523569c2db967cac10fed24a10 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 25 Nov 1999 10:28:41 +0000 Subject: [PATCH] [project @ 1999-11-25 10:28:41 by simonpj] Add documentation on pattern guards --- ghc/docs/users_guide/glasgow_exts.vsgml | 417 ++++++++++++++++++++++++++++++- 1 file changed, 416 insertions(+), 1 deletion(-) diff --git a/ghc/docs/users_guide/glasgow_exts.vsgml b/ghc/docs/users_guide/glasgow_exts.vsgml index d54e919..b29df62 100644 --- a/ghc/docs/users_guide/glasgow_exts.vsgml +++ b/ghc/docs/users_guide/glasgow_exts.vsgml @@ -1,5 +1,5 @@ % -% $Id: glasgow_exts.vsgml,v 1.19 1999/11/12 12:51:50 simonpj Exp $ +% $Id: glasgow_exts.vsgml,v 1.20 1999/11/25 10:28:41 simonpj Exp $ % % GHC Language Extensions. % @@ -73,6 +73,10 @@ The programmer can specify rewrite rules as part of the source program Details in Section . +Pattern guards + +add a more flexible syntax and semantics for guards in function definitions. +This gives expressiveness somewhat comparable to that of ``views''. Before you get too carried away working at the lowest level (e.g., @@ -2262,3 +2266,414 @@ in the RHS of the @INLINE@ thing. I regret the delicacy of this. see how to write rules that will do fusion and yet give an efficient program even if fusion doesn't happen. More rules in @PrelList.lhs@. + + +%----------------------------------------------------------------------------- +Pattern guards +