ghc reports an error in line 12 of the following program. The error is
pasted below.
The expected behavior is to have ghc report the error in line 8, as it
would normally happen if the error occurred in a file which is not
preprocessed.
> {-# OPTIONS_GHC -F -pgmFtrhsx #-}
>
> import HSP
>
> main = (putStrLn =<<)$ fmap (renderAsHTML . snd)$ evalHSP Nothing$
> <html>
> <body>
> <% "hello" == 2 %>
> </body>
> </html>
test.hs:12:32:
Couldn't match type `XML' with `Bool'
In the first argument of `asChild', namely
`((asChild ("hello" == 2)))'
In the expression: asChild ((asChild ("hello" == 2)))
In the third argument of `genElement', namely
`[asChild ((asChild ("hello" == 2)))]'
Regards!
Facundo
--
You received this message because you are subscribed to the Google Groups "Haskell Server Pages" group.
To post to this group, send email to haskell-se...@googlegroups.com.
To unsubscribe from this group, send email to haskell-server-p...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haskell-server-pages?hl=en.
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 ?