RE: Random questions after a long haskell coding day

2002-01-28 Thread Simon Marlow
> Any thumb rule for using arrays? I'm expecting access to be > O(1), it is right? In GHC, yes. > Need to have a set of data, and I just want to get random > elements from that > Set, arrays seem like a good solution... am I right? If you're building it once and doing lots of access, then H

Re: typeclasses without functions

2002-01-28 Thread Ketil Z. Malde
"Cagdas Ozgenc" <[EMAIL PROTECTED]> writes: > class NewClass a where > myTT :: [a] > It seems to be a valid Haskell construct, but I do not comprehend the > semantics of it. Perhaps I'm entirely off base here, but members of the class needs (relatively, you can leave it undefined, of course

typeclasses without functions

2002-01-28 Thread Cagdas Ozgenc
Greetings. How do I interpret the following: class NewClass a where myTT :: [a] It seems to be a valid Haskell construct, but I do not comprehend the semantics of it. Thanks fot taking time. ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http:

Re: Re: unification

2002-01-28 Thread Koen Claessen
| Thank you for this information. However, it does not | quite satisfy my curiosity: are these purely | functional type checkers as efficient (big-O) as | imperative ones? And if not, why not? I usually use the ST monad to implement these kinds of things, which gives the same performance

Re: Re: unification

2002-01-28 Thread David Feuer
> From: Thomas Hallgren <[EMAIL PROTECTED]> > David Feuer wrote: > > >Has anyone written an efficient purely-functional > >implementation of unification (for type checking)? > > > Well, if you have ever used hbc or nhc, you have used type checkers > containing purely functional implementations

Re: unification

2002-01-28 Thread Thomas Hallgren
David Feuer wrote: >Has anyone written an efficient purely-functional >implementation of unification (for type checking)? > Well, if you have ever used hbc or nhc, you have used type checkers containing purely functional implementations of unification. Purely functional unification can be effi

Re: Q about haskell-report

2002-01-28 Thread David Feuer
> From: "Cagdas Ozgenc" <[EMAIL PROTECTED]> > > Greetings. > > In section 4.1 of Haskell Report for 98: > > It is indicated that (->) has kind * -> *-> * and > t1 -> t2 is equivalent to type (->) t1 t2 > > Does this make (->) a type constructor? Is this an attempt to unify > functions and dat

Q about haskell-report

2002-01-28 Thread Cagdas Ozgenc
Greetings. In section 4.1 of Haskell Report for 98: It is indicated that (->) has kind * -> *-> * and t1 -> t2 is equivalent to type (->) t1 t2 Does this make (->) a type constructor? Is this an attempt to unify functions and data types? Thanks _

unification

2002-01-28 Thread David Feuer
Has anyone written an efficient purely-functional implementation of unification (for type checking)? If not, what makes it difficult to solve the problem in that way? David Feuer This message has been brought to you by the letter alpha and the number pi. ___