-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | URLs without host information -- -- Please see the README on Github at -- https://github.com/athanclark/path-extra#readme @package path-extra @version 0.3.1 module Path.Extended -- | A location for some base and type - internally uses Path. data Location base Location :: LocationPath base -> [QueryParam] -> Maybe String -> Location base [locPath] :: Location base -> LocationPath base [locQueryParams] :: Location base -> [QueryParam] [locFragment] :: Location base -> Maybe String data LocationPath base Dir :: Path base Dir -> LocationPath base File :: Path base File -> LocationPath base type QueryParam = (String, Maybe String) -- | Convenience typeclass for symbolic, stringless routes - make an -- instance for your own data type to use your constructors as -- route-referencing symbols. class ToPath sym base type' | sym -> base type' toPath :: ToPath sym base type' => sym -> Path base type' -- | Convenience typeclass for symbolic, stringless routes - make an -- instance for your own data type to use your constructors as -- route-referencing symbols. class ToLocation sym base | sym -> base toLocation :: ToLocation sym base => sym -> Location base class FromPath sym base type' | sym -> base type' parsePath :: FromPath sym base type' => Path base type' -> Either String sym class FromLocation sym base | sym -> base parseLocation :: FromLocation sym base => Location base -> Either String sym fromDir :: Path base Dir -> Location base fromFile :: Path base File -> Location base prependAbs :: Path Abs Dir -> Location Abs -> Location Abs prependRel :: Path Rel Dir -> Location Rel -> Location Rel setQuery :: [QueryParam] -> Location base -> Location base -- | Appends a query parameter addQuery :: QueryParam -> Location base -> Location base (<&>) :: Location base -> QueryParam -> Location base infixl 7 <&> addQueries :: [QueryParam] -> Location base -> Location base delQuery :: Location base -> Location base getQuery :: Location base -> [QueryParam] setFragment :: Maybe String -> Location base -> Location base addFragment :: String -> Location base -> Location base (<#>) :: Location base -> String -> Location base infixl 8 <#> delFragment :: Location base -> Location base getFragment :: Location base -> Maybe String locationAbsParser :: Parser (Location Abs) locationRelParser :: Parser (Location Rel) printLocation :: Location base -> Text instance GHC.Show.Show (Path.Extended.LocationPath base) instance GHC.Generics.Generic (Path.Extended.LocationPath base) instance GHC.Classes.Ord (Path.Extended.LocationPath base) instance GHC.Classes.Eq (Path.Extended.LocationPath base) instance GHC.Show.Show (Path.Extended.Location base) instance GHC.Generics.Generic (Path.Extended.Location base) instance GHC.Classes.Ord (Path.Extended.Location base) instance GHC.Classes.Eq (Path.Extended.Location base)