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.

  1. head :: List2 a -> a

    Agda Agda.Utils.List2

    Safe. O(1).

  2. head :: BinList a -> a

    binary-list Data.BinaryList

    O(log n). Get the first element of a binary list.

  3. head :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-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"

  4. head :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-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"

  5. head :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-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"

  6. head :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-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"

  7. head :: forall (n :: Natural) a . Vec (n + 1) a -> a

    clash-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"

  8. head :: HasCallStack => [a] -> a

    dimensional 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
    

  9. head :: HasCallStack => [a] -> a

    distribution-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
    

  10. head :: HasCallStack => [a] -> a

    faktory 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
    

Page 14 of many | Previous | Next