Re: library Directory.hs

2001-06-19 Thread Wolfgang Jeltsch
Hello, according to http://www.cse.ogi.edu/PacSoft/projects/Hugs/pages/hugsman/libs.html Hugs does not contain all standard libraries. Especially the Directory module is missing. Wolfgang On Tuesday, 19. June 2001 10:23, you wrote: > Hi all, > > I have a problem: I need the library Directo

Re: micro-rant

2001-08-08 Thread Wolfgang Jeltsch
Hello, I totally agree with Gary. In my opinion the unary minus is a anomaly in Haskell which causes a lot of problems while beeing not that useful. For me it is totally okay to use negate x instead of -x. Wolfgang Gary wrote: > Hello people, > I've been studying the Haskell 98 report as part

Re: from micro-rant to macro-feature

2001-08-09 Thread Wolfgang Jeltsch
Hello, > [...] > I had either not realized, or forgotten, that unary minus could be used in > patterns, that is indeed an important feature. Okay, that is right. Maybe it would be good to make the unary minus part of the numeric literal syntax and thus allowing only constants to be negated. This

Re: free variable

2001-08-09 Thread Wolfgang Jeltsch
Hello, > [...] > "findElem <- list" findElem is a new variable, but "list" is not. > "elem==findElem" here for some reason "elem" is not a new variable. > > Why does the rule only apply for "<-" operation, but not "==" for example? Because "<-" is no operator but belongs to the syntax of the who

Re: The future of Haskell discussion

2001-09-13 Thread Wolfgang Jeltsch
On Thursday, 13. September 2001 17:50, Manuel M. T. Chakravarty wrote: > [...] > Let me reiterate: Gtk+HS as it is today is sufficient for > applications requiring a GUI of medium complexity. As far > as I see, despite not covering all of GTK+ yet, Gtk+HS > already has a wider variety of widgets

Re: The future of Haskell discussion

2001-09-14 Thread Wolfgang Jeltsch
On Friday, 14. September 2001 04:38, you wrote: > [...] > wxWindows is quite C++ centric and AFAIK nobody has made a > serious effort at a C++ FFI yet. One of the big advantages > of GTK+ is that it was written with bindings for other > languages in mind. Therefore, it is probably the toolkit >

Re: Tab "\t" character behaviour in (Win)hugs/ghc

2001-09-19 Thread Wolfgang Jeltsch
Alastair David Reid wrote: > [...] > > > What does the language definition say about [tabs]? > [...] > The Haskell 1.4 report says what is meant to happen (section 1.5) > (which was to follow the convention). > > The Haskell 98 report omits this section. > > I would like to report this omission as

Re: Joy and Concatenative Programming

2001-09-26 Thread Wolfgang Jeltsch
> [...] > SAJ> Joy differs from Haskell in that it has no variables. Instead, all > SAJ> functions are postfix, taking a stack as their argument and returning > SAJ> a stack as a result. > No, this is just a good old Forth programming language. It's a pity > that author of Joy even didn't mention

Re: Unicode support

2001-10-04 Thread Wolfgang Jeltsch
On Sunday, 30 September 2001 20:01, John Meacham wrote: > sorry for the me too post, but this has been a major pet peeve of mine > for a long time. 16 bit unicode should be gotten rid of, being the worst > of both worlds, non backwards compatable with ascii, endianness issues > and no constant len

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-18 Thread Wolfgang Jeltsch
On Tuesday 16 October 2001 07:29, Fergus Henderson wrote: > [...] > The whole idea of letting you omit method definitions for methods with > no default and having calls to such methods be run-time errors is IMHO > exceedingly odd in a supposedly strongly typed language, and IMHO ought > to be reco

GHC modules and packages

2001-10-27 Thread Wolfgang Jeltsch
Hello, is there some documentation about which modules reside in which packages in GHC? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: functor

2001-10-29 Thread Wolfgang Jeltsch
Hi, you cannot use sections with types and (->). Furthermore the variable must begin with a lowercase letter. So you have to write instance Functor (->) a where. By the way, you may write fmap = (.) instead of fmap f g = f . g. Yours, Wolfgang ___

Re: Transmitting parameters

2001-11-02 Thread Wolfgang Jeltsch
On Friday, 2 November 2001 07:10 Raul Sierra Alcocer wrote: > Hi, > > What mechanism of transmiting parameters does Haskell implement? > > Thank you, > Raul Anyway, it does not make sense to distinct between call-by-value and call-by-reference in the traditional way since variables cannot be mod

Unicode again

2002-01-08 Thread Wolfgang Jeltsch
Hello, there was some discussion about Unicode and the Char type some time ago. At the moment I'm writing some Haskell code dealing with XML. The problem is that there seems to be no consensus concerning Char so that it is difficult for me to deal with the XML unicode issues appropriately. Is ther

Re: Instance contexts constraining only type variables?

2002-01-24 Thread Wolfgang Jeltsch
Wolfgang Lux wrote: > Wolfgang Jeltsch wrote > > > Hello, > > say I have a type T defined the follwing way: > > newtype T a b = T (a b) > > Now I want to make every T a b with a b beeing an instance of Eq also an > > instance of Eq where (==) just test for

Re: Behavior of fromInteger on out-of-range arguments

2002-02-26 Thread Wolfgang Jeltsch
On Tuesday, February 26, 2002, 15:36:18 EST, David Feuer wrote: > [...] > Question: Is there any standard way in Haskell of determining the maximal > and minimal Int values? There is one. Use maxBound :: Int and minBound :: Int. > [...] By the way, the report says: "Class Enum defines operati

Re: use of undefined type

2002-02-28 Thread Wolfgang Jeltsch
On Wednesday, February 2, 2002, 22:32 CET Andre W B Furtado wrote: > I'm developing a tool that will help game programmers to develop games in > Haskell. To create a game object, the programmer must call the function > *object* as follows: > > object name_of_object position_of_object speed_of_obj

Re: Strictness

2002-03-16 Thread Wolfgang Jeltsch
On Saturday, March 16, 2002, 03:16 CET Jay Cox wrote: > [...] > I think I may eventually attempt to write a haskell lazyness/strictness FAQ. Great! I'm very interested in it. > [...] Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haske

Re: ">>" and "do" notation

2002-03-28 Thread Wolfgang Jeltsch
On Thursday, March 28, 2002, 16:37 CET James B. White III wrote: > [...] > I think the default definition of ">>" is just that, a default, and not a > law. I suppose, a >> b = a >>= \_ -> b is intended to be a law. This would mean that every redefined (>>) would have to obey this law. > [...] >

Re: Type extensions

2002-03-29 Thread Wolfgang Jeltsch
On Friday, March 29, 2002, 14:43 CET Ronald Legere wrote: > [...] > As far as I can tell, the following set of extensions has been included, > for example in ghc: >multiparameter type classes >constructor classes Type classes can be seen as a specific kind of constructor classes because

Re: explicitly quantified classes in functions

2002-04-04 Thread Wolfgang Jeltsch
On Thursday, April 4, 2002, 22:36 CET Hal Daume III wrote: > Why can I not define the following (in ghc): > > > class Foo p where > > instance Foo Double where > > foo :: Double -> (forall q . Foo q => q) > > foo p = p > > From my humble (lack of) knowledge, there seems to be nothing wrong here,

Haskell Web Publisher --- help wanted

2002-04-17 Thread Wolfgang Jeltsch
Hello Haskell freaks, I'm developing some software which I call the "Haskell Web Publisher". This software shall allow the implementation of websites in Haskell and will consist mainly of Haskell modules providing the necessary types and variables. By using HWP, website implementors shall be ab

Questions concerning hierarchical module system

2002-04-17 Thread Wolfgang Jeltsch
Hi, I have some questions regarding the hierarchical module system now implemented in Hugs as well as in GHC. Currently it is possible to have a module A1.A2. ... .Am and a module A1.A2. ... .Am. ... .An (n > m) at the same time. The first one's source code would be in file /A1/A2/ ... /Am.hs a

Equivalence in class laws

2002-05-20 Thread Wolfgang Jeltsch
Hello, instances of classes are required to fulfill certain laws. These laws are usually given in the form t = t' where t and t' are terms. My question is what the exact meaning of the = is. Does it mean that evaluation of the terms must lead to equal results regarding (==)? But if this is the cas

arrows

2002-05-24 Thread Wolfgang Jeltsch
Hello, in his paper "Generalising monads to arrows" John Hughes introduces an Arrow class with the members arr and (>>>) and extends this with a member first. The Arrow module by Ross Paterson adopts the practice of including first in the Arrow class. Now, I have a type which would fit wonderfully

Re: readFloat

2002-05-29 Thread Wolfgang Jeltsch
On Tuesday, 2002-05-28, 18:57, CEST Simon Peyton-Jones wrote: > Folks > > I'm back to tidying up the Haskell Report. > > In the Numeric library, there is the useful function > > readFloat :: RealFloat a => ReadS a > > But you can't use it for reading rationals, because Rational > isn't i

Re: arrows

2002-06-03 Thread Wolfgang Jeltsch
On Saturday, 2002-05-25, 13:25, CEST John Hughes wrote: > On Sat, 25 May 2002, Koen Claessen wrote: > > > > > There are many types which would fit nicely in an arrow > > framework, but do not because of the demand of these > > operators, here are two examples: > > > > * Isomorphisms, are nice a

Re: arrows

2002-06-03 Thread Wolfgang Jeltsch
On Saturday, 2002-05-25, 20:37, CEST Ashley Yakeley wrote: > At 2002-05-25 01:32, Koen Claessen wrote: > > >Might I remind you that an arrow (as defined in category > >theory) only requires identy and composition to be defined > >and satisfying some laws? > > > >In particular, an arrow does not

Re: arrows

2002-06-07 Thread Wolfgang Jeltsch
At 2002-06-04 06:39 CEST Ashley Yakeley wrote: > [...] > 1. Should I add your intermediate class? Do you have examples of > something that has 'pure' but not 'first'? Of course! My Parser type. As I wrote earlier I cannot see a meaningful definition of first for it. You may also try to find a de

Re: arrows

2002-06-29 Thread Wolfgang Jeltsch
On Saturday, 2002-06-08, 00:52, CEST, Ashley Yakeley wrote: > At 2002-06-07 06:18, Wolfgang Jeltsch wrote: > > Of course! My Parser type. > > What's its implementation? Hello again, at the time you asked me the question above, my Parser type wasn't implemented yet. Un

Re: Hugs for MacOS X

2002-07-02 Thread Wolfgang Jeltsch
On Tuesday, 2002-07-02, 09:01, CEST, Lyndon While wrote: > [...] > I might be being dense here, but - where could I get these download > figures? They might be good ammunition for our application. Is it actually allowed to use access statistics for statistics about software usage? At least in Ge

Re: lines/unlines and "inverse"

2002-07-22 Thread Wolfgang Jeltsch
On Monday, 2002-07-22, 11:25, CEST, Koen Claessen wrote: > Lars Henrik Mathiesen wrote: > > | lines . unlines = id > | unlines . lines . unlines == unlines > | words . unwords . words = words > > Don't be fooled by the information content of the second > equation -- the first equation directl

Re: overloaded num types, but not string types?

2002-07-26 Thread Wolfgang Jeltsch
On Wednesday, 2002-07-24, 20:29, CEST, Hal Daume III wrote: > I was wondering if anyone's thought of overloading string literals in > the same way that numeric literals are overloaded. I know that I tend > to use PackedStrings for almost everything, primarly due to the RegExp > stuff and efficien

Re: Text in Haskell: a second proposal

2002-08-10 Thread Wolfgang Jeltsch
On Friday, 2002-08-09, 08:40, CEST, Ashley Yakeley wrote: > At 2002-08-08 23:10, Ken Shan wrote: > > > 1. Octets. > > 2. C "char". > > 3. Unicode code points. > > 4. Unicode code values, useful only for UTF-16, which is seldom used. > > 5. "What handles handle". > ... > >I suggest that the follow

Re: Word8-Based IO

2002-08-21 Thread Wolfgang Jeltsch
On Wednesday, 2002-08-21, 06:55, CEST, Ashley Yakeley wrote: > [...] > * System.IO: addition of new Word8-based functions > > hGetOctet :: Handle -> IO Word8 > hLookAheadOctet :: Handle -> IO Word8 > hPutOctet :: Handle -> Word8 -> IO () > hPutArray :: Handle -> [Word8] -> IO () > hLaz

Re: Word8-Based IO

2002-08-21 Thread Wolfgang Jeltsch
On Wednesday, 2002-08-21, 09:52, CEST, Ketil Z. Malde wrote: > [...] > I don't particularly like 'octet' (probably because I find it a bit > pedantic, and it reminds me too much of committee decisions), and > would prefer hGetWord8 or even hGetByte/hGetWord. hGetWord8 sounds better to me than hGe

Re: Word8-Based IO

2002-08-22 Thread Wolfgang Jeltsch
On Thursday, 2002-08-22, 00:39, CEST, Ashley Yakeley wrote: > At 2002-08-21 13:03, Alastair Reid wrote: > > >Can this discussion be moved to the i18n list please? > > It was originally on Libraries, as it didn't seem to concern > internationalisation per se... > > -- > Ashley Yakeley, Seattl

Re: Why concatMap instead of concat.map?

2002-09-11 Thread Wolfgang Jeltsch
On Wednesday, 2002-09-11, 09:54, CEST, Martin Norbäck wrote: > ons 2002-09-11 klockan 04.50 skrev Dr Mark H Phillips: > > Hi, > > > > Why does Haskell have a special function called concatMap, > > rather than people just doing "concat.map"? Is it because > > concatMap has a more sophisticated im

Re: Good layout style?

2002-09-18 Thread Wolfgang Jeltsch
On Wednesday, 2002-09-18, 07:22, CEST, Hal Daume III wrote: > I think this is purely a personal taste kind of thing. First off, though, > only 'where', 'let', 'of' and 'do' induce layout. I've seen many layout > styles; the most common seem to be: > > let x = ... > y = ... > z = .

forall and class contexts

2002-10-15 Thread Wolfgang Jeltsch
Hello, I want to define something like class (Eq (forall a. T a), Monad T) => C T where the context shall mean that T has to be an instance of Monad and that for every type a the type T a has to be an instance of Eq. Is such a thing possible with some Haskell implementation? Wolfgang __

RE: forall and class contexts

2002-10-16 Thread Wolfgang Jeltsch
On Wednesday, 2002-10-16, 09:40, CEST, Simon Peyton-Jones wrote: > > I want to define something like > > class (Eq (forall a. T a), Monad T) => C T > > where the context shall mean that T has to be an instance of Monad > > and > > that for every type a the type T a has to be an instance of Eq.

RE: forall and class contexts

2002-10-16 Thread Wolfgang Jeltsch
On Wednesday, 2002-10-16, 10:07, CEST, Ashley Yakeley wrote: > [...] > > > Presumably you mean 'instance' not 'class'? A class decl always has > > a type variable after the =>; thus ...=> C a. > > Unless Wolfgang meant > > class (Eq (forall a. t a), Monad t) => C t This is exactly what I me

Re: Using functions from package haskell98 - GHC 5.04

2002-10-22 Thread Wolfgang Jeltsch
On Tuesday, 2002-10-22, 11:28, CEST, Malcolm Wallace wrote: > [...] > IIRC, the current release of Hugs has the function isDigit in the > Prelude, and so doesn't need any imports. (This will change in the > new October 2002 release.) It hasn't changed. Obviously, RC1 has it still in the prelude:

Re: how to convert IO String to string---- still have questions

2002-11-24 Thread Wolfgang Jeltsch
Hello, several mails spoke about converting an IO String to a String. I have to point out that such a conversion is not what happens when you use monadic I/O. In fact, such a conversion is just not possible in Haskell 98. Since Haskell is a pure language, evaluating a String expression mustn't

Re: arrows

2002-12-06 Thread Wolfgang Jeltsch
On Friday, 2002-11-29, 14:12, CET, Ashley Yakeley wrote: > At 2002-06-29 14:43, Wolfgang Jeltsch wrote: > > > To simplify things a bit, let's take a simpler Parser type which doesn't > > use monad state transformers but simple state transformers instead. This &g

Re: arrows

2002-12-12 Thread Wolfgang Jeltsch
On Saturday, 2002-12-07, 03:42, CET, Ashley Yakeley wrote: > At 2002-12-06 15:57, Wolfgang Jeltsch wrote: > > I cannot see how this relatively simple representation can be used to > > describe certain parsers. If I would use Identity for baseMonad, I would > > have a ty

lazy stream I/O

2002-12-12 Thread Wolfgang Jeltsch
Hello, what are the arguments against lazy stream I/O? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: tuple component functions

2003-01-03 Thread Wolfgang Jeltsch
Hi! > [...] > > twin :: a -> (a,a) > > twin x = (x,x) By using the Monad instance of ((->) a), defined in Control.Monad.Reader, one can write join (,) for twin. (And, by the way, one can use join for functions in several other useful ways. For example, one can write join (*) for a squaring fu

Re: [OT] Teaching Haskell in High School

2003-02-03 Thread Wolfgang Jeltsch
On Tuesday, 2003-02-04, 01:01, CET, Hal Daume wrote: > [...] > However, I'm also well aware that Haskell is very difficult to learn (and, > I'd imagine, to teach). Hi, I wouldn't claim that Haskell is very difficult to learn. I think, people often have problems with learning Haskell because the

Re: [OT] Teaching Haskell in High School

2003-02-07 Thread Wolfgang Jeltsch
On Friday, 2003-02-07, 12:31, CET, Arjan van IJzendoorn wrote: >[...] > Yes, that does mean adding type classes, but not the whole machinery. If we > support Eq, Ord, Show and Num with a limited number of instances, chapters 1 > to 11 of Hudak's book can be used without modification. I just have h

Re: [OT] Teaching Haskell in High School

2003-02-07 Thread Wolfgang Jeltsch
On Friday, 2003-02-07, 14:41, CET, Arjan van IJzendoorn wrote: > [...] > For that reason, Helium has a logging facility built in which sends a server > the programs containing errors. Do you tell your students about the existence of this facility? > [...] Wolfgang __

Re: LOOP + HANDLE

2003-06-11 Thread Wolfgang Jeltsch
On Wednesday, 2003-06-11, 18:54, Filip wrote: > So how to write function that will wait until Handle is ready for reading ?? It would be very bad to use a while loop for this like while (!is_ready(handle)) /* do nothing */; which is called active waiting. Your processor is busy all the time do

Re: Stupid wuestion about Monads :)

2003-06-11 Thread Wolfgang Jeltsch
On Wednesday, 2003-06-11, 20:00, Filip wrote: > I have a question :) > What should I do if I have something like "IO Bool" and I need "Bool" ?? > And the same with other IO +something. This is a question which arises very often on this list. I think, you should read a tutorial like the Gentle Int

Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 18:01, CEST, Filip wrote: > Hi, > > I wrote something like "let t = try (hGetLine h1)" and I would like to check > is it EOFError or not. How can I do this ?? > > Thanks Hello, the above code assigns the I/O action try (hGetLine h1) to t. I suppose you want to assign

Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 21:02, CEST, Dean Herington wrote: > On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote: > > [...] You can then examine t as in the following example: > > t <- try (hGetLine h1) > > case t of > > Left error | isEOFErr

Re: problems with working with Handles

2003-06-13 Thread Wolfgang Jeltsch
On Friday, 2003-06-13, 10:33, CEST, Niels Reyngoud wrote: > [...] > To avoid the lazy behaviour, we tried to write our own IO module "IOExts2" > which basically redifnes readFile, writeFile and appendFile to make sure > they use binary-mode and strict behaviour. The libary is as follows: > > [...]

Re: main modules in GHC, deriving differences between GHC and Hugs

2003-06-13 Thread Wolfgang Jeltsch
On Friday, 2003-06-13, 22:06, CEST, Hal Daume III wrote: > [...] > Personally, I think this is stupid and that you should be able to compile > any module with a 'main :: IO a' function as an executable without having to > call it Main. > [...] I would even say that you should be able to use a "m

Re: Unary Operators

2003-07-07 Thread Wolfgang Jeltsch
On Monday, 2003-07-07, 09:46, CEST, Arun Kumar S Jadhav wrote: > Hi All, > How to define a new unary operator. The only unary operator in Haskell is unary minus for negating numbers. There are no other predefined unary operators and it is not possible to define any. So unary minus is rathe

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-09, 05:31, Glynn Clements wrote: > [...] > There isn't a standard mechanism for binary I/O. NHC98 contains the York Binary library. Can someone tell me if this is available for other Haskell systems? And didn't GHC also provide binary I/O? > However, a simple and fairly ge

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-09, 15:16, CEST, Glynn Clements wrote: > [...] > Both GHC and Hugs provide openFileEx, which allows files to be read in > binary mode (without EOL/EOF translations). So we have portable binary I/O, don't we? By the way, does one still read characters rather than bytes even

Re: How overload operator in Haskell?

2003-07-09 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-09, 17:11, CEST, Hal Daume wrote: > What you want to do is make your Vector an instance of the Num(eric) type > class. It would be better to define one's own operators instead of using + and - because Vector has no meaningful instance of Num (as Jerzy Karczmarczuk already p

Re: Function composition and currying

2003-07-16 Thread Wolfgang Jeltsch
Hi, you may use (f .) . g. Wolfgang On Thursday, 2003-07-17, 02:27, CEST, Dr Mark H Phillips wrote: > Hi, > > Hopefully this is a simple question. I am wanting to know good ways > of using ".", the function composition operator, when dealing with > currying functions. > > Suppose I have the fo

Re: User-Defined Operators

2003-07-17 Thread Wolfgang Jeltsch
On Thursday, 2003-07-17, 09:08, CEST, Johannes Waldmann wrote: > [...] > in my code, I don't define any operators at all (only functions). I do think > that self-defined operators make a programm less readable. All you get is a > A short cryptic sequence of non-alphanumeric characters. I think, t

Re: User-Defined Operators

2003-07-17 Thread Wolfgang Jeltsch
On Thursday, 2003-07-17, 16:07, CEST, Robert Ennals wrote: > > Well, for the most part, LaTeX only provides common operators. One > > problem, I came across some weeks ago, is that it is *not* possible to > > define his/her own operators (or, at least, that Lamport's "LaTeX - A > > Document Prepara

Re: User-Defined Operators, Re: Function composition and currying

2003-07-19 Thread Wolfgang Jeltsch
On Saturday, 2003-07-19, 07:52, CEST, Dylan Thurston wrote: > [...] > But if you have -Point, then you have a 0 Point, and there's no distinction > between Points and Vectors at all! Yes, I always thought (and still think) that the (main) difference between points in affine geometry and radius v

Re: Ann: HAllInOne bug fix release

2003-07-30 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-30, 23:36, CEST, Hal Daume III wrote: > [...] > A few people have asked me for speed-up results from All-In-One-ifying code, > so here's a good one. We take two versions of NHC. One is the original > binary distribution and the other is the All-In-One-ified version, compile

overlapping instances and functional dependencies

2003-08-10 Thread Wolfgang Jeltsch
Hello, I have this code: class C a b c | a b -> c where f :: a -> b -> c instance C a b c => C a (x,y,b) c where f a (_,_,b) = f a b instance C a (a,c,b) c where f _ (_,c,_) = c ghci -fglasgow-exts -fallow-overlapping-instances compiles it without complaint b

Re: overlapping instances and functional dependencies

2003-08-17 Thread Wolfgang Jeltsch
I wrote on Saturday, 2003-08-09, 01:32, CEST: > Hello, > > I have this code: > class C a b c | a b -> c where > f :: a -> b -> c > > instance C a b c => C a (x,y,b) c where > f a (_,_,b) = f a b > > instance C a (a,c,b) c where > f _ (_,c,_) = c > ghci -fglasgow-

Re: overlapping instances and functional dependencies

2003-08-19 Thread Wolfgang Jeltsch
the method definitions of the second instance declaration for the instance C (Int,Char,Bool) Char. Am I correct? Wolfgang On Monday, 2003-08-18, 00:37, CEST, Wolfgang Jeltsch wrote: > I wrote on Saturday, 2003-08-09, 01:32, CEST: > > Hello, > > > > I have this code: > &

Re: more unsafePerformIO questions ([...])

2003-08-19 Thread Wolfgang Jeltsch
On Tuesday, 2003-08-19, 13:18, Simon Marlow wrote: > [...] > Yes, I agree that one shouldn't rely on the "no duplication of work" > property. However, folloing this argument we arrive at the conclusion that > hGetContents is an invalid use of unsafePerformIO. (which is something I've > been sayi

Re: Beautifying Haskell programs (was: Re: pretty newby )

2003-09-24 Thread Wolfgang Jeltsch
Am Mittwoch, 24. September 2003, 18:01 schrieb Keith Wansbrough: > [...] > And your other point, Luc, about generating type signatures automatically, > shows up something about your approach to debugging code. You should always > put the type signatures in as you go - preferably, before you write

Re: GHC allow-overlapping-instances (PART II)

2003-10-03 Thread Wolfgang Jeltsch
Am Freitag, 3. Oktober 2003, 10:22 schrieb Kenny: > [...] > But how about > instance C (AND (OR r1 r2) (OR r1 r2)) (OR r1 r2) > --[1] > > instance ( C (AND r1 r3) r5 >, C (AND r2 r4) r6 >) => C (AND (OR r1 r2) (OR r3 r4)) (OR r5 r6) --[2] > > GHC allows this with -fallow-overlappin

Re: implement hash table

2003-10-08 Thread Wolfgang Jeltsch
Am Mittwoch, 8. Oktober 2003, 04:42 schrieb Artie Gold: > [EMAIL PROTECTED] wrote: > > Hi,all > > > > I'm a new one in this Haskell programming language. I have a program which > > involved a lot of computation tasks and it's quite inefficient,so I'm > > currently examing the possibility of using h

Re: changed link

2003-10-15 Thread Wolfgang Jeltsch
Am Mittwoch, 15. Oktober 2003, 12:50 schrieb Christian Maeder: > Hi, > > on: > http://www.haskell.org/bookshelf/ > > the link for: Online Haskell Course by Ralf Hinze (in German). > > should be changed from: > http://www.informatik.uni-bonn.de/~ralf/teaching/HsKurs_toc.html > > to: > http://www.inf

Haddock and Template Haskell

2003-11-21 Thread Wolfgang Jeltsch
Hello, is Haddock compatible with Template Haskell or does it get confused by $(...) syntax? If it is compatible, how does the documentation of TH-generated code look? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Haddock and DocBook

2003-11-21 Thread Wolfgang Jeltsch
Hello, the Haddock documentation says: -S, --docbook Reserved for future use (output documentation in SGML DocBook format). I would appreciate very much if the output wouldn't be just in SGML DocBook but in XML DocBook format. Would it be possible to implement it this way? Wolfgang

Re: Haddock and Template Haskell

2003-11-21 Thread Wolfgang Jeltsch
Am Freitag, 21. November 2003, 13:42 schrieb Simon Marlow: > [...] Hello again, thanks for your response. > There are two issues: > > Q. Will Haddock parse a file containing Template Haskell code? > A. No, the parser doesn't currently understand the TH extensions. Is it planned to let it unde

Re: Why are strings linked lists?

2003-11-28 Thread Wolfgang Jeltsch
Am Freitag, 28. November 2003 04:32 schrieb Ben Escoto: >Hi, can someone tell me why Haskell strings are linked lists? I think they are lists because there is already good support for lists in Haskell. You can just take the many list functions and apply them directly to strings. You could then

Re: Why are strings linked lists?

2003-11-28 Thread Wolfgang Jeltsch
Am Freitag, 28. November 2003 12:10 schrieb Koen Claessen: > Wolfgang Jeltsch wrote: > | > 1. Today I spend a few hours trying to track down a memory leak. It > | > turns out I just didn't realize how much space a string takes up. > | > On my machine "

Re: Why are strings linked lists?

2003-11-28 Thread Wolfgang Jeltsch
Am Freitag, 28. November 2003 19:21 schrieb Hal Daume III: > > As a matter of pure speculation, how big an impact would it have if, in > > the next "version" of Haskell, Strings were represented as opaque types > > with appropriate functions to convert to and from [Char]? Would there be > > riotin

Re: Why are strings linked lists?

2003-11-29 Thread Wolfgang Jeltsch
Am Freitag, 28. November 2003 22:21 schrieb Glynn Clements: > [...] > > What do you mean with this? Hopefully, not dropping Unicode support > > because this would be a very bad idea, IMHO. > > What Unicode support? > > Simply claiming that values of type Char are Unicode characters doesn't make >

Re: Why are strings linked lists?

2003-11-29 Thread Wolfgang Jeltsch
Am Freitag, 28. November 2003 08:49 schrieb John Meacham: > [...] > I also have wondered how much the string representation hurts haskell > program performance.. Something I'd like to see (perhaps a bit less drastic) > would be a String class, similar to Num so string constants would have type >

Re: Why are strings linked lists?

2003-11-30 Thread Wolfgang Jeltsch
Am Samstag, 29. November 2003 23:58 schrieb [EMAIL PROTECTED]: > G'day all. > > Quoting Wolfgang Jeltsch <[EMAIL PROTECTED]>: > > I think, I have already said the following on this list. I would also like > > to have different character types for different subsets

Re: haskell extensions question

2003-12-01 Thread Wolfgang Jeltsch
Am Montag, 1. Dezember 2003 05:44 schrieb Ken Shan: > [...] > > ERROR "Test.hs":12 - Overlapping instances for class "B" > > *** This instance : B () > > *** Overlaps with : B a > > *** Common instance : B () > > > > but I don't have an instance "A ()" from which haskell can infer an > > insta

Re: Why are strings linked lists?

2003-12-08 Thread Wolfgang Jeltsch
Am Montag, 8. Dezember 2003 15:13 schrieb Tomasz Zielonka: > [...] > Even in unoptimized, byte-code compiled code? Does GHCi use byte code internally? Would it be possible to export this code and load it into GHCi again or compile it to machine code? What Haskell byte code projects are out ther

Re: Why are strings linked lists?

2003-12-10 Thread Wolfgang Jeltsch
Am Dienstag, 9. Dezember 2003 18:34 schrieb Malcolm Wallace: > [...] > > The most obvious is the LVM. See Helium though the LVM is not tied to it. > > Both Hugs and nhc98 are also based on bytecode interpreters. Wouldn't it be good to implement an LVM import/export feature in GHC, Hugs and nhc9

efficiency of FiniteMap and Set

2003-12-30 Thread Wolfgang Jeltsch
Hello, is there some documentation about the complexity of the FiniteMap and Set operations? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

from array update algorithm to nice Haskell code

2003-12-30 Thread Wolfgang Jeltsch
Hello, I have an algorithm which updates one or more arrays in a loop. The update operations depend on the (old) contents of the arrays, so I cannot use accumArray. I want to implement this algorithm without mutable arrays in Haskell. Are there any possibilities to do so efficiently? Are th

Re: from array update algorithm to nice Haskell code

2003-12-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. Dezember 2003 00:06 schrieb Daan Leijen: > Hi Wolfgang, > > > is there some documentation about the complexity of the FiniteMap and Set > > operations? > [...] > The operations in the "Data.FiniteMap" library in Ghc have the same > complexity of the operations in the "DData.Map"

long lines of code with Haddock

2003-12-31 Thread Wolfgang Jeltsch
Hello, Haddock 0.6 produces output where code generated from non-comment source (like the declarations in the synopsis) is not split across multiple lines. Since my type declarations are rather long, the Haddock-produced lines get much larger than my screen when shown in a web browser. How ca

class ??? with Haddock

2003-12-31 Thread Wolfgang Jeltsch
Hello, I have a datatype Relation element1 element2 which derives an Eq instance. In the Haddock-generated documentation the instances section of Relation says (Ord element1, Ord element2, ??? element1 element2) => [...]. Why does Haddock generate this mysterious ??? element1 element

Re: class ??? with Haddock

2003-12-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. Dezember 2003 17:48 schrieb Sven Panne: > Wolfgang Jeltsch wrote: > > I have a datatype > > Relation element1 element2 > > which derives an Eq instance. In the Haddock-generated documentation the > > instances section of Relation says > >

Haddock and module properties

2004-01-02 Thread Wolfgang Jeltsch
Hello, the sources of the hierarchical libraries contain things like Portability : portable in the module descriptions. Some of these property descriptions make it into the HTML documentation, some not. I'm looking for a documentation about these things. Why doesn't the Haddock User Guide

Re: Haddock and man pages

2004-01-02 Thread Wolfgang Jeltsch
Am Freitag, 2. Januar 2004 14:02 schrieb Per Larsson: > Hi, > > When you have a good understanding of a programming library and only need > to quickly refresh your memory regarding the type signature of a specific > function, etc., I find man pages very convenient. Are there any plans of > adding

Re: Combining distinct-thread state monads?

2004-01-06 Thread Wolfgang Jeltsch
Hello, your problem can be solved with StateT: (warning: untested code) First we want to execute two independent state threads: start1 :: Monad m => StateT Int m startOutput1 start1 = start2 :: Monad m => StateT Bool m startOutput2 start2 = After this there is a part where we

mkSet on sorted lists

2004-01-07 Thread Wolfgang Jeltsch
Hello, does Data.Set.mkSet run in linear time when applied to a sorted list? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Hugs with C preprocessor

2004-01-07 Thread Wolfgang Jeltsch
Hello, I want to use Haskell files with #ifdef, #else and #endif preprocessor directives. I tried hugs -F "cpp -P" but cpp complains about unterminated character constants. What is wrong? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://

Re: class ??? with Haddock

2004-01-07 Thread Wolfgang Jeltsch
Am Mittwoch, 31. Dezember 2003 17:48 schrieben Sie: > Wolfgang Jeltsch wrote: > > I have a datatype > > Relation element1 element2 > > which derives an Eq instance. In the Haddock-generated documentation the > > instances section of Relation says > >

Re: Hugs with C preprocessor

2004-01-08 Thread Wolfgang Jeltsch
Am Mittwoch, 7. Januar 2004 20:37 schrieb Alastair Reid: > > I want to use Haskell files with #ifdef, #else and #endif preprocessor > > directives. I tried hugs -F "cpp -P" but cpp > > complains about unterminated character constants. What is wrong? > > ANSI C preprocessors tend to get confused

Re: Combining distinct-thread state monads?

2004-01-08 Thread Wolfgang Jeltsch
Am Donnerstag, 8. Januar 2004 03:20 schrieben Sie: > [...] > Thanks for your informative reply. You're welcome. > [...] > One disadvantage is that it lacks symmetry in that one monad is arbitrarily > chosen to sit inside the other. Yes, I see this as a disadvantage, too. > I found another app

  1   2   3   4   >