[arch-haskell] Problem with Server.Helpers
edgar at ymonad.com
edgar at ymonad.com
Tue Mar 31 14:53:18 EDT 2009
Hi,
I installed haskell-happstack-helpers from AUR and I'm having some
problems with the function exactdir on Happstack.Server.Helpers. The
problem is that I can load normally the module, but the type of exactdir
function is:
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Happstack.Helpers
Prelude Happstack.Helpers> :t exactdir
exactdir :: (Monad m) =>
String
->
happstack-server-0.2.1:Happstack.Server.SimpleHTTP.ServerPartT
m a
->
happstack-server-0.2.1:Happstack.Server.SimpleHTTP.ServerPartT
m a
And ghc doesn't recognize when I pass a ServerPartT m a to exactdir.
Prelude Happstack.Helpers Happstack.Server> simpleHTTP nullConf $
exactdir "/about" $ ok "Hello"
<interactive>:1:22:
Couldn't match expected type `ServerPartT IO a'
against inferred type
`happstack-server-0.2.1:Happstack.Server.SimpleHTTP.ServerPartT
m [Char]'
In the second argument of `($)', namely
`exactdir "/about" $ ok "Hello"'
In the expression:
simpleHTTP nullConf $ exactdir "/about" $ ok "Hello"
In the definition of `it':
it = simpleHTTP nullConf $ exactdir "/about" $ ok "Hello"
But if I copy the source of exactdir (and spsIf too) to the file where I
use simpleHTTP the type checks correctly. Any ideas?
Edgar
More information about the arch-haskell
mailing list