[commit: ghc] master: User's Guide: Fix compiler plugin example (#9641, #7682) (071167c)

git at git.haskell.org git at git.haskell.org
Sun Sep 28 02:48:29 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/071167c793489f4071c348223f9591d20dbe11a3/ghc

>---------------------------------------------------------------

commit 071167c793489f4071c348223f9591d20dbe11a3
Author: Reid Barton <rwbarton at gmail.com>
Date:   Sat Sep 27 22:13:10 2014 -0400

    User's Guide: Fix compiler plugin example (#9641, #7682)
    
    The previous fix was incorrectly eta-reduced.


>---------------------------------------------------------------

071167c793489f4071c348223f9591d20dbe11a3
 docs/users_guide/extending_ghc.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/users_guide/extending_ghc.xml b/docs/users_guide/extending_ghc.xml
index 1b5bbfa..12e598b 100644
--- a/docs/users_guide/extending_ghc.xml
+++ b/docs/users_guide/extending_ghc.xml
@@ -226,8 +226,8 @@ install _ todo = do
   return (CoreDoPluginPass "Say name" pass : todo)
 
 pass :: ModGuts -> CoreM ModGuts
-pass = do dflags <- getDynFlags
-          bindsOnlyPass (mapM (printBind dflags))
+pass guts = do dflags <- getDynFlags
+               bindsOnlyPass (mapM (printBind dflags)) guts
   where printBind :: DynFlags -> CoreBind -> CoreM CoreBind
         printBind dflags bndr@(NonRec b _) = do
           putMsgS $ "Non-recursive binding named " ++ showSDoc dflags (ppr b)



More information about the ghc-commits mailing list