[Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

Arnaud Bailly arnaud.oqube at gmail.com
Thu Jun 10 00:28:24 EDT 2010

I did:

ghc-pkg unregister bytestring-

then restarted emacs and it works now. Don't now if ther weill be
side-effects on other packages...

Thanks for the tip.


On Thu, Jun 10, 2010 at 6:15 AM, Arnaud Bailly <arnaud.oqube at gmail.com> wrote:
> Yes, I have two versions installed , and Here is the
> output of ghc-pkg -l:
> d:/Program Files/Haskell Platform/2009.2.0.2\package.conf:
>    Cabal-, GLUT-, HSlim-0.1, HTTP-4000.0.6,
>    HUnit-, OpenGL-, QuickCheck-,
>    QuickCheck-, Win32-, array-, base-,
>    base-, bytestring-, bytestring-,
>    cgi-3001.1.7.1, containers-, directory-,
>    (dph-base-0.3), (dph-par-0.3), (dph-prim-interface-0.3),
>    (dph-prim-par-0.3), (dph-prim-seq-0.3), (dph-seq-0.3),
>    extensible-exceptions-, fgl-, filepath-,
>    (ghc-6.10.4), ghc-prim-, haddock-2.4.2, haskell-src-,
>    haskell98-, hpc-, html-, integer-,
>    mtl-, network-, old-locale-, old-time-,
>    packedstring-, parallel-, parsec-,
>    pretty-, process-, random-,
>    regex-base-, regex-compat-, regex-posix-,
>    rts-1.0, stm-, syb-, template-haskell-,
>    time-, utf8-string-0.3.6, xhtml-3000.2.0.1, zlib-
> However, I tried to force the version I use to be and it does
> not work as ghc itself seems to require, as pointed out by
> Ivan. I did not try to remove one or the other however.
> Arnaud
> On Thu, Jun 10, 2010 at 12:13 AM, Ivan Lazar Miljenovic
> <ivan.miljenovic at gmail.com> wrote:
>> Don Stewart <dons at galois.com> writes:
>>> arnaud.oqube:
>>>> Hello,
>>>> I have a strange issue which sprang today out of nowhere. When I load
>>>> a certain file using bytestring package in Ghci using emacs, I got the
>>>> following error:
>>>> Couldn't match expected type `Data.ByteString.Internal.ByteString'
>>>>            against inferred type
>>>> `bytestring-'
>>>>     In the second argument of `hPutStrLn', namely `(fromString msgs)'
>>>>     In a stmt of a 'do' expression: hPutStrLn cnx (fromString msgs)
>>>> The same file compiles fine on the command-line. I have a single
>>>> installation of haskell platform, using ghc 6.10.4, on windows XP.
>>> Looks like you might have two versions of bytestring installed (ghc-pkg
>>> list bytestring) and are attempting to combine them. The diamond
>>> dependency problem.
>>>     * delete the old version (ghc-pkg unregister)
>> Isn't the old version likely to be the one that comes with GHC and hence
>> shouldn't be touched?
>> --
>> Ivan Lazar Miljenovic
>> Ivan.Miljenovic at gmail.com
>> IvanMiljenovic.wordpress.com

More information about the Haskell-Cafe mailing list