Re: some SrcLoc functions

2009-09-13 Thread Isaac Dupree
Ian Lynagh wrote: On Tue, Aug 11, 2009 at 11:16:49PM -0400, Isaac Dupree wrote: Although it turned out that in my Synify code there wasn't much actually valid srcloc information, it might still be generally useful to put these convenience functions I invented, into GHC: What's the status of

Re: some SrcLoc functions

2009-09-13 Thread Ian Lynagh
On Tue, Aug 11, 2009 at 11:16:49PM -0400, Isaac Dupree wrote: > Although it turned out that in my Synify code there wasn't much actually > valid srcloc information, it might still be generally useful to put > these convenience functions I invented, into GHC: What's the status of these, and Dav

RE: some SrcLoc functions

2009-08-24 Thread Simon Peyton-Jones
ok with me | -Original Message- | From: cvs-ghc-boun...@haskell.org [mailto:cvs-ghc-boun...@haskell.org] On | Behalf Of David Waern | Sent: 22 August 2009 09:44 | To: cvs-ghc@haskell.org | Subject: Re: some SrcLoc functions | | 2009/8/13 David Waern : | > Haddock also defines (in anot

Re: some SrcLoc functions

2009-08-22 Thread David Waern
2009/8/13 David Waern : > Haddock also defines (in another branch, not in head): > > startLoc :: Located a -> SrcLoc > startLoc = srcSpanStart . getLoc > > endLoc :: Located a -> SrcLoc > endLoc = srcSpanEnd . getLoc > > instance Foldable Located where >  foldMap f (L _ x) = f x > > instance Traver

Re: some SrcLoc functions

2009-08-13 Thread David Waern
2009/8/12 Isaac Dupree : > Although it turned out that in my Synify code there wasn't much actually > valid srcloc information, it might still be generally useful to put these > convenience functions I invented, into GHC: > > combineSrcSpanss :: [SrcSpan] -> SrcSpan > combineSrcSpanss [] = noSrcSpa

RE: some SrcLoc functions

2009-08-13 Thread Simon Peyton-Jones
I'd be fine with these, except I think it'd be better to rename combineSrcSpans --> combineSrcSpan and then use combineSrcSpans for the new function. Simon | -Original Message- | From: cvs-ghc-boun...@haskell.org [mailto:cvs-ghc-boun...@haskell.org] On Behalf Of | Isaac