Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I think it can be solved by making non-terminating coroutines polymorphic in their return type, similar to how
forever
itself is defined:In that case, the functions could be used with
consume
by substitutingvoid ~ ()
; and at the same time, the fact that they never return is both signalled (by similarity with functions likeforever
andthrowIO
) and enforced by the type system (as GHC won't allow to stick any non-bottom value into a now rigid type variablevoid
).At least, that's what I did with my solution, and it seems to have worked.