Re: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-05 Thread Wolfgang Jeltsch
Am Freitag, 5. August 2005 08:04 schrieb Till Mossakowski: [...] I disagree with the equation primitives = unsafe that is implicit in sentence to be implemented _efficiently_, also needs something like unsafePerformIO (or even lower-level unsafe mutable state primitives). The point

Re: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-04 Thread Wolfgang Jeltsch
Am Mittwoch, 3. August 2005 19:07 schrieb Srinivas Nedunuri: [...] I have a bunch of ST code, and then somewhere in there I had the misfortune of needing to insert a file copy and bam I'm now stuck with the dang IO monad which goes and infects the entire program. You can use something like

Re: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-04 Thread Wolfgang Jeltsch
Am Donnerstag, 4. August 2005 10:21 schrieb Axel Simon: [...] Nowadays, you can use one of the MonadState monad State transformer monads like State and StateT can be implemented without using special language features. So there was always the opportunity to implement something like State or

Re: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-04 Thread Wolfgang Jeltsch
Am Donnerstag, 4. August 2005 11:09 schrieben Sie: On Thu, 2005-08-04 at 10:58 +0200, Wolfgang Jeltsch wrote: Am Donnerstag, 4. August 2005 10:21 schrieb Axel Simon: [...] Nowadays, you can use one of the MonadState monad State transformer monads like State and StateT can

Re: [Haskell] Files and lazyness

2005-08-01 Thread Wolfgang Jeltsch
Am Donnerstag, 28. Juli 2005 20:01 schrieb Diego y tal: I was developing a web site using haskell programs as cgi's, and I found a strange behavior that I would like to know whether it is normal. I have reduced the problem to the next program: fEntrada = fich.txt fSalida = fich.txt

Re: [Haskell] Files and lazyness

2005-08-01 Thread Wolfgang Jeltsch
Am Montag, 1. August 2005 22:38 schrieb Tomasz Zielonka: On Thu, Jul 28, 2005 at 08:01:17PM +0200, Diego y tal wrote: [...] but.. is it normal that we have to think about this problem when programming? You just have to know, which functions mix laziness and side-effects by using

Re: switching off let-floating

2005-07-28 Thread Wolfgang Jeltsch
Am Mittwoch, 27. Juli 2005 21:39 schrieben Sie: Wolfgang Jeltsch [EMAIL PROTECTED] writes: But how do I switch off let-floating? -fno-full-laziness, I believe. I just tried using this flag. Result: GHC 6.2.2 doesn't recognize it. :-( --sigbjorn Regards, Wolfgang

Re: switching off let-floating

2005-07-28 Thread Wolfgang Jeltsch
Am Donnerstag, 28. Juli 2005 16:42 schrieb Peter Simons: Wolfgang Jeltsch writes: where is this switch documented? http://haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html #id3128647 Peter Thank you. Wolfgang ___ Glasgow-haskell

GHC 6.4 Debian packages (was: Re: switching off let-floating)

2005-07-28 Thread Wolfgang Jeltsch
Am Donnerstag, 28. Juli 2005 16:45 schrieben Sie: On Thu, 28 Jul 2005, Wolfgang Jeltsch wrote: (snip) Related question: Can anybody tell me when there will be Debian packages of GHC 6.4 available? See http://packages.debian.org/unstable/devel/ghc6 -- Mark Okay, I wasn't precise enough

more on GHC 6.4 Debian packages (was: Re: switching off let-floating)

2005-07-28 Thread Wolfgang Jeltsch
Am Donnerstag, 28. Juli 2005 16:58 schrieb Ian Lynagh: On Thu, Jul 28, 2005 at 04:37:40PM +0200, Wolfgang Jeltsch wrote: Related question: Can anybody tell me when there will be Debian packages of GHC 6.4 available? There are 6.4 packages in unstable. They aren't installable in unstable

[Haskell] strict vs. lazy state threads

2005-07-26 Thread Wolfgang Jeltsch
Hello, http://haskell.org/ghc/docs/latest/html/libraries/base/Control.Monad.ST.html says about the module Control.Monad.ST: This library provides support for strict state threads, as described in the PLDI '94 paper by John Launchbury and Simon Peyton Jones Lazy State Threads. I

Re: [Haskell] Ambiguity problem

2005-07-22 Thread Wolfgang Jeltsch
Am Freitag, 22. Juli 2005 14:58 schrieb Mads Lindstrøm: Hi I am struggling with an ambiguity problem. I have the following code: foo :: Constr - Int foo = numChildren . fromConstr numChildren :: (Data a) = a - Int numChildren x = sum $ gmapQ (\_ - 1) x which I thought would work,

Re: [Haskell] Ambiguity problem

2005-07-22 Thread Wolfgang Jeltsch
Am Freitag, 22. Juli 2005 15:56 schrieb Mads Lindstrøm: Hi Wolfgang Thank you very much for the reply. I added an extra parameter to the function, so the code now looks like: foo :: (Data a) = a - Constr - Int foo idType = (numChildren idType) . fromConstr numChildren :: (Data a) =

Re: [Haskell] line-based interactive program

2005-07-14 Thread Wolfgang Jeltsch
, readChar would have type FileReadIO Char. [...] Best wishes, Wolfgang Jeltsch ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] line-based interactive program

2005-07-12 Thread Wolfgang Jeltsch
you, that's nice. :-) Alas, the thesis will be in German so if you don't understand German all you can do is to see if I will translate the relevant parts into English. :-( Of course, the code will also tell a lot. Regards, Peter Achten Best wishes, Wolfgang Jeltsch

private modules

2005-07-11 Thread Wolfgang Jeltsch
Hello, I thought, I heard something about a private modules feature in GHC. Was I just dreaming or is there in fact something like this. I cannot find information about such a thing. Best wishes, Wolfgang ___ Glasgow-haskell-users mailing list

option for enabling generalized deriving for newtypes

2005-07-10 Thread Wolfgang Jeltsch
Hello, isn't there an option for enabling just generalized deriving for newtypes without enabling all this other stuff by using -fglasgow-exts? Best wishes, Wolfgang ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: [Haskell] line-based interactive program

2005-07-10 Thread Wolfgang Jeltsch
Am Samstag, 9. Juli 2005 18:17 schrieb Bulat Ziganshin: [...] sorry, it is probably not what i'm think about. as i can see, you are provide safe equivalent of interleaveIO, Not really. An important difference between my solution and unsafeInterleaveIO is that with unsafeInterleaveIO the

Re: [Haskell] line-based interactive program

2005-07-09 Thread Wolfgang Jeltsch
Am Samstag, 9. Juli 2005 15:25 schrieben Sie: On Fri, Jul 08, 2005 at 09:55:48PM +0200, Wolfgang Jeltsch wrote: As part of my diploma thesis, I'm working on a small collection of modules which provides safe I/O interleaving. The key point is to split the state of the world since I/O

Re: [Haskell] line-based interactive program

2005-07-09 Thread Wolfgang Jeltsch
Am Samstag, 9. Juli 2005 08:31 schrieb Bulat Ziganshin: Hello Wolfgang, Friday, July 08, 2005, 11:55:48 PM, you wrote: As part of my diploma thesis, I'm working on a small collection of modules which provides safe I/O interleaving. The key point is to split the state of the world since

Re: [Haskell] ST Monad and all that

2005-07-08 Thread Wolfgang Jeltsch
Am Freitag, 8. Juli 2005 12:48 schrieb Srinivas Nedunuri: Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef, etc. the list goes on. Is there a place

Re: [Haskell] Re: ST Monad and all that

2005-07-08 Thread Wolfgang Jeltsch
Am Freitag, 8. Juli 2005 18:50 schrieb Peter Eriksen: Srinivas Nedunuri [EMAIL PROTECTED] writes: Hello, in trying to understand how to use the ST Monad I've come across references to a bewildering variety of related types such as STRefs, STArrays, MutVar, ArrayRef, IORef, IOArray, ArrRef,

Re: [Haskell] line-based interactive program

2005-07-08 Thread Wolfgang Jeltsch
Am Freitag, 8. Juli 2005 19:21 schrieb Olaf Chitil: [...] In fact, unsafeInterleaveIO shows up limitations of the IO monad. Without this strange primitive (what is actually unsafe about it?) unsafeInterleaveIO doesn't break referential transparency, right? I suppose, it is unsafe in the

Re: [Haskell] Instance declaration of classes with method type constraints

2005-06-30 Thread Wolfgang Jeltsch
Am Donnerstag, 30. Juni 2005 14:07 schrieb Johan Holmquist: [...] Anyone: However, I haven't been able to make PRect an instance of this class (with extensions). If I understand your problem correctly, you may use the new Rect class (the one which is declared as class Num b = Rect a b | a

Re: [Haskell] Bignums in Haskell

2005-06-21 Thread Wolfgang Jeltsch
Am Dienstag, 21. Juni 2005 15:25 schrieb robert dockins: Thank you for the prompt response. Do you have any insight as to why the GMP library is used instead of another library for arbitrary precision? Also, I understand that Haskell does not specify an implementation for bignums, but why

Re: [Haskell] translation of kind

2005-06-20 Thread Wolfgang Jeltsch
Am Montag, 20. Juni 2005 11:46 schrieben Sie: Wolfgang Jeltsch wrote: can anybody tell me what the German translation of the word kind as used in type theory and especially in Haskell is? Even Peter Thiemann in Grundlagen der funktionalen Programmierung (1994) did not translate Kind

Re: [Haskell] translation of kind

2005-06-20 Thread Wolfgang Jeltsch
Am Montag, 20. Juni 2005 14:01 schrieb Ralf Hinze: Am Montag, 20. Juni 2005 13:45 schrieb Christian Maeder: you could also say ein Typkonstruktor mit Kind ... (and leave the gender open) Hier ist er: , _/^\_

Re: [Haskell] translation of kind

2005-06-20 Thread Wolfgang Jeltsch
Am Montag, 20. Juni 2005 16:36 schrieben Sie: Wolfgang Jeltsch [EMAIL PROTECTED] writes: [...] This is very bad IMO because of the existence of the German word Kind which you also mention below which means child. well, my experience having to do with translating to French parts of ISO

[Haskell] translation of kind

2005-06-18 Thread Wolfgang Jeltsch
Hello, can anybody tell me what the German translation of the word kind as used in type theory and especially in Haskell is? Best wishes, Wolfgang ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] translation of kind

2005-06-18 Thread Wolfgang Jeltsch
Am Samstag, 18. Juni 2005 20:25 schrieben Sie: can anybody tell me what the German translation of the word kind as used in type theory and especially in Haskell is? Wie wr's mit `Sorte', Ralf I have already thought about that but was not sure it was correct since the meaning of Sorte in

Re: [Haskell] how can i learn haskell?

2005-06-13 Thread Wolfgang Jeltsch
Am Freitag, 10. Juni 2005 13:14 schrieb [EMAIL PROTECTED]: go to www.haskell.org Or better, go directly to http://www.haskell.org/learning.html. [...] Best wishes, Wolfgang ___ Haskell mailing list Haskell@haskell.org

Re: [Haskell] Been there, it's great. Let's do it again, Re: HaskellForge

2005-06-01 Thread Wolfgang Jeltsch
Am Mittwoch, 1. Juni 2005 08:29 schrieb Gour: [...] The two main Haskell gui libs (gtk2hs wxhaskell) use SF, and (still) use CVS. Has someone already mentioned that SourceForge.net plans to introduce Subversion support this year? [...] Best wishes, Wolfgang

[Haskell] standard monads and strictness

2005-05-30 Thread Wolfgang Jeltsch
Hello, I looked at the implementation of Writer, WriterT, State, StateT, RWS and RWST. They all use tuples to knit the result with the written value and/or state. Now, there seems to be an inconsistency between the transformer and non-transformer variants concerning strictness. The

[Haskell] new monad library

2005-05-30 Thread Wolfgang Jeltsch
By the way, wasn't there some effort to build a new monad library which should replace most of the things under Control.Monad? Best wishes, Wolfgang ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] simple MonadWriter instance

2005-05-30 Thread Wolfgang Jeltsch
Hello, there is an instance MonadReader r ((-) r). Why isn't there an instance MonadWriter w ((,) w)? Best wishes, Wolfgang ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] signification of RWS and RWST

2005-05-30 Thread Wolfgang Jeltsch
Hello, why do we have RWS and RWST in the libaries? Isn't RWS r w s a isomorphic to ReaderT r (StateT s (Writer w a)) and RWST r w s m isomorphic to ReaderT r (StateT s (WriterT w m a))? Best wishes, Wolfgang ___ Haskell mailing list

[Haskell] integration of functional and imperative programming concepts

2005-03-03 Thread Wolfgang Jeltsch
Hello, for my diploma thesis, I need to find information about integration of functional and imperative programming concepts. Could somebody of you point me to good websites, papers, etc. about this topic? Thanks a lot. Best wishes, Wolfgang ___

Re: [Haskell] Haskell in Trove Software Map

2004-10-23 Thread Wolfgang Jeltsch
Am Samstag, 23. Oktober 2004 10:03 schrieb Anders Höckersten: Hi, Apparently, I in June asked Sourceforge to add Haskell as a language categorization in their so called Trove Software Map. I had forgotten all about this, but just received a mail that Haskell has been added. Hi, good news!

Re: [Haskell] hscpp

2004-09-28 Thread Wolfgang Jeltsch
Am Dienstag, 28. September 2004 11:51 schrieb Malcolm Wallace: Wolfgang Jeltsch [EMAIL PROTECTED] writes: there was some discussion about a Haskell-friendly CPP a while ago. What happend to this project? I desperately need such a preprocessor. It is called cpphs, and is currently

Re: [Haskell] hscpp

2004-09-28 Thread Wolfgang Jeltsch
Am Dienstag, 28. September 2004 16:24 schrieb Ian Lynagh: [...] It would be very good if cpphs would enter the next stable Debian release (3.1). I'm told this is still possible, so I'll have a look at it unless someone else says they already have or want to. Thanks a lot. Thanks Ian

[Haskell] hscpp

2004-09-27 Thread Wolfgang Jeltsch
Hello, there was some discussion about a Haskell-friendly CPP a while ago. What happend to this project? I desperately need such a preprocessor. CPP 3.3.4, which I use now, is not usable for me because you cannot have such a simple thing like a \\ operator with it. How do others solve such

Re: [Haskell] Annoying naming clashes

2004-06-15 Thread Wolfgang Jeltsch
Am Dienstag, 15. Juni 2004 04:05 schrieb John Meacham: [...] now classes are a bit trickier, the main thing is that classes in haskell are not like classes in other languages. A class in haskell is nothing more than a construct allowing you to reuse the same syntax on different types. (to

[Haskell] auto-qualification of identifiers in Haddock

2004-05-15 Thread Wolfgang Jeltsch
Hello, take the following module: module InfiniteList where import Prelude hiding (repeat) data InfiniteList e = InfiniteList e (InfiniteList e) {-| Essentially the same as 'Prelude.repeat'. -} repeat :: e - InfiniteList e repeat e

Re: [Haskell] Re: [Haskell-cafe] Call for recommendation

2004-05-02 Thread Wolfgang Jeltsch
Am Sonntag, 2. Mai 2004 01:51 schrieb Don Groves: On Sat, 1 May 2004 20:52:45 +0800 (CST), [EMAIL PROTECTED] wrote: Hi, all I'm a newbie to Haskell and FP now, I need your help. Could anybody give me any advice on how to learn and master the Haskell language and thinking/programming in

Re: [Haskell] sizeFM type

2004-04-27 Thread Wolfgang Jeltsch
Am Dienstag, 27. April 2004 00:55 schrieb Don Groves: [...] Wolfgang and Remi, Thanks to you both for the explanation. Yes, the GHC Integer type does what I was referring to and clearly anything done at runtime will slow execution. For future reference, if I know an integer will never

Re: [Haskell] sizeFM type

2004-04-27 Thread Wolfgang Jeltsch
Am Dienstag, 27. April 2004 07:09 schrieb Donald Bruce Stewart: [...] To ask a silly question, is Int defined as 32 bits or is it defined in a similar vein to C's int? Well, you can all look this up, at least in GHC's implementation: It seems that people sometimes tend to think that GHC

Re: [Haskell] sizeFM type

2004-04-26 Thread Wolfgang Jeltsch
Am Montag, 26. April 2004 17:06 schrieb Philippa Cowderoy: [...] To ask a silly question, is Int defined as 32 bits or is it defined in a similar vein to C's int? I think it is defined to cover at least the numbers from -(2 ^ 27) + 1 to 2 ^ 27 - 1. So its exact range is

Re: [Haskell] sizeFM type

2004-04-26 Thread Wolfgang Jeltsch
Am Montag, 26. April 2004 20:45 schrieb Don Groves: [...] Hello, Haskell newbie here. Some languages handle the Int/Integer question automatically, determined by the size of the integer in question. Int is used until the integer excedes what the underlying architecture can handle, then

Re: [Haskell-cafe] FiniteMap, Map, FiniteSet, Set

2004-04-24 Thread Wolfgang Jeltsch
Am Samstag, 24. April 2004 03:50 schrieb John Meacham: On Fri, Apr 23, 2004 at 08:02:47PM -0500, [EMAIL PROTECTED] wrote: Why does the library have [FiniteMap and Set] instead of [FiniteMap and FiniteSet] or just [Map and Set]? Is there some reason for this inconsistency? Historical

Re: [Haskell-cafe] Hierarchical Library

2004-04-24 Thread Wolfgang Jeltsch
Am Samstag, 24. April 2004 09:23 schrieb [EMAIL PROTECTED]: Hello, Why does this fail? == import System.Posix test = Temp.mkstemp == Are the libraries hierarchical in name only? Thanks, James Use import System.Posix.Temp test

Re: [Haskell-cafe] Hierarchical Library

2004-04-24 Thread Wolfgang Jeltsch
Am Samstag, 24. April 2004 10:40 schrieb Wolfgang Jeltsch: [...] Use import System.Posix.Temp test = mkstemp instead. By the way, you can also use import System.Posix.Temp test = System.Posix.Temp.mkstemp or import System.Posix.Temp as Temp mkstemp = Temp.mkstemp

Re: [Haskell-cafe] A useful trick for inclusion and exclusion of commented code

2004-04-12 Thread Wolfgang Jeltsch
Am Sonntag, 11. April 2004 23:14 schrieb Sunil KOTHARI: Here's a little trick that I often use for inclusion and exclusion of a chunk of code. Imagine we have a function foo defined below. The three lines of code can be included or excluded just by a changing a single character --- that's

Re: [Haskell-cafe] Newbie: Is it possible to catch _|_ ?

2004-04-06 Thread Wolfgang Jeltsch
Am Dienstag, 6. April 2004 16:23 schrieb Russ Lewis: Another newbie question: Is it possible to catch _|_ - that is, to encounter it, handle it and continue? I'm assuming that you all are going to say no, since I can't figure out any way to do this and retain the functional nature of Haskell.

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 10:28 schrieb Henning Thielemann: On Wed, 31 Mar 2004, Simon Peyton-Jones wrote: I'm sorry to say that you just can't make Set an instance of Monad. To make an instance of Monad for a type constructor T you must have a function bindT :: forall a b. T a -

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 13:51 schrieb Henning Thielemann: [...] A data type declaration creates two things - the data type itself and the constructor function. If you consider the constrains in the data type declaration to apply only to the constructor then it all makes sense. If

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 14:36 schrieb MR K P SCHUPKE: This syntax would also have the advantage that you can apply different contexts to different constructors. Er, you can already do that as I just pointed out: data (Ord a,Num b) = Either a b = Left a | Right b Note that to constrain

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-31 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 15:42 schrieb MR K P SCHUPKE: data Either a =3D Num a =3D Left a Ord a =3D Right a This is a mistake because the same variable is being constrained in two different ways. The only way both constrains can be satisfied is if a is both

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-30 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 00:11 schrieb S. Alexander Jacobson: [...] Could not deduce (Ord b) from the context (Monad Set) arising from use of `concatSets' at dbMeta3.hs:242 Probable fix: Add (Ord b) to the class or instance method `=' In the definition of `=': =

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-30 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 03:11 schrieb Benjamin Franksen: instance Monad Set where m = k = concatSets (mapSet k m) return x = unitSet x fail s = emptySet concatSets sets = foldl union emptySet (setToList sets) instance (Eq b,Ord b) = Ord (Set b) where

Re: [Haskell-cafe] Adding Ord constraint to instance Monad Set?

2004-03-30 Thread Wolfgang Jeltsch
Am Mittwoch, 31. März 2004 09:32 schrieben Sie: On Wed, Mar 31, 2004 at 08:48:35AM +0200, Wolfgang Jeltsch wrote: Now, as i think a little more about it, i believe what you want to do makes no sense. The monad operation '=' works on monads over *different* 'element' (i.e. argument) types

Re: [Haskell] deriving with newtypes

2004-03-23 Thread Wolfgang Jeltsch
Am Dienstag, 23. März 2004 12:31 schrieben Sie: Op zo 21-03-2004, om 18:54 schreef Wolfgang Jeltsch: Hello, I'm trying to use GHC's deriving mechanism for newtypes in the following way: class C a b instance C [a] Char newtype T = T Char deriving C [a] Unfortunately

Re: [Haskell] reasons for non-portability

2004-03-22 Thread Wolfgang Jeltsch
Am Montag, 22. März 2004 12:46 schrieben Sie: Am Sonntag, 21. März 2004 12:36 schrieben Sie: Wolfgang Jeltsch wrote: [...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just

Re: [Haskell] reasons for non-portability

2004-03-22 Thread Wolfgang Jeltsch
Am Montag, 22. März 2004 13:29 schrieben Sie: On Sat, Mar 20, 2004 at 08:50:10PM +0100, Wolfgang Jeltsch wrote: according to http://www.haskell.org/hierarchical-modules/libraries/ reference-libraries.html#MODULE-HEADER, each module should have a header which contains a line about

Re: [Haskell] reasons for non-portability

2004-03-21 Thread Wolfgang Jeltsch
Am Sonntag, 21. März 2004 12:36 schrieben Sie: Wolfgang Jeltsch wrote: [...] My question is, if a module is considered non-portable only if it contains non-portable constructs itself, or if a module is also non-portable if it just imports a module which is non-portable. Both, otherwise

[Haskell] deriving with newtypes

2004-03-21 Thread Wolfgang Jeltsch
Hello, I'm trying to use GHC's deriving mechanism for newtypes in the following way: class C a b instance C [a] Char newtype T = T Char deriving C [a] Unfortunately, this isn't possible. Is there a reason for this? Can I circumvent this restriction? Wolfgang

[Haskell] reasons for non-portability

2004-03-20 Thread Wolfgang Jeltsch
Hello, according to http://www.haskell.org/hierarchical-modules/libraries/ reference-libraries.html#MODULE-HEADER, each module should have a header which contains a line about portability. My question is, if a module is considered non-portable only if it contains non-portable

Re: [Haskell-cafe] State Monad

2004-03-03 Thread Wolfgang Jeltsch
Am Mittwoch, 3. Mrz 2004 14:44 schrieb Georg Martius: [...] Now I have also functions to map from (a, String) - (a,String). I could write: modifyT :: ((a, String) - (a, String)) - a - State String a modifyT trans a = do str - get let (a', str') = trans (a, str)

Re: [Haskell-cafe] State Monad

2004-03-03 Thread Wolfgang Jeltsch
Am Mittwoch, 3. Mrz 2004 18:15 schrieb Georg Martius: Thanks for your answer. I got it now. It works with lift instead of liftM. Yes, of course. Georg Wolfgang ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Re: [Haskell] System.Random

2004-03-02 Thread Wolfgang Jeltsch
Am Dienstag, 2. März 2004 13:47 schrieb Jerzy Karczmarczuk: Simon Marlow wrote: why is the Random module situated under System? Wouldn't something like Data be more adequate? There is usually an external source of randomness, which is why the library in placed in System rather than Data.

[Haskell] System.Random

2004-03-01 Thread Wolfgang Jeltsch
Hello, why is the Random module situated under System? Wouldn't something like Data be more adequate? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Re: Data.Set whishes

2004-02-20 Thread Wolfgang Jeltsch
Am Freitag, 20. Februar 2004 10:23 schrieb Koen Claessen: http://www.haskell.org/hierarchical-modules/libraries/library-design.html I have always wondered why the module system is not used at all in these conventions. I mean, the function names seem to come straight from the Haskell 1.2 days

Re: [Haskell] Re: Data.Set whishes

2004-02-20 Thread Wolfgang Jeltsch
Am Freitag, 20. Februar 2004 12:51 schrieb Bayley, Alistair: Excuse my ignorance, but why can't you just say: import qualified Data.Set as Set You can do so. I knew itI'd have missed something. ;-) [...] Wolfgang ___ Haskell mailing list [EMAIL

[Haskell] Re: Data.Set whishes

2004-02-16 Thread Wolfgang Jeltsch
Am Montag, 16. Februar 2004 10:05 schrieb Ketil Malde: Wolfgang Jeltsch [EMAIL PROTECTED] writes: * subsetOf :: Ord element = Set element - Set element - Bool (Isn't isSubsetOf a better name?) So is isElementOf. I just said subsetOf to be consistent with elementOf. Well, the naming

Re: [Haskell] Re: non-ASCII characters in Haddock documentation

2004-02-15 Thread Wolfgang Jeltsch
Am Sonntag, 15. Februar 2004 06:01 schrieb Ashley Yakeley: In article [EMAIL PROTECTED], Wolfgang Jeltsch [EMAIL PROTECTED] wrote: how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation? Can't you use HTML entities? Haddock isn't restricted to HTML

Re: [Haskell] Re: non-ASCII characters in Haddock documentation

2004-02-15 Thread Wolfgang Jeltsch
Am Sonntag, 15. Februar 2004 22:14 schrieb Wolfgang Jeltsch: [...] So the logical thing would be if, e.g., szlig; would be translated to the HTML code amp;szlig; in order to show up as szlig; in the browser. In fact, Haddock behaves this way. (just checked) [...] Wolfgang

Re: [Haskell] hs2lhs

2004-02-14 Thread Wolfgang Jeltsch
Am Samstag, 14. Februar 2004 19:54 schrieb Derek Elkins: [...] GHC comes with an unlit program that will convert lhs to hs files, there's probably also some flag you can give to GHC to have it spit out the .hs file after processing it. ghc -E Module.lhs, maybe. [...] Wolfgang

Re: [Haskell] non-ASCII characters in Haddock documentation

2004-02-13 Thread Wolfgang Jeltsch
Am Freitag, 13. Februar 2004 01:23 schrieben Sie: wolfgang: Hello, how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation? Wolfgang Looks like it might be difficult. The haddock lexer src has: $alphanum = [A-Za-z0-9] So, non-ascii might

[Haskell] non-ASCII characters in Haddock documentation

2004-02-12 Thread Wolfgang Jeltsch
Hello, how do I insert non-ASCII and maybe even non-Latin-1 characters in Haddock documentation? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Haddock index

2004-02-01 Thread Wolfgang Jeltsch
Hello, I've generated Haddock HTML documentation for some modules. There are doc-index-letter.html files for 15 letters. Surprisingly, doc-index.html shows only the letters C, D, F, G, I and T. What's wrong here? Wolfgang ___ Haskell mailing list

Re: [Haskell] Haddock index

2004-02-01 Thread Wolfgang Jeltsch
Am Sonntag, 1. Februar 2004 23:57 schrieb Wolfgang Jeltsch: Hello, I've generated Haddock HTML documentation for some modules. There are doc-index-letter.html files for 15 letters. Surprisingly, doc-index.html shows only the letters C, D, F, G, I and T. What's wrong here? Wolfgang I'm

Re: [Haskell] Re: Use of tab characters in indentation-sensitive code

2004-01-26 Thread Wolfgang Jeltsch
Am Sonntag, 25. Januar 2004 23:42 schrieb Sebastian Sylvan: Sean L. Palmer wrote: Besides, the idea would be not to use nbsp, but rather some indent paragraph tag. This is kind-of a cool idea. If I ever take a course involving writing my own language I'll be sure to incorporate this idea.

Hugs/GHC incompatibility

2004-01-21 Thread Wolfgang Jeltsch
Hello, I have some code which runs fine with GHC/GHCi but signals Program error: undefined array element when run with Hugs. Does anyone know why this difference occurs and where I have to search for the cause of the error in my code? Wolfgang

Re: Hugs/GHC incompatibility

2004-01-21 Thread Wolfgang Jeltsch
Am Mittwoch, 21. Januar 2004 21:52 schrieb Wolfgang Jeltsch: Hello, I have some code which runs fine with GHC/GHCi but signals Program error: undefined array element when run with Hugs. Does anyone know why this difference occurs and where I have to search for the cause of the error

Re: Hugs/GHC incompatibility

2004-01-21 Thread Wolfgang Jeltsch
Am Mittwoch, 21. Januar 2004 23:03 schrieb Iavor S. Diatchki: hi, not that it matters, but i think commonly when specifications say that something is undefined, that means that the behaviour can be whatever, i.e. the implementors can do what they like. this is not to be confused with the

Re: graphs and trees again

2004-01-14 Thread Wolfgang Jeltsch
Am Dienstag, 13. Januar 2004 22:56 schrieb Ross Paterson: On Tue, Jan 13, 2004 at 09:36:58PM +0100, Wolfgang Jeltsch wrote: Am Dienstag, 13. Januar 2004 19:12 schrieb Ross Paterson: * made the types abstract, but provided the equivalent constructor and destructor functions. I'm

Haddock and fixity declarations

2004-01-14 Thread Wolfgang Jeltsch
Hello, could Haddock be made to document also fixity declarations? Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

graphs and trees again

2004-01-13 Thread Wolfgang Jeltsch
Hello, for my studies I recently needed graph and tree handling code. Because nothing I found seemed to satisfy my needs, I finally started writing my own graph and tree module. I was especially disappointed with Data.Graph and Data.Tree. The reasons are: * The Implementation of the

Re: mkSet on sorted lists

2004-01-12 Thread Wolfgang Jeltsch
Am Sonntag, 11. Januar 2004 22:15 schrieb Tomasz Zielonka: On Wed, Jan 07, 2004 at 07:30:35PM +0100, Tomasz Zielonka wrote: On Wed, Jan 07, 2004 at 05:41:04PM +0100, Wolfgang Jeltsch wrote: Hello, does Data.Set.mkSet run in linear time when applied to a sorted list? No, at least

Re: from array update algorithm to nice Haskell code

2004-01-09 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? [...] Also, all DData functions have their complexity listed in the documentation. See: http://www.cs.uu.nl/~daan/ddata.html

Re: from array update algorithm to nice Haskell code

2004-01-09 Thread Wolfgang Jeltsch
Am Freitag, 9. Januar 2004 23:45 schrieb Daan Leijen: Now assume that I have a set a with O(n) elements and a set b with O(1) elements. You can't have O(1) elements ... (A bound like O(..) talks about the worst case time/space of an operation.) Well, the O calculus isn't bound to resource

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 source_file_name but cpp complains about unterminated character constants. What is wrong? ANSI C preprocessors tend to get

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 approach

Re: class ??? with Haddock

2004-01-08 Thread Wolfgang Jeltsch
Am Donnerstag, 8. Januar 2004 11:02 schrieb Simon Marlow: How do I instruct Haddock to preprocess the Haskell files. From your mail I thought that Haddock would do so by default but it complains at the first #ifdef it sees. Unfortunately, I didn't find any Haddock option similar to Hugs'

Re: Hugs with C preprocessor

2004-01-08 Thread Wolfgang Jeltsch
Am Mittwoch, 7. Januar 2004 21:46 schrieb Wolfgang Jeltsch: [...] I tried hugs -F cpp -P -traditional but got the same error message as without -traditional. This message is, suprisingly, sh: line 1: /usr/lib/hugs/libraries/Hugs/Prelude.hs: Permission denied ERROR /usr/lib/hugs

Re: class ??? with Haddock

2004-01-08 Thread Wolfgang Jeltsch
Am Donnerstag, 8. Januar 2004 11:02 schrieben Sie: [...] Anyway, you can use GHC to preprocess your source files before feeding them to Haddock: $ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs This only replaces all __HADDOCK__ occurences with 1 but doesn't process #ifdefs. [...]

Re: class ??? with Haddock

2004-01-08 Thread Wolfgang Jeltsch
Am Donnerstag, 8. Januar 2004 17:39 schrieb Simon Marlow: [...] $ ghc -E -cpp -D__HADDOCK__ Foo.hs -o Foo.raw-hs This only replaces all __HADDOCK__ occurences with 1 but doesn't process #ifdefs. Are you sure? It works for me, and it's what we use in GHC's libraries. I found the

Re: class ??? with Haddock

2004-01-08 Thread Wolfgang Jeltsch
Am Donnerstag, 8. Januar 2004 17:44 schrieb Simon Marlow: [...] One thing I forgot to mention is that you also need to remove the pesky lines beginning with '#' that the C preprocessor leaves behind. Here's what we do in GHC: $ ghc -D__HADDOCK__ -E -cpp Foo.hs -o Foo.tmp $ sed

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 source_file_name but cpp complains about unterminated character constants. What is wrong? Wolfgang ___ Haskell mailing list [EMAIL

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 (Ord element1, Ord element2, ??? element1

<    2   3   4   5   6   7   8   9   >