-- 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/githubuser/localcooking-db#readme @package path-extra @version 0.2.0 module Path.Extended -- | A location for some base and type - internally uses Path. data Location Location :: Either (Path Abs Dir) (Path Abs File) -> [QueryParam] -> Maybe String -> Location [locPath] :: Location -> Either (Path Abs Dir) (Path Abs File) [locQueryParams] :: Location -> [QueryParam] [locFragment] :: Location -> Maybe String 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 toLocation :: ToLocation sym => sym -> Location class FromPath sym base type' | sym -> base type' parsePath :: FromPath sym base type' => Path base type' -> Either String sym class FromLocation sym parseLocation :: FromLocation sym => Location -> Either String sym fromAbsDir :: Path Abs Dir -> Location fromAbsFile :: Path Abs File -> Location prepend :: Path Abs Dir -> Location -> Location setQuery :: [QueryParam] -> Location -> Location -- | Appends a query parameter addQuery :: QueryParam -> Location -> Location (<&>) :: Location -> QueryParam -> Location infixl 7 <&> addQueries :: [QueryParam] -> Location -> Location delQuery :: Location -> Location getQuery :: Location -> [QueryParam] setFragment :: Maybe String -> Location -> Location addFragment :: String -> Location -> Location (<#>) :: Location -> String -> Location infixl 8 <#> delFragment :: Location -> Location getFragment :: Location -> Maybe String locationParser :: Parser Location printLocation :: Location -> Text instance GHC.Generics.Generic Path.Extended.Location instance GHC.Classes.Ord Path.Extended.Location instance GHC.Classes.Eq Path.Extended.Location