ListWriter-0.1.0.0: define a list constant using Monadic syntax other than overhead [,]

CopyrightBSD
Maintainerylilarry@gmail.com
StabilityExperimental
PortabilityNon-portable (GHC extensions)
Safe HaskellSafe
LanguageHaskell2010

Syntax.ListWriter

Description

This package allows you to define a list constant using Monadic syntax.

It can be used to define a list constant in your program in a better looking syntax than overhead [, ], and ,.

Other than that the package is not really useful.

Example

listA :: [Int]
listA = toList $ do
   element 1
   element 2
   element 3
>>> print listA
[1,2,3]

Documentation

type ListM a = ListM' a () Source

fromList :: [a] -> ListM a Source

toList :: ListM a -> [a] Source

element :: a -> ListM a Source