Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
Agda Agda.Utils.List2 Safe. O(1).
-
binary-list Data.BinaryList O(log n). Get the first element of a binary list.
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
# 445 "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
# 445 "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
# 445 "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
# 445 "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
# 445 "srcClashSized/Vector.hs"head :: HasCallStack => [a] -> adimensional Numeric.Units.Dimensional.Prelude Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.
Examples
>>> head [1, 2, 3] 1
>>> head [1..] 1
>>> head [] *** Exception: Prelude.head: empty list
head :: HasCallStack => [a] -> adistribution-opensuse OpenSuse.Prelude Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.
Examples
>>> head [1, 2, 3] 1
>>> head [1..] 1
>>> head [] *** Exception: Prelude.head: empty list
head :: HasCallStack => [a] -> afaktory Faktory.Prelude Extract the first element of a list, which must be non-empty. To disable the warning about partiality put {-# OPTIONS_GHC -Wno-x-partial -Wno-unrecognised-warning-flags #-} at the top of the file. To disable it throughout a package put the same options into ghc-options section of Cabal file. To disable it in GHCi put :set -Wno-x-partial -Wno-unrecognised-warning-flags into ~/.ghci config file. See also the migration guide.
Examples
>>> head [1, 2, 3] 1
>>> head [1..] 1
>>> head [] *** Exception: Prelude.head: empty list