morphismtech / squeal

Squeal, a deep embedding of SQL in Haskell
352 stars 32 forks source link

New `Prepared` statement type and `prepare` functions #314

Closed echatav closed 2 years ago

echatav commented 2 years ago

Introduces new Prepared statement type as well as new functions prepare and prepare_ to construct Prepared statements in a MonadPQ. This generalizes and factors out of executePrepared from earlier.

Prepared has many instances, notably Functor, Profunctor, Traversing, Category and Arrow.

The PR also adds MonadFix, Alternative and MonadPlus instances to PQ.