-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | jQuery for Haskell. -- -- jQuery for Haskell. @package haquery @version 0.1.1.3 -- | Haquery is jQuery for Haskell. -- -- Known problems: -- -- Some selectors need explicit * to work: ":eq(0)" does not work but -- "*:eq(0)" does, same with "> b": "* > b", etc. module Haquery data Attrs data Tag Doctype :: [Int] -> Text -> Tag Text :: [Int] -> Text -> Tag Tag :: [Int] -> Text -> Attrs -> [Child] -> Tag type Child = Tag -- | Render tag to text. render :: Tag -> Text -- | Create any tag. tag :: Text -> [(Text, Text)] -> [Tag] -> Tag doctype :: Text -> Tag html :: [(Text, Text)] -> [Tag] -> Tag head' :: [(Text, Text)] -> [Tag] -> Tag body :: [(Text, Text)] -> [Tag] -> Tag div' :: [(Text, Text)] -> [Tag] -> Tag text :: Text -> Tag form :: [(Text, Text)] -> [Tag] -> Tag input :: [(Text, Text)] -> [Tag] -> Tag article :: [(Text, Text)] -> [Tag] -> Tag a :: [(Text, Text)] -> [Tag] -> Tag title :: [(Text, Text)] -> [Tag] -> Tag link :: [(Text, Text)] -> [Tag] -> Tag script :: [(Text, Text)] -> [Tag] -> Tag -- | Create any attribute. cat :: Text -> Text -> (Text, Text) -- | Same as cat (-.) :: Text -> Text -> (Text, Text) infix 0 -. id' :: Text -> (Text, Text) class' :: Text -> (Text, Text) src :: Text -> (Text, Text) href :: Text -> (Text, Text) type' :: Text -> (Text, Text) style :: Text -> (Text, Text) -- | Apply function on elements matching the selector. alter :: Text -> (Tag -> Tag) -> Tag -> Tag -- | Remove tags matching the selector. Does not remove the provided tag -- itself. remove :: Text -> Tag -> Tag -- | Returns tags matching the selector. Obiously not too useful if you -- want to alter the given elements, because of Haskell's purity. See -- alter and remove instead. select :: Text -> Tag -> [Tag] -- | Returns the attributes of a tag. attrs :: Tag -> Attrs -- | Returns an attribute of a tag specified by the first argument. attr :: Text -> Tag -> Maybe Text -- | Returns the (direct) children of a tag. children :: Tag -> [Child] -- | Returns the name of a tag. name :: Tag -> Text -- | Insert the first argument as the last child of the second. append :: Tag -> Tag -> Tag -- | Inserts the first argument as the first child of the second. prepend :: Tag -> Tag -> Tag -- | Adds the class specified by the first argument to the tag. addClass :: Text -> Tag -> Tag removeClass :: Text -> Tag -> Tag -- | Returns true if the tag already has the given class. hasClass :: Text -> Tag -> Bool toggleClass :: Text -> Tag -> Tag -- | Turns text into tags. parseHtml :: Text -> [Tag] -- | Just for quick and ugly testing. Tests if a (top level) tag satisfies -- a given selector matches :: Text -> Tag -> Bool parseSelector :: Text -> Selector example :: Tag instance GHC.Show.Show Haquery.Selector instance GHC.Classes.Eq Haquery.Selector instance GHC.Show.Show Haquery.Regexy instance GHC.Classes.Eq Haquery.Regexy instance GHC.Classes.Eq Haquery.Tag instance GHC.Classes.Eq Haquery.Attrs instance GHC.Show.Show Haquery.Attrs instance GHC.Show.Show Haquery.Tag