[web-devel] Question about happstack

Kyle Murphy orclev at gmail.com
Wed Apr 21 10:03:20 EDT 2010

 I fixed the issue by installing GHC 6.12, and the latest version of
haskell-platform. It worries me that when building against two different
versions of the same library ghc more or less fails silently. Near as I can
tell, it attempts to link against a new version of mtl, records the symbol
for MonadIO, then links in happstack, notices that there's no definition for
the MonadIO symbol referenced in happstack, and silently ignore the class
instance defined in happstack. This seems depressingly non-deterministic,
and makes me wonder how hard it would be to create some sort of check when
linking to see if two libraries define/reference different classes that have
the same name and at least print some sort of warning about it. The fact
that mtl defines MonadIO, but a different version than is referenced in
happstack should have been enough to at least generate a warning. Of course,
for all I know there is an option for GHC that provides such a warning, but
I've no idea what it is and it probably should be enabled by default anyway.

At this point I think anything remotely web-devel related has been covered,
so I think I'll take further discussion of this apparent disconnect between
class versions to either the #haskell channel, or maybe the haskell-cafe
mailing list.

-R. Kyle Murphy
Curiosity was framed, Ignorance killed the cat.

On Tue, Apr 20, 2010 at 15:24, Jeremy Shaw <jeremy at n-heptane.com> wrote:

> On Apr 20, 2010, at 9:02 AM, Kyle Murphy wrote:
> It also seems strange that this just started happening recently. I've
> upgraded a number of packages recently, but I can't say for sure what I
> changed since the last time I was able to compile something based on
> happstack successfully. Is it possible that some change with mtl or some
> other package is causing this error?
> I am guessing that some of the libraries you depend on are compiled against
> one version of mtl, and some are compiled against another version. This is
> not an error in itself. However, you will run into issues similar to what
> you have described when GHC tries to use version of MonadIO from different
> versions of the mtl library.
> Does "ghc-pkg describe mtl" show more than one version of mtl installed?
> What happens if you try to unregister the older version?
> This seems like an issues with the state of your installed system, and not
> something happstack specific..
> - jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/web-devel/attachments/20100421/da8670fa/attachment-0001.html

More information about the web-devel mailing list