Hoogle Search
Within LTS Haskell 24.69 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
lookAhead :: Parser i a -> Parser i aattoparsec Data.Attoparsec.Combinator Apply a parser without consuming any input.
type
RequestHeaders = [Header]http-types Network.HTTP.Types A list of Headers. Same type as ResponseHeaders, but useful to differentiate in type signatures.
type
ResponseHeaders = [Header]http-types Network.HTTP.Types A list of Headers. Same type as RequestHeaders, but useful to differentiate in type signatures.
-
http-types Network.HTTP.Types HEAD Method
requestHeaderFieldsTooLarge431 :: Statushttp-types Network.HTTP.Types Request Header Fields Too Large 431 (RFC 6585)
type
RequestHeaders = [Header]http-types Network.HTTP.Types.Header A list of Headers. Same type as ResponseHeaders, but useful to differentiate in type signatures.
type
ResponseHeaders = [Header]http-types Network.HTTP.Types.Header A list of Headers. Same type as RequestHeaders, but useful to differentiate in type signatures.
-
http-types Network.HTTP.Types.Method HEAD Method
requestHeaderFieldsTooLarge431 :: Statushttp-types Network.HTTP.Types.Status Request Header Fields Too Large 431 (RFC 6585)
_head :: Cons s s a a => Traversal' s alens Control.Lens.Combinators A Traversal reading and writing to the head of a non-empty container.
>>> [a,b,c]^? _head Just a
>>> [a,b,c] & _head .~ d [d,b,c]
>>> [a,b,c] & _head %~ f [f a,b,c]
>>> [] & _head %~ f []
>>> [1,2,3]^?!_head 1
>>> []^?_head Nothing
>>> [1,2]^?_head Just 1
>>> [] & _head .~ 1 []
>>> [0] & _head .~ 2 [2]
>>> [0,1] & _head .~ 2 [2,1]
This isn't limited to lists. For instance you can also traverse the head of a Seq:>>> Seq.fromList [a,b,c,d] & _head %~ f fromList [f a,b,c,d]
>>> Seq.fromList [] ^? _head Nothing
>>> Seq.fromList [a,b,c,d] ^? _head Just a
_head :: Traversal' [a] a _head :: Traversal' (Seq a) a _head :: Traversal' (Vector a) a