When learning about Control.Arrow
and Haskell's built-in proc
notation, I had the idea that this language might prove very useful as an eDSL for general monoidal categories (using ***
for tensor and >>>
for composition), if only the Arrow
typeclass were generalized to allow a general tens :: * -> * -> *
operation rather than Arrow
's (,) : * -> * -> *
.
After doing some research, I found GArrows
, which seem to fit my needs. However, the linked Garrow
typeclass comes bundled with the so-called "HetMet" GHC extensions, and support for other features that (for the time being, anyway), I don't have much use for, such as "modal types".
Given that I would like to be able to use such a GArrow
typeclass without having to install non-standard GHC extensions:
Is there an actual (somewhat standardized) library on Hackage that meets my needs for such a generalized arrow typeclass?
Given such a library, is there any way to use such a
GArrow
type class with a "generalizedproc
" notation without having to cook up my own GHC extension? (WithRebindableSyntax
perhaps?)
Note: Also, I'm fine with using quasiquotation for a generalized proc
notation. So perhaps it wouldn't be too difficult to modify something like this to suit my needs.
constrained-categories
if it helps. – Cinchona