On Tue, Dec 6, 2011 at 7:46 PM, Jeremy Shaw <jashaw
...@gmail.com> wrote:
> If we run trhsx on this document we see:
> $ trhsx test.hs
> {-# LINE 1 "test.hs" #-}
> {-# OPTIONS_GHC -F -pgmFtrhsx #-}
> module Main (main) where
> {-# LINE 2 "test.hs" #-}
> import HSP
> {-# LINE 3 "test.hs" #-}
> main
> = (putStrLn =<<) $
> fmap (renderAsHTML . snd) $
> evalHSP Nothing $
> (genElement (Nothing, "html") []
> [asChild
> ((genElement (Nothing, "body") []
> [asChild ((asChild ("hello" == 2)))]))])
> So, it looks like the LINE pragmas that trhsx inserts are correct. But
> that it does not insert enough of them ?
Thanks for the report Facundo, and thanks for digging in to the matter
Jeremy. It's clear that haskell-src-exts doesn't insert enough LINE
pragmas, though I'm not sure if it can ever be perfect. I'll look into it
though, surely I can do better than the current situation.
But in the longer run, the plan is to switch trhsx over to the
exact-printer rather than the pretty-printer. That move should give far
more precision.
And in the even longer run, the plan is to complete the type checker that
would allows us to type check directly on the hsx code, rather than waiting
for GHC to do it on the post-processed code.
Anyone feel like hiring me for a month or two, so I can take the time off
from my current job and do some hsp-related work for a while? ;-)
Cheers,
/Niklas