Hoogle Search
Within LTS Haskell 24.36 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
module Data.
IndexedListLiterals No documentation available.
-
indexed-list-literals Data.IndexedListLiterals A type class which allows you to write tuples which can be transformed to and from a list the length of the list is also provided as a Nat
-
indexed-list-literals Data.IndexedListLiterals > fromList [1,2,3] :: Maybe (Int, Int, Int) Just (1,2,3)
> fromList ["word","up"] :: Maybe (String, String, String) Nothing
> fromList ['z'] :: Maybe (Only Char) Just (Only 'z')
fromList' :: IndexedListLiterals input length output => [output] -> inputindexed-list-literals Data.IndexedListLiterals a partial fromList with bad error messages
-
indexed-list-literals Data.IndexedListLiterals the fromList variants take a list and convert it into a tuple it's sort of the inverse of toList
> fromListP (len @3) [1,2,3] Just (1,2,3)
> fromListP (len @3) ["word","up"] Nothing
> fromListP (len @1) ['z'] Just (Only 'z') @
toList :: IndexedListLiterals input length output => input -> [output]indexed-list-literals Data.IndexedListLiterals > toList (Only 1) [1]
> toList (1,2,3) [1,2,3]
> toList ZeroTuple []
fromAscList :: [Int] -> IntSetintern Data.Interned.IntSet O(n). Build a set from an ascending list of elements. The precondition (input list is ascending) is not checked.
fromDistinctAscList :: [Int] -> IntSetintern Data.Interned.IntSet O(n). Build a set from an ascending list of distinct elements. The precondition (input list is strictly ascending) is not checked.
-
intern Data.Interned.IntSet O(n*min(n,W)). Create a set from a list of integers.
-
intern Data.Interned.IntSet O(n). Convert the set to an ascending list of elements.