hgeometry-combinatorial
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2021

HGeometry.Foldable.Util

Description

Convenience classes for types that can be built from foldable collections.

Synopsis

Documentation

class HasFromFoldable (f :: Type -> Type) where Source #

Types that can be built from foldable collections

Minimal complete definition

fromList

Methods

fromFoldable :: Foldable g => g a -> f a Source #

Build the data structure from something that is foldable.

fromList :: [a] -> f a Source #

Build the data structure from a list of elements

Instances

Instances details
HasFromFoldable Seq Source # 
Instance details

Defined in HGeometry.Foldable.Util

Methods

fromFoldable :: Foldable g => g a -> Seq a Source #

fromList :: [a] -> Seq a Source #

HasFromFoldable Vector Source # 
Instance details

Defined in HGeometry.Foldable.Util

Methods

fromFoldable :: Foldable g => g a -> Vector a Source #

fromList :: [a] -> Vector a Source #

HasFromFoldable [] Source # 
Instance details

Defined in HGeometry.Foldable.Util

Methods

fromFoldable :: Foldable g => g a -> [a] Source #

fromList :: [a] -> [a] Source #

Monoid c => HasFromFoldable (Const c :: Type -> Type) Source # 
Instance details

Defined in HGeometry.Foldable.Util

Methods

fromFoldable :: Foldable g => g a -> Const c a Source #

fromList :: [a] -> Const c a Source #

HasFromFoldable v => HasFromFoldable (Cyclic v) Source # 
Instance details

Defined in HGeometry.Cyclic

Methods

fromFoldable :: Foldable g => g a -> Cyclic v a Source #

fromList :: [a] -> Cyclic v a Source #

class HasFromFoldable1 (f :: Type -> Type) where Source #

Types that can be built from non-empty foldable collections

Minimal complete definition

fromNonEmpty

Methods

fromFoldable1 :: Foldable1 g => g a -> f a Source #

Build the data structure from something that is foldable and has at least one element.

fromNonEmpty :: NonEmpty a -> f a Source #

Build the data structure from a non-empty list of elements