úÎRqNÁC      !"#$%&'()*+,-./0123456789:;<=>?@ABSafe 1Bundle together information useful for an upload.package name & versionfile being uploaded file contsdocco or package candidate or notname and version of a package 'are we uploading a package or just docs0whether a package is a normal one or a candidate      None oRelevant bits of server response, packed into a record for those who don't want to deal with http-clients's  type.See /."OOptions that can be applied to a Request. (e.g. to add standard headers, etc.) Can just use *.$;Username and password for HTTP basic access authentication.( Alias for  /https://hackage.haskell.org/package/http-client http-client's  type.*/returns default options to use with a request.ŽWe try to request plain text where possible; and we allow non-success statuses to still return normally (rather than throwing an exception)+!pack a name and password into an $ structuremkAuth "myname" "mypassword"?Just (Auth {authUser = "myname", authPassword = "mypassword"}) ,.work out what URL to upload a .tgz file to. getUploadUrl server upload returns a URL.„getUploadUrl "http://localhost:8080/" $ Upload (Package "foo" "0.1.0.0") "./foo-0.1.0.0.tar.gz" Nothing IsDocumentation CandidatePkg:"http://localhost:8080/package/foo-0.1.0.0/candidate/docs"-#buildRequest serverUrl upl userAuthL - create an HTTP request for uploading some package (details packed into upl) to the server at  serverUrl, using the credentials in userAuth. e.g. usage: Àlet p = Package "foo" "0.1.0.0" let u = Upload p "./foo-0.1.0.0.tar.gz" Nothing IsDocumentation CandidatePkg req <- buildRequest "http://localhost:8080/" u (mkAuth "tmp" "tmp") sendRequest req.*Send an HTTP request and get the response.[May throw an exception on network errors etc., but not on a non-2XX response (e.g. a 404).0 Construct a POST! request for uploading a package.postPkg url conts userAuth8 creates a request which will upload the file conts in conts to the URL at url!, using the user authentication userAuth.1Build a PUT) request to upload package documentation.putDocs url fileConts userAuth; creates a request which will upload the file contents in  fileConts to the URL at url!, using the user authentication userAuth.26given a filename and contents, produce an http-client C0 for uploading as a package to a hackage server3 Convert a D to a E.)For testing purposes. Won't work if your D- is set up to do streaming (e.g. using the F constructor/ partFileSource). !"#$%&'()*+,-./0123) ! "#$%&'()*+,-./0123)($%&'"#*+,-. !/0123$%&' !"#$%&'()*+,-./0123Safe 7strip whitespace from endrstrip "abcd \t\n\r""abcd"8strip whitespace from beginninglstrip "\t\n\r abcd""abcd"9]Replace a subsequence everywhere it occurs. The first argument must not be the empty list. from NDM's /https://hackage.haskell.org/package/extra-1.5.1 extra-1.5.1-replace "el" "_" "Hello Bella" == "H_lo B_la"True(replace "el" "e" "Hello" == "Helo"True ^\xs ys -> not (null xs) ==> replace xs xs ys == ys replace "" "e" "Hello" == undefined:Like G , but for .(taken from filepath-1.4.1.1)(takeWhileEnd (< 10) [1, 2, 10, 3, 4, -3][3,4,-3];like  , but from the endspanEnd (< 3) [4,3,2,1,4,3,2,1]([4,3,2,1,4,3],[2,1])spanEnd (< 9) [1,2,3] ([],[1,2,3])spanEnd (< 0) [1,2,3] ([1,2,3],[])<like  , but from the end breakEnd (> 3) [4,3,2,1,4,3,2,1]([4,3,2,1,4],[3,2,1])breakEnd (< 9) [1,2,3] ([1,2,3],[])breakEnd (> 9) [1,2,3] ([],[1,2,3])=Bif there's a .cabal file in the current dir, return its file name. from NDM's  -https://hackage.haskell.org/package/neil-0.10 neil-0.10 >^find & read contents of Cabal file from current dir, if it exists. else returns empty string. from NDM's  -https://hackage.haskell.org/package/neil-0.10 neil-0.10 ?!extractCabal fieldName cabalConts$: extract contents of field named  fieldName from a Cabal file string.4field name is case-insensitive [folded to lowercase] from NDM's  -https://hackage.haskell.org/package/neil-0.10 neil-0.10 @‰Inspect the name of a .tar.gz file to work out the package name and version it's for, and whether it is for documentation or a package.AA specialized to   .d(parseTgzFilename' "foo-bar-baz-0.1.0.0.2.3.0.1.tar.gz") :: Either String (IsDocumentation, Package)[Right (IsPackage,Package {packageName = "foo-bar-baz", packageVersion = "0.1.0.0.2.3.0.1"}) 789:;<=>?@A 789:;<=>?@A 789:;<=>?@A 789:;<=>?@ANoneB"buildTar tarFileName baseDir paths£ - create a gz-compressed tar file with name tarFileName, with files in it from baseDir, "paths" being the files & directories to archive, relative to baseDir.BBBB None! $%&'+,-.01=>?@AB!=>?@AB,+01-.  $%&'H !"#$%&'()*++,,-./0123456789:;<=>?@ABCDEFGHIJKLJMNOPQJMRSTUV"hup-0.2.0.0-B6GOqwu151sJt4BrwPvUEbDistribution.Hup.TypesDistribution.Hup.UploadDistribution.Hup.ParseDistribution.Hup.BuildTarNetwork.HTTP.ClientResponse Data.Listtakespanbreak Data.EitherEitherDistribution.HupUploadpackage fileToUpload fileConts uploadType isCandidatePackage packageNamepackageVersionIsDocumentation IsPackage IsCandidate NormalPkg CandidatePkg$fShowIsCandidate$fEqIsCandidate$fReadIsCandidate$fShowIsDocumentation$fEqIsDocumentation$fReadIsDocumentation $fShowPackage $fEqPackage $fReadPackage $fShowUpload $fEqUpload statusCodemessage contentType responseBodyOptionsAuthauthUser authPassword HResponse parseRequestdefaultOptionsmkAuth getUploadUrl buildRequest sendRequest mkResponsepostPkgputDocsmkPartbodyToByteString$fEqAuth $fShowAuth$fShowResponserstriplstripreplace takeWhileEndspanEndbreakEnd findCabal readCabal extractCabalparseTgzFilenameparseTgzFilename'buildTar(http-client-0.5.5-4KPK3pU6CX91qekwesaNmq%Network.HTTP.Client.MultipartFormDataPartNetwork.HTTP.Client.Types RequestBodybytestring-0.10.8.1Data.ByteString.Internal ByteStringRequestBodyStreambase Data.OldList dropWhileEnd