packages feed

network-uri-lenses (empty) → 0.1.0.0

raw patch · 6 files changed

+116/−0 lines, 6 filesdep +basedep +lensdep +network-urisetup-changed

Dependencies added: base, lens, network-uri

Files

+ ChangeLog.md view
@@ -0,0 +1,3 @@+# Changelog for network-uri-lenses++## Unreleased changes
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Author name here (c) 2018++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Author name here nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ README.md view
@@ -0,0 +1,1 @@+# network-uri-lenses
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ network-uri-lenses.cabal view
@@ -0,0 +1,39 @@+-- This file has been generated from package.yaml by hpack version 0.21.2.+--+-- see: https://github.com/sol/hpack+--+-- hash: 47df182ac5d2dbfbfc074244e450688952351a375b7bd27579b87c7c860a4683++name:           network-uri-lenses+version:        0.1.0.0+description:    Please see the README on GitHub at <https://github.com/githubuser/network-uri-lenses#readme>+homepage:       https://github.com/jappeace/network-uri-lenses#readme+bug-reports:    https://github.com/jappeace/network-uri-lenses/issues+author:         Jappie Klooster+maintainer:     jappieklooster@hotmail.com+copyright:      2018 Jappie Klooster+license:        BSD3+license-file:   LICENSE+build-type:     Simple+cabal-version:  >= 1.10++extra-source-files:+    ChangeLog.md+    README.md++source-repository head+  type: git+  location: https://github.com/jappeace/network-uri-lenses++library+  exposed-modules:+      Network.Uri.Lens+  other-modules:+      Paths_network_uri_lenses+  hs-source-dirs:+      src+  build-depends:+      base >=4.7 && <5+    , lens+    , network-uri+  default-language: Haskell2010
+ src/Network/Uri/Lens.hs view
@@ -0,0 +1,41 @@+-- | Network uri lenses+module Network.Uri.Lens+  ( regNameLens+  , userInfoLens+  , portLens+  , uriAuthLens+  , uriSchemeLens+  , uriPathLens+  , uriQueryLens+  , uriFragmentLens+  ) where++import           Control.Lens+import           Network.URI++regNameLens :: Lens' URIAuth String+regNameLens = lens uriRegName (\parent newVal -> parent {uriRegName = newVal})++userInfoLens :: Lens' URIAuth String+userInfoLens =+  lens uriUserInfo (\parent newVal -> parent {uriUserInfo = newVal})++portLens :: Lens' URIAuth String+portLens = lens uriPort (\parent newVal -> parent {uriPort = newVal})++uriAuthLens :: Lens' URI (Maybe URIAuth)+uriAuthLens =+  lens uriAuthority (\parent newVal -> parent {uriAuthority = newVal})++uriSchemeLens :: Lens' URI String+uriSchemeLens = lens uriScheme (\parent newVal -> parent {uriScheme = newVal})++uriPathLens :: Lens' URI String+uriPathLens = lens uriPath (\parent newVal -> parent {uriPath = newVal})++uriQueryLens :: Lens' URI String+uriQueryLens = lens uriQuery (\parent newVal -> parent {uriQuery = newVal})++uriFragmentLens :: Lens' URI String+uriFragmentLens =+  lens uriFragment (\parent newVal -> parent {uriFragment = newVal})