24-days-of-purescript-2016
24-days-of-purescript-2016 copied to clipboard
Error in code for day 4
Day 4 has a link to http://try.purescript.org/?gist=ec91ebe17ca510f1ca36c8a535b292ac but that generates
No type class instance was found for
Control.Monad.Error.Class.MonadThrow String
(App
( console :: CONSOLE
| eff4
)
)
while applying a function throwError
of type MonadThrow t1 t2 => t1 -> t2 t3
to argument "Out of range!"
while checking that expression throwError "Out of range!"
has type t0 Unit
in value declaration example
where eff4 is a rigid type variable
bound at line 24, column 1 - line 27, column 22
t0 is an unknown type
t1 is an unknown type
t2 is an unknown type
t3 is an unknown type
Looks like you need to add
derive newtype instance monadThrowApp :: MonadThrow String (App eff)
since we refined MonadError
.