Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
head :: forall (n :: Natural) a . Vec (n + 1) a -> aclash-prelude Clash.Explicit.Prelude Extract the first element of a vector
>>> head (1:>2:>3:>Nil) 1
>>> head Nil <interactive>:... • Couldn't match type ‘1’ with ‘0’ Expected: Vec (0 + 1) a Actual: Vec 0 a • In the first argument of ‘head’, namely ‘Nil’ In the expression: head Nil In an equation for ‘it’: it = head Nil
# 448 "srcClashSized/Vector.hs"head :: forall (n :: Natural) a . Vec (n + 1) a -> aclash-prelude Clash.Explicit.Prelude.Safe Extract the first element of a vector
>>> head (1:>2:>3:>Nil) 1
>>> head Nil <interactive>:... • Couldn't match type ‘1’ with ‘0’ Expected: Vec (0 + 1) a Actual: Vec 0 a • In the first argument of ‘head’, namely ‘Nil’ In the expression: head Nil In an equation for ‘it’: it = head Nil
# 448 "srcClashSized/Vector.hs"head :: forall (n :: Natural) a . Vec (n + 1) a -> aclash-prelude Clash.Prelude Extract the first element of a vector
>>> head (1:>2:>3:>Nil) 1
>>> head Nil <interactive>:... • Couldn't match type ‘1’ with ‘0’ Expected: Vec (0 + 1) a Actual: Vec 0 a • In the first argument of ‘head’, namely ‘Nil’ In the expression: head Nil In an equation for ‘it’: it = head Nil
# 448 "srcClashSized/Vector.hs"head :: forall (n :: Natural) a . Vec (n + 1) a -> aclash-prelude Clash.Prelude.Safe Extract the first element of a vector
>>> head (1:>2:>3:>Nil) 1
>>> head Nil <interactive>:... • Couldn't match type ‘1’ with ‘0’ Expected: Vec (0 + 1) a Actual: Vec 0 a • In the first argument of ‘head’, namely ‘Nil’ In the expression: head Nil In an equation for ‘it’: it = head Nil
# 448 "srcClashSized/Vector.hs"head :: forall (n :: Natural) a . Vec (n + 1) a -> aclash-prelude Clash.Sized.Vector Extract the first element of a vector
>>> head (1:>2:>3:>Nil) 1
>>> head Nil <interactive>:... • Couldn't match type ‘1’ with ‘0’ Expected: Vec (0 + 1) a Actual: Vec 0 a • In the first argument of ‘head’, namely ‘Nil’ In the expression: head Nil In an equation for ‘it’: it = head Nil
# 448 "srcClashSized/Vector.hs"-
incipit-base Incipit.List Return Just the head of a list.
-
monad-par-extras Control.Monad.Par.AList O(n) take the head element of an AList NB. linear-time, because the list might look like this:
(((... `append` a) `append` b) `append` c)
head :: SymVal a => SList a -> SBV asbv Data.SBV.List head returns the first element of a list. Unspecified if the list is empty.
>>> prove $ \c -> head (singleton c) .== (c :: SInteger) Q.E.D.
-
sbv Data.SBV.String head returns the head of a string. Unspecified if the string is empty.
>>> prove $ \c -> head (singleton c) .== c Q.E.D.
head :: forall (m :: Type -> Type) a . Monad m => Fold m a (Maybe a)streamly-core Streamly.Data.Fold Deprecated: Please use "one" instead