Re: Using

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: So is it only possible to load home-grown/non-standard modules when also doing a regular import? Here I really mean: So is it only possible to load home-grown/non-standard modules _without_ also doing a regular import? I could also pose

Re: Using GHC as a library with own functions makes runStmt return RunBreak

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: Hi I am trying to use GHC as a library. From runStmt, I want to load and run functions from a home-grown module. Lets call my home-grown module HomeGrown.hs. I have tried to model my application after http://haskell.org/sitewiki

Using GHC as a library with own functions makes runStmt return RunBreak

2008-01-30 Thread Mads Lindstrøm
in MyPrelude, runStmt also returned RunBreak. So is it only possible to load home-grown/non-standard modules when also doing a regular import? Greetings, Mads Lindstrøm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

(Compile ghc 6.7) Cannot find package base

2007-08-12 Thread Mads Lindstrøm
dependencies: hpc, template-haskell, readline, unix, Cabal, base, haskell98 If anybody is interested I got the complete build logs, but given there size 2.2 megabytes (180 kilo when compressed with gzip) I choose not to include them in the message. Greetings, Mads Lindstrøm

GHC as a library stalls when nobody is consuming it's output

2007-05-27 Thread Mads Lindstrøm
, if WxHaskell is not happy about threading, the answer is that I run the GUI and GHC as a library in separate processes. Greetings, Mads Lindstrøm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman

How to to terminate runStmt in GHC as a library

2007-05-20 Thread Mads Lindstrøm
. Greetings, Mads Lindstrøm module Main where -- Compile with: ghc -package ghc-6.6 --make StopingRunStmt.hs import qualified GHC import qualified Outputable import qualified Packages import qualified PackageConfig import DynFlags import System.IO import Control.Concurrent path = /usr/lib/ghc-6.6

Re: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi Look at System.Posix.IO I do not know if that module can do what you want. But it does deal with FileDescriptors and handles. Maybe the dup function can help you. According to http://www2.lib.uchicago.edu/~keith//tcl-course/topics/processes.html it does: The dup implements the dup system

RE: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi Simon The Interactive.hs program do not really redirect stdout. It intercepts calls to putStrLn and getLine via let definitions: mustWork let putStrLn = MyPrelude.myPutStrLn mustWork let getLine = MyPrelude.myGetLine -- mustWork either runs the given statement successfully

Re: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi While wrapIO works in most cases, try running this: :m +Control.Concurrent forkIO (let foo = do threadDelay 100; print A; foo in foo) I am not saying that this makes wrapIO unusable - just that it is not bulletproof. If not using forkIO is ok, then this is a much easier solution, than

Re: GHC as a library - getting output from GHCI

2007-05-06 Thread Mads Lindstrøm
Hi Pepe Pepe Iborra wrote: Mads On 04/05/2007, at 19:19, Mads Lindstrøm wrote: Hi Pepe I would have liked something cross-platform. Take a look at the unix-compat[1] package by Bjorn Bringert, although it looks like it won't help you. Maybe it can be extended. Also

GHC as a library - getting output from GHCI

2007-05-04 Thread Mads Lindstrøm
do not see and easy way to get hold of it. The only way I see, is having the GUI in one process and GHC as a library in another process. Do anybody know of an easy way to get hold of the output from GHC as a library - the output currently printed to standard output? Greetings, Mads Lindstrøm