Re: Using -fext-core without a Main function

2010-04-16 Thread Hal Daume III
quot; declaration is actually called Main and hence insists on a main declaration. """" mbolingbr...@perihelion ~/tmp $ ghc -c Hal.hs Hal.hs:1:0: The function `main' is not defined in module `Main' """ Compile this instead: """ module Ha

Using -fext-core without a Main function

2010-04-13 Thread Hal Daume III
7;t produce the .hcr file. I tried adding -no-hs-main but that doesn't help. I can add 'main = undefined' to Foo.hs, but then the core file doesn't contain the declaration of addOne because it's not used. Any suggestions? Thanks! -h -- Hal Daume III --- me AT hal3

missing Control.Monad.State

2007-11-11 Thread Hal Daume III
or that matter. A "find" in /usr/lib/ghc-6.6 doesn't turn up anything called State, either. I presume that I'm doing something incredibly stupid, but I'd appreciate a bit of help! Thanks! - Hal -- Hal Daume III --- me AT hal3 DOT name | http://hal3.name

Re: Faster IO

2005-06-23 Thread Hal Daume III
rs mailing list > Glasgow-haskell-users@haskell.org > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume ___

main thread GC'd on ^C

2004-08-13 Thread Hal Daume III
eason it doesn't just exit gracefully, or print "Control-C caught" or something like that? (9:38am strontium:ACE/ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.2.1) - Hal -- Hal Daume III | [EMAIL PROTECTED] "Arr

Double -> CDouble, realToFrac doesn't work

2004-08-03 Thread Hal Daume III
Foreign.C> (0 :: Double) / 0 NaN Prelude Foreign.C> realToFrac ((0 :: Double) / 0) :: CDouble -Infinity yikes! the NaN got turned into a -Infinity!!! aside from manually checking for 'strange' Double/CDouble values and wrapping realToFrac, is there a better way? also, does this cou

Re: Polymorphic lists...

2004-03-09 Thread Hal Daume III
t; op :: forall a . a -> i -> i > > Regards, > Keean Schupke. > ___ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > -- Hal Daume III

RE: optimization question

2004-02-23 Thread Hal Daume III
; | String literals are handled in a special way in GHC, so your example > is > | essentially converted into an if-cascade, which is not what you want. > | OTOH, if you write the strings in their expanded form like > ['f','o','o'], > | you get your

Re: POpen, opening lots of processes

2004-01-08 Thread Hal Daume III
to a dead state...I don't see how any of these three functions accomplishes that...what am I missing? -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume

POpen, opening lots of processes

2004-01-08 Thread Hal Daume III
lable which basically seems to be telling me that the program hasn't been closing the old processes, even though they're definitely not in use anymore. Does anyone have any suggestions how to get around this? Thanks! - Hal -- Hal Daume III | [

specializing on existentially quantified data types

2003-11-24 Thread Hal Daume III
Hi all, Suppose you have: class C a where ... data MkC = forall a . C a => MkC a foo :: MkC -> ... and I want to specialize foo for when the 'a' in the MkC is, say, Int. Is this possible? -- Hal Daume III | [EMAIL PROTECTED] "Arrest

time for updating records (was Re: A simple doubt about // operator)

2003-11-03 Thread Hal Daume III
nt terms would be higher, so you'd really have to have a large datatype to notice the difference, I'd imagine... - Hal -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume On Sun, 2 No

Re: A simple doubt about // operator ....

2003-11-02 Thread Hal Daume III
Hi, > The GHC documentation says about // (update array operator): > > "For MOST array types, this operation is O(n) where n is the size of the > array. However, the DiffArray type provides this operation with complexity > linear in the number of updates". > > The word "MOST" sugggests th

Re: Marshalling functions was: Transmitting Haskell values

2003-10-28 Thread Hal Daume III
No, it's possible -- it's done under the hood in GPH (parallel Haskell); it just doesn't exist in normal GHC... On Tue, 28 Oct 2003, Dimitry Golubovsky wrote: > Hi, > > Hal Daume III wrote: > >>Hmm... I can write out functions using the "Show (a ->

Re: Transmitting Haskell values

2003-10-28 Thread Hal Daume III
o google and searching for 'site:haskell.org haddock Show' or something like that. I find it's a reasonable way to find things, though of course not perfect. > 2. Remove the split between "type/class index" and "function/constructor > index&

Re: UArray question....

2003-10-26 Thread Hal Daume III
aquelas janelinhas que pulam na sua tela. > AntiPop-up UOL - É grátis! > http://antipopup.uol.com.br/ > > > ___ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users &g

Re: Transmitting Haskell values

2003-10-26 Thread Hal Daume III
_ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.

SPECIALIZEing something from another module

2003-10-23 Thread Hal Daume III
Is this possible, or need the specializations go in the defining module. Is this decision based on a fundamental problem with allowing specializations anywhere, or was it just a design choice (in which case I would encourage it's removal)... Thanks! - Hal -- Hal Daum

Re: @-bindings broken in 6.0?

2003-06-18 Thread Hal Daume III
> I think lumping all these extensions under one switch is the > problem. I find it hard to do useful stuff without some extensions, > but would rather not be bitten by this kind of things. Hear hear :). I agree. Though the only extension which gets me is TH (both the |] issue mentioned here an

Re: GHC 6.0 Release: sparc-solaris2 binaries

2003-06-04 Thread Hal Daume III
I don't think this is the problem, though, as none of the path issues he mentioned contained the ill-mannered "hdaume" in them :). Perhaps SimonM can comment more on this... -- Hal Daume III | [EMAIL PROTECTED] "Arrest this ma

RE: GHC 6.0 Release: sparc-solaris2 binaries

2003-06-04 Thread Hal Daume III
d not have the path problems the previous one(s) did. -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume On Tue, 3 Jun 2003, Simon Marlow wrote: > > > Sorry about that. I

RE: GHC 6.0 Release: sparc-solaris2 binaries

2003-06-03 Thread Hal Daume III
Sorry about that. It's fixed at: http://www.isi.edu/~hdaume/ghc-6.0-sparc-solaris2.tar.bz2 Simon: could you update the haskell.org link? - Hal -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.

RE: GHC 6.0 Release: sparc-solaris2 binaries

2003-05-31 Thread Hal Daume III
Yes, it does. Furthermore, this contains profiling and normal libraries, but not documentation. - Hal -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume On Fri, 30 May 2003, Simon Ma

GHC 6.0 Release: sparc-solaris2 binaries

2003-05-30 Thread Hal Daume III
here :). Happy Haskelling! - Hal -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://

Re: beginner question on module loading error

2003-02-20 Thread Hal Daume III
It would help to know: What directory you are running ghci from What directory the files you're attempting to load exist in What their file names are What their module names are The command you're using to load them -- Hal Daume III "Computer science is no more

Re: buffering woes

2003-02-05 Thread Hal Daume III
d: foo > hello bYou said: hello > You said: > ar here it goes right the first time, but then i have to type two more letters (in this case 'b\n') to get it to respond to "hello". -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECT

buffering woes

2003-02-05 Thread Hal Daume III
u said: foo > You said: > You said: > ^Ctest: interrupted 9:55am moussor:JavaInterp/ basically, i have to type 'fo' before it will give me my first reply. I thought the two calls to hSetBuffering would fix this. -- Hal Daume III "Computer science is no more about computers

RE: ghc feature request: core notes

2003-02-04 Thread Hal Daume III
ines of code in all. It doesn't seem that these get thrown away anywhere in the AbsSyn -> Core piping process. I'm not sure the extend to which this de-simplifies Core. Currently these Notes are only used to store SCC information for profiling and INLINE information. - Hal

ghc feature request: core notes

2003-02-03 Thread Hal Daume III
me to implement it, I could do it myself (probably), but I thought I'd ask the experts first (or if there's anything like this in there currently)... - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronom

Re: ghc/cygwin filename resolution issue.

2003-01-28 Thread Hal Daume III
It's been a while since I've installed GHC on Windows, but I believe back when I did it (5.00 or something), you needed to have cygwin installed in c:\, not c:\cygwin, despite cygwin's protests. I don't know if this has changed, though. - Hal -- Hal Daume III "Co

RE: problem using ffi with profiling

2003-01-27 Thread Hal Daume III
Aha, that's it. Thanks. - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Mon, 27 Jan 2003, Simon Marlow wrote: > > Sure. The relevant files look

RE: problem using ffi with profiling

2003-01-27 Thread Hal Daume III
Warning: deleting non-existent /tmp/ghc8140.hspp I can probably trim down a smaller example and send if off if that would help. It doesn't happen with a very simple example. I think it probably depends crucially on the fact that the .h file #includes another .h file. - Hal -- Hal Daum

problem using ffi with profiling

2003-01-26 Thread Hal Daume III
file or directory In file included from /tmp/ghc5638.hc:6: lm_bridge.h:10: parse error before "word" lm_bridge.h:11: parse error before "word" lm_bridge.h:12: parse error before "word" Any idea why there would be a difference? -- Hal Daume III "Com

Re: incremental linking?

2003-01-25 Thread Hal Daume III
Claus, How did you get ghc to use gld when doing --make instead of standard ld? I'm having the exact same problem you were and I'd love to make it work faster. Thanks in advance, Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] th

Re: MonadPlus IO

2003-01-22 Thread Hal Daume III
o value is an error value and (m1 + m2) is the action which attempts to run m1 and then, if it fails, runs m2. HTH - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On

building stage=2 on solaris

2003-01-09 Thread Hal Daume III
f i *remove* the '-package readline' from that commandline, it builds properly. is this needed? -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume __

Re: emacs haskell-ghci mode hook

2003-01-08 Thread Hal Daume III
> a) adding arguments to the ghci was not well documented. So I appended > the following (and a few more paths) to my .gnu-emacs: > > ;(add-hook 'haskell-mode-hook 'turn-on-haskell-hugs) > (add-hook 'haskell-mode-hook 'turn-on-haskell-ghci) > (setq haskell-ghci-program-args >(append >

ghc more aggressive with Ints?

2003-01-07 Thread Hal Daume III
en we do get full deforestation as we want. This new version, when run with [1..25], yields a time of 4.12u 0.23s 0:04.44 which is actually faster than the TWICE/DOUBLE version. So...why is GHC more aggressive with Ints than with Doubles and what are the additional conditions under which

duplicating handles

2002-12-17 Thread Hal Daume III
Question about dupTo...you can use it to, for instance, redirect stdout to a file. What if I want to have stuff that is printed to stdout to be redirect to a file *and also* printed to stdout. I fooled around with a few combinations, but nothing seems to work. Please help :) -- Hal Daume III

Re: Constructors in GHC (fwd)

2002-12-11 Thread Hal Daume III
...this seemed not to make it to the mailing list ([EMAIL PROTECTED] isn't valid)... -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume -- Forwarded message -

Re: CVS access?

2002-12-05 Thread Hal Daume III
I believe it's Jeffrey R Lewis <[EMAIL PROTECTED]>. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Thu, 5 Dec 2002, John Meacham wrote: > I sent a message

RE: :info in ghci

2002-12-03 Thread Hal Daume III
SeekMode... I'm sure opinions differ on this, though... -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Tue, 3 Dec 2002, Simon Marlow wrote: > > Ah...but if

RE: :info in ghci

2002-12-03 Thread Hal Daume III
Ah...but if the fixity is not explicitly specified (and thus defaults to infixl 9), this isn't printed, which is what was catching me...it seems it should be (or perhaps say "infixl 9 (default)")? -- Hal Daume III "Computer science is no more about computers| [EMA

:info in ghci

2002-12-02 Thread Hal Daume III
Any chance :info could also report fixity information, especially for symbolic identifiers? -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.e

RE: incremental linking?

2002-11-27 Thread Hal Daume III
> > 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:-| > > Hmm, I've never heard of linking being a bottleneck. Even G

Re: foldl' ?

2002-11-22 Thread Hal Daume III
List.foldl' forall a b. (a -> b -> a) -> a -> [b] -> a Prelude> -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Fri, 22 Nov 2002, Mark Carroll wrote:

Re: unsafePerformIO and IORefs

2002-11-18 Thread Hal Daume III
sages or people suggesting implicit paremeters or monad wrappers (in fact, count this as the first of said emails). - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Mon,

Re: foldl' ?

2002-11-16 Thread Hal Daume III
If it appears in Data.List then you need to import Data.List. In order to do this, you will need a newer (>=5.03) version of GHC, if I'm not mistaken. - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescope

Re: functional dependency syntax?

2002-11-11 Thread Hal Daume III
You don't need the parentheses. So, you want something like: class Foo a b c d e | a b -> c d, a -> d e where... which means from the paper: class Foo a b c d e | (a,b) -> (c,d), a -> (d,e) HTH - Hal -- Hal Daume III "Computer science is no more about computers

specifing user RTS options to GHCi

2002-11-07 Thread Hal Daume III
is seriously undervalued -- I know that I didn't know about it for about a year of using ghc even after asking if such a thing could be done in various places (clf, mostly). Perhaps it should go in the option list for +RTS? -- Hal Daume III "Computer science is no more about compute

Re: emacs "hangs" in haskell mode

2002-11-05 Thread Hal Daume III
yeah, the mode needs to be updated. edit your haskell-ghci.el file , namely the line which begins "(setq comint-prompt-regexp" to: (setq comint-prompt-regexp "^[\*_a-zA-Z0-9\. ]*>") The problem is that ghc changed a bit what it outputs. -- Hal Daume III "Compu

-Wall with recursive functions

2002-11-04 Thread Hal Daume III
yield warnings for unused definitions... Is there a reason for this (i.e., is the common behavior in other compilers)? - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes.&qu

Re: -parallel and error"failed to load interface for ..."

2002-11-04 Thread Hal Daume III
over > > > ___ > Glasgow-haskell-users mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users > -- -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED]

problem generating Core with no-implicit-prelude

2002-10-29 Thread Hal Daume III
Test.Nothing -> Test.zdwTrue}; Test.Just (a1::a) -> %case ds1 %of (wild1::Test.Maybe a) {Test.Nothing -> Test.zdwFalse; Test.Just (b::a) ->

standalone core parser

2002-10-24 Thread Hal Daume III
There's ParserCore.y in the ghc sources, but this relies on a bunch of other stuff. Does anyone have a Core language library, such as one which might be found in the std libs at Language.GHCCore, or something like that? If not, I'll probably try to create something myself. - Hal --

Re: FFI : A failing example

2002-10-21 Thread Hal Daume III
There was (two days ago or so) a sequence of posts about this. You need the command line option -ffi. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Tue, 22 Oct 2002, Fran

more undecidable instances, but why

2002-10-18 Thread Hal Daume III
I'm being hit by undecidable instances, but I can't see why. I read and reread the GHC docs on MPTCs, but to no avail. This is what I'm trying to do: newtype S a = S a instance MArray IOUArray a IO => MArray IOUArray (S a) IO where ... the instance declaration is basically just wrapping

Re: GHCI parse bug?

2002-10-16 Thread Hal Daume III
-> x (map (+y) z) if you wish. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Wed, 16 Oct 2002, Bryn Keller wrote: > Prelude> let f = \x->\y->\z->x (map (+ y

foralls in newtypes

2002-10-16 Thread Hal Daume III
> b) is not... - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] htt

Re: brain explosion in polymorphic state monad

2002-10-10 Thread Hal Daume III
acceptable, function. HTH - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Thu, 10 Oct 2002, mathieu wrote: > Hello, > > I am trying to define a polymorph

RE: Building Both "Regular" and "Profiling" Libraries

2002-10-09 Thread Hal Daume III
rently on (this enables me to have i686 and sun4 binaries coexisting in a friendly manner). Then, when I want a normal build, I do: ghcm Foo.hs -o Foo and for a profiled: ghcp Foo.hs -o Foo_prof It saves a lot of build time. Is this the sort of thing you're looking for? -- Hal D

Re: Question about the notation of (# ... #)

2002-10-04 Thread Hal Daume III
This means its an unboxed tuple. See recent thread about boxed vs. unboxed. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume On Fri, 4 Oct 2002, David Sabel wrote: >

Re: IO security

2002-10-04 Thread Hal Daume III
>o There are functions like "unsafePerformIO". How many of these > unsafe functions exist and what are their names? Is there It depends on what you count as unsafe. There's also unsafeIOToST, which is just as unsafe (You can write unsafePerformIO using this -- see a message to the haske

deriving weirdness on newtypes

2002-10-02 Thread Hal Daume III
omething to the list of derived classes should *not* change previously derived instances. There is yet another thing. If we have: newtype Foo = Foo Int deriving (Num) instance Show Foo where { show = undefined } then, the value of 'show (Foo 5)' is undefined, but the

Re: Performance question

2002-10-02 Thread Hal Daume III
arr i f = castIOUArray arr >>= \arr' -> unsafeWrite arr' i (f==F) here we have represented Fs by their isomorphic type Bool, which already has MArray instances. HTH - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronom

Re: No GHC support for a week

2002-10-02 Thread Hal Daume III
yesterday (or something), it was refusing to fall over. If you have a short program which demonstrates the same problem, I'm sure Simon would love to get a copy... - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about

Re: Interface file for ShowFunctions not found

2002-09-20 Thread Hal Daume III
Hi > I am trying to using the ShowFunctions module but > ghc 5.04.1 is not being able to find its interface > file. > $ ghc -c t.hs Try '-package lang' ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/gl

Re: unsafePerformIO

2002-09-20 Thread Hal Daume III
piler conjures up some value of type RealWorld to use. It is unsafe because it doesn't guarentee the relative order of IO actions. Of course, someone correct me if I'm mistaken. - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECT

what does "ExtractConcepts: fatal error: heapCensus" mean?

2002-07-25 Thread Hal Daume III
I get this when I "+RTS -h" one of my programs... what does it mean? -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume ___

bug with profiling things with "strange" filename

2002-07-25 Thread Hal Daume III
if you compile a program -p -auto-all with ghc and the name you give the exectuable contains iether a "." or a "-" (and possibly other things) it will core dump when executed (at least on sparc solaris), or so it seems, under 5.04. has anyone else had this problem? -- Hal D

passing an option to gcc without a -

2002-07-25 Thread Hal Daume III
't include this option. if i copy that call to gcc and add it maually at the command line, everything's cool thoughts? - hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -

instances of Typable

2002-07-25 Thread Hal Daume III
if I have newtype Foo = Foo Int and i want to make it an instance of typeable, how do I create a TypeRep object? - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.e

suggestion regarding :browse

2002-07-24 Thread Hal Daume III
Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listin

Re: Using UArray and Array

2002-07-24 Thread Hal Daume III
Not positive, but perhaps you could just hide things like (!), array, etc., from Unboxed since these are class methods and Unboxed is probably just reexporting what Array exports? You should also probably import Data.Array instead of just Array. -- Hal Daume III "Computer science is no

Re: Foreign.destructArray

2002-07-24 Thread Hal Daume III
the version number of GHC to change significantly. A minor version change should not break programs (imo). Sorry for the tirade, but I'm pressured to get some code out soon and this isn't helping things. -- Hal Daume III "Computer science is no more about computers| [E

hPutBufBAFull missing

2002-07-24 Thread Hal Daume III
I'm migrating my (stolen) Binary module to ghc 5.04 and it uses this function which also seems to have disappeared...am I just not looking in the right place? -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes.&

weird (bug?) in linear implicit parameters

2002-07-23 Thread Hal Daume III
remove the type signature from the number function. then, in ghci: *ImpParam> :t number forall a. (%ns :: BLSupply) => [a] -> [(a, [Bool])] *ImpParam> let %ns = BLSupply [] in number "hello" [('h',[]),('e',[]),('l',[]),('l',[]),('o'

infixed implicit parameters

2002-07-23 Thread Hal Daume III
insert x ys | otherwise = x : y : ys but we cannot write for the second-to-last line: x `?cmp` y or x ?`cmp` y any chance this will be changed (my preference would be for the first one. - hal -- Hal Daume III "Computer science is no more about computers| [EMAIL

Foreign.destructArray

2002-07-22 Thread Hal Daume III
cides to index the new docs :). a closer integration would be nice though... - hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

error building greencard with ghc 5.04

2002-07-22 Thread Hal Daume III
39: Module `Foreign' does not export `makeStablePtr' StdDIS.hs:39: Module `Foreign' does not export `addForeignFinalizer' StdDIS.hs:39: Module `Foreign' does not export `makeForeignObj' gmake[2]: *** [StdDIS.o] Error 1 anyone have a patch? -- Hal Daume

RE: comparison of execution speed of array types

2002-07-22 Thread Hal Daume III
> Could you try IOUArray for completeness too? (An IOUArray is the > unboxed version of IOArray, it can be found in Data.Array.IO). It fits in as the fastest: IOUnboxedMutArray 0.48u 0.04s 0:00.58 89.6% > > NormalArray 1.65u 0.20s 0:01.89 97.8% > > NormalArrayReplace

unsafePerformIO around FFI calls

2002-07-08 Thread Hal Daume III
IO $ withHMatrix m maxEigenvalue ??? Thanks! - Hal p.s., Please continue to CC Carl as this issue came up in conversations with him -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/

Re: Existential Datatypes

2002-06-30 Thread Hal Daume III
I'll take a stab at this: > data Foo2 = forall a. MkFoo2 { val2 :: a >, func2 :: a -> Bool >} > > But the compiler said: > > Can't combine named fields with locally-quantified type variables > In the declaration of data constructor

RE: when is compilation necessary

2002-06-20 Thread Hal Daume III
On Thu, 20 Jun 2002, Simon Peyton-Jones wrote: > I assume you mean 'bar' in module Main? Yes :) > | Now, suppose I change Foo.hs so that "foo x = x + 2". If I > | ghc --make on > | Main, it will build Foo, then Bar, then Main, then link. Is > | all of this necessary or can I (manually) ju

Re: Giving profiled object files a different extension (was: RE:Profiling suggestion)

2002-06-18 Thread Hal Daume III
s -osuf $ARCH.p.o, etc. As long as this default is overridden by explicit options, I'm fine with it, but please don't hardwire it :). - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www

Re: problems with FFI including h files

2002-05-31 Thread Hal Daume III
lda, const float *B, const int ldb, const float beta, float *bC, const int ldc); everything works (well, at least i no longer get an error on *that* line -- the other errors are still there). So it looks like you were right. How can I get ghc to *not* do this? :) -- Hal Daume III

instance Show (Ptr a)

2002-05-30 Thread Hal Daume III
to be able to see where the allocations from malloc, newArray, etc took place. - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume

Re: specifying common 'dis's in greencard

2002-05-29 Thread Hal Daume III
Ah, my problem was that I was using the extension ".ghs" on my "Foo" file and it expected ".gc". Thanks. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.ed

specifying common 'dis's in greencard

2002-05-29 Thread Hal Daume III
the modules that need it and put it's directory in the search path with -i). Unfortunately, even so it complains that it doesn't know how to marshall my datatypes. Any suggestions? - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECT

Re: instance Ord FiniteMap

2002-05-29 Thread Hal Daume III
I agree; the problem is that I fear that making my own instance by using setToList will be very inefficient (or at least much more so than an instance which actually looks at the tree structure). -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED]

Re: GMP from haskell

2002-05-29 Thread Hal Daume III
I should have been more specific :). I was referring to the more complicated things, such as Lucas numbers, Binomial coefficients, etc. -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes." -Dijkstra | www.isi.e

GMP from haskell

2002-05-28 Thread Hal Daume III
The gnu web page (www.gnu.org/manual/gmp-4.0.1/html_node/gmp_70.html) claims that Haskell (GHC) has bindings to GMP. Is this true? How can I access these routines? - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is

instance Ord FiniteMap

2002-05-28 Thread Hal Daume III
Is there any particular reason FiniteMap (and hence Set) aren't instances of Ord? I realize it's "weird" to define a map to be ordered, but even if the Ord definition were in some sense "nonsensical", being able to have, for instance, Sets of Sets of things would

POpen/createPipe errors

2002-05-28 Thread Hal Daume III
turn res) this function opens and reads a file, parses it using the function provided, deepSeqs the result and closes the file. could a similar thing be done with popen? - Hal -- Hal Daume III "Computer science is no more about computers

getting a grip on memory usage

2002-05-22 Thread Hal Daume III
Loops 38 30.8 29.5 30.8 29.5 i realize it's being entered a lot of times, and i can understand that it would use a bunch of time resources, but i don't understand why it's using so much space. any help would be appreciated... - Hal -- Hal Daume

RE: efficiency of UArray

2002-05-16 Thread Hal Daume III
raries, since there are so many possible implementations and, it seems, the "best" implementation could be very compiler dependent. but barring this happening, what's the best approach to take for things like this. is // fast, or is it better to create new arrays? - Hal > | -

efficiency of UArray

2002-05-15 Thread Hal Daume III
can we expect a function like: sum [x*y | (x,y) <- zip (elems v) (elems u)] to be as efficient as, say: sum = 0 for i=1, n sum = sum + v[i] * u[i] ? Basically, will any intermediate lists be created here? -- Hal Daume III "Computer science is no more about computers

RE: using error x as a placeholder

2002-05-15 Thread Hal Daume III
mance; the one with zeros is just a bit faster than the other, but probably not significantly so. So this case didn't show a problem with undefined. Could there ever be a problem or is the compiler smart enough to catch this? - Hal -- Hal Daume III "Computer science is no more

Re: Profiling suggestion

2002-05-10 Thread Hal Daume III
arc Solaris and x86 Linux builds of my programs and basically have to keep two separate directory structures to house them. With this, I could simply point my solaris ghc to do --o-postfix=s.o and my linux ghc to do --o-postfix=l.o or something. - Hal -- Hal Daume III "Computer scie

building 5.03 from source and illegal buffer size

2002-05-07 Thread Hal Daume III
attached the transcript. If anyone has any ideas, please let me know :) (oh, when building i used the build.mk.sample as is and this is on sparc solaris 2.7). Thanks! - Hal -- Hal Daume III "Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about teles

  1   2   >