on master help sign in
Document listTable and nonEmptyTable
3d54aa7Ollie Charles
src/Rel8/Table/List.hs+1
@@ -117,6 +117,7 @@ instance Table Expr a => Monoid (ListTable a) where
117 mempty = ListTable $ hempty $ \_ -> E . sempty
117 mempty = ListTable $ hempty $ \_ -> E . sempty
118
118
119
119
120+-- | Construct a @ListTable@ from a list of expressions.
120listTable :: Table Expr a => [a] -> ListTable a
121listTable :: Table Expr a => [a] -> ListTable a
121listTable =
122listTable =
122 ListTable .
123 ListTable .
src/Rel8/Table/NonEmpty.hs+1
@@ -109,6 +109,7 @@ instance Table Expr a => Semigroup (NonEmptyTable a) where
109 happend (\_ _ (E a) (E b) -> E (sappend1 a b)) as bs
109 happend (\_ _ (E a) (E b) -> E (sappend1 a b)) as bs
110
110
111
111
112+-- | Construct a @NonEmptyTable@ from a non-empty list of expressions.
112nonEmptyTable :: Table Expr a => NonEmpty a -> NonEmptyTable a
113nonEmptyTable :: Table Expr a => NonEmpty a -> NonEmptyTable a
113nonEmptyTable =
114nonEmptyTable =
114 NonEmptyTable .
115 NonEmptyTable .