Existential datatypes with contexts crash ghci

Lauri Alanko la at iki.fi
Sun Apr 29 11:39:25 EDT 2001


Hello. Given the source:


module GHCITst where

data Q = forall x . Show x => Q x

showQ (Q x) = show x


GHCi behaves like this:

   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 5.01, For Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package std ... linking ... done.
Prelude> :l GHCITst
Compiling GHCITst          ( GHCITst.hs, interpreted )
Ok, modules loaded: GHCITst.
GHCITst> showQ (Q "foo")
Segmentation fault


The behavior is the same for 5.00. Tested both on debian-unstable, linux
2.4.4, glibc-2.2.2, gcc-2.95.4 and redhat 6.1, linux-2.2.19, glibc-2.1.3,
egcs-1.1.2.

Prithee, somebody fix this, I would _so_ love to migrate from hugs and get
all the yummy ghc extensions and hslibs when using an interpreter. :)


Lauri Alanko
la at iki.fi




More information about the Glasgow-haskell-bugs mailing list