Document listTable and nonEmptyTable

This commit is contained in:
Ollie Charles 2021-06-18 11:33:24 +01:00
parent 1a3c3c139d
commit 3d54aa780b
2 changed files with 2 additions and 0 deletions

View File

@ -117,6 +117,7 @@ instance Table Expr a => Monoid (ListTable a) where
mempty = ListTable $ hempty $ \_ -> E . sempty
-- | Construct a @ListTable@ from a list of expressions.
listTable :: Table Expr a => [a] -> ListTable a
listTable =
ListTable .

View File

@ -109,6 +109,7 @@ instance Table Expr a => Semigroup (NonEmptyTable a) where
happend (\_ _ (E a) (E b) -> E (sappend1 a b)) as bs
-- | Construct a @NonEmptyTable@ from a non-empty list of expressions.
nonEmptyTable :: Table Expr a => NonEmpty a -> NonEmptyTable a
nonEmptyTable =
NonEmptyTable .