Generic programming bundle released

2001-08-09 Thread Ralf Laemmel
appreciate your feedback. Regards, Joost Visser and Ralf Laemmel -- Dr.-Ing. Ralf Laemmel CWI VU, Amsterdam, The Netherlands http://www.cwi.nl/~ralf/ http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: multiparameter generic classes

2002-03-03 Thread Ralf Laemmel
/haskell -- Dr.-Ing. Ralf Laemmel CWI VU, Amsterdam, The Netherlands http://www.cwi.nl/~ralf/ http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

first-class polymorphism beats rank-2 polymorphism

2002-03-06 Thread Ralf Laemmel
experience makes me think that it should be possible. Anyway, can this problem be solved? Any hint appreciated. Ralf -- Dr.-Ing. Ralf Laemmel CWI VU, Amsterdam, The Netherlands http://www.cwi.nl/~ralf/ http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list

class hierarchies inmature in hugs

2002-03-07 Thread Ralf Laemmel
should have suffered from that? Ralf -- Dr.-Ing. Ralf Laemmel CWI VU, Amsterdam, The Netherlands http://www.cwi.nl/~ralf/ http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

RE: first-class polymorphism beats rank-2 polymorphism

2002-03-08 Thread Ralf . Laemmel
Simon Peyton-Jones wrote: In fact GHC does forall-lifting on type signatures to bring the foralls to the front. But there's a bug in 5.02's forall-lifting... ... Perhaps you can try the 5.03 snapshot release? Certain things work there. In fact, it is fascinating. But now I did a new

RE: first-class polymorphism beats rank-2 polymorphism

2002-03-11 Thread Ralf . Laemmel
Simon Peyton-Jones wrote: Indeed the foralls are at the top, but I claim that wherever you could use the composition function you were expecting, you can also use the one GHC gives you. The two types are isomorphic. ... Let me know if you find a situation where this isn't true. ... No I

Functional design patterns (was: How to get functional software engineering experience?)

2002-05-15 Thread Ralf . Laemmel
mean that the firm adherence to a well-designed format for a catalogue is the key. Ralf -- Dr.-Ing. Ralf Laemmel CWI VU, Amsterdam, The Netherlands http://www.cwi.nl/~ralf/ http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http

CFC: SCP Special Issue on Program Transformation

2002-10-25 Thread Ralf Laemmel
Not just a few haskell@... subscribers do transformation for/with functional programming. Thanks for passing on to interested authors. -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ Special Issue on Program Transformation Science

New Strafunski packages released

2002-11-10 Thread Ralf Laemmel
, and can be directed to the authors: * Ralf Laemmel([EMAIL PROTECTED]) * Joost Visser([EMAIL PROTECTED]) Have fun! ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Design patterns in Haskell

2002-12-03 Thread Ralf Laemmel
@... ? -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Last Call: SCP Special Issue on Program Transformation; Deadline 1.4.2003

2003-02-17 Thread Ralf Laemmel
of functional languages, and it is also a typical application domain of functional programming. Other keywords: Meta-programming, XML processing, refactoring.) -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ Special Issue on Program

Re: Collecting values from Functors?

2003-06-05 Thread Ralf Laemmel
of these datatypes is normally an ingenious process as opposed to boilerplate programming in the sense of AST or document traversal.) Ralf L. -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ ___ Haskell

Re: Language extension proposal

2003-06-28 Thread Ralf Laemmel
thing entirely safe and transparent. -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Language extension proposal

2003-06-28 Thread Ralf Laemmel
Ashley Yakeley wrote: At 2003-06-28 02:51, Ralf Laemmel wrote: Suffering from persecution mania, I prefer to know for sure that nobody never ever will pattern match on those a's. So I prefer to write: I don't understand. Did you mean pattern-match on MkType? I could stop that by hiding

Re: StrategyLib - need help

2003-07-24 Thread Ralf Laemmel
639D ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf

Re: StrategyLib - need help

2003-07-25 Thread Ralf Laemmel
of types and I'd like to print all of them. -- Dmitry Astapov //ADEpt GPG KeyID/fprint: F5D7639D/CA36 E6C4 815D 434D 0498 2B08 7867 4860 F5D7 639D ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- Ralf

Re: *safe* coerce, for regular and existential types

2003-08-01 Thread Ralf Laemmel
Stephanie Weirich's type-safe cast fit for nominal type analysis. -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: *safe* coerce: four methods compared

2003-08-02 Thread Ralf Laemmel
your boilerplate: a practical design pattern for generic programming by Ralf Lämmel and Simon Peyton-Jones, appeared in Proceedings of TLDI 2003, ACM Press http://www.cs.vu.nl/boilerplate/#paper -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http

command-line options become extensional imports

2003-09-11 Thread Ralf Laemmel
Regarding M. P. Jones proposal to move command-line options to the module space, I would like to reiterate something from an earlier email: What if you want to express that overlapping instances are fine for a certain class C but not for the rest? Recasted to the module speak of MPJ, would that

Re: Generic Haskell Diffs?

2003-11-14 Thread Ralf Laemmel
[EMAIL PROTECTED] wrote: According to the communities report there are different generic haskell projects (Jeuring/Hinze and PJ/Lämmel) out there. But I don't understand their relation. Can you use both at the same time? Is one building on the other? Are there adressing different issues? A

FOAL 2004 -- deadline 19.01.2004

2003-12-05 Thread Ralf Laemmel
(* This field has meanwhile seen a number of contributions from the functional programming community. So it is fair to assume that the present announcement is of interest for some subscribers of this list. *) FOAL: Foundations of Aspect-Oriented Languages A one day workshop affiliated

FOAL 2004 -- deadline 19.01.2004

2003-12-05 Thread Ralf Laemmel
(* This field has meanwhile seen a number of contributions from the functional programming community. So it is fair to assume that the present announcement is of interest for some subscribers of this list. *) FOAL: Foundations of Aspect-Oriented Languages A one day workshop

CFP --- FOAL 2004: Foundations of Aspect-Oriented Languages

2003-12-05 Thread Ralf Laemmel
(* This field has meanwhile seen a number of contributions from the functional programming community. So it is fair to assume that the present announcement is of interest for subscribers of this list. *) FOAL: Foundations of Aspect-Oriented Languages A one day workshop affiliated with

Re: pattern-matching extension?

2003-12-06 Thread Ralf Laemmel
As Bernie and Derek already pointed out, in principle, the rich work on intensional polymorphism and dynamic typing comes to mind. In particular, dynamics are readily supported in Haskell. Let me add the following. Type-safe cast is now clearly localised in the module Data.Typeable. (Due to a

Re: [Haskell] new primitive instances of Data?

2004-01-29 Thread Ralf Laemmel
and I have a draft which explains all this but it is too clumsy to release yet :-) All the best, Ralf -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: [Haskell] Parsing Typed Data from a String

2004-03-08 Thread Ralf Laemmel
reflection that come handy in such a context; we really plan to release [3] very soon :-) Ralf [1] The boilerplate site: http://www.cs.vu.nl/boilerplate [2] The code for this example: http://www.cs.vu.nl/boilerplate/testsuite/perm.hs [3] Scrap more boilerplate by SPJ and Ralf Laemmel, forthcoming

[Haskell] SCP Special Issue on Foundations of Aspect-Oriented Programming

2004-07-13 Thread Ralf Laemmel
[ Functional programming has contributed to the foundations of AOP over the last few years. For instance, see Walker's and Wand's contributions at ICFP 2003. ] Special Issue on Foundations of Aspect-Oriented Programming Science of Computer Programming Guest Editors: Pascal Fradet and Ralf Lämmel

[Haskell] controlling the scope of instances

2004-12-02 Thread Ralf Laemmel
Hi, I refer to Section 5.3 (title see subject line) in Type classes: exploring the design space by Simon Peyton Jones, Mark P. Jones and Erik Meijer HW 1997. There it is argued very briefly that a type system with controlled scope of instances risks coherence. Likewise, in Wadler's and Blotts

[Haskell] CFP: FOAL 2005, Foundations Of Aspect-Oriented Languages

2004-12-02 Thread Ralf Laemmel
FOAL: Foundations of Aspect-Oriented Languages A one day workshop affiliated with AOSD 2005 in Chicago, USA, on Monday, 14 March 2005. Themes and Goals FOAL is a forum for research in foundations of aspect-oriented programming languages. Areas of interest include but are not

[Haskell] SCP special issue on Foundations of AOP --- Last CFC + Deadline extension

2005-01-13 Thread Ralf Laemmel
Special Issue on Foundations of Aspect-Oriented Programming Science of Computer Programming Last Call For Contributions [ Please note the new deadline: 1 March 2005. This deadline caters for synchronisation with the FOAL 2005 workshop. See text below. ] Guest Editors: Pascal Fradet and

Re: [Haskell] Typeable and Data instances for Double, FiniteMap, ...

2005-01-18 Thread Ralf Laemmel
Georg Martius wrote: I was playing around with Scap you Boilerplate and realised some missing instances of Typeable and Data. Is there a particular reason why there is no Data Double instance? There has been a Double instance under CVS (GHC HEAD) since March 2004. It will be included in GHC

[Haskell] sugar for extensible types (was: class associated types, via GADTs.)

2005-02-16 Thread Ralf Laemmel
Assoc types and GADTs are great but I am still too fond of encoding extensible datatypes with (open) classes. I contributed to some related discussion at comp.compilers a while ago [1]. The Haskell code samples are worth sharing (because they are so simple):

[Haskell] CFP --- FOAL: Foundations of Aspect-Oriented Languages

2007-11-22 Thread Ralf Laemmel
[You can actually check that indeed Haskell folks have contributed to this workshop in the past. -- Ralf] Call for papers: FOAL: *F*oundations *o*f *A*spect-Oriented *L*anguages A one day workshop affiliated with AOSD 2008 in Brussels, Belgium, on 31 March or 1 April 2008. Themes and Goals

Re: [Haskell] Empty instance declaration

2007-12-28 Thread Ralf Laemmel
Isaac wrote: I wonder whether it would be safe for the compiler to infer simply by the default methods mentioning each other in a cycle. It might miss some cases when (probably involving laziness) the default methods actually terminate and form an intended set of implemention, and warn when

Re: [Haskell] Empty instance declaration

2007-12-28 Thread Ralf Laemmel
You did not say anything that's imprecise about mentioning each other in a cycle, just the well-known fact that it's not equivalent to total termination checking (in fact, it's neither fully an overestimate nor underestimate of termination -- it's just an estimate that's likely to be right

Re: [Haskell] detecting existing instances

2008-01-09 Thread Ralf Laemmel
Given two type classes A t and B t, I'd like the typechecker to derive different A t instances depending exactly on whether t is an instance of B. In other words, is it possible to define a class (actually a type-level function) IsB t f such that: A GHC-like type system is in principle

[Haskell] Haskell goes GPCE/OOPSLA 2008

2008-02-28 Thread Ralf Laemmel
[Deadline: 20th March] Regards, Ralf Laemmel Satellite Chair GPCE 2008 PS: The paper deadline for GPCE is in May. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] indirectly recursive dictionaries

2009-03-16 Thread Ralf Laemmel
{- Recursive instance heads as in ...  instance C0 (x,Bool) = C0 x ... are Ok if we allow for typechecking scheme as described in SYB with class. The main idea is to assume C0 x in proving the preconditions of the body of the clause. This is also works for mutual recursion among type classes and

[Haskell] Re: indirectly recursive dictionaries

2009-03-17 Thread Ralf Laemmel
AM, Ralf Laemmel rlaem...@gmail.com wrote: {- Recursive instance heads as in ...  instance C0 (x,Bool) = C0 x ... are Ok if we allow for typechecking scheme as described in SYB with class. The main idea is to assume C0 x in proving the preconditions of the body of the clause. This is also

Re: [Haskell] Data.Generics.gzip3 anyone?

2009-06-01 Thread Ralf Laemmel
On Mon, Jun 1, 2009 at 8:20 PM, David Fox da...@seereason.com wrote: Is there a Scrap Your Boilerplate guru out there who could whip up a three argument version of gzip for me? This can be done of course (untested but type-checked code follows). Left wondering what the scenario might be :-)

Re: [Haskell] Data.Generics.gzip3 anyone?

2009-06-01 Thread Ralf Laemmel
Thank you!  What I have in mind is three way merging - you have two revisions based on the same original value, and you need to decide whether they can be merged automatically or they need to be merged by a user.  You only have a real conflict when both revisions differ from the original and

[Haskell] CfP ADAPT Summer School

2010-06-23 Thread Ralf Laemmel
Dear Haskellers, this summer school contains bits of formal methods and language design that typically intersect very well with interests on this list. Looking forward to meet some of you in Koblenz. Ralf 8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  CALL FOR

[Haskell] Call for Participation: SoTeSoLa, 19-23 Aug, Koblenz

2012-07-17 Thread Ralf Laemmel
Dear Haskell-ers, SoTeSoLa is not a Haskell- or FP-centric event, but Haskell-ers are very much encouraged to represent their technological space at the school. In fact, I know for a reason that some Haskell-ers will be there, but the more the better. I expect that Haskell will play a role in one

[Haskell] Call for Remote Hackathon Participation at SoTeSoLa

2012-08-15 Thread Ralf Laemmel
to compete for the award. SoTeSoLa is a fun-oriented research event. Regards, Jean-Marie Favre (Research 2.0 Chair) Ralf Laemmel (General Chair, SoTeSoLa) Vadim Zaytsev (Hackathon Coordination) ___ Haskell mailing list Haskell@haskell.org http

strange difference between old and hierachical module names

2003-11-03 Thread Ralf Laemmel
Hi, I am trying to compile some modules with old imports such import MonadFix. These modules compile fine with GHC 6.0 latest RPM, and also on CVS source tree 6.1 somewhere from july. However, the file below does NOT get through with GHC HEAD. I get ... Compiling Foo ( Foo.hs,

Re: Data instances in ghc 6.2.1?

2004-06-23 Thread Ralf Laemmel
Hi Claus, the tuple instances did not make it into GHC 6.2 because of CVS branching policy. GHC CVS HEAD compiles the example. And yes, SPJ approved recently that Language.Haskell.Syntax should derive Data and Typeable. But, I can't access cvs.haskell.org. Already for a while, it asks for my

Re: Data instances in ghc 6.2.1?

2004-06-24 Thread Ralf Laemmel
Claus Reinke wrote: For context: I wanted to show people in the haskell tools thread - how easy it is these days to write a Haskell program transformation for instrumenting source code with asserts, e.g. to get location info for heads of empty lists :-) Yes, it is easy! - why these lovely

Interesting non-terminating behaviour for recursive classes

2004-12-01 Thread Ralf Laemmel
Hi Simon and others, this is an interesting feature. The three attached files are largely the same. They don't do too weird stuff except a little bit instance-constraint-level recursion among classes. (and some use of undecidable instances ...) (There are embedded comments in the files.) (I used

Re: -fallow-incoherent-instances

2004-11-30 Thread Ralf Laemmel
Hi, you do realise that -fallow-incoherent-instances is enabling a hell. What mostly happens is that the most general instance is chosen. Which explains the error here: Say the confusing instance is chosen (because it is generic) and hence the type checker tries to establish the Confuse

Re: gfindtype type

2005-01-26 Thread Ralf Laemmel
read it, i.e., before a first cup of coffee. Sorry. Regards, Stefan ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands

Re: Restricted Types and Infinite Loops

2005-02-17 Thread Ralf Laemmel
Hi Simon SD, cc Simon PJ, (Since the _evaluation_ does not terminate (rather than type checking), this seems to imply that evaluation-time dictionary construction does not terminate. Right?) Anyhow, do this change, and your code works. diff SDF.save SDF.hs 10c10 class (Data (DictClassA a) b,

Re: Restricted Types and Infinite Loops

2005-02-18 Thread Ralf Laemmel
Hi Simon (PJ), cc Simon (DF), I rather reckon we are facing a bug here. The attached minimalised Foo.hs shows the offending code pattern. With GHC 6.2 we get *** Exception: loop With GHC 6.4 we get(still waiting for the rest of the string) The scenario is about class/instance-head-level

Re: gunfoldl

2005-02-18 Thread Ralf Laemmel
It is called gunfold rather than gunfoldl as you will see when you browse the Data.Generics.Basics. Also, your gunfold code looks like it will not work. Here is a simple example for Maybe: gunfold k z con = case constrIndex con of 1 - z Nothing -- no children 2 - k (z

Re: Polymorphic lists...

2004-03-08 Thread Ralf Laemmel
I would like to see your code indeed ... it seems the attachment was missing. Anyway, I am not sure if it obvious or not, but heterogenously typed lists can be nicely modelled with Data.Typeable (!!!) I guess we should add something like this to the module? See

Re: Polymorphic lists...

2004-03-09 Thread Ralf Laemmel
Hi Kean, looks cool. I get your point about static typing. I guess that adding a fold operator would make your implementation more complete. Oleg has also encountered some of your operations (as you probably know): http://www.haskell.org/pipermail/haskell/2003-August/012355.html (Oleg also

Re: Polymorphic lists...

2004-03-10 Thread Ralf Laemmel
MR K P SCHUPKE wrote: Hi Oleg, I like the polymorphic list indexed by Ints... there do seem to be a couple of differences between this and the list indexed by natural numbers. ... Agreed with these differences. Another difference: it is initially a heterogeneous set rather than list!

Re: What happened to constrFields?

2004-05-09 Thread Ralf Laemmel
The problem is that constrFields is not included with 6.2.1. You would need to build GHC from CVS. It will be in 6.4 for sure. And yes, you are right, there is no other way to get the names of all fields of a constructor. Ralf Stefan Reich wrote: In recent versions of the GHC libraries,

Re: Modelling Java Interfaces with Existential data types

2004-06-07 Thread Ralf Laemmel
{-# OPTIONS -fglasgow-exts #-} {-# OPTIONS -fallow-overlapping-instances #-} {- Hi Mike, You might heterogeneous lists useful. http://www.cwi.nl/~ralf/HList/ See the treatment of your example below. Cheers, Ralf -} import HList import HTypeDriven -- These are your two implementations.

[Haskell-cafe] Haskell in image processing

2009-12-23 Thread Ralf Laemmel
Disclaimer: this is an Xmas gift as opposed to serious stuff. http://professor-fish.blogspot.com/2009/12/major-breakthrough-in-image-processing.html Greetings, Ralf ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: What are the MonadPlus laws?

2005-01-26 Thread Ralf Laemmel
Stratego). All in all, this more like try and catch or exception handling rather than calculations returning multiple values. Ralf -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ ___ Haskell-Cafe mailing list Haskell-Cafe

ovelapping instances under control

2003-05-31 Thread Ralf Laemmel
, technically)? Ralf -- Ralf Laemmel VU CWI, Amsterdam, The Netherlands http://www.cs.vu.nl/~ralf/ http://www.cwi.nl/~ralf/ ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Data representation, maybe reflection, laziness

2003-11-01 Thread Ralf Laemmel
Hi Mark, The boilerplate style of generic programming [1] should be of help here. For example, here you can see how to do a normal read and show: http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Data/Generics/Text.hs?only_with_tag=MAIN We are also using this style to do decode

Re: Another fold question

2003-11-06 Thread Ralf Laemmel
Continuing Keith's self-reply ... the Music type involves types other than Music; so it is fair to say that ultimately you would need generalised folds extended to the case of *systems* of datatypes (cf. Dealing with large bananas). Imagine for example getPitches :: Music - [Pitch]. Even if a

Re: Type tree traversals [Re: Modeling multiple inheritance]

2003-11-06 Thread Ralf Laemmel
Brandon Michael Moore wrote: Great. But I can't build from the source: I'm getting errors about a missing config.h.in in mk. I'm just trying autoconf, comfigure. I'll look closer over the weekend. Use the following (more specifically autoREconf). The GHC build guide is behind. cvs -d

[Haskell-cafe] Re: Modelling Java Interfaces with Existential data types

2004-06-08 Thread Ralf Laemmel
Hi Mike, Let's redirect to Haskell cafe. http://www.mail-archive.com/glasgow-haskell-users%40haskell.org/msg06288.html http://www.mail-archive.com/glasgow-haskell-users%40haskell.org/msg06289.html thanks for your time to look into the HList paper. 1. It looks like your HList is basically a

Re: [Haskell-cafe] RE: Modelling Java Interfaces with Existential data types

2004-06-09 Thread Ralf Laemmel
Mike Aizatsky wrote: It's quite good. It reminds me the quirks Alexandrescu does in his Modern C++ Design or here http://osl.iu.edu/~tveldhui/papers/Template-Metaprograms/meta-art.html . Since type system allows implementation of natural arithmetic, do you know, is it Turing-complete? Yes, C.

Re: [Haskell-cafe] Polymorphic algebraic type constructors

2004-06-23 Thread Ralf Laemmel
Graham Klyne wrote: If I have a polymorphic algebraic type (T a) with several type constructors, only one of which actually references the type parameter, is there any way to express type conversion for the type-parameter-independent constructors without actually mentioning all the

[Haskell-cafe] Re: Extensible Serialization class with type classes

2004-08-26 Thread Ralf Laemmel
...but rather define a generic function, this time is nothing but a type case of type forall x. Typeable x = x - Maybe (String, String) Hope it helps. Conclusion: don't use classes, rather use generic functions. Ralf Simon David Foster wrote: On Thu, 2004-08-26 at 20:52, Ralf Laemmel wrote: Hi

[Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-13 Thread Ralf Laemmel
John Goerzen wrote: One of the best features of OO programming is that of inheritance. ... Oleg, Keean and me have lying around a draft that adds to this discussion. We reconstruct OCaml's tutorial in Haskell The short paper version is online and under consideration for FOOL:

Re: [Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-13 Thread Ralf Laemmel
[EMAIL PROTECTED] wrote: Some people say that ocaml's object system is kinda useless. The best support I hear so far was:it does not hurt Why do you (or do these people) think having all the OO idioms of OCaml (see OCamls OO tutorial) is useless? Or do you mean too baroque? If not, what's

Re: [Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

2004-10-14 Thread Ralf Laemmel
Graham Klyne wrote: At 22:17 13/10/04 +0200, Ralf Laemmel wrote: ... We reconstruct OCaml's tutorial in Haskell ,,, I think that's interesting as a theoretical exercise, but I don't currently see myself using that framework in practice, in the form presented. As you say Simply

Re: [Haskell-cafe] functional programming school

2004-10-15 Thread Ralf Laemmel
Matthew Roberts wrote: I am looking for a functional programming summer school in the next 12 months. I realise there was one August this year, does anyone know of any others coming up? July 4-8 2005 will be an international summer school on generative and transformational techniques in

Re: [Haskell-cafe] Dynamic Type Contruction

2004-11-08 Thread Ralf Laemmel
Vitor, That's amazing!!! Your question is very timely! :-) You know ... someone just challenged me with this question, and I added the corresponding function to the boilerplate testsuite. However, it is much more typeful than you propose. I call it the typeful reflection benchmark.

Re: [Haskell-cafe] Problem with overlapping class instances

2004-11-22 Thread Ralf Laemmel
Instance selection and thereby overlapping resolution is *independent* of constraints. It is defined to be purely syntactical in terms of instance heads. See the HList paper for some weird examples. Ralf Graham Klyne wrote: The reported overlapping instance is [Char], which I take to be derived

Re: [Haskell-cafe] Equality of functions

2004-11-30 Thread Ralf Laemmel
Adam Zachary Wyner wrote: Question -- is this all there is to the issue, or is there something more? Apologies in advance for not understanding the math better here. You can compare functions in a pointwise fashion, which does not work (other than approximatively) for infinite domains. This is the

Re: [Haskell-cafe] Rank-2 types and class constraints

2004-12-01 Thread Ralf Laemmel
Hi, foo _ = undefined works fine. Otherwise the poor little a has no chance to get disambiguated. ... Ambiguous type variable `a' in the top-level constraint ... Ralf Stefan Holdermans wrote: Hi, Just out of curiosity (I cannot come up with a practical example): Why doesn't the following piece

Re: [Haskell-cafe] Named function fields vs. type classes

2004-12-13 Thread Ralf Laemmel
Major apologies for this repeated plug for HList. Anyway, HLists [1] are *exactly* designed for this sort of problem. Well, one can also use existential quantification + bounded polymorphism; with the shapes benchmark providing a good example [2]. The trade-offs are explored a little bit on the

Re: [Haskell-cafe] Problem with type signature in local function

2004-12-24 Thread Ralf Laemmel
Timely question. :-) GHC supports lexically scoped type variables. And this support has just been _extended_ to be readily useful for you (see discussion on the ghc list just a few days back). With GHC CVS HEAD the following program works fine. (Note that I removed the inner Num constraint.) {-#

[Haskell-cafe] PhD/PostDoc opening in programming techniques and technologies

2011-08-25 Thread Ralf Laemmel
PhD/PostDoc opening in programming techniques and technologies in the Software Languages Team [1] in Koblenz. Applicants can safely assume that functional programming plays a huge role in this. The application deadline is 31 Aug. A German description of formalities is available [2]. One