Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coalgebra examples for multi #26

Open
tscholak opened this issue May 28, 2018 · 0 comments
Open

Coalgebra examples for multi #26

tscholak opened this issue May 28, 2018 · 0 comments

Comments

@tscholak
Copy link

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant