Possible typo in the new IxSet happstack crashcourse?

4 views
Skip to first unread message

kirstin

unread,
Jan 23, 2012, 11:05:50 PM1/23/12
to HAppS
There is:

>import Happstack.Server ( ..., method, ... )

followed by

> edit :: AcidState Blog -> ServerPart Response
> edit acid = do
...
> msum [ do method GET
...
, do method PUT
etc.


But I think 'method' should be 'methodM' (unless I'm using an old
version?)

(And much appreciation for the new examples, btw!)

Cheers,

kirstin

Jeremy Shaw

unread,
Jan 23, 2012, 11:45:44 PM1/23/12
to ha...@googlegroups.com
Thanks for the report!

methodM was deprecated in favor of method last month. (And the old
method implementation which has been deprecated for a long time was
removed). Somehow we ended up with 4 method* functions when 1 is
plenty. So, it is part of a medium term plan to have only 1 method
function.

To run the example in the final section of the acid-state section you
will need happstack-server 6.5 or greater because it adds some
additional type class instances for ReaderT. It's a bit unfortunate
that there is no .cabal file associated with the examples. The whole
tutorial build system could use a major overhaul. It get's a number of
things right (such as being able to extract and test that all the
examples work, automatic table of contents generation, etc). But ..
other things could be better :)

For now, anyway, the crashcourse is only tested to work against the
latest and greatest happstack. I think that is ok, since many people
reading it will be newcomers and have the latest version anyway?
Unless they are installing packages from debian, etc, in which case
they will be hopelessly out of date :-/ But, since most sections don't
get revised often (unless they fail to compile), the problem sort of
fixes itself over time.

In any case, it is great to get feedback on the tutorials! If there is
stuff you found confusing, missing, or misleading, I would love to
hear it. It's hard for me to tell if I am covering things well enough
sometimes because I am already so familiar with Haskell and Happstack.
The next section will be on HSP (because it is complicated, quirky,
and has essentially no documentation right now, but is still my
favorite templating solution). If you have requests for other topics,
I am happy to take those into consideration as well :)

- jeremy

> --
> You received this message because you are subscribed to the Google Groups "HAppS" group.
> To post to this group, send email to ha...@googlegroups.com.
> To unsubscribe from this group, send email to happs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/happs?hl=en.
>

Reply all
Reply to author
Forward
0 new messages