After individual FunBinds have been parsed, they are combined in
getMonoBind.
In the process, all the original FunBind fun_id's bar one are discarded,
including its location.
This causes a problem for source-to-source conversions of functions such as
the following
(&&& ) [] [] = []
xs &&& [] = xs
( &&& ) [] ys = ys
Where there are compound RdrNames, and each has different spacing.
I am proposing to add a (Maybe (Located id)) to the Match datatype to deal
with this.
data Match id body
= Match
Maybe (Located id) -- fun_id in subsequent function equations
[LPat id] -- The patterns
(Maybe (LHsType id)) -- A type signature for the result of the
match
-- Nothing after typechecking
(GRHSs id body)
Is this a problem?
Alan
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs