on master help sign in
Document listTable and nonEmptyTable
commit3d54aa780b4ead4c13fab97ef33f2f9e12afe0e5 authorOllie Charles <ollie@ocharles.org.uk> dateFri 18 Jun 2021, 11:33 (5 years ago) parent1a3c3c1
2 files changed+2
src/Rel8/Table/List.hs+1 src/Rel8/Table/NonEmpty.hs+1
src/Rel8/Table/List.hs+1
@@ -117,6 +117,7 @@ instance Table Expr a => Monoid (ListTable a) where
117117 mempty = ListTable $ hempty $ \_ -> E . sempty
118118
119119
120+-- | Construct a @ListTable@ from a list of expressions.
120121listTable :: Table Expr a => [a] -> ListTable a
121122listTable =
122123 ListTable .
src/Rel8/Table/NonEmpty.hs+1
@@ -109,6 +109,7 @@ instance Table Expr a => Semigroup (NonEmptyTable a) where
109109 happend (\_ _ (E a) (E b) -> E (sappend1 a b)) as bs
110110
111111
112+-- | Construct a @NonEmptyTable@ from a non-empty list of expressions.
112113nonEmptyTable :: Table Expr a => NonEmpty a -> NonEmptyTable a
113114nonEmptyTable =
114115 NonEmptyTable .