Commit 0e0b9840 authored by simonpj's avatar simonpj
Browse files

[project @ 2005-12-19 09:32:33 by simonpj]

** Wibble to Friday's commit (fixes HEAD build) **

	-----------------------------------------
	Make deriving work for infix constructors
	-----------------------------------------

	Merge to stable branch

Back quotes were not being done correctly in deriving Read and Show.
Now they are.  I think.

Test is drvrun018
parent 59a54a3f
...@@ -54,7 +54,6 @@ import TysWiredIn ( charDataCon, intDataCon, floatDataCon, doubleDataCon, ...@@ -54,7 +54,6 @@ import TysWiredIn ( charDataCon, intDataCon, floatDataCon, doubleDataCon,
intDataCon_RDR, true_RDR, false_RDR ) intDataCon_RDR, true_RDR, false_RDR )
import Util ( zipWithEqual, isSingleton, import Util ( zipWithEqual, isSingleton,
zipWith3Equal, nOfThem, zipEqual ) zipWith3Equal, nOfThem, zipEqual )
import Char ( isAlpha )
import Constants import Constants
import List ( partition, intersperse ) import List ( partition, intersperse )
import Outputable import Outputable
...@@ -776,9 +775,9 @@ gen_Read_binds get_fixity tycon ...@@ -776,9 +775,9 @@ gen_Read_binds get_fixity tycon
infix_stmts -- a %% b, or a `T` b infix_stmts -- a %% b, or a `T` b
= [read_a1] = [read_a1]
++ if isSym con_str ++ (if isSym con_str
then [bindLex (symbol_pat con_str)] then [bindLex (symbol_pat con_str)]
else [read_punc "`", bindLex (ident_pat con_str), read_punc "`"] else [read_punc "`", bindLex (ident_pat con_str), read_punc "`"])
++ [read_a2] ++ [read_a2]
lbl_stmts -- T { f1 = a, f2 = b } lbl_stmts -- T { f1 = a, f2 = b }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment