[Haskell-cafe] Re: HaXML - creating a simple document

Terrence Brannon metaperl at gmail.com
Sat Dec 30 18:32:52 EST 2006




On 12/30/06, Jeremy Shaw < jeremy.shaw at linspireinc.com> wrote:

    

    So may something like this would work:

    > main = print $ htmlprint $ go (CString False "")


mk.hs:6:33:
    Couldn't match expected type `Content i'
       against inferred type `i1 -> Content i1'
    In the first argument of `go', namely `(CString False "")'
    In the second argument of `($)', namely `go (CString False "")'
    In the second argument of `($)', namely
    `htmlprint $ (go (CString False ""))'

---------------------------------------------------------------------------

I modified it like this and got the error included in the comment:

The type check error for your version is below. I include my modified source and
associated error jeopardy style. Thanks for your efforts on this.

import Text.XML.HaXml.Html.Generate
import Text.XML.HaXml.Combinators
import Text.XML.HaXml.XmlContent
import Text.XML.HaXml.Wrappers

main = print $ htmlprint $  go $ (CString False "")
{-
mk.hs:6:34:
    Couldn't match expected type `Content i'
       against inferred type `i1 -> Content i1'
    In the second argument of `($)', namely `(CString False "")'
    In the second argument of `($)', namely `go $ (CString False "")'
    In the second argument of `($)', namely
    `htmlprint $ (go $ (CString False ""))'
-}

go = html []



More information about the Haskell-Cafe mailing list