git.iko.soy/typeable/http-api-data
on master help sign in
Corrected documentation
4dc6829Andrew
Web/PathPieces.hs+5−2
@@ -125,7 +125,7 @@ instance PathPiece a => PathMultiPiece [a] where
125 fromPathMultiPiece = mapM fromPathPiece
125 fromPathMultiPiece = mapM fromPathPiece
126 toPathMultiPiece = map toPathPiece
126 toPathMultiPiece = map toPathPiece
127
127
128−-- | Since 0.2.1. A function for helping generate free 'PathPiece'
128+-- | A function for helping generate free 'PathPiece'
129-- instances for enumeration data types
129-- instances for enumeration data types
130-- that have derived 'Read' and 'Show' instances.
130-- that have derived 'Read' and 'Show' instances.
131-- Intended to be used like this:
131-- Intended to be used like this:
@@ -136,10 +136,13 @@ instance PathPiece a => PathMultiPiece [a] where
136-- > fromPathPiece = readFromPathPiece
136-- > fromPathPiece = readFromPathPiece
137-- > toPathPiece = showToPathPiece
137-- > toPathPiece = showToPathPiece
138--
138--
139+-- Since 0.2.1.
139readFromPathPiece :: Read s => S.Text -> Maybe s
140readFromPathPiece :: Read s => S.Text -> Maybe s
140readFromPathPiece = readMaybe . S.unpack
141readFromPathPiece = readMaybe . S.unpack
141
142
142−-- | Since 0.2.1. See the documentation for 'readFromPathPiece'.
143+-- | See the documentation for 'readFromPathPiece'.
144+--
145+-- Since 0.2.1.
143showToPathPiece :: Show s => s -> S.Text
146showToPathPiece :: Show s => s -> S.Text
144showToPathPiece = S.pack . show
147showToPathPiece = S.pack . show
145
148