hjugement-1.0.0.20170804: Majority Judgment.

Safe HaskellNone
LanguageHaskell2010

Hjugement

Synopsis

Documentation

class IsList l where #

The IsList class and its methods are intended to be used in conjunction with the OverloadedLists extension.

Since: 4.7.0.0

Minimal complete definition

fromList, toList

Associated Types

type Item l :: * #

The Item type function returns the type of items of the structure l.

Methods

fromList :: [Item l] -> l #

The fromList function constructs the structure l from the given list of Item l

fromListN :: Int -> [Item l] -> l #

The fromListN function takes the input list's length as a hint. Its behaviour should be equivalent to fromList. The hint can be used to construct the structure l more efficiently compared to fromList. If the given hint does not equal to the input list's length the behaviour of fromListN is not specified.

toList :: l -> [Item l] #

The toList function extracts a list of Item l from the structure l. It should satisfy fromList . toList = id.

Instances

IsList CallStack

Be aware that 'fromList . toList = id' only for unfrozen CallStacks, since toList removes frozenness information.

Since: 4.9.0.0

Associated Types

type Item CallStack :: * #

IsList Version

Since: 4.8.0.0

Associated Types

type Item Version :: * #

IsList [a] 

Associated Types

type Item [a] :: * #

Methods

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

fromListN :: Int -> [Item [a]] -> [a] #

toList :: [a] -> [Item [a]] #

IsList (NonEmpty a) 

Associated Types

type Item (NonEmpty a) :: * #

Methods

fromList :: [Item (NonEmpty a)] -> NonEmpty a #

fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a #

toList :: NonEmpty a -> [Item (NonEmpty a)] #

Ord a => IsList (Set a) 

Associated Types

type Item (Set a) :: * #

Methods

fromList :: [Item (Set a)] -> Set a #

fromListN :: Int -> [Item (Set a)] -> Set a #

toList :: Set a -> [Item (Set a)] #

(Ord grade, Show grade) => IsList (Merit grade) # 

Associated Types

type Item (Merit grade) :: * #

Methods

fromList :: [Item (Merit grade)] -> Merit grade #

fromListN :: Int -> [Item (Merit grade)] -> Merit grade #

toList :: Merit grade -> [Item (Merit grade)] #

Ord k => IsList (Map k v) 

Associated Types

type Item (Map k v) :: * #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Ord prop, Show prop) => IsList (Merits prop grade) # 

Associated Types

type Item (Merits prop grade) :: * #

Methods

fromList :: [Item (Merits prop grade)] -> Merits prop grade #

fromListN :: Int -> [Item (Merits prop grade)] -> Merits prop grade #

toList :: Merits prop grade -> [Item (Merits prop grade)] #

(Ord judge, Show judge) => IsList (Opinions prop grade judge) # 

Associated Types

type Item (Opinions prop grade judge) :: * #

Methods

fromList :: [Item (Opinions prop grade judge)] -> Opinions prop grade judge #

fromListN :: Int -> [Item (Opinions prop grade judge)] -> Opinions prop grade judge #

toList :: Opinions prop grade judge -> [Item (Opinions prop grade judge)] #