Re: unsafeness of unsafeInterleaveIO

2005-06-10 Thread Andre Pang
"unsafe". OK, that's more-or-less what I thought. Thanks Remi! -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

unsafeness of unsafeInterleaveIO

2005-06-10 Thread Andre Pang
G'day all, Just looking at the documentation for System.IO.unsafeInterleaveIO, what exactly is unsafe about it? -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> ___ Glasgow-haskell-users mailing list Glasgow-ha

Re: Can't compile GHC

2005-05-09 Thread Andre Pang
do about that, besides hope for a new Sparc maintainer. However, hopefully the documentation will be updated by one of the GHC hackers so that what you experienced won't happen again! -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> __

Re: multiple versions of ghc

2005-05-05 Thread Andre Pang
ee no reason why it wouldn't work.) 1. http://www.sysinternals.com/ntw2k/source/misc.shtml#junction -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haske

Re: Linking shared libraries

2005-04-24 Thread Andre Pang
I have been missing that could help me? If I understand you correctly, all you have to do is pass the -lLibraryName flag on the GHC command-line, just as you would with gcc. -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com

Re: Another GHC 6.4 Release Candidate Binary for Mac OS X

2005-03-09 Thread Andre Pang
first year at university ;). Thanks Wolfgang, GHC's Mac OS X support has gone from non-existent to superior in the past two-three years largely because of you! -- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/> ___

Re: GHC 6.4 Release Candidate Binary for Mac OS X

2005-03-08 Thread Andre Pang
c-6.4 /usr/local/lib/ghc-6.4/ghc-6.4 After doing that, it works great for me. ("Works great" = "the two test programs I chucked at it compiles and works with --make -dynamic). Awesome work, you da man Wolfgang. -- % Andre Pang : t

Re: Loading package GHC in GHCi

2005-01-09 Thread Andre Pang
asis, especially portably.) Even if this does work, it won't be possible whenever GHC uses platform-native shared libraries, in the far far future :). It's probably best to follow the other thread for feasible solutions to this, since it's already being discussed there. -- % A

Re: Scoped type variables

2004-12-18 Thread Andre Pang
ped, it seems intuitive to me that type variables should also be lexically scoped. -- % Andre Pang : trust.in.love.to.save ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: deriving...

2004-10-13 Thread Andre Pang
e way to do it. See "Template Haskell: A Report from the Field", a paper where Ian Lynagh does exactly what you're trying to do: http://www.haskell.org/th/papers.html -- % Andre Pang : trust.in.love.to.save ___ Glasgow-haskell-us

Re: turn off let floating

2004-04-20 Thread Andre Pang
was faster than using a global mutable counter via "unsafePerformIO $ newIORef ...". -- % Andre Pang : trust.in.love.to.save ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: ghc --make with .o files

2003-06-30 Thread Andre Pang
m all together at the end with a linking command. 'tis not a big hassle; I'm doing the linking without --make right now, and that works okay. The only downside is that you have to specify the packages to link in too. -- % Andre Pan

ghc --make with .o files

2003-06-28 Thread Andre Pang
HC integration with Apple's Project Builder and Xcode IDEs, and having a more intelligent linking process would be really useful :). -- % Andre Pang : just.your.average.bounty.hunter ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.has

Re: -no-hs-main behaviour

2002-12-16 Thread Andre Pang
On Wed, Dec 11, 2002 at 12:05:29PM -, Simon Marlow wrote: > > Is it possible to modify the behaviour so that if --make > > -no-hs-main is specified, GHC won't perform the link if it finds > > a main function? > > I think we should probably just have a -no-link option rather than > overload th

Re: Problems with main in a lib*.a. Is that a bug?

2002-12-11 Thread Andre Pang
On Tue, Dec 10, 2002 at 05:25:46PM +0100, Nicolas Oury wrote: > but when I write > > ghc -o test Main.hs -lSDLmain, ghc creates its own main, and it doesn't > work. Probably a stupid question, but if SDL supplies its own main function, then you don't have to put your functions in a module calle

-hidir separation of search/output paths

2002-12-10 Thread Andre Pang
On Tue, Dec 10, 2002 at 10:15:58PM +1100, Andre Pang wrote: > Is it possible to modify the behaviour so that if --make > -no-hs-main is specified, GHC won't perform the link if it finds > a main function? Oops, one more request which I almost forgot: -hidir currently specifies

-no-hs-main behaviour

2002-12-10 Thread Andre Pang
On Tue, Dec 10, 2002 at 10:35:22AM -, Simon Marlow wrote: > Even if you do need to use --make or GHCi, then I think you can still > specify all the source files on the command line. While on the subject of GHC's build options, can we change the behaviour of -no-hs-main when it's used with -

RuntimeLoader now works on Mac OS X

2002-12-09 Thread Andre Pang
Thanks to the amazing work by Wolfgang Thaller on GHC for Mac OS X, it was trivial to port the RuntimeLoader to work on Mac OS X (or Darwin, if you want to be pedantic). The runtime loader enables a GHC program to load object files (.o) at runtime and load functions in them, much like how you ca

Re: Proposals for changes to searching behaviour

2002-12-09 Thread Andre Pang
On Mon, Dec 09, 2002 at 12:03:10PM -0500, [EMAIL PROTECTED] wrote: > If, say, a library consists of the top-level module "A.B.C" and > a bunch of internal components "A.B.C.M1", "A.B.C.M2", etc., > I can't see why I should not be allowed to put them all in one > directory. I think that's the sel

Re: Proposals for changes to searching behaviour

2002-12-09 Thread Andre Pang
On Mon, Dec 09, 2002 at 12:40:18PM -, Simon Marlow wrote: > - The sources for a module A.B.C would be allowed to be placed > in either A.B.C.hs or A/B/C.hs relative to one of the directories > in the search path. Currently only A/B/C.hs is allowed. > > This is an easy change to

Re: MacOS X (10.2.2) standalone ghc app

2002-12-02 Thread Andre Pang
On Mon, Dec 02, 2002 at 11:47:41PM +0100, Wolfgang Thaller wrote: > >I'm trying to deliver a self contained app that I developed with ghc > >5.04.1 on Mac OS X (10.2.2). It all works well if ghc is installed on > >the machine, but on a user-machine w/o ghc, the following file is > >needed: > >

Re: incremental linking?

2002-11-27 Thread Andre Pang
On Wed, Nov 27, 2002 at 03:55:54PM -, Simon Marlow wrote: > Those who experience long link times (longer than a few seconds), please > reply with your > > - platform / OS version > - versions of relevent things (GHC, GCC, binutils). > - time to link 'main = print "hello"'. Platform: De

Re: incremental linking?

2002-11-27 Thread Andre Pang
On Wed, Nov 27, 2002 at 09:50:56AM -, Simon Marlow wrote: > > More fun with Haskell-in-the-large: linking time has become the > > main bottleneck in our development cycle. The standard solution > > would be to use an incremental linker, but it seems that gnu does > > not yet support this:-| >

Dynamic/runtime loading with GHC

2002-09-21 Thread Andre Pang
Hi all, I've whipped up an example tarball of how to do "runtime loading" (similar to dynamic loading, a.k.a. dlopen() or LoadLibrary()) in GHC. You can find it here: http://www.algorithm.com.au/wiki/hacking/haskell.ghc_runtime_loading It's a little example stdin text filter program, that

Re: possible readline license problem with ghc and -package util

2002-06-12 Thread Andre Pang
On Wed, Jun 12, 2002 at 10:10:15AM +0200, Wolfgang Thaller wrote: > > 3. Developer wins because lots of people like the GPL, and > >any development they do with the GPL is guaranteed to go > >back to the community. This may not occur all the time if > >you only use

Re: possible readline license problem with ghc and -package util

2002-06-11 Thread Andre Pang
On Tue, Jun 11, 2002 at 04:18:53PM +0100, Simon Marlow wrote: > I think realistically we have to ditch readline for GHCi and > use something with a friendlier license. BSD's libedit is > a possibility. Here are some less tragic solutions I can think of: 1. Dual-license GHC under _both_ the

Re: Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
On Sat, Jun 01, 2002 at 07:56:39PM +0100, Alastair Reid wrote: > Your Typeable instance looks like this: > > > instance Typeable FootnoteData where > >typeOf _ = mkAppTy (mkTyCon "FootnoteData") [typeOf ("Foo" :: String), typeOf >(7 :: Int)] > > This should be written: > > > instance Type

Re: Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
On Sat, Jun 01, 2002 at 11:01:57PM +1000, Andre Pang wrote: > It seems that the fromDynamic and fromDyn functions seem to work > if you load your module into GHCI, but they don't work when you > compile it into a stand-alone executable with GHC. .. unless you compile it with -O2

Dynamic types: GHCI works, GHC doesn't?

2002-06-01 Thread Andre Pang
Hi all, I'm trying to get a grip on the Dynamic types stuff supplied with GHC, and I'm not sure if I'm doing something wrong, or whether I've found a bug. It seems that the fromDynamic and fromDyn functions seem to work if you load your module into GHCI, but they don't work when you compile it i

Re: Runtime importing of modules in GHC

2002-05-27 Thread Andre Pang
On Mon, May 27, 2002 at 10:57:18AM +0100, Simon Marlow wrote: > > So, is there some wizardry out there which allows using the RTS > > Linker to load up .o modules which are not created with the FFI? > > I've been experimenting with it, and I just get segfaults if > > I try to load the adder_closu

Re: Runtime importing of modules in GHC

2002-05-26 Thread Andre Pang
On Mon, May 27, 2002 at 04:31:02PM +1000, Andre Pang wrote: > The concept: You want to have the equivalent of dlopen(); i.e. be > able to tell the Haskell runtime system to import a module and > call functions in that module. As an example, say there's > a function called adder

Runtime importing of modules in GHC

2002-05-26 Thread Andre Pang
Hi all, Manuel Chakravarty has helped me[1] with getting runtime importing of modules (a.k.a. dynamic loading) working in GHC on Linux. It should work on Windows, too. The concept: You want to have the equivalent of dlopen(); i.e. be able to tell the Haskell runtime system to import a module an