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
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
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 =
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 :
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
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,
Kurze Story zu BPL?
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
-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
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).
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
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
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
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.
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
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
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
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
___
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.
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
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
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
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
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
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:
,
_/^\_
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
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.
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
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
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
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.
/ /_\\/ __ / /___| |
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
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.
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'
| 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
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
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
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
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
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
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
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
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
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
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
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
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
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))
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
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
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
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
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
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/
\/\/ /_/\/|_|
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
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
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 -
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
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
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
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
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
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) =
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 ::
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
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / /
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
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
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 ...
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
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
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:
#
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
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]
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
BTW, does this version support rank-n types?
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
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]
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
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
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
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
)
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
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,
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
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
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) -
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
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
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
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: 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
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
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
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?
| 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
| 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
| 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
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
| 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
| 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) ...
| 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
| 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 - 100 of 163 matches
Mail list logo