Skip to content

Commit

Permalink
integerArrayQuery is not a valid prism... add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
himura committed Jun 21, 2014
1 parent 224e115 commit 5925d6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Web/Twitter/Conduit/Parameters/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Web.Twitter.Conduit.Parameters.Internal
import qualified Network.HTTP.Types as HT
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S8
import qualified Data.Attoparsec.ByteString.Char8 as Atto
import Data.Maybe
import Control.Lens

Expand Down Expand Up @@ -57,6 +58,13 @@ booleanQuery = prism' bs sb

-- | This 'Prism' convert from a 'ByteString' to the array of 'Integer' value.
--
-- This is not a valid Prism, for example:
--
-- @
-- "1, 2" ^? integerArrayQuery == Just [1,2]
-- integerArrayQuery # [1,2] != "1, 2"
-- @
--
-- >>> integerArrayQuery # [1]
-- "1"
-- >>> integerArrayQuery # [1,2234,3]
Expand Down

0 comments on commit 5925d6a

Please sign in to comment.