I find myself having a lot of trouble figuring out how to generate terms for mutual recursive data types. Unfortunately, there are no coalgebra examples for the multi modules. It would be really helpful if there were an example of, for instance, randomly sampling terms of
data Value a i where
Const :: Int -> Value a Int
Pair :: a i -> a j -> Value a (i,j)
I find myself having a lot of trouble figuring out how to generate terms for mutual recursive data types. Unfortunately, there are no coalgebra examples for the multi modules. It would be really helpful if there were an example of, for instance, randomly sampling terms of
I had a look at the
GenTyped
class and instances, https://github.com/pa-ba/compdata/blob/master/benchmark/DataTypes/Comp.hs#L111-L171, but I find porting them to mutual recursive terms highly nontrivial.