packages feed

Cabal revisions of urlpath-0.0.2

Hackage metadata revisions edit the .cabal file after upload; each diff below is one revision.

revision 1
-Name:                   urlpath-Version:                0.0.2-Author:                 Athan Clark <athan.clark@gmail.com>-Maintainer:             Athan Clark <athan.clark@gmail.com>-License:                BSD3-License-File:           LICENSE-Category:               Web-Synopsis:               Painfully simple URL writing combinators-Description:-  Simple URL DSL for Haskell.-  .-  Use raw combinators (kinda useless) ...-  .-  >  render $ "foo.php" <?> ("key1","bar") <&> ("key2","baz")-  >-  >  ↪ "foo.php?key1=bar&key2=baz"-  .-  ... or use the MonadReader instance for a configurable root ...-  .-  >  let url = runReader $ expandAbsolute $ "foo.php" <?> ("key1","bar") <&> ("key2","baz")-  >  url "example.com"-  >-  >  ↪ "example.com/foo.php?key1=bar&key2=baz"-  .-  ... in Lucid ...-  .-  >  (runReader $ renderTextT $-  >    (\a -> do-  >      foo <- lift $ expandAbsolute a-  >      script_ [src_ foo] "" )-  >    ("foo" <?> ("bar","baz"))-  >  ) "example.com"-  >-  >  ↪ "<script src=\"example.com/foo?bar=baz\"></script>"-  .-  ... and in Scotty ...-  .-  >  main :: IO ()-  >  main = scottyT 3000-  >      rootConf-  >      rootConf-  >      run-  >  -  >    where-  >      rootConf = flip runReaderT "http://example.com"-  >  -  >      run :: ( MonadIO m-  >             , MonadReader T.Text m ) =>-  >             ScottyT LT.Text m ()-  >      run = get "/" $ do-  >        path <- lift $ expandAbsolute $ "foo" <?> ("bar","baz")-  >        text $ LT.fromStrict path-  >-  >  λ> curl localhost:3000/-  >  ↪ "http://example.com/foo?bar=baz"-  --Cabal-Version:          >= 1.10-Build-Type:             Simple--Library-  Default-Language:     Haskell2010-  HS-Source-Dirs:       src-  GHC-Options:          -Wall-  Exposed-Modules:      UrlPath-                        UrlPath.Types-  Build-Depends:        base >= 4 && < 5-                      , mtl-                      , text-                      , transformers--Source-Repository head-  Type:                 git-  Location:             https://github.com/athanclark/urlpath.git+Cabal-Version:          >= 1.10
+Name:                   urlpath
+Version:                0.0.2
+x-revision: 1
+Author:                 Athan Clark <athan.clark@gmail.com>
+Maintainer:             Athan Clark <athan.clark@gmail.com>
+License:                BSD3
+License-File:           LICENSE
+Category:               Web
+Synopsis:               Painfully simple URL writing combinators
+Description:
+  Simple URL DSL for Haskell.
+  .
+  Use raw combinators (kinda useless) ...
+  .
+  >  render $ "foo.php" <?> ("key1","bar") <&> ("key2","baz")
+  >
+  >  ↪ "foo.php?key1=bar&key2=baz"
+  .
+  ... or use the MonadReader instance for a configurable root ...
+  .
+  >  let url = runReader $ expandAbsolute $ "foo.php" <?> ("key1","bar") <&> ("key2","baz")
+  >  url "example.com"
+  >
+  >  ↪ "example.com/foo.php?key1=bar&key2=baz"
+  .
+  ... in Lucid ...
+  .
+  >  (runReader $ renderTextT $
+  >    (\a -> do
+  >      foo <- lift $ expandAbsolute a
+  >      script_ [src_ foo] "" )
+  >    ("foo" <?> ("bar","baz"))
+  >  ) "example.com"
+  >
+  >  ↪ "<script src=\"example.com/foo?bar=baz\"></script>"
+  .
+  ... and in Scotty ...
+  .
+  >  main :: IO ()
+  >  main = scottyT 3000
+  >      rootConf
+  >      rootConf
+  >      run
+  >  
+  >    where
+  >      rootConf = flip runReaderT "http://example.com"
+  >  
+  >      run :: ( MonadIO m
+  >             , MonadReader T.Text m ) =>
+  >             ScottyT LT.Text m ()
+  >      run = get "/" $ do
+  >        path <- lift $ expandAbsolute $ "foo" <?> ("bar","baz")
+  >        text $ LT.fromStrict path
+  >
+  >  λ> curl localhost:3000/
+  >  ↪ "http://example.com/foo?bar=baz"
+  
+
+Build-Type:             Simple
+
+Library
+  Default-Language:     Haskell2010
+  Other-Extensions:     InstanceSigs
+  HS-Source-Dirs:       src
+  GHC-Options:          -Wall
+  Exposed-Modules:      UrlPath
+                        UrlPath.Types
+  Build-Depends:        base >= 4 && < 5
+                      , mtl
+                      , text
+                      , transformers
+
+Source-Repository head
+  Type:                 git
+  Location:             https://github.com/athanclark/urlpath.git