-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Components of paths.
--   
--   Hackage documentation generation is not reliable. For up to date
--   documentation, please see:
--   <a>http://www.stackage.org/package/path-pieces</a>.
@package path-pieces
@version 0.2.1

module Web.PathPieces
class PathPiece s
fromPathPiece :: PathPiece s => Text -> Maybe s
toPathPiece :: PathPiece s => s -> Text
class PathMultiPiece s
fromPathMultiPiece :: PathMultiPiece s => [Text] -> Maybe s
toPathMultiPiece :: PathMultiPiece s => s -> [Text]

-- | A function for helping generate free <a>PathPiece</a> instances for
--   enumeration data types that have derived <a>Read</a> and <a>Show</a>
--   instances. Intended to be used like this:
--   
--   <pre>
--   data MyData = Foo | Bar | Baz
--     deriving (Read,Show)
--   instance PathPiece MyData where
--     fromPathPiece = readFromPathPiece
--     toPathPiece = showToPathPiece
--   </pre>
--   
--   Since 0.2.1.
readFromPathPiece :: Read s => Text -> Maybe s

-- | See the documentation for <a>readFromPathPiece</a>.
--   
--   Since 0.2.1.
showToPathPiece :: Show s => s -> Text

-- | <i>Deprecated: Use toPathPiece instead of toSinglePiece</i>
toSinglePiece :: PathPiece p => p -> Text

-- | <i>Deprecated: Use toPathMultiPiece instead of toMultiPiece</i>
toMultiPiece :: PathMultiPiece ps => ps -> [Text]

-- | <i>Deprecated: Use fromPathPiece instead of fromSinglePiece</i>
fromSinglePiece :: PathPiece p => Text -> Maybe p

-- | <i>Deprecated: Use fromPathMultiPiece instead of fromMultiPiece</i>
fromMultiPiece :: PathMultiPiece ps => [Text] -> Maybe ps
instance Web.PathPieces.PathPiece ()
instance Web.PathPieces.PathPiece GHC.Base.String
instance Web.PathPieces.PathPiece Data.Text.Internal.Text
instance Web.PathPieces.PathPiece Data.Text.Internal.Lazy.Text
instance Web.PathPieces.PathPiece GHC.Integer.Type.Integer
instance Web.PathPieces.PathPiece GHC.Types.Int
instance Web.PathPieces.PathPiece GHC.Int.Int8
instance Web.PathPieces.PathPiece GHC.Int.Int16
instance Web.PathPieces.PathPiece GHC.Int.Int32
instance Web.PathPieces.PathPiece GHC.Int.Int64
instance Web.PathPieces.PathPiece GHC.Types.Word
instance Web.PathPieces.PathPiece GHC.Word.Word8
instance Web.PathPieces.PathPiece GHC.Word.Word16
instance Web.PathPieces.PathPiece GHC.Word.Word32
instance Web.PathPieces.PathPiece GHC.Word.Word64
instance Web.PathPieces.PathPiece GHC.Types.Bool
instance Web.PathPieces.PathPiece Data.Time.Calendar.Days.Day
instance Web.PathPieces.PathPiece a => Web.PathPieces.PathPiece (GHC.Base.Maybe a)
instance Web.PathPieces.PathPiece a => Web.PathPieces.PathMultiPiece [a]
