bootstarted / effects

Almost-extensible effects for Elixir.
27 stars 0 forks source link

defeffect functions return a different type than the one handle/1 expects #11

Open rosacris opened 7 years ago

rosacris commented 7 years ago

Hi,

I've been trying to experiment with the library but I'm stuck with an issue that it can be easily spotted in the documentation:

# Create the computation. 
computation = MessageApp.greet "Fred" 
# Perform the computation. 
MessageInterpreter.Console.handle(computation)

The typespec of computation is MessageEffect.t, however the typespec of MessageInterpreter.Console.handle/1 is MessageEffect.Say.e

When I try to run a minimal example it fails exactly for this reason.