hGetContents and laziness in file io

2001-07-23 Thread Hal Daume
- do putStrLn err Error err - do return () where parse takes a string and parses it and convert takes the tree and converts it back to a string (in the other format)... PLEASE help! Thanks! -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED

Re: hGetContents and laziness in file io

2001-07-24 Thread Hal Daume
Okay, I understand the problem. I would do something like the solution you propose, except that in the input file, trees span multiple lines. So the input file looks something like: (:cat S :subs ((() (:cat NP :subs ((() (:surf John) (() (:cat VP :subs

varying number of arguments restriction

2001-10-30 Thread Hal Daume
, well, for a parameter s, calling foo s: does s match [] ? if so, return otherwise, try the next definition of foo (which must match in this case). obviously i can rewrite: foo [] = foo s = (snd . head) s but this is uglier. - hal -- Hal Daume III Computer science is no more about

Re: seq / strictness and laziness

2001-11-12 Thread Hal Daume
Dean Herington wrote: `seq` forces evaluation of only the top-level construct in its first argument. (($!) similarly for its second argument.) I would guess your newcounts are structured (probably a tuple or list), in which case you are not forcing evaluation deeply enough. See

not naming modules Main

2001-11-16 Thread Hal Daume
will change its policy on this? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http

annotated haskell

2001-11-20 Thread Hal Daume
element therein. is there any language extension that allows you to make these annotates in the definitions of longest and sortByF that would enable this definition of y to not produce an error? thanks! - hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED

RE: Array + memory usage

2003-06-19 Thread Hal Daume
based on letter distributions, but this is probably overkill. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mies

RE: stack space overflow

2003-06-20 Thread Hal Daume
like: *Main ind 1 foo $ listArray (1,1) (concat $ repeat abcfoodefgfooa) even in ghci. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto

RE: Language extension proposal

2003-06-25 Thread Hal Daume
). Of course, the powers that be can weight in on this, and I'm sure that you're aware of the phantom type solution, but I figured I'd post anyway so that others can get a look at types like this for their own benefit... -- Hal Daume III | [EMAIL PROTECTED] Arrest

foldr in terms of map

2003-06-30 Thread Hal Daume
? and why is it that when put together, these things are strong enough (plus refs) to subsume primitive recursiveness? - Hal p.s., responses delayed until after ICFP are equally welcome :) -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

RE: foldr in terms of map

2003-07-01 Thread Hal Daume
Hi, quick reply :)...i've reordered some of what you've said (i hope you don't mind!) However the monad is defined, sequence_ has to process the entire list before anything can be determined about the result. The entire result of () depends upon both arguments, whereas you can deduce the head

RE: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Hal Daume
become standard. This is available at: http://www.isi.edu/~hdaume/haskell/NewBinary/ and allows both bit-based and byte-based writing styles. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume

RE: How overload operator in Haskell?

2003-07-09 Thread Hal Daume
is a little harder. Perhaps just 'fromInteger i = [fromInteger i]' would be acceptable. Or you could leave these undefined. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message

RE: How overload operator in Haskell?

2003-07-09 Thread Hal Daume
Quite right :). I agree whole-heartedly. There's nothing wrong with overloading (+) and (-) in this case, but the rest really don't make much sense. Probably best to leave them undefined and just not use them. Then you could define your own dot product function and the like. -- Hal Daume

referring to deeply embedded definitions

2003-07-18 Thread Hal Daume
. Is there any way to get at the definition from M3? - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org

RE: referring to deeply embedded definitions

2003-07-18 Thread Hal Daume
Please ignore my stupid question :) -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: Hal Daume Sent: Friday, July 18, 2003 10:23 AM To: [EMAIL PROTECTED] Subject

RE: dynamics on polymorphic datatype

2003-07-26 Thread Hal Daume
(undefined :: Foo Double) Foo a so, it kind of depends on what you want. probably you want exactly what didn't work; perhaps someone else has a more ingenious solution than mine... - hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

System.Directory (was RE: Proposal for a new I/O library design)

2003-07-28 Thread Hal Daume
Hi guys, I'm not replying to anything in the message, but... Is the idea to abstract away from the syntax of pathnames on the platform (eg. directory separator characters)? If so, I'm not sure it's worthwhile. There are lots of differences between pathname conventions: case sensitivity,

RE: Existentials...

2003-07-28 Thread Hal Daume
this helps. - hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amr A Sabry Sent: Monday, July 28, 2003 2:22

RE: Ann: HAllInOne bug fix release

2003-07-30 Thread Hal Daume
with ghc: real0m27.167s user0m9.991s sys 0m1.304s nhc all-in-one: real0m31.411s user0m10.007s sys 0m1.299s i am completely unable to explain this. someone want to hazard a guess? - hal, who is a bit disappointed now :( -- Hal Daume III

a breaking monad

2003-07-31 Thread Hal Daume
of? is there something fundamentally broken about this (sorry for the pun)? any other comments, suggestions? -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume ___ Haskell

RE: a breaking monad

2003-07-31 Thread Hal Daume
This looks like a bizarre rendition of the Error/Exception monad. Yes, of course. *Hal slaps himself* Thanks. Also, your motivating example is ambiguous. I think you mainly care about the case where the test is testing for some exceptional condition. I personally wouldn't want to use

RE: Text I/O library proposal, first draft

2003-07-31 Thread Hal Daume
Hi Ben, Bad things: * There's no way to implement fgetpos/fsetpos type functionality, because coders don't expose their internal state. (In fact, there would need to be a way to explicitly copy the state, since it may well include IORefs, Ptrs, etc.) Is this a serious

RE: Text I/O library proposal, first draft

2003-08-05 Thread Hal Daume
to take advantage of this new infrastructure, if possible... -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

RE: overlapping instances and functional dependencies

2003-08-14 Thread Hal Daume
understanding -- someone might correct me) - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wolfgang Jeltsch

RE: Help with Exceptions on I/O

2003-08-14 Thread Hal Daume
NoBuffering hSetBuffering stdin NoBuffering you'll need to import System.IO to get these. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

more unsafePerformIO questions (is it safe to use with ReadMode Handles)?

2003-08-18 Thread Hal Daume
anyway, there's no reason to pass the WordNetEnv around everywhere. But still, if possible, it would be nice for these to be pure. - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume

RE: container for different types, avoiding boiler plate

2003-08-20 Thread Hal Daume
write the instances by hand. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent

RE: container for different types, avoiding boiler plate

2003-08-21 Thread Hal Daume
Yes, this is essentially what DynamicMap isThe url i posted before was wrong...it should have been: www.isi.edu/~hdaume/haskell/DynamicMap.hs -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume

RE: Need some help please.

2003-08-27 Thread Hal Daume
There's a small problem with this solution, namely that it requires you to have an Eq instance for the elements in the list. You can fix this by using 'null' from the Prelude. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

unsafeInterleaveIO ordering

2003-08-29 Thread Hal Daume
at once? -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: unsafeInterleaveIO ordering

2003-08-29 Thread Hal Daume
In your example it's more or less guaranteed that putting b and c will never happen, because the result of the combinated IO action isn't demanded. well yes, it was a bad example. i got another answer basically saying that threading could screw it up (i'm not using thread) as could,

compiler bug report

2001-07-31 Thread Hal Daume
-5.00.2: panic! (the `impossible' happened, GHC version 5.00.2): unloadObj: failed Please report it as a compiler bug to [EMAIL PROTECTED], or http://sourceforge.net/projects/ghc/. Util - I'm not sure exactly what went wrong, but here's a copy of Util.hs... -- Hal Daume III

Re: compiler bug report

2001-08-01 Thread Hal Daume
not sure exactly what went wrong, but here's a copy of Util.hs... -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume -- Hal Daume III Computer science is no more about computers

small bug with :info and ids beginning with _

2003-06-30 Thread Hal Daume
:info treats _a as an infix operator in ghci. Prelude let _a = 'a' Prelude :i _a -- _a is a variable, defined at interactive:1 (_a) :: Char should have not enclosed _a in parens. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

RE: very strange behavior (crashes!) with Dynamics

2003-08-14 Thread Hal Daume
, NLP.String, NLP.Util, Common. *ReadCorefData showDM corefDShow dm1 Coref=Coref 1 2 Process ghci exited abnormally with code 5 interestingly it seems to be trying to read this as the range (since the two ints are the same as the initial ones)... -- Hal Daume III

RE: very strange behavior (crashes!) with Dynamics

2003-08-14 Thread Hal Daume
by all the others, but that didn't exhibit the bug). -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hal Daume

RE: very strange behavior (crashes!) with Dynamics

2003-08-14 Thread Hal Daume
(toDyn (Range 1 1)))' which works fine (returns Nothing), then touch it and reload it and do the same thing and you'll crash. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From

very strange behavior (crashes!) with Dynamics

2003-08-15 Thread Hal Daume
be incredibly appreciated. Thanks! - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume PennError.tar.gz Description: PennError.tar.gz

RE: very strange behavior (crashes!) with Dynamics

2003-08-15 Thread Hal Daume
When deriving Typeable instead of writing the instances myself, this bug doesn't pop up. This puts it on a back burner for me, but it's still something that should probably get fixed :). -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

Re: not naming modules Main

2001-11-19 Thread Hal Daume
about what would be useful -- GHC has lots of things that aren't exactly Haskell that were generated by such suggestions. But I'm unclear what you would like (let alone how easy it would be to implement). Simon | -Original Message- | From: Hal Daume [mailto:[EMAIL

how much can %alloc in profiling be trusted

2003-07-09 Thread Hal Daume
not there in the beginning -- I added them later but it changed nothing.) - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume ___ Glasgow-haskell-users mailing

RE: how much can %alloc in profiling be trusted

2003-07-10 Thread Hal Daume
I know the semantics of core is a bit different than Haskell, but this seems to no longer be tail recursive (it needs to rebox the Double# after the recursive call). Am I reading this correctly? - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he

bug(?) in unblockThread?

2003-08-05 Thread Hal Daume
? If it is, is there another way I can get the same effect? -- 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: link statically with libc?

2003-08-14 Thread Hal Daume
I don't know how the Ada guys do it. Perhaps they have an alternate set of compiled libraries with bounds-checking turned off? Me neither, I've just heard the idea discussed, not the actual technology. I know O'Caml does this too (-unsafe as a compiler flag gives you unsafe array

fast CString - IO PackedString fuction

2003-08-20 Thread Hal Daume
is there a way to go from a CString to a PackedString w/o going through a normal String in the middle? or should i write my own? -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume

RE: fast CString - IO PackedString fuction

2003-08-21 Thread Hal Daume
= PS (UArray Int Char) so the casting gives us what we want. This does seem like something that belongs in the PackedString library or the Foreign.C.String library, though. - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

ghci with -prof

2003-08-27 Thread Hal Daume
stack backtraces in ghci. how much effort would be required to allow ghci to (at least) *use* profiled objects, if not build them itself? - hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume

RE: Help: Stack-overflow and tail-recursive functions

2003-06-19 Thread Hal Daume
is first built, then the array is filled in. You can see that this is a problem by replacing your main with: main = print (m ! snd (bounds m)) where m = rmat 800 This will stack overflow too. Solution: use mutable arrays and fill them in by hand :). -- Hal Daume III

RE: Help: Stack-overflow and tail-recursive functions

2003-06-20 Thread Hal Daume
GHCi didn't have any problem even with the original code. mine didn't either, until I increased the 200 to around 1500...it's probably OS/memory specific. ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

RE: Simple monads

2003-06-26 Thread Hal Daume
(a) People could point out to me where I'm still confused, as revealed by my code. Is it needlessly complicated? looks pretty reasonable to me :) as to why Unique is in the IO monad is probabyl because if it were in any other monad, you could start the monad twice and thus get a repeat of

RE: haskell array access

2003-06-26 Thread Hal Daume
, but not doing the same to GCC. even with -O0, gcc gets rid of the loop body. one solution: add in the assembly to actually read the array (i'm too lazy and busy to do this). - hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths

RE: Help with ghci and Yet Another Haskell Tutorial

2003-06-27 Thread Hal Daume
it was in there to begin with. - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Espinoza Sent: Friday, June 27, 2003

RE: haskell array access

2003-06-27 Thread Hal Daume
At best case for Haskell, 15.5 times slower. The thing about bounds checking, in Haskell it's always there. In C, you might have it, you might not there is no certainty by the language, only by design and implementation. So with C, one is free to live dangerously. If you're using

RE: Representing cyclic data structures efficiently in Haskell

2003-07-07 Thread Hal Daume
are fixed size (that way you don't need to grow the array). But it works. -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

RE: functional updatable graph

2003-07-13 Thread Hal Daume
I think that the difficulties you are facing are from the fact that you are trying to express a purely functional updatable graph. Should I understand from this, that this is a difficult problem and that there exist no easy way to do this at the moment? Well, I think he was being a bit

RE: functional graph

2003-07-15 Thread Hal Daume
But it looks the Graph class works on types a and b where a is the Node type where b is the Edge type, or just the other way around :), I don't have the code right now. Yes, 'Graph n e' is a graph whose nodes are labelled with elements of type n and whose edges are labelled with elements of

RE: Type design question

2003-07-25 Thread Hal Daume
Hi Konrad, I am a Haskell newbie working on my first serious test case, and I would like some feedback from the experts to make sure I am not doing anything stupid ;-) Well, I may not exactly qualify, but I can give you a few suggestions, nonetheless... data Floating a = Vector a =

RE: Ann: HAllInOne bug fix release

2003-07-31 Thread Hal Daume
(moved to haskell cafe -- hopefully the other threads will follow) I don't know why the all in one version might go slower though Virtual memory thrashing? (Hal did say something about needing lots of RAM.) only to compile. i haven't measured, but the resulting executable shouldn't

RE: Ann: HAllInOne bug fix release

2003-07-31 Thread Hal Daume
(haskell-cafe now) Interesting. I've stripped them and they are exactly the same size. diff says they differ though. pre-stripping, the normal nhc (non ai1) is marginally larger (6.8m versus 7.0m). I'll try to measure memory usage if someone tells me how :) - Hal -- Hal Daume III

RE: Ann: HAllInOne bug fix release

2003-07-31 Thread Hal Daume
(cafe) This seems like a reasonable hypothesis. Is there a way to get GHC to keep trying, despite the enormity of the input file? Specifically, I expect it to do a better job of (a) inlining and (b) specialization. Is there a way to hint to it to try a bit harder? :) - Hal -- Hal Daume

RE: Haskell indentation

2003-08-27 Thread Hal Daume
Just my 2 cents... The first is that I always put the where for local function definitions on a new line, e.g. foo x = x + a + b where a = 1 + x b = 2 * x I find this a lot clearer and prettier than, foo x = x + a + b where a = 1 + x b = 2 * x I used to do it

RE: New to Haskell

2003-08-28 Thread Hal Daume
(the first half) of the first pair in the list. HTH - Hal -- Hal Daume III | [EMAIL PROTECTED] Arrest this man, he talks in maths. | www.isi.edu/~hdaume -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Namespaces (was Re: GUI Library Task Force)

2001-10-10 Thread Hal Daume III
(just like Java has java.*). -- Lennart ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell ~~ Hal Daume III

Re: Namespaces (was Re: GUI Library Task Force)

2001-10-10 Thread Hal Daume III
is there a third option that I'm missing? How do other people handle this issue? - Hal On Wed, 10 Oct 2001, Mark Carroll wrote: On Wed, 10 Oct 2001, Hal Daume III wrote: (snip) least) is that the Java compiler knows how to interpret the .s and will use them to navigate directory

Re: Namespaces

2001-10-10 Thread Hal Daume III
~~ Hal Daume III [EMAIL PROTECTED] arrest this man, he talks in maths www.andrew.cmu.edu/~hcd

bug in report? empty datatypes

2001-11-30 Thread Hal Daume III
error and i can't get nhc to accept empty datatypes at all... - hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL

class parameters to existential datatypes

2001-12-06 Thread Hal Daume III
Hi, I would like to be able to write something like this: data Foo c = forall a . c a = Foo a Unfortunately, this isn't allowed (apparently) because it's an illegal class assertion (or at least that's what ghc tells me). My motivation for doing this is I want to have something like List, but

Re: Strict foldl

2001-12-06 Thread Hal Daume III
Hi, Is this what I think it is? Do you benchmark the interpreter? Interpreted code isn't optimised. When I compile main = print $ sum [1..1000] with -O2, it takes 13s on a 600MHz P3 and runs in 1.5MB of space. Out of curiousity, why doesn't this get compiled down to main

Re: We need Documentation

2001-12-13 Thread Hal Daume III
I taught myself Python in about two weeks with the online Python tutorial, I think something similar for Haskell would greatly increase the number of Haskell users. I'm not familiar with the Python tutorial, but the Java tutorial which resides at java.sun.com is pretty much the most highly

Re: We need Documentation

2001-12-13 Thread Hal Daume III
I think we should move this off the mailing list. I'm willing to spear-head such an effort. Anyone who is interested in contributing, please email me. I'll compile a list of people and we can figure out what we want to do. - Hal -- Hal Daume III Computer science is no more about computers

global counters

2001-12-19 Thread Hal Daume III
Please, no tirade about banishing unsafePerformIO. I've seen this done before I just don't remember how. I want to use a state monad to count things, but don't want to monadify the thing I'm using the counter in. basically, i want a function getVar :: () - String which returns a new string

Re: Report Issues

2002-01-04 Thread Hal Daume III
_) /= (U _ ) = False This probably isn't good, but it suited my purposes. I agree in general, though, I don't think /= should be in the class, even though I've capitalized on it. - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about

readfile not so lazy

2002-01-09 Thread Hal Daume III
Why, in the following program: createFile = unsafePerformIO $ writeFile test.xxx ('1' : (take 1000 (repeat '0')) ++ 1) processFile = unsafePerformIO $ do f - readFile test.xxx return (dropWhile (=='0') $ dropWhile

rank x polymorphism

2002-01-17 Thread Hal Daume III
i'm familiar with ranks 1 and 2 of polymorphism. what are the higher ones (are there any). is there a good summary anywhere? -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume

dependent type query

2002-01-18 Thread Hal Daume III
even write: data (MyClass f a) = MyData2 f = MyData2 f This makes no sense to me whatsoever. This problem can the thwarted by moving the contraint to only the function definitions, but for MyData itself, it's really a hassle. Please could someone explain what's going on? -- Hal Daume III

question about kinds

2002-01-18 Thread Hal Daume III
this? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo

Re: question about kinds

2002-01-18 Thread Hal Daume III
this be? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Fri, 18 Jan 2002, Hal Daume III wrote: I have the following definition: class Traversable d where traverse :: d

Re: question about kinds

2002-01-18 Thread Hal Daume III
Oops, nevermind; that was dumb of me. I spoke too quickly. Of course that would produce overlapping instances :) -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Fri, 18 Jan 2002, Hal

type specs not making it in to functions

2002-01-25 Thread Hal Daume III
::a). But is there a better/preferred way to do this? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http

compilation using MPI

2002-02-01 Thread Hal Daume III
are there any MPI bindings for any version of Haskell (or related language or any FPL for that matter)? - hal (please respond to my email and not just to the ng) -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes

why is this legal

2002-02-01 Thread Hal Daume III
f x = f' 0 x where f' acc [] = acc f acc (x:xs) = f' (x+acc) xs why are we allowed to rebind f in the where clause? this is clearly a typo (in this instance) but it seems really strange to me that this would be allowed. -- Hal Daume III Computer science is no more about

Re: why is this legal

2002-02-01 Thread Hal Daume III
then, why are we allowed to rebind f in a let clause :) -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Fri, 1 Feb 2002, David Feuer wrote: Hal Daume III wondered: f x = f' 0 x

Re: Position of arguments in function definition and performance

2002-02-06 Thread Hal Daume III
-- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Wed, 6 Feb 2002, [iso-8859-1] José Romildo Malaquias wrote: Hello. Please, tell me which set of definitions below should I expected

Re: String manipulation.

2002-02-07 Thread Hal Daume III
to a list of integers, you could do: map (\x - (read x)::Double) [list of strings] Hope that helps. - 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, 7 Feb 2002, DK wrote

efficiency question

2002-02-08 Thread Hal Daume III
), but test2 is still much slower. i *expected* test2 to be much faster because you're only traversing the list once. presumably the two elements a and b in test2 could be put in registers and i'd imagine test2 should be faster (it certainly would be if written in c). - hal -- Hal Daume III Computer

RE: efficiency question

2002-02-08 Thread Hal Daume III
I've tried using a strict fold: foldl' f a [] = a foldl' f a (x:xs) = (foldl' f $! f a x) xs but that has no effect (or minimal effect). -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu

RE: efficiency question

2002-02-08 Thread Hal Daume III
This doesn't seem to make a difference, eithr (I just tried it). - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Fri, 8 Feb 2002, Konst Sushenko wrote: Did you try strict

Re: efficiency question

2002-02-08 Thread Hal Daume III
I agree that it's the overhead of (,), but I don't see why there would be any overhead for doing this. -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Sat, 9 Feb 2002, Jorge Adriano

what does fixST do?

2002-02-09 Thread Hal Daume III
subject says it all... -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org

allowing non-sequentiality in IO

2002-02-16 Thread Hal Daume III
be to define a new nonsequential IO monad that basically used unsafePerformIO to do the computations. So it would basically transform the above from to: main = unsafePerformIO (putStrLn hi) `seq` unsafePerformIO (putStrLn bye) and then order wouldn't be guarentee, right? - Hal -- Hal Daume III

haskell sparse matrices

2002-02-17 Thread Hal Daume III
Are there any Haskell libs for dealing with sparse matrices (or even just libraries for writing to and reading from a standard format, say, harwell boeing? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes

Re: Composition Monad

2002-02-17 Thread Hal Daume III
this monadically? -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Mon, 18 Feb 2002, Andre W B Furtado wrote: Roughly speaking, I'm in need of a monad (say MyIO) that interprets

Re: a universal printer for Haskell?

2002-02-19 Thread Hal Daume III
Hi, Doesn't Hugs basically do just this when you don't have +u set? Why not simply mimick their approach? I mean, sure, it's not written in haskell, but does that really matter for the printing for debugging issue? - Hal -- Hal Daume III Computer science is no more about computers

library design conventions

2002-02-27 Thread Hal Daume III
in the first position of the pair. it's probably hopeless to get Random to change at this point, as with the mapAccum functions. - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume

Re: library design conventions

2002-02-27 Thread Hal Daume III
So I just checked and what Java does is it always loads the unqualified import, so it doesn't do my stuff with automatically adding the package name to imports, which is reasonable. -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about

Re: library design conventions

2002-02-27 Thread Hal Daume III
oops! that was supposed to be a follow up to my post about pacakge, not about this. sorry :) -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume On Wed, 27 Feb 2002, Hal Daume III wrote

multiparameter generic classes

2002-02-28 Thread Hal Daume III
are there any papers/webpages/implementations/etc. of using multiparameter classes in a generic framework, with or without dependencies? thanks! - hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra

Re: rank-n polymorphism

2002-03-07 Thread Hal Daume III
to the front in type inference. - 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, 7 Mar 2002, Artem S Alimarine wrote: Dear all, GHC 5.0.3 supports rank-n polymorphism. Could

HGL ang GHC on Win32

2002-03-08 Thread Hal Daume III
... Any ideas? - Hal -- Hal Daume III Computer science is no more about computers| [EMAIL PROTECTED] than astronomy is about telescopes. -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

  1   2   3   4   5   >