API Annotatons in a FunBind
Alan & Kim Zimmerman
alan.zimm at gmail.com
Mon Dec 15 21:15:40 UTC 2014
After individual FunBinds have been parsed, they are combined in
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
(&&& )   = 
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
data Match id body
Maybe (Located id) -- fun_id in subsequent function equations
[LPat id] -- The patterns
(Maybe (LHsType id)) -- A type signature for the result of the
-- Nothing after typechecking
(GRHSs id body)
Is this a problem?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs