Example doesn't work.
reygoch opened this issue · 4 comments
reygoch commented
I've copied the example available in the readme file and it doesn't work and I can't figure out why. I'm getting the following error:
C:\Users\crow\Desktop\cookster\src\Cookster\Validation.hs:33:25: error:
* Expecting one fewer arguments to `FormParser LoginFields Text m'
Expected kind `* -> *',
but `FormParser LoginFields Text m' has kind `*'
* In the type signature:
loginForm :: Monad m => FormParser LoginFields Text m LoginForm
|
33 | loginForm :: Monad m => FormParser LoginFields Text m LoginForm
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
C:\Users\crow\Desktop\cookster\src\Cookster\Validation.hs:33:48: error:
* Expected kind `* -> *', but `Text' has kind `*'
* In the second argument of `FormParser', namely `Text'
In the type signature:
loginForm :: Monad m => FormParser LoginFields Text m LoginForm
|
33 | loginForm :: Monad m => FormParser LoginFields Text m LoginForm
| ^^^^
C:\Users\crow\Desktop\cookster\src\Cookster\Validation.hs:33:53: error:
* Expecting one more argument to `m'
Expected a type, but `m' has kind `* -> *'
* In the third argument of `FormParser', namely `m'
In the type signature:
loginForm :: Monad m => FormParser LoginFields Text m LoginForm
|
33 | loginForm :: Monad m => FormParser LoginFields Text m LoginForm
| ^
mrkkrp commented
Which version of the library you're trying to use?
mrkkrp commented
Right. So the example in current master
is for the latest version, 1.1.0 (also works with 1.0.0). Stackage apparently included the fresh readme because forma-1.1.0
is in nightly snapshots. You can go to Hackage though and look at the older version of readme there: