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.
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.
messageList :: Message s => [s] -> Stringtypecheck-plugin-nat-simple Data.Log No documentation available.
type family
LookupList (keys :: [Factor Type]) (map :: LCSU Type) :: [Factor Type]units Data.Metrology No documentation available.
type family
NegList (a :: [Factor Type]) :: [Factor Type]units Data.Metrology negate a list of Factors