Name : ghc-taggy-lens
| |
Version : 0.1.2
| Vendor : obs://build_opensuse_org/devel:languages:haskell
|
Release : 3.26
| Date : 2018-01-23 21:18:28
|
Group : Development/Languages/Other
| Source RPM : ghc-taggy-lens-0.1.2-3.26.src.rpm
|
Size : 0.08 MB
| |
Packager : (none)
| |
Summary : Lenses for the taggy html/xml parser
|
Description :
Lenses, folds, traversals and prisms for < http://hackage.haskell.org/package/taggy taggy>.
This greatly simplifies your life when dealing with the ugly world of Real Life HTML. Here\'s an < https://github.com/alpmestan/taggy-lens/blob/master/example/HackageNew.hs example>. It lists the date, author and package name of all the /recent package uploads/ entries from the hackage page of the same name. Note that it uses < http://hackage.haskell.org/package/wreq wreq> to /fetch/ the Hackage page.
> module Main (main) where > > import Control.Lens (to, only,(^?),ix, toListOf) > import Data.ByteString.Lazy (ByteString) > import Data.Text (Text) > import Data.Text.Encoding.Error (lenientDecode) > import Data.Text.Lazy.Encoding (decodeUtf8With) > import Network.HTTP.Client (Response) > import Network.Wreq (responseBody, get) > import Text.Taggy (Node) > import Text.Taggy.Lens (html, elements, children, contents,allNamed) > > data Upload = > Upload Text -- ^ date > Text -- ^ author > Text -- ^ package name > deriving (Show) > > table :: [Node] -> Maybe Upload > table row = do > date < - row ^? ix 0 . contents > author < - row ^? ix 1 . contents > package < - row ^? ix 2 . elements . contents > return $ Upload date author package > > recentPackages :: Response ByteString -> [Maybe Upload] > recentPackages = toListOf > $ responseBody . to (decodeUtf8With lenientDecode) > . html . allNamed (only \"tr\") . children . to table > > main :: IO () > main = get \"https://hackage.haskell.org/packages/recent\" >>= print `fmap` recentPackages
Report any problem on our < http://github.com/alpmestan/taggy-lens/issues issues> page on github.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/haskell:/lts:/7/openSUSE_Leap_42.2/x86_64 |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
ghc-taggy-lens
ghc-taggy-lens(x86-64)
libHStaggy-lens-0.1.2-43c21hI9q0qlbhV0wbcUD-ghc8.0.1.so()(64bit)
Requires :