purescript-contrib / purescript-coroutines

Computations which can suspend their execution and return control to their invoker
MIT License
38 stars 11 forks source link

The test / example does not build anymore #13

Closed ghost closed 8 years ago

ghost commented 8 years ago

The commented test:

main :: forall eff. Eff (console :: CONSOLE | eff) Unit
main =
  runProcess (nats $~ showing $$ printer)

Does not work for me with PureScript 0.9.1. The compiler says:

  Could not match type

    Transform t3

  with type

    Emit

while trying to match type Transform t3 String
  with type Emit t0
while checking that expression showing
  has type FreeT (Emit t0) t1 t2
in value declaration main

where t2 is an unknown type
      t1 is an unknown type
      t0 is an unknown type
      t3 is an unknown type
ghost commented 8 years ago

I've figured it out, it should be:

main :: forall eff. Eff (console :: CONSOLE | eff) Unit
main =
  runProcess (nats $$ showing ~$ printer)
paf31 commented 8 years ago

This will be fixed in the next release, thanks.