@@ -51,6 +51,9 @@ import Rel8.Type ( DBType )
5151import Data.Functor.Apply ( WrappedApplicative(..) )
5252
5353
54+-- | @ToExprs exprs a@ is evidence that the types @exprs@ and @a@ describe
55+-- essentially the same type, but @exprs@ is in the 'Expr' context, and @a@ is
56+-- in the 'Result' context.
5457type ToExprs :: Type -> Type -> Constraint
5558class Table Expr exprs => ToExprs exprs a where
5659 fromResult :: Columns exprs (Col Result) -> a
@@ -190,6 +193,8 @@ instance (KnownSpec spec, x ~ Col Expr spec) =>
190193 toResult = toColumns
191194
192195
196+-- | The @FromExprs@ type function maps a type in the @Expr@ context to the
197+-- corresponding type in the @Result@ context.
193198type FromExprs :: Type -> Type
194199type family FromExprs a
195200type instance FromExprs (Expr a) = a