[arch-haskell] Problem with Server.Helpers

edgar at ymonad.com edgar at ymonad.com
Sat Oct 12 07:34:38 UTC 2013


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) =>
                    m a
                    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"
       Couldn't match expected type `ServerPartT IO a'
              against inferred type
                                       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?


More information about the arch-haskell mailing list