[Haskell-cafe] Segmentation fault with realdine library

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Oct 23 18:38:21 EDT 2006

On Mon, 2006-10-23 at 20:18 -0200, Maurí­cio wrote:
>    Hi,
>    This small program says "Segmentation fault":
> module Main (Main.main) where
> import Data.Char
> import System.Time
> import System.Console.Readline
> main :: IO ()
> main = do
>      readKey
>      return ()
>    I don't understand anything about readline, so I probably should have 
> to call some function before readKey (by they way, I don't know what 
> readKey does). But I thought a segmentation fault is always something to 
> be reported.

Yes, I get the same result. It seems that one must use 'initialise'
first. I agree, it would be much nicer if you didn't have to do this and
if instead it would "Just Work"tm.


More information about the Haskell-Cafe mailing list