urlpath 9.0.0 → 9.0.0.1
raw patch · 2 files changed
+12/−11 lines, 2 filesdep ~attoparsec-uri
Dependency ranges changed: attoparsec-uri
Files
- src/Data/Url.hs +9/−8
- urlpath.cabal +3/−3
src/Data/Url.hs view
@@ -429,9 +429,9 @@ packLocation :: Strict.Maybe T.Text -> Bool -> URIAuth -> Location -> URI packLocation scheme slashes auth loc = URI scheme slashes auth- ( either getPathChunks getPathChunks (locPath loc)+ (Strict.Just $ either getPathChunks getPathChunks (locPath loc) )- ( V.fromList+ (V.fromList $ map (\(l,r) -> T.pack l Strict.:!: maybe Strict.Nothing (Strict.Just . T.pack) r) $ getQuery loc@@ -446,12 +446,13 @@ , auth , let path :: Either (Path Abs Dir) (Path Abs File) path = case xs of- [] -> Left [absdir|/|]- _ ->- Right $- foldl (\acc x -> unsafeCoerce acc </> unsafePerformIO (parseRelFile $ T.unpack x))- (unsafePerformIO $ unsafeCoerce <$> parseAbsDir "/")- xs+ Strict.Nothing -> Left [absdir|/|]+ Strict.Just xs'+ | xs' == [] -> Left [absdir|/|]+ | otherwise -> Right $+ foldl (\acc x -> unsafeCoerce acc </> unsafePerformIO (parseRelFile $ T.unpack x))+ (unsafePerformIO $ unsafeCoerce <$> parseAbsDir "/")+ xs' withQs :: Location withQs = foldl (\acc (k Strict.:!: mV) -> acc <&> (T.unpack k, Strict.maybe Nothing (Just . T.unpack) mV)) (either fromAbsDir fromAbsFile path)
urlpath.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 370200b23cf5fa3450682a014bbd744ebcf8345c2d887cdb320a3017c78431be+-- hash: fb47f14654a7cf599ede8cd4bbcea362a4559a94d55550521dd32c2ca08ce795 name: urlpath-version: 9.0.0+version: 9.0.0.1 synopsis: Painfully simple URL deployment. description: Please see the README on Github at <https://github.com/githubuser/urlpath#readme> category: Web, Data@@ -35,7 +35,7 @@ src ghc-options: -Wall build-depends:- attoparsec-uri >=0.0.4+ attoparsec-uri ==0.0.5.1 , base >=4.8 && <5 , exceptions , mmorph