[darcs-users] darcs patch: Resolve issue1292: re-encode line input from the Haskeline backend.
Judah Jacobson
judah.jacobson at gmail.com
Thu Jan 22 18:05:13 UTC 2009
On Thu, Jan 22, 2009 at 1:59 AM, Eric Kow <kowey at darcs.net> wrote:
> By the way, I now get this complaint:
>
> src/Darcs/Utils.hs:49:7:
> Could not find module `System.Console.Haskeline.Encoding':
> Use -v to see a list of the files searched for.
>
> which I resolved with cabal update and cabal upgrade haskeline
>
> Could you update the configure test accordingly? Thanks!
I ran into a problem trying to do this. The only API change between
0.5 and 0.6 was the addition of System.Console.Haskeline.Encoding, so
I tried:
GHC_CHECK_MODULE(System.Console.Haskeline.Encoding( encode ),
haskeline,
encode ,,
AC_MSG_ERROR(Cannot find Haskeline; try installing
the Haskeline package >=0.6.0.))
but when autoconf compiles that it gets:
conftest.hs:2:12:
Ambiguous type variable `m' in the constraint:
`mtl-1.1.0.2:Control.Monad.Trans.MonadIO m'
arising from a use of `encode' at conftest.hs:2:12-17
I.e., it runs into the monomorphism restriction since encode has an
overloaded type.
The solution would seem to be to specify the type:
encode :: MonadIO m => String -> InputT m ByteString
but specifying that type requires importing two other modules
(Control.Monad.Trans and System.Console.Haskeline). Is that possible
with the current autoconf macros?
Thanks,
-Judah
More information about the darcs-users
mailing list