From: simonm Date: Wed, 3 Sep 1997 10:43:01 +0000 (+0000) Subject: [project @ 1997-09-03 10:43:01 by simonm] X-Git-Tag: Approximately_1000_patches_recorded~79 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=2220d42a06b23a4447e4aa9b7d5eff5b84dc957c [project @ 1997-09-03 10:43:01 by simonm] Fix exporting of (->) instances. This is the fix from the web page with minor changes for the new continuation-passing lexer. --- diff --git a/ghc/compiler/reader/Lex.lhs b/ghc/compiler/reader/Lex.lhs index 283ce9d..0fda696 100644 --- a/ghc/compiler/reader/Lex.lhs +++ b/ghc/compiler/reader/Lex.lhs @@ -665,6 +665,14 @@ lex_id2 cont module_dot buf = ','# -> lex_tuple cont module_dot (stepOnBy# buf 2#) _ -> lex_id3 cont module_dot buf ':'# -> lex_id3 cont module_dot (incLexeme buf) + '-'# -> + case module_dot of + Nothing -> lex_id3 cont module_dot buf + Just ghc -> -- this should be "GHC" (current home of (->)) + case lookAhead# buf 1# of + '>'# -> end_lex_id cont module_dot (ITconid SLIT("->")) + (stepOnBy# buf 2#) + _ -> lex_id3 cont module_dot buf _ -> lex_id3 cont module_dot buf