Re: [Haskell] Type Lambdas in Gofer

2007-08-01 Thread Stefan Holdermans
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wolfgang, Why did Gofer have this power while Haskell does not? Quite probably they never bothered to test it. More probably ;-) they did test it and just swept it under the carpet in order not

Re: [Haskell] Higher kind type inference paper

2006-12-07 Thread Stefan Holdermans
Edsko, Are there any papers that describe how higher kind type inference (and I really mean higher kind, not higher rank) is done? I'm not aware of any specific papers (but maybe someone else can jump in, here?), but as long as your kind language is simple enough, say k, v ::= *

Re: [Haskell] Re: reflection/metadata in Haskell?

2005-09-23 Thread Stefan Holdermans
Srinivas, mkT :: (Typeable a, Typeable b) => (b -> b) -> a -> a mkT f = case cast f of Just g -> g Nothing -> id From the definition of cast and the examples given earlier it looks like cast needs to be told what the target type (a here) is in order to know

Re: [Haskell] reflection/metadata in Haskell?

2005-09-22 Thread Stefan Holdermans
Ralf, On Sep 22, 2005, at 1:52 AM, Ralf Lammel wrote: I would rather argue that: - Template Haskell approx. *compile-time* reflection - Scrap your boilerplate II (ICFP 2004) approx. *run-time* reflection - Generic Haskell is effectively a Haskell generator I think, Generic Haskell is a Haskell

Re: [Haskell] Haskell SOE Question

2005-07-27 Thread Stefan Holdermans
Alex, Just remove the line import Word (word32ToInt) and replace all *other* occurrences of word32ToInt with fromIntegral. HTH, Stefan On Jul 27, 2005, at 10:46 AM, Alex Edelsburg wrote: Thanks for the quick reply, Lennart. If I understand you correctly, I should only have the following

Re: [Haskell] Undefined of Char.toUpper ?

2005-04-27 Thread Stefan Holdermans
Luo, I try it on Hugs for windows32, compile error: ERROR - Undefined qualified variable "Char.toUpper" It is possible that you forget to import the Char module first? Regards, Stefan ___ Haskell mailing list Haskell@haskell.org http://www.haskell.o

Re: [Haskell] Binary Tree Traversal.

2005-03-10 Thread Stefan Holdermans
Paul, Are you sure this isn't homework? ;) data BinTree a = Nil | Node a (BinTree a) (BinTree a) inorder2 :: BinTree a -> [a] -> [a] inorder2 Nil xs = [] inorder2 (Node val b1 b2) xs = (inorder2 b1 (val:(inorder2 b2 (xs Review the case for []. What does the parameter xs represent? How should i

Re: [Haskell] Context of a pattern variable

2005-01-11 Thread Stefan Holdermans
Tomasz, I have an idea for a funny extension to pattern matching in Haskell. I wonder if it was proposed before, and most importantly, if it would be seen as useful. I haven't seen anything like this before, which if of course not to say that there has never been made a similar proposal before.

Re: [Haskell] How to get different two random numbers

2004-10-06 Thread Stefan Holdermans
ldou, LD> How to get different two random numbers, and use the two LD> numbers in program,e.g LD> x = b + c LD> where LD> b && c are different random numbers between 1..n Have a look at the Random module from the standard libraries. > module Test where > import Random > > test :: Int

RE: [Haskell] Annoying naming clashes

2004-06-17 Thread Stefan Holdermans
Ben, BY> it is nice to use 'maybe', 'either' functions. However, with BY> data types with more than 2 constructors, using such function BY> tends to be tedious than pattern match, where, you can pick BY> specific constructors of interest. BY> And in order to use pattern match, I hav

RE: Use of tab characters in indentation-sensitive code

2004-01-24 Thread Stefan Holdermans
Sean, > Why has HTML been out for many many years, and yet > programming languages still use plain ASCII text exclusively? > Don't we have similar needs as other electronic document > manipulators? Mmm ... I don't like that idea too much. And that's for a rather obvious reason actually: writi

[Parsec] Extracting line and column numbers

2004-01-13 Thread Stefan Holdermans
s abstract and I cannot extract the line and column numbers from a SourcePos value. What are my options? With kind regards, Stefan Holdermans ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell