#! for GHC?

2004-03-08 Thread Dean Herington
Can GHC be invoked somehow via the #! mechanism? Put another way, is there a GHC analogue to runhugs? ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: -static

2004-03-08 Thread Simon Marlow
In ghc/compiler/main/DriverFlags.hs machdepCCOpts includes a -static flag for some arches. Is this really necessary? I can't see any comments as to why, nor any real answers from a quick google. I can't remember why either. It causes this when compiling darcs on these arches:

Re: #! for GHC?

2004-03-08 Thread Hampus Ram
On Sat, Mar 06 2004, Dean Herington wrote: Can GHC be invoked somehow via the #! mechanism? Put another way, is there a GHC analogue to runhugs? Well, ghc now has an -e flag to evaluate stuff directly from the prompt (e.g. ghc -e Main.main Main.hs). But you can't execute shell-scripts from a

RE: #! for GHC?

2004-03-08 Thread Simon Marlow
Can GHC be invoked somehow via the #! mechanism? Put another way, is there a GHC analogue to runhugs? Almost, but not quite. Since 6.2, GHC has the -e switch for invoking expressions from the command line, which gets a step closer. GHC doesn't ignore the '#!' line yet, but I can add that.

RE: #! for GHC?

2004-03-08 Thread Simon Marlow
On Sat, Mar 06 2004, Dean Herington wrote: Can GHC be invoked somehow via the #! mechanism? Put another way, is there a GHC analogue to runhugs? Well, ghc now has an -e flag to evaluate stuff directly from the prompt (e.g. ghc -e Main.main Main.hs). But you can't execute

Re: #! for GHC?

2004-03-08 Thread Hampus Ram
On Mon, Mar 08 2004, Simon Marlow wrote: However, I just tried it on a recent Linux (RedHat 9) and it seems to accept nested #! scripts. It doesn't work for me though (it tries to run the first script (the Haskell module) with the interpreter for the second script (bash). Anyway, one cannot

RE: -static

2004-03-08 Thread Simon Marlow
On Mon, Mar 08, 2004 at 11:07:07AM -, Simon Marlow wrote: It causes this when compiling darcs on these arches: /usr/lib/ghc-6.2/libHSunix.a(User.o)(.text+0x2a2c): In function `s6T9_ret': : warning: Using 'getgrgid_r' in statically linked applications requires at

Polymorphic lists...

2004-03-08 Thread MR K P SCHUPKE
I needed a list which could handle items of different types for the database code I am writing. I have written a module implementing such a list based on dependant types (from Conor McBride: Faking It; Simulating Depandant Types in Haskell). Although McBride does not mention lists/vectors with

Re: -static

2004-03-08 Thread Ian Lynagh
On Mon, Mar 08, 2004 at 03:25:06PM +, Ian Lynagh wrote: On Mon, Mar 08, 2004 at 11:07:07AM -, Simon Marlow wrote: What platform? Does everything work if you remove the -static? alpha, powerpc and hppa so far. I expect the same will happen for mips and mipsel. If, on powerpc,

Re: Polymorphic lists...

2004-03-08 Thread Ralf Laemmel
I would like to see your code indeed ... it seems the attachment was missing. Anyway, I am not sure if it obvious or not, but heterogenously typed lists can be nicely modelled with Data.Typeable (!!!) I guess we should add something like this to the module? See

Re: Polymorphic lists...

2004-03-08 Thread MR K P SCHUPKE
Didn't know If I should post it straight away... its quite long and I dont do attachments (well not If I can help it. I am aware Dynamic can model heterogenious lists (thanks for correct terminology) - but I need static typing. Thats the clever thing about this code - the list is heterogenious

Re: -static

2004-03-08 Thread Wolfgang Thaller
What platform? Does everything work if you remove the -static? alpha, powerpc and hppa so far. I expect the same will happen for mips and mipsel. If, on powerpc, I run the final link command without -static (that's the only place it should make a difference, right?) then it links without warnings