Re: [Haskell-cafe] Help with lhs2TeX

2010-12-11 Thread Ralf Hinze
Hi Dominic, Hi, I wonder if someone could point out what I am doing wrong. My understanding was that I should be able to create a .lhs file and run it e.g. with ghci and then use lhs2TeX to create a nice .pdf file, all from the same source. I can produce nice slides but unfortunately the .lhs

Re: [Haskell-cafe] Mysterious factorial

2009-12-30 Thread Ralf Hinze
fact2 is O(log n) while fact is O(n). fact2 is partitioning the problem. But fact2 sparks off two recursive calls. If we assume that multiplication is a constant-time operations, both algorithms have the same asymptotic running time (try a version that operates on Ints). For Integers, this

Re: [Haskell-cafe] Mysterious factorial

2009-12-30 Thread Ralf Hinze
fact2 sparks 2*n multiplications for every (n^2) factors fact sparks n multiplications for every n factors Okay, let's count: data Tree a = Leaf a | Fork (Tree a) (Tree a) deriving (Show) fact 1 = Leaf 1 fact n = Leaf n `Fork` fact (n - 1) fact2 x = f x y where f n e | n 2 =

Re: [Haskell-cafe] Mysterious factorial

2009-12-30 Thread Ralf Hinze
As an aside, in one of my libraries I have a combinator for folding a list in a binary-subdivision scheme. foldm :: (a - a - a) - a - [a] - a foldm (*) e x | null x= e | otherwise = fst (rec (length x) x) where rec 1 (a :

Re: [Haskell-cafe] Mysterious factorial

2009-12-30 Thread Ralf Hinze
I would use: foldm :: Monoid m = [m] - m Which is just a better implementation of mconcat / fold. The reason I prefer this interface is that foldm has a precondition in order to have a simple semantics: the operator you're giving it has to be associative. I like to use typeclasses to

Re: [Haskell-cafe] Applicative and Monad transformers

2009-08-26 Thread Ralf Hinze
Hi Jeremy, I have seen it said that all Monads are Applicative Functors because you can just do: instance (Monad f, Applicative f) = Applicative (ReaderT r f) where pure = return (*) = ap However, that instance for ReaderT does not exhibit the properties I was hoping for. OK,

Re: [Haskell] Call for Contributions - HCA Report (November 2006 edition)

2006-10-14 Thread Ralf Hinze
Kurze Story zu BPL? ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Call for participation: Workshop on Generic Programming 2006

2006-08-15 Thread Ralf Hinze
-baked, == exciting, new stuff) please drop me a short note. Slots will be == reserved on a first-come-first-serve basis. Looking forward to seeing you in Portland, Ralf Hinze CALL

Re: [Haskell-cafe] Re: Functional programming for processing of largeraster images

2006-06-21 Thread Ralf Hinze
Am Mittwoch 21 Juni 2006 21:30 schrieb Brian Hulley: Perhaps laziness is more foundational, in that you can write       if2 c x y = if c then x else y However: 1) What's the advantage of being able to define if2? Well, you can easily define you own control structures (when, unless etc).

[Haskell] 2nd CFP: Workshop on Generic Programming 2006

2006-05-10 Thread Ralf Hinze
for submission:3rd June 2006 Notification of acceptance:24th June 2006 Final submission due: 8th July 2006 Workshop: 16th September 2006 Authors should submit papers, in postscript or PDF format, formatted for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) by 3rd June

[Haskell] CFP: Workshop on Generic Programming 2006

2006-02-16 Thread Ralf Hinze
of acceptance:24th June 2006 Final submission due: 8th July 2006 Workshop: 16th September 2006 Authors should submit papers, in postscript or PDF format, formatted for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) by 3rd June 2006. The length should be restricted to 12

GADTs and type synonyms

2005-12-27 Thread Ralf Hinze
Another GADT `bug report': type synonyms are not unfolded when checking the signature of the data constructors: given type Hello a = a - a data World :: * where Msg :: Hello World GHC reports GADT.lhs:2:1: Data constructor `Msg' returns type `Hello' instead of its parent type

Re: [Haskell-cafe] Arrows for invertible programming: Notation question

2005-12-23 Thread Ralf Hinze
What does this mean and how do I make it compile? mapl{|a, b|arr|} :: (mapl{|a, b|arr|}, ArrowChoice arr, BiArrow arr) = arr a b It's Generic Haskell source code, see http://www.generic-haskell.org/ Generic Haskell is an extension of Haskell that supports generic programming.

Re: [Haskell-cafe] Arrows for invertible programming: Notation question

2005-12-23 Thread Ralf Hinze
Is this something that can be compiled with GHC right now? I noticed - fgenerics but I think it does something else entirely. GH is a pre-compiler that takes GH code to Haskell code, so this is a two-step process. -fgenerics turns derivable type classes on (see Derivable type classes, Ralf

[Haskell-cafe] IO

2005-12-21 Thread Ralf Hinze
Interesting discussion ... I don't think it is necessary/desirable to relegate IO to `chapter 14'. First of all, IO is handled differently in Haskell as the language designers quite successfully resisted the temptation of impurity. However, you don't have to understand the full implications of

Re: Strictness annotations on type parameters

2005-12-07 Thread Ralf Hinze
It's hard to avoid the feeling that one ought to be able to say something useful about strictness in the types but it's swampy territory, and hard to get right. Fortunately, it's easy to dry up the `swampy territory'. The type `Contract' below models strictness requirements. The function

GADTs: malformed constructor signature

2005-11-19 Thread Ralf Hinze
Rather unituitively, GHC allows {-# OPTIONS -fglasgow-exts #-} data T :: * where C :: Int - Int - T but not data T :: * where C :: Int - (Int - T) Sometimes, I like to parenthesize the result type for emphasis. Cheers, Ralf ___

[Haskell] ANNOUNCE: Frown - an LALR(k) Parser Generator for Haskell (version 0.6, beta)

2005-11-01 Thread Ralf Hinze
I'm pleased to announce the first release of Frown (version 0.6, andromeda release), an LALR(k) Parser Generator for Haskell 98. This is a beta quality release. Frown's salient features are: o The generated parsers are time and space efficient. On the downside, the parsers are quite large.

Re: [Haskell-cafe] Regular Expressions without GADTs

2005-10-17 Thread Ralf Hinze
The code seems a bit simpler, too. Do you really think so? To me replacing a GADT by class and instance declarations seems the wrong way round. We should not forget that the DT in GADT stands for `data type'. One could certainly argue that the gist of functional programming is to define a

Re: [Haskell-cafe] Estonia and GADT

2005-10-15 Thread Ralf Hinze
Hi Bulat, 2) they all say that GADT is great, but i personally don't feel GADTs. can anyone write a paper about it for beginners like me, or may be just collect examples of using GADT in real programs? I wrote a book chapter on GADTs a while ago, called Fun with phantom types, see

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Ralf Hinze
Hi Huong, attached you find a small program for parsing values of various (data) types. It uses a generalized algebraic data type for representing types and a universal data type for representing values. The parser itself is rather simple-minded: it builds on Haskell's ReadS type. I don't know

Re: 6.4.1 release candidate testing

2005-08-04 Thread Ralf Hinze
Please ignore last night's snapshot (3/8), something is broken. The message came in too late ;-). Anyway, 3/8 compiled fine (using 1/8) and it seems to work. Environment: patronus ghc-6.4.1.20050803 # uname -a Linux patronus 2.6.12-gentoo-r7 #1 Wed Aug 3 18:57:28 CEST 2005 x86_64 AMD

Re: [Haskell] translation of kind

2005-06-20 Thread Ralf Hinze
Am Montag, 20. Juni 2005 12:06 schrieb Christian Maeder: Even Peter Thiemann in Grundlagen der funktionalen Programmierung (1994) did not translate Kind, although he used geschönfinkelt for curry (honoring logicians Schönfinkel and Curry) I'ld prefer der Kind (and avoid situtations that

Re: [Haskell] translation of kind

2005-06-20 Thread 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-18 Thread Ralf Hinze
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 ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: Registerised x86_64 port: test version available

2005-03-09 Thread Ralf Hinze
Hi Simon, this is just to let you know that I successfully compiled the lastest snapshot (ghc-6.4.20050308). Initial tests look promising. Thanks! Cheers, Ralf PS: Just curious: is the gcc route easier than the NCG? To me it seems much more fragile.

Re: x86_64 port

2005-03-04 Thread Ralf Hinze
My amd64 hardware arrived yesterday, shouldn't be too long before we have a registerised port of GHC, and possibly a native code generator... That would be great! I just assembled an amd64 box and I am mssing ghci badly. Let me know if I can be of any help (testing ..). Cheers, Ralf

Re: [Haskell-cafe] special term describing f :: (Monad m) = (a - m b) ?

2004-12-14 Thread Ralf Hinze
I can understand how calling this kind of function effectual makes sense in the magic IO monad, or perhaps even in the ST and State monads, because the term seems to imply side-effects. However, it is a misnomer for eg, the Error, List and Cont monads. It depends a bit on how wide you

Re: [Haskell-cafe] special term describing f :: (Monad m) = (a - m b) ?

2004-12-13 Thread Ralf Hinze
What is a function of the followning type called: f :: (Monad m) = (a - m b) Is there a special term describing such a function (a function into a monad)? It is often called a procedure or an effectful function (I assume that `a' and `b' are not meant to be universally quantified). I

Re: Browsing RealWorld broken

2004-07-29 Thread Ralf Hinze
Here is another one: the case for foreign declarations seems to miss in ghc/compiler/ghci/InteractiveUI.hs:showDecl: ./bin/ghci ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.3, for Haskell 98. / /_\\/ __ / /___| |

Re: __stginit_Int_

2004-01-26 Thread Ralf Hinze
Loading package fmp ... linking ... /home/ralf/Software/FuncMP/fmp.o: unknown symbol `__stginit_Int_' ghc-6.2: panic! (the `impossible' happened, GHC version 6.2): can't load package `fmp' Try adding -package haskell98 to GHC's options or use the Data.Int module instead of

Re: __stginit_Int_

2004-01-26 Thread Ralf Hinze
Thanks for the work-around(?). Adding -package haskell98 works if it listed after -package fmp. It's not a workaround, it's just a missing dependency for your fmp package. Probably the right thing would be adding haskell98 to the package_deps field of your package description for fmp.

Re: Puzzle

2003-08-26 Thread Ralf Hinze
Am Dienstag, 26. August 2003 05:54 schrieb Matt Harden: Cool! That leads me to this contraption: tricky= 0 : enigma tricky tricky enigma (k : ks) = (k :) . labyrinth (enigma ks) labyrinth f (k : _ : ks) = (k + 1) : f ks Figure out what `tricky'

Puzzle

2003-08-22 Thread Ralf Hinze
| Seeing as its thst time of year again and everyone is posting their | homework, has anyone got any good puzzles to do? | I wouldn't mind having a go at something a bit tricky. Here is another one: figure out what `unknown' is. unknown = mysterious unknown mysterious

Re: 'Forest inversion'?

2003-08-20 Thread Ralf Hinze
Dear Marnix, your transformation can be rewritten as the composition of three functions: one that converts the forest into a binary tree (this is based on the natural correspondence between forests and binary trees (*), see Knuth TAOCP, Vol 1), one that mirrors a binary tree swapping left and

Predicativity

2003-07-11 Thread Ralf Hinze
Dear Simon, dear Mark, I had a very cursory look at your Practical type inference for arbitrary-rank types paper. One thing that catched my attention was the remark about predicativity in Sec. 3.4. Recently, I posted a `bug report' to the glasgow-haskell-bugs mailing list complaining about GHC's

Re: Language extension proposal

2003-06-30 Thread Ralf Hinze
If we could only figure out a good syntax for (optional) type application, it would deal rather nicely with many of these cases. Trouble is, '..' gets confused with comparisons. And when there are multiple foralls, it's not obvious what order to supply the type parameters. What about

Re: Typesafe MRef with a regular monad

2003-06-16 Thread Ralf Hinze
Yes, that's a good point. So there are really three issues: a) single-threaded-ness b) making sure you look up in the right map c) making sure the thing you find has the right type Even if you have typed keys, (Key a), then if you look them up in the wrong map, any

Re: Typesafe MRef's

2003-06-13 Thread Ralf Hinze
Am Freitag, 13. Juni 2003 17:12 schrieb George Russell: Keith wrote (snipped) But George Russell's implementation relied on looking up something in one map with a key obtained from another map. I thought type-safe MRefs should disallow this. However if you disallow lookup up in one

Re: forall quantifier

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 09:15 schrieb Simon Peyton-Jones: I forget whether I've aired this on the list, but I'm seriously thinking that we should change 'forall' to 'exists' in existential data constructors like this one. One has to explain 'forall' every time. But we'd lose a keyword. Or

Re: ANN: H98 FFI Addendum 1.0, Release Candidate 10

2003-06-06 Thread Ralf Hinze
On Fri, Jun 06, 2003 at 09:32:18AM +0100, Simon Peyton-Jones wrote: Yes! Yes! Advice is good! OK, how about avoid unsafePerformIO like the plague? Why is it the business of the FFI spec to document unsafe uses of unsafePerformIO? I'd like to second Ross here. Advice is good at the right

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
A more concrete way to formulate a problem that I believe to be equivalent is this. Implement the following interface module TypedFM where data FM k -- Abstract; finite map indexed by keys of type k data Key k a-- Abstract; a key of type k, indexing

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 15:23 schrieb Simon Peyton-Jones: Oh bother, I forgot to add that you can of course insert a new value with an old key (suitably typed) and have it overwrite. Else, as you say, there would not be much point. Maybe it'd be better to have a separate key-construction

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 15:47 schrieb Simon Peyton-Jones: Yes, one *could* use dynamic types. But the check would always succeed! Why is that? If I overwrite an entry with a value of a different type, then the check fails. I am certainly missing something ... Cheers, Ralf

Re: Typesafe MRef with a regular monad

2003-06-06 Thread Ralf Hinze
Am Freitag, 6. Juni 2003 16:09 schrieb Simon Peyton-Jones: You can't overwrite an entry with a value of a different type, because the keys are typed! Any more than you can overwrite an IORef with a value of a different type. S Why is that? Ok, here is my second implementation. It uses the

Re: Collecting values from Functors?

2003-06-06 Thread Ralf Hinze
class FunctorM t where fmapM :: Monad m = (a - m b) - (t a - m (t b)) fmapM_ :: Monad m = (a - m b) - (t a - m ()) fmapM_ f t = fmapM f t return () The `fmapM' function is also known as a monadic map. It can be defined in a generic way for every Haskell data type. It's in the

Re: Collecting values from Functors?

2003-06-05 Thread Ralf Hinze
Rather than using fmap, why not use gmap in GHC. Using an appropriate generic traversal scheme, say listify, all the code you write is the following expression: listify (const True) mytree :: [Int] if you are looking for all the Ints in mytree = Fork (Leaf 42) (Fork (Leaf 88) (Leaf 37))

Re: ANNOUNCE: GHC version 6.0

2003-06-01 Thread Ralf Hinze
Compiling 6.0 from source fails with: ../../ghc/compiler/ghc-inplace -H16m -O -Wall -fffi -Iinclude '-#include HsOpenGL.h' -cpp -I/usr/X11R6/include -DCALLCONV=ccall '-DGET_PROC_ADDRESS=glXGetProcAddressARB' -package-name OpenGL -O -Rghc-timing -package base -split-objs-c

Re: GHC *is* resource hungry

2003-05-30 Thread Ralf Hinze
I bet it's massive types. Translate the program into system F and see. (I remember this came up when looking at Okasaki's sequences of code combinators.) Ok. I didn't use System Fomega (no compiler at hand) but GHC's data types with locally quantified fields. Here is the original program (I

Re: ANNOUNCE: GHC version 6.0

2003-05-30 Thread Ralf Hinze
Please report bugs using our SourceForge page at http://sourceforge.net/projects/ghc/ or send them to [EMAIL PROTECTED] Compiling 6.0 from source fails with: ../../ghc/compiler/ghc-inplace -H16m -O -Wall -fffi -Iinclude '-#include HsOpenGL.h' -cpp -I/usr/X11R6/include

GHC *is* resource hungry

2003-05-29 Thread Ralf Hinze
Here is a harmless little program (no recursion, no data types) which GHC doesn't manage to compile (well, the kernel kills GHC after a while on a machine with generous 512MB of main memory and 1GB of swap space). begin next = next id leaf k i next = next (k i) fork k next = next (\ t u - k (t

Re: GHC *is* resource hungry

2003-05-29 Thread Ralf Hinze
Of Ralf Hinze | Sent: 28 May 2003 15:32 | To: [EMAIL PROTECTED] | Subject: GHC *is* resource hungry | | Here is a harmless little program (no recursion, no data types) | which GHC doesn't manage to compile (well, the kernel kills GHC | after a while on a machine with generous 512MB of main

n + k patterns

2003-05-29 Thread Ralf Hinze
GHCi infers for fac 0 = 1 fac (n + 1) = (n + 1) * fac n the following type / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 5.04.2, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_|

Re: Random Permutations

2003-03-06 Thread Ralf Hinze
Is there a library routine for random permutations? I didn't find any and did a quick hack, which works fine for my application (length of list 100), but what would be a more elegant way? permute :: StdGen - [a] - [a] permute gen [] = [] permute gen xs = (head tl) : permute gen' (hd

Re: Global variables?

2003-01-31 Thread Ralf Hinze
Pavel G. Zhbanov wrote: Is it even possible to make a global variable in Haskell? If yes, how? The usual fudge is: import IORef import IOExts globalVar :: IORef Int globalVar = unsafePerformIO $ newIORef 0 However, beware of creating more than one global

build of ghc-5.05.20021118 fails

2002-11-27 Thread Ralf Hinze
From time to time I try out one of the development snapshots. Does it make sense to report errors? Anyway, the the build of ghc-5.05.20021118 fails with the following error message ... ==fptools== make html -

ghc-5.05.20021109 build failure

2002-11-11 Thread Ralf Hinze
Hi Folks, just to let you know: the (nightly) build of ghc-5.05.20021109 fails with ... ==fptools== make all -wr; in /var/tmp/portage/ghc-5.05.20021109/work/stage3-build/libraries/GLUT

Re: Nightly build snapshots available

2002-11-07 Thread Ralf Hinze
Enjoy... Will do ... I would appreciate a little note saying this snapshot is ok, or this one is horribly broken, or maybe this one is a milestone, if this is at all possible. But, thanks anyway, Ralf ___ Glasgow-haskell-users mailing list [EMAIL

glibc 2.3.1

2002-10-24 Thread Ralf Hinze
Hi, some days ago I upgraded the GNU libc6 (also called glibc2) C library to version 2.3.1. It's only now that I notice that this wasn't a very good idea as it breaks GHC (version 5.04.1). basilisk Software/Haskell ghc --make Hello.hs ghc-5.04.1: chasing modules from: Hello.hs Compiling Main

Generating docs

2002-09-25 Thread Ralf Hinze
What is the approved way of generating and installing docs? I tried (from source) ./configure ... make all make install make html make dvi make ps make install-docs The latter command fails with (as usual with a bit of German :-) --- ==fptools== make install-docs -wr; in

Re: Generating docs

2002-09-25 Thread Ralf Hinze
What is the approved way of generating and installing docs? I tried (from source) ./configure ... make all make install make html make dvi make ps make install-docs The latter command fails with (as usual with a bit of German :-) Do you have Haddock installed? Did the

HR, App. D.5, minor correction

2002-08-04 Thread Ralf Hinze
Hi Simon, here is a minor correction to the May version of the HR. In appendix D.5 there is a table with an example for derived instances: for reasons of consistency the line showsPrec d (Leaf m) = showParen (d = 10) showStr should be replaced by showsPrec d (Leaf m) =

Re: DeepSeq

2002-07-19 Thread Ralf Hinze
Beeing able to derive instances of DeepSeq would be nice too. Here is an implementation using GHC's derivable type classes. Cheers, Ralf ghc -c -fglasgow-exts -fgenerics -package lang Eval.lhs module Force where import Generics class Force a where force ::

GHC.Prim

2002-07-02 Thread Ralf Hinze
Hi, ghci does not find GHC.Prim, but ghc does: :: A.lhs :: module A where import GHC.Prim a# i# j# = i# +# j# ralf/tmp ghc -c -fglasgow-exts A.lhs ralf/tmp ghci -fglasgow-exts A.lhs ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / /

qualified instance declarations

2002-07-01 Thread Ralf Hinze
Hi, GHC (5.03.20020410) wrongly accepts the following: :: C.lhs :: module C where class A a where a :: a - Int :: X.lhs :: module X where import qualified C instance C.A Int where C.a = id Note that the class method is qualified

Sorting and adaptive sorting

2002-06-28 Thread Ralf Hinze
There seems to be a renewed interest in sorting and in adaptive sorting. A while ago (pre Haskell 98) I compiled a rather extensive library of sorting routines you may want to look at http://www.informatik.uni-bonn.de/~ralf/software.html#sort This includes different versions of

Re: [ADMINISTRIVIA]: Change list submission policy please?

2002-06-27 Thread Ralf Hinze
The haskell mailing list is getting an increasing amount of spam, viruses, and virus warnings. Would it be possible to change the list policy to only allow submissions from subscribed members? Please? I'd like to second this. The amount of spam etc is becoming more and more annoying ...

SuSE 8.0 packages

2002-06-04 Thread Ralf Hinze
You can find GHC packages (version 5.03.20020410) for SuSE's latest distribution here: http://www.informatik.uni-bonn.de/~ralf/ghc-5.03.20020410-1.i386.rpm http://www.informatik.uni-bonn.de/~ralf/ghc-prof-5.03.20020410-1.i386.rpm

WAAAPL 2002, final call for papers

2002-05-20 Thread Ralf Hinze
submit papers of at most 12 pages, in postscript format, formatted for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) or Chris Okasaki ([EMAIL PROTECTED]) by 3rd June 2002. The proceedings will be published by ACM and will appear in the ACM digital library. Programme committee

Re: preprocessing printf/regex strings (like ocaml)

2002-05-12 Thread Ralf Hinze
I'm interested to know why a string translating preprocessor doesn't exist for haskell. It seems to me that it would alleviate printf and regex like problems in an convenient, elegant and type-safe manner. An example of this I came across recently was the ocaml printf statement: #

CFP: JFP Special Issue on Functional Pearls

2002-05-03 Thread Ralf Hinze
or rejection by 30 November 2002. Revised versions are due on 31 January 2003. For other submission details, please consult an issue of the Journal of Functional Programming or see the Journal's web page at http://www.dcs.gla.ac.uk/jfp/. Guest Editor Ralf Hinze Institut für Informatik III

Syntax highlighting for KDE's Kate

2002-05-03 Thread Ralf Hinze
Dear KDE users, I've hacked syntax highlighting files for Kate, KDE's editor. Feel free to use or to modify them. http://www.informatik.uni-bonn.de/~ralf/software.html#syntax Cheers, Ralf ___ Haskell mailing list [EMAIL PROTECTED]

Re: ANNOUNCE: GHC 5.03.20020410 snapshot released

2002-04-18 Thread Ralf Hinze
Am Donnerstag, 18. April 2002 14:12 schrieb Simon Marlow: Ralf Hinze [EMAIL PROTECTED] writes: BTW, does this version support rank-n types? IIRC the previous snapshot did. So presumably this one does too? Yes, it does. Simon That's what I feared ;-). Ok, here is my first attempt

Re: ANNOUNCE: GHC 5.03.20020410 snapshot released

2002-04-12 Thread Ralf Hinze
BTW, does this version support rank-n types? ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Haskell Report: minor error

2002-04-12 Thread Ralf Hinze
Hi Simon, minor error in the Report: Figure 5 that displays the hierarchy of Haskell classes defined in the Prelude also includes the MonadPlus class, which, however, is defined in Monad. Cheers, Ralf ___ Haskell mailing list [EMAIL PROTECTED]

Re: ANNOUNCE: GHC 5.03.20020410 snapshot released

2002-04-11 Thread Ralf Hinze
Another snapshot along the 5.03 line, we expect this to be the last snapshot before 5.04. As before, there are NO GUARANTEES as to the stability of this release, but it has passed our three-stage bootstrap and all but one(!) of the 754 regressions tests passed. Documentation is also still

Re: does this have a name (recusive datatypes)

2002-04-10 Thread Ralf Hinze
Does this have a name: data S s a = Nil | S a (s (S s a)) I sometimes use the name `generalized rose tree' but that's certainly not standard. Chris Okasaki uses this data type, for instance, to implements priority queues with an efficient merge, see his book `Purely functional data

GHC 5.02.3, SuSE rpms

2002-04-09 Thread Ralf Hinze
I've uploaded SuSE 7.3 rpms for the patchlevel release of the Glasgow Haskell Compiler (GHC), version 5.02.3. http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.3-1.src.rpm http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.3-1.i386.rpm

GHC 5.02.3, SuSE rpms

2002-04-09 Thread Ralf Hinze
I've uploaded SuSE 7.3 rpms for the patchlevel release of the Glasgow Haskell Compiler (GHC), version 5.02.3. http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.3-1.src.rpm http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.3-1.i386.rpm

WAAAPL 2002, preliminary announcement

2001-12-10 Thread Ralf Hinze
) Authors should submit papers of at most 12 pages, in postscript format, formatted for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) or Chris Okasaki ([EMAIL PROTECTED]) by 3rd June 2002. The accepted papers will be published as a University of Bonn technical report. Programme committee

Re: Functional Metapost revival

2001-12-02 Thread Ralf Hinze
Dear Feri, You can find a version of Functional Metapost, which works with current (2001 February) Hugs, on the following page: http://afavant.elte.hu/~wferi/funcmp/ This version is able to produce all the illustrations in the enclosed Tutorial on my machine. Good luck,

SuSE 7.1 RPMs for ghc-5.02.1

2001-11-03 Thread Ralf Hinze
You can find SuSE 7.1 RPMs for ghc-5.02.1 here http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.1-1.i386.rpm http://www.informatik.uni-bonn.de/~ralf/ghc-prof-5.02.1-1.i386.rpm http://www.informatik.uni-bonn.de/~ralf/ghc-5.02.1-1.src.rpm Have fun, Ralf

undefined reference to `PrelGHC_Z2H_static_info'

2001-10-31 Thread Ralf Hinze
Hi, I get a link error when I compile a program with -O2 Lexer2.o: In function `Lexer2_zdszdwlexCharLit_closure': Lexer2.o(.data+0x46c): undefined reference to `PrelGHC_Z2H_static_info' Lexer2.o: In function `Lexer2_zdszdwlexStrLit_closure': Lexer2.o(.data+0x484): undefined reference to

forall for all places

2001-10-19 Thread Ralf Hinze
GHC 5.02 accepts forall types only at some sensible places: this works data CPS a = CPS { unCPS :: forall ans . (a - ans) - ans } this doesn't work newtype CPS a = CPS { unCPS :: forall ans . (a - ans) - ans } this works newtype CPS a = CPS (forall ans . (a - ans) -

Haskell workshop: 10-minute slots

2001-08-14 Thread Ralf Hinze
Folks, The Haskell Workshop in Firenze on 2nd September is now only a couple of weeks away. If you'd like to attend but haven't yet registered, please do so as soon as possible. For further details, see: http://music.dsi.unifi.it/pli01/registration/index.html The workshop programme

2001 Haskell Workshop: call for participation

2001-07-22 Thread Ralf Hinze
papers, a number of slots for participants to make 10-minute informal presentations are available. To request such a slot, contact Ralf Hinze ([EMAIL PROTECTED]). 9.00 - 10.30: chaired by Ralf Hinze Functional Pearl: Derivation of a Carry Lookahead Addition Circuit, John O'Donnell

Re: Permutations of a list

2001-05-14 Thread Ralf Hinze
Andy Fugard wrote: My main question is really what facilities of the language I should be looking at to make this code more elegant! As you can see I currently know only the basics of currying, and some list operations. Definitely list comprehensions! I digged out some old code: module

Re: No luck installing on SuSE 7.1

2001-05-10 Thread Ralf Hinze
Dear William, using Manuel's SRPM I have built RPMs for SuSE 7.1. Would you like to serve as a beta-tester for these builds? I am not very confident whether the dependencies are ok. Generating the documentation for GHC was a mess; the SGML tools in the SuSE 7.1 distribution seem to be broken and

2001 Haskell Workshop: final call for papers

2001-05-02 Thread Ralf Hinze
2001 Haskell Workshop: 2nd September 2001 Authors should submit papers in postscript format, formatted for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) by 1st June 2001. Use of the ENTCS style files is strongly recommended. The length should be restricted to the equivalent of 5000

GHC from CVS

2001-04-10 Thread Ralf Hinze
Dear all, after the failed attempts to install ghc 5.00 from the packages you provide, I downloaded ghc from the cvs repository. It compiles just fine except that ghci is not built: ghci ghc-5.00: not built for interactive use Do I have to specify this explicitly? Cheers, Ralf

GHC-5.00, first attempts

2001-04-09 Thread Ralf Hinze
Dear all, here are the results from my first attempts to install ghc-5.00 on my linux machine: o Using the binary package: I was not able to install the documentation: make install-docs ./mkdirhier /home/ralf/Lang/share/ghc-5.00 cp -r html/* /home/ralf/Lang/share/ghc-5.00 chmod -R 644

RE: Documentation

2001-02-01 Thread Ralf Hinze
Yup, you have to explicitly ask for the documentation. Go to ghc/docs/set, and type 'make set'. The full documentation (combined Users' Guide and Library reference) will end up in set/ after a while. That does not work. make answers make: *** No rule to make target `set'. Any ideas?

Re: Showing functions

2000-07-31 Thread Ralf Hinze
| Section 6.1.6 of the report says that "Functions are an instance of the | Show class but not | Read." How are functions meant to be shown? The standard prelude | 'specification' doesn't say anything about it. That's a typo. Section 6.3.3 says ``All Prelude types, except function types and IO

Re: convex hull

2000-06-15 Thread Ralf Hinze
| I need a 'convex hull' implementation in Haskell. | Does anyone know where I can find one? Joern Dinkla has implemented several geometric algorithms in Haskell, see http://goethe.ira.uka.de/~dinkla/cglib.html Cheers, Ralf

Re: When is an occurrence an occurrence

2000-06-09 Thread Ralf Hinze
| Gentle Haskellers, | | Here's a Haskell98-typo question. | | Consider this program: | | module M where | | reverse xs = Prelude.reverse (tail xs) | | foo ys = M.reverse ys | | This is legal Haskell98. The call to Prelude.reverse and to M.reverse | must both be

Misleading error message

2000-02-24 Thread Ralf Hinze
The following error message might be a bit misleading ;-) None of the type variable(s) in the constraint `C a' appears in the type `a - b' In the type signature for `op' Here is the source class C a where op :: (C a) = a - b which is not legal Haskell 98 (cf page 45: "the

re: The Haskell mailing list

1999-10-11 Thread Ralf Hinze
| I also agree with Simon that simply making this a moderated list is | not the solution. Perhaps splitting is best. How about | | haskell-info | haskell-talk | | where info carries *brief* announcements, requests for information | and responses to such requests, and talk carries anything and

RE: `sort'

1999-02-16 Thread Ralf Hinze
| If you want others, check out Ralf Hinze's pages at | |http://www.informatik.uni-bonn.de/~ralf/ Actually, http://www.informatik.uni-bonn.de/~ralf/Sort.tar.gz The library includes several adaptive sorting algorithms, an O(n log n) `quick sort' (aka introspective sort) ...

Re: Stream of random comments continues

1998-12-04 Thread Ralf Hinze
| The discussion of random numbers in Haskell should perhaps | move elsewhere as it is quite restricted, but it shows one | problem with the functional approach to *practical* programming: | in *my opinion* our fascination by the Monadic Approach to | Universe and Everything, and the possibility

Re: Random comments

1998-12-03 Thread Ralf Hinze
| Could somebody - perhaps outside this list - provide a serious | example showing the *necessity* for RandomIO() - the Monadic, | "side-effect" version? In a pure functional language? Well, I'm not outside this list ;-). Honestly, there is no necessity for using the IO monad, it is just a

  1   2   >