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.
toListRev :: Monad m => Stream m a -> m [a]streamly-core Streamly.Internal.Data.Stream No documentation available.
fromList :: forall a (m :: Type -> Type) . [a] -> StreamK m astreamly-core Streamly.Internal.Data.StreamK No documentation available.
toList :: Monad m => StreamK m a -> m [a]streamly-core Streamly.Internal.Data.StreamK No documentation available.
fromList :: forall (m :: Type -> Type) a . Applicative m => Unfold m [a] astreamly-core Streamly.Internal.Data.Unfold Convert a list of pure values to a Stream
fromListM :: Applicative m => Unfold m [m a] astreamly-core Streamly.Internal.Data.Unfold Convert a list of monadic values to a Stream
displayList :: Display a => [a] -> Buildertext-display Data.Text.Display The method displayList is provided to allow for a specialised way to render lists of a certain value. This is used to render the list of Char as a string of characters enclosed in double quotes, rather than between square brackets and separated by commas.
Example
import qualified Data.Text.Lazy.Builder as TB instance Display Char where displayBuilder c = Builder.fromText $ Text.pack $ Text.singleton c displayList cs = Builder.fromText $ Text.pack $ Text.pack cs instance (Display a) => Display [a] where -- In this instance, 'displayBuilder' is defined in terms of 'displayList', which for most types -- is defined as the default written in the class declaration. -- But when a ~ Char, there is an explicit implementation that is selected instead, which -- provides the rendering of the character string between double quotes. displayBuilder = displayList
How implementations are selected
displayBuilder ([1,2,3] :: [Int]) → displayBuilder @[Int] = displayBuilderList @Int → Default `displayList` displayBuilder ("abc" :: [Char]) → displayBuilder @[Char] = displayBuilderList @Char → Custom `displayList`displayList :: Display a => [a] -> Buildertext-display Data.Text.Display.Core The method displayList is provided to allow for a specialised way to render lists of a certain value. This is used to render the list of Char as a string of characters enclosed in double quotes, rather than between square brackets and separated by commas.
Example
import qualified Data.Text.Lazy.Builder as TB instance Display Char where displayBuilder c = Builder.fromText $ Text.pack $ Text.singleton c displayList cs = Builder.fromText $ Text.pack $ Text.pack cs instance (Display a) => Display [a] where -- In this instance, 'displayBuilder' is defined in terms of 'displayList', which for most types -- is defined as the default written in the class declaration. -- But when a ~ Char, there is an explicit implementation that is selected instead, which -- provides the rendering of the character string between double quotes. displayBuilder = displayList
How implementations are selected
displayBuilder ([1,2,3] :: [Int]) → displayBuilder @[Int] = displayBuilderList @Int → Default `displayList` displayBuilder ("abc" :: [Char]) → displayBuilder @[Char] = displayBuilderList @Char → Custom `displayList`type family
NotSubList (a :: [k]) (b :: [k])type-fun TypeFun.Data.List No documentation available.
type family
SubList (a :: [k]) (b :: [k])type-fun TypeFun.Data.List Constrains that first argument is a sublist of second. Reduces to (Elem a1 b, Elem a2 b, Elem a3 b, ...)
type family
UnionList (l :: [[k]]) :: [k]type-fun TypeFun.Data.List No documentation available.