document :: XParser (Document Posn)
document = do
 -- p <- prolog `adjustErr` ("unrecognisable XML prolog\n"++)
 -- e <- element
 -- ms <- many misc
 -- (_,ge) <- stGet
 -- return (Document p ge e ms)
    return Document `apply` (prolog `adjustErr`
                                    ("unrecognisable XML prolog\n"++))
                    `apply` (fmap snd stGet)
                    `apply` element
                    `apply` many misc

-- | Return an XML comment.
document :: XParser (Document Posn)
document = do
 -- p <- prolog `adjustErr` ("unrecognisable XML prolog\n"++)
 -- e <- element
 -- ms <- many misc
 -- (_,ge) <- stGet
 -- return (Document p ge e ms)
    return Document `apply` (prolog `adjustErr`
                                    ("unrecognisable XML prolog\n"++))
                    `apply` (fmap snd stGet)
                    `apply` element
                    `apply` many misc

-- | Return an XML comment.
document = do
 -- p <- prolog `adjustErr` ("unrecognisable XML prolog\n"++)
 -- e <- element
 -- ms <- many misc
 -- (_,ge) <- stGet
 -- return (Document p ge e ms)
    return Document `apply` (prolog `adjustErr`
                                    ("unrecognisable XML prolog\n"++))
                    `apply` (fmap snd stGet)
                    `apply` element
                    `apply` many misc

-- | Return an XML comment.