alpmestan / servant

Moved to http://github.com/haskell-servant
50 stars 1 forks source link

Add 'Mount' (analog to 'Capture', etc.) #9

Closed soenkehahn closed 10 years ago

soenkehahn commented 10 years ago

I'm not sure if I find this better than before, but it's a bit more consistent. Mount then works in the same way that Capture, RQBody, etc. work. I.e. :> doesn't treat mounting special.

@alpmestan, @jkarni: What do you think?

alpmestan commented 10 years ago

Mount sounds a bit scary for that simple combinator, doesn't it? How about Static?

So, you don't like "plain strings" there in the API type?

jkarni commented 10 years ago

Do we have any plans to reduce the boilerplate eventually? I think it's very important to make it (a) very simple and non-boilerplate-y to write a new route, and (b) very easy to read routes. "GET foo/:name/ handler", for instance, makes it really easy to figure out where "foo/bar" goes, whereas currently servant makes it pretty difficult. Adding Mount will my opinion only make it worse, unless we already have some general solution to this problem planned out.