Ticket #8226: 0001-Tentative-fix-for-8226-remove-Haddock-0.x-style-comm.patch

File 0001-Tentative-fix-for-8226-remove-Haddock-0.x-style-comm.patch, 882 bytes (added by adinapoli, 16 months ago)

Alfredo's proposed fix

  • compiler/parser/Lexer.x

    From 79531d874cb26b24edf94a99b0e45fb488cf01d4 Mon Sep 17 00:00:00 2001
    From: Alfredo Di Napoli <[email protected]>
    Date: Sun, 25 May 2014 20:20:04 +0100
    Subject: [PATCH] Tentative fix for #8226 (remove Haddock 0.x style comments)
    
    ---
     compiler/parser/Lexer.x | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
    index 3d02393..81e862f 100644
    a b isNormalComment bits _ _ (AI _ buf) 
    841841  | otherwise           = nextCharIsNot buf (== '#')
    842842  where
    843843    notFollowedByDocOrPragma
    844        = afterOptionalSpace buf (\b -> nextCharIsNot b (`elem` "|^*$#"))
     844       = afterOptionalSpace buf (\b -> nextCharIsNot b (`elem` "|^*$"))
    845845
    846846afterOptionalSpace :: StringBuffer -> (StringBuffer -> Bool) -> Bool
    847847afterOptionalSpace buf p