From 2220d42a06b23a4447e4aa9b7d5eff5b84dc957c Mon Sep 17 00:00:00 2001 From: simonm Date: Wed, 3 Sep 1997 10:43:01 +0000 Subject: [PATCH] [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. --- ghc/compiler/reader/Lex.lhs | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 1.7.10.4