[commit: ghc] master: Accept underscores in the module parser. (Thanks spinda for the fix.) (34b106f)

git at git.haskell.org git at git.haskell.org
Thu Sep 3 21:14:20 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/34b106f65325d7642ad37ac49d2b9b90dd7684e6/ghc

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

commit 34b106f65325d7642ad37ac49d2b9b90dd7684e6
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Thu Sep 3 14:16:03 2015 -0700

    Accept underscores in the module parser. (Thanks spinda for the fix.)
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


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

34b106f65325d7642ad37ac49d2b9b90dd7684e6
 compiler/main/DynFlags.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 0dacb0c..6b44e16 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3718,7 +3718,7 @@ clearPkgConf = upd $ \s -> s { extraPkgConfs = const [] }
 
 parseModuleName :: ReadP ModuleName
 parseModuleName = fmap mkModuleName
-                $ munch1 (\c -> isAlphaNum c || c `elem` ".")
+                $ munch1 (\c -> isAlphaNum c || c `elem` "_.")
 
 parsePackageFlag :: (String -> PackageArg) -- type of argument
                  -> String                 -- string to parse



More information about the ghc-commits mailing list