Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. toList :: forall (n :: Nat) a . SNatI n => Vec n a -> [a]

    vec Data.Vec.Lazy.Inline

    Convert Vec to list.

    >>> toList $ 'f' ::: 'o' ::: 'o' ::: VNil
    "foo"
    

  2. fromList :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)

    vec Data.Vec.Pull

    Convert list [a] to Vec n a. Returns Nothing if lengths don't match exactly.

    >>> L.fromPull <$> fromList "foo" :: Maybe (L.Vec N.Nat3 Char)
    Just ('f' ::: 'o' ::: 'o' ::: VNil)
    
    >>> L.fromPull <$> fromList "quux" :: Maybe (L.Vec N.Nat3 Char)
    Nothing
    
    >>> L.fromPull <$> fromList "xy" :: Maybe (L.Vec N.Nat3 Char)
    Nothing
    

  3. fromListPrefix :: forall (n :: Nat) a . SNatI n => [a] -> Maybe (Vec n a)

    vec Data.Vec.Pull

    Convert list [a] to Vec n a. Returns Nothing if input list is too short.

    >>> L.fromPull <$> fromListPrefix "foo" :: Maybe (L.Vec N.Nat3 Char)
    Just ('f' ::: 'o' ::: 'o' ::: VNil)
    
    >>> L.fromPull <$> fromListPrefix "quux" :: Maybe (L.Vec N.Nat3 Char)
    Just ('q' ::: 'u' ::: 'u' ::: VNil)
    
    >>> L.fromPull <$> fromListPrefix "xy" :: Maybe (L.Vec N.Nat3 Char)
    Nothing
    

  4. reifyList :: [a] -> (forall (n :: Nat) . SNatI n => Vec n a -> r) -> r

    vec Data.Vec.Pull

    Reify any list [a] to Vec n a.

    >>> reifyList "foo" length
    3
    

  5. toList :: forall (n :: Nat) a . SNatI n => Vec n a -> [a]

    vec Data.Vec.Pull

    Convert Vec to list.

  6. fromList :: [String] -> Trie

    word-trie Data.Trie

    Take a list of String and compress it into a Trie

  7. toList :: Trie -> [String]

    word-trie Data.Trie

    Take a trie and expand it into the strings that it represents

  8. fromList :: forall ik k v . (Ord k, Ord ik, Enum ik, Bounded ik) => Proxy ik -> [(NonEmpty k, v)] -> MKMap k v

    yarn-lock Data.MultiKeyedMap

    Build a map from a list of key/value pairs.

  9. toList :: MKMap k v -> [(NonEmpty k, v)]

    yarn-lock Data.MultiKeyedMap

    Convert the map to a list of key/value pairs.

  10. fromList :: (a -> a -> Ordering) -> (a -> Val) -> [a] -> FTree a

    FenwickTree Data.Tree.Fenwick

    Creates a tree from a list and helper functions: compare, and value.

Page 231 of many | Previous | Next