TTG hsSyn for Batch and Interactive Parsing
Alan & Kim Zimmerman
alan.zimm at gmail.com
Fri May 18 14:31:13 UTC 2018
On 18 May 2018 at 16:13, Simon Peyton Jones <simonpj at microsoft.com> wrote:
>
>
> We can’t make the result type depend on DynFlags! (Yet)(
>
> * parser :: DynFlags -> String *
>
> * -> HsSyn (GhcPass (Parsed (if … *
>
> * then WithApiAnnotations*
>
> * else WihoutsApiAnnotations)*
>
>
We could conceptually have
parser :: DynFlags -> String -> Either (HsSyn (Parsed
WithApiAnnotations)) (HsSyn (Parsed NoApiAnnotations))
The main point is that the next phase can make use of either of the
variants.
And it may be simplest to just always use the annotations, the ParsedSource
is normally discarded after renaming anyway.
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180518/b7e65eef/attachment.html>
More information about the ghc-devs
mailing list