diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-10 20:01:54 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-10 20:01:54 -0400 |
commit | 6e9b116e86eb944492a0744d948aef33f7cee132 (patch) | |
tree | 539b2eeff62d32df5b0912fe6cc997c4016e705d /standalone/no-th | |
parent | 28f07ad61e6af39a71853088ca88322f1775eb47 (diff) |
re-evil-splicved new version of DAV
Diffstat (limited to 'standalone/no-th')
-rw-r--r-- | standalone/no-th/haskell-patches/DAV_build-without-TH.patch | 487 |
1 files changed, 243 insertions, 244 deletions
diff --git a/standalone/no-th/haskell-patches/DAV_build-without-TH.patch b/standalone/no-th/haskell-patches/DAV_build-without-TH.patch index 45e9a3cec..cc730ebbd 100644 --- a/standalone/no-th/haskell-patches/DAV_build-without-TH.patch +++ b/standalone/no-th/haskell-patches/DAV_build-without-TH.patch @@ -10,61 +10,60 @@ Subject: [PATCH] expand TH 3 files changed, 307 insertions(+), 45 deletions(-) diff --git a/DAV.cabal b/DAV.cabal -index bf54f44..04f375a 100644 +index 5d50e39..f2abf89 100644 --- a/DAV.cabal +++ b/DAV.cabal -@@ -42,29 +42,7 @@ library - , transformers-base +@@ -43,30 +43,7 @@ library + , utf8-string , xml-conduit >= 1.0 && < 1.3 - , xml-hamlet >= 0.4 && <= 0.5 + , xml-hamlet >= 0.4 && < 0.5 -executable hdav - main-is: hdav.hs - ghc-options: -Wall -- build-depends: base >= 4.5 && <= 5 +- build-depends: base >= 4.5 && < 5 - , bytestring - , bytestring - , case-insensitive >= 0.4 - , containers +- , data-default - , either >= 4.1 - , errors +- , exceptions - , http-client >= 0.2 - , http-client-tls >= 0.2 - , http-types >= 0.7 - , lens >= 3.0 -- , lifted-base >= 0.1 -- , monad-control >= 0.3.2 - , mtl >= 2.1 - , network >= 2.3 - , optparse-applicative >= 0.5.0 - , transformers >= 0.3 - , transformers-base +- , utf8-string - , xml-conduit >= 1.0 && < 1.3 -- , xml-hamlet >= 0.4 && <= 0.5 +- , xml-hamlet >= 0.4 && < 0.5 + , text source-repository head type: git diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs -index 94d21bc..c48618f 100644 +index 4c6d68f..55979b6 100644 --- a/Network/Protocol/HTTP/DAV.hs +++ b/Network/Protocol/HTTP/DAV.hs -@@ -78,7 +78,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho - +@@ -82,6 +82,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho import qualified Text.XML as XML import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName) --import Text.Hamlet.XML (xml) + import Text.Hamlet.XML (xml) +import qualified Data.Text import Data.CaseInsensitive (mk) -@@ -336,28 +336,84 @@ makeCollection url username password = choke $ evalDAVT url $ do +@@ -330,31 +331,88 @@ withLockIfPossibleForDelete nocreate f = do propname :: XML.Document propname = XML.Document (XML.Prologue [] Nothing []) root [] where - root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml| -<D:allprop> -|] -- + root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) $ concat + [[XML.NodeElement + (XML.Element @@ -72,9 +71,11 @@ index 94d21bc..c48618f 100644 + (Data.Text.pack "D:allprop") Nothing Nothing) + Map.empty + (concat []))]] ++ + locky :: XML.Document locky = XML.Document (XML.Prologue [] Nothing []) root [] -- where + where - root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml| -<D:lockscope> - <D:exclusive> @@ -82,38 +83,37 @@ index 94d21bc..c48618f 100644 - <D:write> -<D:owner>Haskell DAV user -|] -+ where -+ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:lockscope") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:exclusive") Nothing Nothing) -+ Map.empty -+ (concat []))]]))], -+ [XML.NodeElement -+ (XML.Element -+ (XML.Name -+ (Data.Text.pack "D:locktype") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeElement -+ (XML.Element -+ (XML.Name (Data.Text.pack "D:write") Nothing Nothing) -+ Map.empty -+ (concat []))]]))], -+ [XML.NodeElement -+ (XML.Element -+ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing) -+ Map.empty -+ (concat -+ [[XML.NodeContent -+ (Data.Text.pack "Haskell DAV user")]]))]] ++ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:lockscope") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:exclusive") Nothing Nothing) ++ Map.empty ++ (concat []))]]))], ++ [XML.NodeElement ++ (XML.Element ++ (XML.Name ++ (Data.Text.pack "D:locktype") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeElement ++ (XML.Element ++ (XML.Name (Data.Text.pack "D:write") Nothing Nothing) ++ Map.empty ++ (concat []))]]))], ++ [XML.NodeElement ++ (XML.Element ++ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing) ++ Map.empty ++ (concat ++ [[XML.NodeContent ++ (Data.Text.pack "Haskell DAV user")]]))]] + calendarquery :: XML.Document @@ -146,8 +146,7 @@ index 94d21bc..c48618f 100644 + (concat []))]]))], + [XML.NodeElement + (XML.Element -+ (XML.Name -+ (Data.Text.pack "C:filter") Nothing Nothing) ++ (XML.Name (Data.Text.pack "C:filter") Nothing Nothing) + Map.empty + (concat + [[XML.NodeElement @@ -161,8 +160,11 @@ index 94d21bc..c48618f 100644 + Map.empty) + (concat []))]]))]] + + + -- | Normally, DAVT actions act on the url that is provided to eg, evalDAVT. + -- Sometimes, it's useful to adjust the url that is acted on, while diff --git a/Network/Protocol/HTTP/DAV/TH.hs b/Network/Protocol/HTTP/DAV/TH.hs -index b072116..5a01bf9 100644 +index 0ecd476..1653bf6 100644 --- a/Network/Protocol/HTTP/DAV/TH.hs +++ b/Network/Protocol/HTTP/DAV/TH.hs @@ -20,9 +20,11 @@ @@ -173,8 +175,8 @@ index b072116..5a01bf9 100644 +import Control.Lens import qualified Data.ByteString as B import Network.HTTP.Client (Manager, Request) -+import qualified Control.Lens.Type +import qualified Data.Functor ++import qualified Control.Lens.Type data Depth = Depth0 | Depth1 | DepthInfinity instance Read Depth where @@ -185,231 +187,228 @@ index b072116..5a01bf9 100644 -makeLenses ''DAVContext +allowedMethods :: Control.Lens.Type.Lens' DAVContext [B.ByteString] +allowedMethods -+ _f_a2PF -+ (DAVContext __allowedMethods'_a2PG -+ __baseRequest_a2PI -+ __basicusername_a2PJ -+ __basicpassword_a2PK -+ __complianceClasses_a2PL -+ __depth_a2PM -+ __httpManager_a2PN -+ __lockToken_a2PO -+ __userAgent_a2PP) -+ = ((\ __allowedMethods_a2PH ++ _f_a3iH ++ (DAVContext __allowedMethods'_a3iI ++ __baseRequest_a3iK ++ __basicusername_a3iL ++ __basicpassword_a3iM ++ __complianceClasses_a3iN ++ __depth_a3iO ++ __httpManager_a3iP ++ __lockToken_a3iQ ++ __userAgent_a3iR) ++ = ((\ __allowedMethods_a3iJ + -> DAVContext -+ __allowedMethods_a2PH -+ __baseRequest_a2PI -+ __basicusername_a2PJ -+ __basicpassword_a2PK -+ __complianceClasses_a2PL -+ __depth_a2PM -+ __httpManager_a2PN -+ __lockToken_a2PO -+ __userAgent_a2PP) -+ Data.Functor.<$> (_f_a2PF __allowedMethods'_a2PG)) ++ __allowedMethods_a3iJ ++ __baseRequest_a3iK ++ __basicusername_a3iL ++ __basicpassword_a3iM ++ __complianceClasses_a3iN ++ __depth_a3iO ++ __httpManager_a3iP ++ __lockToken_a3iQ ++ __userAgent_a3iR) ++ Data.Functor.<$> (_f_a3iH __allowedMethods'_a3iI)) +{-# INLINE allowedMethods #-} +baseRequest :: Control.Lens.Type.Lens' DAVContext Request +baseRequest -+ _f_a2PQ -+ (DAVContext __allowedMethods_a2PR -+ __baseRequest'_a2PS -+ __basicusername_a2PU -+ __basicpassword_a2PV -+ __complianceClasses_a2PW -+ __depth_a2PX -+ __httpManager_a2PY -+ __lockToken_a2PZ -+ __userAgent_a2Q0) -+ = ((\ __baseRequest_a2PT ++ _f_a3iS ++ (DAVContext __allowedMethods_a3iT ++ __baseRequest'_a3iU ++ __basicusername_a3iW ++ __basicpassword_a3iX ++ __complianceClasses_a3iY ++ __depth_a3iZ ++ __httpManager_a3j0 ++ __lockToken_a3j1 ++ __userAgent_a3j2) ++ = ((\ __baseRequest_a3iV + -> DAVContext -+ __allowedMethods_a2PR -+ __baseRequest_a2PT -+ __basicusername_a2PU -+ __basicpassword_a2PV -+ __complianceClasses_a2PW -+ __depth_a2PX -+ __httpManager_a2PY -+ __lockToken_a2PZ -+ __userAgent_a2Q0) -+ Data.Functor.<$> (_f_a2PQ __baseRequest'_a2PS)) ++ __allowedMethods_a3iT ++ __baseRequest_a3iV ++ __basicusername_a3iW ++ __basicpassword_a3iX ++ __complianceClasses_a3iY ++ __depth_a3iZ ++ __httpManager_a3j0 ++ __lockToken_a3j1 ++ __userAgent_a3j2) ++ Data.Functor.<$> (_f_a3iS __baseRequest'_a3iU)) +{-# INLINE baseRequest #-} +basicpassword :: Control.Lens.Type.Lens' DAVContext B.ByteString +basicpassword -+ _f_a2Q1 -+ (DAVContext __allowedMethods_a2Q2 -+ __baseRequest_a2Q3 -+ __basicusername_a2Q4 -+ __basicpassword'_a2Q5 -+ __complianceClasses_a2Q7 -+ __depth_a2Q8 -+ __httpManager_a2Q9 -+ __lockToken_a2Qa -+ __userAgent_a2Qb) -+ = ((\ __basicpassword_a2Q6 ++ _f_a3j3 ++ (DAVContext __allowedMethods_a3j4 ++ __baseRequest_a3j5 ++ __basicusername_a3j6 ++ __basicpassword'_a3j7 ++ __complianceClasses_a3j9 ++ __depth_a3ja ++ __httpManager_a3jb ++ __lockToken_a3jc ++ __userAgent_a3jd) ++ = ((\ __basicpassword_a3j8 + -> DAVContext -+ __allowedMethods_a2Q2 -+ __baseRequest_a2Q3 -+ __basicusername_a2Q4 -+ __basicpassword_a2Q6 -+ __complianceClasses_a2Q7 -+ __depth_a2Q8 -+ __httpManager_a2Q9 -+ __lockToken_a2Qa -+ __userAgent_a2Qb) -+ Data.Functor.<$> (_f_a2Q1 __basicpassword'_a2Q5)) ++ __allowedMethods_a3j4 ++ __baseRequest_a3j5 ++ __basicusername_a3j6 ++ __basicpassword_a3j8 ++ __complianceClasses_a3j9 ++ __depth_a3ja ++ __httpManager_a3jb ++ __lockToken_a3jc ++ __userAgent_a3jd) ++ Data.Functor.<$> (_f_a3j3 __basicpassword'_a3j7)) +{-# INLINE basicpassword #-} +basicusername :: Control.Lens.Type.Lens' DAVContext B.ByteString +basicusername -+ _f_a2Qc -+ (DAVContext __allowedMethods_a2Qd -+ __baseRequest_a2Qe -+ __basicusername'_a2Qf -+ __basicpassword_a2Qh -+ __complianceClasses_a2Qi -+ __depth_a2Qj -+ __httpManager_a2Qk -+ __lockToken_a2Ql -+ __userAgent_a2Qm) -+ = ((\ __basicusername_a2Qg ++ _f_a3je ++ (DAVContext __allowedMethods_a3jf ++ __baseRequest_a3jg ++ __basicusername'_a3jh ++ __basicpassword_a3jj ++ __complianceClasses_a3jk ++ __depth_a3jl ++ __httpManager_a3jm ++ __lockToken_a3jn ++ __userAgent_a3jo) ++ = ((\ __basicusername_a3ji + -> DAVContext -+ __allowedMethods_a2Qd -+ __baseRequest_a2Qe -+ __basicusername_a2Qg -+ __basicpassword_a2Qh -+ __complianceClasses_a2Qi -+ __depth_a2Qj -+ __httpManager_a2Qk -+ __lockToken_a2Ql -+ __userAgent_a2Qm) -+ Data.Functor.<$> (_f_a2Qc __basicusername'_a2Qf)) ++ __allowedMethods_a3jf ++ __baseRequest_a3jg ++ __basicusername_a3ji ++ __basicpassword_a3jj ++ __complianceClasses_a3jk ++ __depth_a3jl ++ __httpManager_a3jm ++ __lockToken_a3jn ++ __userAgent_a3jo) ++ Data.Functor.<$> (_f_a3je __basicusername'_a3jh)) +{-# INLINE basicusername #-} +complianceClasses :: + Control.Lens.Type.Lens' DAVContext [B.ByteString] +complianceClasses -+ _f_a2Qn -+ (DAVContext __allowedMethods_a2Qo -+ __baseRequest_a2Qp -+ __basicusername_a2Qq -+ __basicpassword_a2Qr -+ __complianceClasses'_a2Qs -+ __depth_a2Qu -+ __httpManager_a2Qv -+ __lockToken_a2Qw -+ __userAgent_a2Qx) -+ = ((\ __complianceClasses_a2Qt ++ _f_a3jp ++ (DAVContext __allowedMethods_a3jq ++ __baseRequest_a3jr ++ __basicusername_a3js ++ __basicpassword_a3jt ++ __complianceClasses'_a3ju ++ __depth_a3jw ++ __httpManager_a3jx ++ __lockToken_a3jy ++ __userAgent_a3jz) ++ = ((\ __complianceClasses_a3jv + -> DAVContext -+ __allowedMethods_a2Qo -+ __baseRequest_a2Qp -+ __basicusername_a2Qq -+ __basicpassword_a2Qr -+ __complianceClasses_a2Qt -+ __depth_a2Qu -+ __httpManager_a2Qv -+ __lockToken_a2Qw -+ __userAgent_a2Qx) -+ Data.Functor.<$> (_f_a2Qn __complianceClasses'_a2Qs)) ++ __allowedMethods_a3jq ++ __baseRequest_a3jr ++ __basicusername_a3js ++ __basicpassword_a3jt ++ __complianceClasses_a3jv ++ __depth_a3jw ++ __httpManager_a3jx ++ __lockToken_a3jy ++ __userAgent_a3jz) ++ Data.Functor.<$> (_f_a3jp __complianceClasses'_a3ju)) +{-# INLINE complianceClasses #-} +depth :: Control.Lens.Type.Lens' DAVContext (Maybe Depth) +depth -+ _f_a2Qy -+ (DAVContext __allowedMethods_a2Qz -+ __baseRequest_a2QA -+ __basicusername_a2QB -+ __basicpassword_a2QC -+ __complianceClasses_a2QD -+ __depth'_a2QE -+ __httpManager_a2QG -+ __lockToken_a2QH -+ __userAgent_a2QI) -+ = ((\ __depth_a2QF ++ _f_a3jA ++ (DAVContext __allowedMethods_a3jB ++ __baseRequest_a3jC ++ __basicusername_a3jD ++ __basicpassword_a3jE ++ __complianceClasses_a3jF ++ __depth'_a3jG ++ __httpManager_a3jI ++ __lockToken_a3jJ ++ __userAgent_a3jK) ++ = ((\ __depth_a3jH + -> DAVContext -+ __allowedMethods_a2Qz -+ __baseRequest_a2QA -+ __basicusername_a2QB -+ __basicpassword_a2QC -+ __complianceClasses_a2QD -+ __depth_a2QF -+ __httpManager_a2QG -+ __lockToken_a2QH -+ __userAgent_a2QI) -+ Data.Functor.<$> (_f_a2Qy __depth'_a2QE)) ++ __allowedMethods_a3jB ++ __baseRequest_a3jC ++ __basicusername_a3jD ++ __basicpassword_a3jE ++ __complianceClasses_a3jF ++ __depth_a3jH ++ __httpManager_a3jI ++ __lockToken_a3jJ ++ __userAgent_a3jK) ++ Data.Functor.<$> (_f_a3jA __depth'_a3jG)) +{-# INLINE depth #-} -+httpManager :: Control.Lens.Type.Lens' DAVContext Manager ++httpManager :: Control.Lens.Type.Lens' DAVContext (Maybe Manager) +httpManager -+ _f_a2QJ -+ (DAVContext __allowedMethods_a2QK -+ __baseRequest_a2QL -+ __basicusername_a2QM -+ __basicpassword_a2QN -+ __complianceClasses_a2QO -+ __depth_a2QP -+ __httpManager'_a2QQ -+ __lockToken_a2QS -+ __userAgent_a2QT) -+ = ((\ __httpManager_a2QR ++ _f_a3jL ++ (DAVContext __allowedMethods_a3jM ++ __baseRequest_a3jN ++ __basicusername_a3jO ++ __basicpassword_a3jP ++ __complianceClasses_a3jQ ++ __depth_a3jR ++ __httpManager'_a3jS ++ __lockToken_a3jU ++ __userAgent_a3jV) ++ = ((\ __httpManager_a3jT + -> DAVContext -+ __allowedMethods_a2QK -+ __baseRequest_a2QL -+ __basicusername_a2QM -+ __basicpassword_a2QN -+ __complianceClasses_a2QO -+ __depth_a2QP -+ __httpManager_a2QR -+ __lockToken_a2QS -+ __userAgent_a2QT) -+ Data.Functor.<$> (_f_a2QJ __httpManager'_a2QQ)) ++ __allowedMethods_a3jM ++ __baseRequest_a3jN ++ __basicusername_a3jO ++ __basicpassword_a3jP ++ __complianceClasses_a3jQ ++ __depth_a3jR ++ __httpManager_a3jT ++ __lockToken_a3jU ++ __userAgent_a3jV) ++ Data.Functor.<$> (_f_a3jL __httpManager'_a3jS)) +{-# INLINE httpManager #-} +lockToken :: + Control.Lens.Type.Lens' DAVContext (Maybe B.ByteString) +lockToken -+ _f_a2QU -+ (DAVContext __allowedMethods_a2QV -+ __baseRequest_a2QW -+ __basicusername_a2QX -+ __basicpassword_a2QY -+ __complianceClasses_a2QZ -+ __depth_a2R0 -+ __httpManager_a2R1 -+ __lockToken'_a2R2 -+ __userAgent_a2R4) -+ = ((\ __lockToken_a2R3 ++ _f_a3jW ++ (DAVContext __allowedMethods_a3jX ++ __baseRequest_a3jY ++ __basicusername_a3jZ ++ __basicpassword_a3k0 ++ __complianceClasses_a3k1 ++ __depth_a3k2 ++ __httpManager_a3k3 ++ __lockToken'_a3k4 ++ __userAgent_a3k6) ++ = ((\ __lockToken_a3k5 + -> DAVContext -+ __allowedMethods_a2QV -+ __baseRequest_a2QW -+ __basicusername_a2QX -+ __basicpassword_a2QY -+ __complianceClasses_a2QZ -+ __depth_a2R0 -+ __httpManager_a2R1 -+ __lockToken_a2R3 -+ __userAgent_a2R4) -+ Data.Functor.<$> (_f_a2QU __lockToken'_a2R2)) ++ __allowedMethods_a3jX ++ __baseRequest_a3jY ++ __basicusername_a3jZ ++ __basicpassword_a3k0 ++ __complianceClasses_a3k1 ++ __depth_a3k2 ++ __httpManager_a3k3 ++ __lockToken_a3k5 ++ __userAgent_a3k6) ++ Data.Functor.<$> (_f_a3jW __lockToken'_a3k4)) +{-# INLINE lockToken #-} +userAgent :: Control.Lens.Type.Lens' DAVContext B.ByteString +userAgent -+ _f_a2R5 -+ (DAVContext __allowedMethods_a2R6 -+ __baseRequest_a2R7 -+ __basicusername_a2R8 -+ __basicpassword_a2R9 -+ __complianceClasses_a2Ra -+ __depth_a2Rb -+ __httpManager_a2Rc -+ __lockToken_a2Rd -+ __userAgent'_a2Re) -+ = ((\ __userAgent_a2Rf ++ _f_a3k7 ++ (DAVContext __allowedMethods_a3k8 ++ __baseRequest_a3k9 ++ __basicusername_a3ka ++ __basicpassword_a3kb ++ __complianceClasses_a3kc ++ __depth_a3kd ++ __httpManager_a3ke ++ __lockToken_a3kf ++ __userAgent'_a3kg) ++ = ((\ __userAgent_a3kh + -> DAVContext -+ __allowedMethods_a2R6 -+ __baseRequest_a2R7 -+ __basicusername_a2R8 -+ __basicpassword_a2R9 -+ __complianceClasses_a2Ra -+ __depth_a2Rb -+ __httpManager_a2Rc -+ __lockToken_a2Rd -+ __userAgent_a2Rf) -+ Data.Functor.<$> (_f_a2R5 __userAgent'_a2Re)) ++ __allowedMethods_a3k8 ++ __baseRequest_a3k9 ++ __basicusername_a3ka ++ __basicpassword_a3kb ++ __complianceClasses_a3kc ++ __depth_a3kd ++ __httpManager_a3ke ++ __lockToken_a3kf ++ __userAgent_a3kh) ++ Data.Functor.<$> (_f_a3k7 __userAgent'_a3kg)) +{-# INLINE userAgent #-} --- -1.7.10.4 - |