John Hughes wrote:
Taking Ian Stark's example a little bit further,
Main let x=6.0e-8 in (1.0,1.0+x,1.0==1.0+x)
(1.0,1.0,False)
is a useful reminder that show isn't one-to-one.
Dunno much about FP arithmetic, but maybe there should be a primitive
showFloatExact which yields the
My name's Jesse and I'm starting first year computer science this year.
Our first language is Haskell, which we study for about 6 weeks. Before
classes start I and a few friends are trying to get a handle on haskell.
We've each tried using your compiler with no luck.
I have some experience
The link for 4.06 i386-unknown-linux (glibc 2.1) binaries appears to be
broken.
--fac
Brian Boutel wrote:
On Thursday, January 27, 2000 2:08 PM, Frank A. Christoph
[SMTP:[EMAIL PROTECTED]] wrote:
My preference is still (B). (A) is not *very* bad, but should really
replicate (-7) "foo" be []?
I could say: Sure, why not? replicate suffers from the same
doma
After a monstrous fight against the versionitis of jadetex and the
DocBook tools, I've finally managed to build the installation guide
and the user's guide. But there were tons of warnings like:
jade:/var/lib/sgml/CATALOG.docbk31:24:0:W: DTDDECL catalog
entries are not supported
Should
Or you can use OpenJade 1.3
(http://peano.mathematik.uni-freiburg.de/jade-cvs/), which I
think supports DTDDECL.
Oops, I take it back. The OpenSP 1.4 prerelease supports DTDDECL, but not
1.3, and OpenJade 1.4 hasn't been released in any form yet (except CVS).
--FAC
To Whom It May Concern,
Hi, it been nine months sense I apply for the Green Card. I have never
receipt the Green Card until today. My family have been receipt
the Green
Card accept my Green Card have never receipt. I call in, even written
several letters to them. Is seem never get the
Doug Ransom wrote:
I am curious. How much faster do you think GHC would run if it were
written
in C? Or how much slower would a C++ compiler be if it were written in
Haskell instead of C++?
It seems to me that a compiler would be an ideal candidate for writing in
a
functional language.
I wrote:
Doug Ransom wrote:
It seems to me that a compiler would be an ideal candidate for writing
in a
functional language. The number of times C++ compilers have given out
on me
indicates that C++ is not suitable for writing anything as complicated
as a
C++ compiler.
[...]
It seems
I have a datatype which looks like:
data T c d f g = forall a. T ...
and I want to make it an instance of a class C:
instance (C c, C d) = C (T c d) where ...
However, Hugs98 (newest version) gives me an error:
Illegal type in class constraint
which I have determined does not arise
Fergus Henderson wrote:
On 06-Dec-1999, Alex Ferguson [EMAIL PROTECTED] wrote:
Now that rank-2 polymorphism seems to be part of the 'received standard'
(at least two implementations support 'em, and I assume they're
a shoo-in
for Haskell 2), couldn't we really also do with type
I wrote:
I think he means the application term associated with second-order lambda
calculus' "big lambda," usually written "M [T]" or just "M T" where M is a
value term and T is a type term, e.g., "(/\X.\x.x) Int 3".
Should be: "(/\X.\x:X.x) Int 3". (Doesn't make much sense if you don't say
Simon Peyton-Jones wrote:
Third, while the things you mention are important, they are not
at the top of the wish-list that Sven maintains for users of
Haskell
(http://marutea.pms.informatik.uni-muenchen.de/wishlist/index.html)
Does that mean that (to borrow from the GHC docs) "smaller,
It would be nice to be able to say
module Shape(
Shape,
Square :: Int - Shape,
RotateDegrees :: Int - Shape - Shape,
...
) where . . .
Ideally one would want to be able to have instance declarations as well.
This would mean that someone using the Shape
Simon Marlow wrote:
Here's my proposal:
- haskell-announce (v. low volume)
- haskell-chat (high volume, anything vaguely related to
Haskell is acceptable)
- haskell-questions (questions about the use of the language,
maybe haskell-help or haskell-users)
Traffic on the Haskell mailing list has jumped dramatically of late.
[...]
So we can decide to do one of two things:
1. Try to keep the Haskell mailing list as a low-traffic list, to which
many, many people subscribe. Under this model, one might *start*
a discussion on the Haskell
Kevin Atkinson wrote:
Ok here is my partial list.
- True ad-doc polymorphism
- Built in dynamic typing system.
- State Encapsulation
- A solution to the abilities arising from multi parameter type classes.
- Syntactic sugar for supporting OO programming styles
What is the significance of
I'm not sure I agree with this. Keith Wansbrough has an interesting
paper that identifies the ways in which a macro processor can
do thing that ordinary functions can't.
Is this paper available somewhere?
Keith Wansbrough (1999). Macros and Preprocessing in Haskell. Unpublished.
I found this bold statement from their top page amusing:
If you want to build robust, scalable, complex _and yet exciting_
software
then you need to use pure object-oriented programming techniques.
[emphasis mine]
Personally, I am a strong advocate of dynamic, rather than
Since ghc-4.04 confuguration insists one has Happy v1.6, has this
actually been released? I see no link to it from the usually suspect
sites.
If it's Imminent, can a make the modest suggestion that it have a
standalone makefile in it? Having to slot it into a ghc source
build tree has
Program won't compile in default max heap;
-H objects that I should instead use -M, to raise same;
-M isn't a recognised option.
Have you tried -optCrts-M?
--FC
However, I note that Maybe is an instance of Monad. What for?
Someone, I think at Glasgow, has a web page called something
like "What the hell are monads?", which I thought gave a pretty
good practical description of them. I can't remember who
made this page, though. Anybody know
Here is a laundry list of things I think Haskell still needs. By
Haskell here I mean Haskell plus extension that are found in both hugs
and ghc.
...
4) Being able to write
do a - getLine
b - getLine
proc a b
as
proc getLine getLine
and the like. I don't know the number
Oops, I left out the type context:
liftM2' :: (Monad m) = (a - b - m c) - (m a - m b - m c)
liftM2' proc m1 m2 = do
v1 - m1
v2 - m2
proc v1 v2
Oh, and here is a nicer definition:
import Monad
liftM2' :: (Monad m) = (a - b - m c) - (m a - m b - m c)
liftM2' proc m1 m2 = join $
For bigger things which
you want to identify, you can either use qualified module identifiers, or
Haskell's type classes which at least let you establish and codify a
motivation for using the same name for distinct things (namely, that their
types are equivalent under a particular relation).
I find that if you make liberal use of higher-order constructs and
modularize your code, then the need to do explicit binding is
not so much of
a problem. Then again, I am the sort of person who uses "let"
and "where"
whenever he can to name subexpressions as well...
But the point is
versus nonstrictness
should be our concern, rather than the operational notions of
eagerness and laziness.
"Frank A. Christoph" [EMAIL PROTECTED]:
Please elucidate. Where does this difference become important?
What impact
did it have on the language?
It is definitely important i
Joe Fasel wrote:
Actually, I think we were originally thinking of laziness, rather
than nonstrictness, and weren't considering languages like Id as
part of our domain, but Arvind and Nikhil (quite correctly) convinced
us that the semantic distinction of strictness versus nonstrictness
should
Please, do *not* put error correction into ghc! I think error correction
is one of the Classic Bad Ideas for a compiler. It's much better to
focus on providing understandable error messages: when the user knows
what the compiler thinks is wrong, it's usually not so hard to fix the
error.
[This question more properly belongs on glasgow-haskell-users, so I cc'd
there.]
Rory Leigh wrote:
Could you help me please; I'm looking to possibly be able to download
a Haskell compiler in as simple a way as possible (preferably without zip
files
-- if possible -- or if so,together with
| Is this why the PDF version of the Haskell report looks so
strange? On my
| system (Win98 and Acrobat Reader 4.0) it looks like the baseline
| oscillates up and down between each letter. I find it very difficult to
| read.
I made a pdf version of the Haskell report using pdflatex; fans
These fonts are especially recommended for use with pdfTeX.
In fact, for
PDF output one should not even consider applying the bitmap fonts for they
produce terrible results, whether generated with pdfTeX or with the
Distiller program.
Is this why the PDF version of the Haskell report
Then an Anonymous Coward replyed:
Is their a good online tutorial and reference for Haskell? Last time I
looked all I could find were pointers to books and links to Amazon.Com. Oh
yes, and some moldy academic papers in postscript format. I think it would
behoove those in the communities of
IIRC, this has already been discussed quickly some time ago, but
anyway: To conform more with the rest of the *nix world and decrease
the confusion of my students, I'd like GHC to be less verbose by
default. IMHO the following messages should not be issued without
any commandline flags:
So the two conditions
if a `eq` b then F(a) `eq` F(b)
if a `req` b then G(a) `req` G(b)
will only lead to different classes of functions (homomorphisms with
respect to different properties). The latter will in math more correspond
to consider all underlying set functions,
Fergus wrote:
On 27-Jul-1999, Simon Marlow [EMAIL PROTECTED] wrote:
I would like to have a comparison instruction that compares
the internal
reference of two objects.
Let's call it "req".
req :: a - a - Bool
By coincidence, I was just looking at GHC's documentation on
I would like to have a comparison instruction that compares the internal
reference of two objects.
Let's call it "req".
req :: a - a - Bool
By coincidence, I was just looking at GHC's documentation on stable names
and pointers, and it seems relevant here.
Miranda has something called diagonalizing list
comprehensions if I recall
correctly. I think you would write:
[(a,b) // a - [1..], b -[1..]]
and the resulting list would be
[(1,1), (1,2), (2,1) ...]
Haskell has this too. :) The syntax is almost the same:
Let me take a shot at this.
Jan Brosius writes:
Now I have some difficulty to follow. If I write
id :: a - a
then I thought it meant " id is a "function" from type a to type a " ; in
logic this is completely equivalent with (since a is a variable ):
" forall a ( id is a function from
I wrote:
For example, we know just from the fact that
concat : Forall a. a - a, that
\xs.map A B f (concat A xs) = \xs. concat B (map A B f xs)
where map : forall a. forall b. A - B - ([A] - [B]). Here the
endofunctor in question is the list functor, [].
Oops, I really screwed this up.
Peter Hancock wrote:
"Marcin" == Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes:
What do you think would be the best representation of the buffer for
such a crazy idea as a text editor in Haskell?
I don't think its crazy. I thought that one could start with
something
Does anyone have a GIF of (I think Phil Wadler's) Lambda-man? I
mean the one that appeared with its friend the chip on the old
FPCA proceedings?
Let me take a wild guess and say that it's the one at the home page of
Glasgow's FP department.
http://www.dcs.gla.ac.uk/fp/
--FC
Jonathan King wrote:
transformListElems :: (elem - elem') - List elem - List elem'
transformListElems transform Nil = Nil
transformListElems transform (Cons elem elemRest) =
Cons (transform elem) (transformListElems transform elemRest)
Well, the second version does more than
What is difficult is that by using some predefined function, one can
express very much in very small code. I believe Haskell is even more
expressive than most OO languages with comparable libraries
(perhaps except Smalltalk, as that has also a very compact syntax).
I havn't
In principle I can do this, but:
1. how do I hide the import of show String to replace it w/ my own?
2. If I do replce show String what else will break?
3. If instead I define an eshow function that strips "", how do I minimize
the perforamnce hit of quote stripping?
4. If I want to share
Do you want to drive me away from learning Haskell? Who the
hell can try
to write such functions? Is readabilty not a concern in Haskell?
I would have to agree, Sven does seem to be working hard to drive a
beginner away from Haskell. But he is illustrating an important
coding
I wrote:
After all, the world's most famous text-processing
language, Perl,represents strings as character lists too.
I thought I had read this somewhere, for example O'Reilly's "camel" book,
but I can't find the place, and Carl Witty assures me that Perl represents
strings internally in the
I would welcome either. However, there is a huge body of code that
assumes strings are lists of chars.
Yes, obviously... this is for new programs (which people aren't writing
because of Haskell's inefficiency in dealing with strings).
While I think Haskell should also support primitive
David Barton wrote:
What began with a fairly limited, and practical, suggestion on Simon's
part to assist the compiler with optimizations and transformations
that are valid in some cases and not in others has blossomed into a
search for a full logical language, with inference, proof
I am a long-time Hugs user, but am relatively new to ghc.
I've been trying to get a Makefile working, with little success.
After much investigation, the problem seems to be not with my Makefile,
but that ghc does not like modules whose names start with 'Z'.
Seems that a module called Zabc
Christian wrote:
Frank A. Christoph gave examples for unintended non-linear patterns,
among them:
Or, even more more common:
f (x@(x,y)) = ... --- oops!
If I don't oversee something obvious, this just would fail to
type-check, so this shouldn't be a problem.
As you can plainly see
In addition to the other arguments mentioned, there is the practical concern
that it becomes quite easy to introduce non-termination by a simple typo:
f [1...] [2..] where f x x = x --- oops!
versus, say, the intended
f [1..] [2..] where f x y = x .
Or, even more more common:
f
But how important is having a fold well defined. For many common
numerical operations such as summing a list, taking the product of a
list, etc. The order in which the elements get folded does not matter.
All that matters is that each element gets represented exactly once.
From an algebraic
I have another pet peeve: ease of use of tools.
The Haskell standard (intentionally?) leaves the interface to tools an
implementors question. Unfortunate, IMHO, every Haskell compiler I've
tried (GHC, NHC, HBC) have just had plain horrible interfaces.
Interpreters are inherently a
[I sent this message about a week ago, but it has apparently disappeared into the
Internet aether...]
See the attached transcript. The GHC release in question is the precompiled HPPA
binary package.
The _INCLUDE_POSIX_SOURCE, etc. macro redefinition warnings arise because I predefine
all the
Has anyone created an IDL file for Xlib? Alternatively, has anyone created one for
H/Direct?
I know that someone is working on GTK, but I'm interested in Xlib specifically. Also,
I'm aware of Sigbjorn's Xlib interface in Haggis, but that one's reportedly still for
GHC 0.29. :(
BTW, it's not
I am relatively new to Haskell, and I'm using Hugs 1.4.
My my source of programming is Java, with the odd bit of basic thrown in for
good measure.
Now one of the first things I notice about Haskell is that there don't seem
to be variables in the same sense that there are in other programming
I was amused to disover recently (thanks to Zhou-san, at POPL) that
the name GHC (well, really FGHC or `flat' GHC) has already been used,
by the Japanese Fifth Generation Project.
FGHC stands for Flat Guided Horn Clause, and it's a language that was
used by the project for knowledge
Would it be asking too much to have Ross Paterson's syntax (or something close) for
John Hughes' arrows implemented in GHC 4.02? I'm dying to fool around with it.
--FC
I wrote:
First, a CVS question. I am a real CVS novice so bear with me.
I finally managed to use CVS to get the current 4.02 GHC
distribution (and to compile it! :). Now, I understand how
one can create recursive diffs between versions, but if I
understand correctly, not every change
First, a CVS question. I am a real CVS novice so bear with me.
I finally managed to use CVS to get the current 4.02 GHC distribution (and to compile
it! :). Now, I understand how one can create recursive diffs between versions, but if
I understand correctly, not every change counts as a
Ross Paterson wrote:
John Hughes has defined a new abstract view of computation, in his
(currently draft) paper "Generalising Monads to Arrows", at
http://www.cs.chalmers.se/~rjmh/Papers/arrows.ps
Has anyone else read this paper? I'm interested in hearing comments, if
only to
Koen Claessen wrote:
We should allow "partial type specification". The programmer
is allowed to specify as much information about the type as
(s)he wants.
The partial type specification would be taken as a "skeleton",
merely filled in by the type inference algorithm.
Here is how we could
Assuming you mean "infix to Reverse Polish", I guess you need something that
will parse mathematical expressions. You might like to check out Happy...
it's a parser generator for Haskell, and you could write your own infix to RPN
program using it. Alternatively, there is a parsing
I wish to use the FiniteMap module, lib/exts/FiniteMap.lhs, but want
to use it from both GHC and hugs. As it is hugs can't use it because
it imports PrelBase. (btw, why didn't it make it into the joint
GHC/Hugs Libraries? - seems v. useful).
As far as I can see this can be fixed by placing
Simon Marlow wrote:
You should either compile the whole lot with -O, or not at all.
Really? What are the consequences if you don't? It doesn't lead to incorrectly
linked code, does it?
I can see that, even if you compiled module A with -O, and then tried to call some
functions of A from
When will 4.02 (by which I mean the next stable release) be released?
and
Will it be Haskell 98-compliant, or is that going to be in a
future release?
We'll try to put out a source release before Xmas. Why are you
interested? Scoped tyvars?
No, I just want a reliable compiler with
class (Monad m, Monad (t m)) = MonadT t m where
lift :: m a - t m a
instance (Monad m, Monad (StateT s m)) = MonadT (StateT s) m where
lift m = \s - m = \x - return (s,x)
If the definitions from the paper can be turned into valid
Haskell 98 w.l.o.g. now, then I'm happy.
No,
Perhaps a "better" solution than ad hoc polymorphism would be to provide
a more convenient namespace syntax. Am I mistaken in thinking that
overloading, for overloading's sake, isn't what is wanted; what is
wanted is to be able to easily differentiate between two functions that
happen to be
Simon Peyton-Jones [EMAIL PROTECTED] writes
- The simple-context restriction.
...
My default position is not to change. Question: who, apart from
Ralf, has actually tripped over the lack of contexts of the
form (C (a t1 .. tn)) in Haskell 1.4? Is their lack a real
problem in practice?
The names `mzero' and `mfail' are horrible. I like Ralph's suggestion
to change `fail' to `raise' in the IO monad, and use `fail' for
`mfail'. If that doesn't work, try something else, but please
pick names that have a simple meaning in English (as with `return')
not monsters like `mzero'
Frank A. Christoph wrote:
Standard ML does not allow this. One important aspect of the SML module
system actually is its strong separation from the core language.
Not that old saw again...! Ocaml separates the two as well.
Well, the new let-module feature undermines the separation quite
Running the programs compiled with ghc-4 (several examples), i have
noticed that it pretends to spend thousands of space less than
ghc-3.02. Typically,
ghc-3.02 with +RTS -H100k -K9k runs as fast as
ghc-4with +RTS-K4
According to 4-00-notes.vsgml, the latter -K4 means
Let me get this straight: you want to replace "import qualified"
with "with", "import" with "use", and "=" with "rename"? That
sounds like it's 180 degrees away from what I propose. My intention
was to eliminate the need for either new keywords or special
syntactic categories for
Johannes Waldmann wrote:
Frank Christoph writes:
The convention should be reversed: by default, a module import is qualified.
That eliminates the need for both "qualified" and "hiding". You can rename
your identifiers explicitly, as God intended.
are we talking Haskell
I find it unnatural (and irritating) that:
[False ..]== [False, True]
[false..] where false = False == [False, True]
(Just . Just) 1 == Just (Just 1)
(just.just) 1 where just = Just == Just (Just 1)
but [False..]
and
That's just what I intend to do. I don't see Std Haskell as a big
deal, but even little deals are worth completing rather than
leaving as loose ends... and I'm more optimistic than Paul about
the usefulness of Std Haskell. I would be happy to find a name
that was less grand and final-sounding
We've fixed a few bugs in GHC 3.02, thanks to useful bug reports
from several of you. I'd rather not release an 'official' 3.03 because
it takes half a day to do a full release, and meanwhile we have
a substantial new compiler in the works (new RTS, CAF space leaks
squashed, new GC, new Core
[I'm replying to both Fergus and Alastair in this message.]
This is a reply to Fergus Henderson's comments on my proposal.
My answer to all his comments is that consistent languages are
easier to learn than languages littered with exceptions, special cases
and random default behaviour.
On the
I suppose it depends on the compiler implementation. In GHC, you can just
use unsafePerformPrimIO and _ccall_. There is a section in the manual
called "Avoiding monads" that describes this.
--FC
-Original Message-
Is there a way to promise Haskell that external calls which return
el, and we hope to be seeing you in our offices soon.
Yours truly,
Frank A, Christoph
President and CEO
Glasgow Haskell Bugs, Gmbh.
Hope to have a release ready soon. A translator that spits out IDL
specs given Green Card 2 input will not be supplied, as the two
approaches to describing bindings to foreign functionality are
fundamentally different. Green Card 2 starts with a Haskell type
signature and tries to derive the
Oops.
\begin{code}
module MPTC
where
class MPTC a b where
fun :: a - b
\end{code}
should have been:
\begin{code}
{-# OPTIONS -fglasgow-exts #-}
module MPTC
where
class MPTC a b where
fun :: a - b
\end{code}
--FC
The options pragma syntax doesn't work in a literate file using the
birdtrack syntax:
{-# OPTIONS -fglasgow-exts #-}
module MPTC
where
class MPTC a b where
fun :: a - b
yields an error because the class has multiple parameters and the pragma
isn't recognized whereas
\begin{code}
module
GHC complains about:
class (Monad m, {-, Monad (t m)-}) = MonadT t m where
lift :: m a - (t m) a
instance (Monad m) = Monad (EnvT env m) where
...
instance (Monad (EnvT env m)) = MonadT (EnvT env) m where
...
...
OK, there are two things going on. First, GHC is meant to
Suggestion for Standard Haskell:
Copy all the stuff in the Prelude to the standard libraries, at least when
there is an obvious module for them to go to. For instance, head and tail
should appear in the List module. I doubt I'm the only one who can't
remember if a particular list function, for
What is the status of the lastest release (3.01) with respect to Unicode
support? Is it possible to write source in Unicode? How wide are
characters? Do the I/O library functions support it? etc.
--FC
Alex Ferguson wrote:
| Frank A. Christoph:
| I hope that Either will be renamed to (+), or at
| least deprecated in favor of (+).
|
| I'd basically agree with Frank here, though presumably for consistency
| with Koen's (very reasonable) proposals, this would need to be the
| symbol
* Secondly, "Restrictions on name spaces removed". As an addition to
this, I would like to propose the following modest extension to Haskell.
Why don't we allow type constructors with more than one argument to be
written as operators? An obvious example to define would be:
data a :+: b = Left
Under the "Getting GHC" heading on the GHC web page, version 3.00 is listed
as the most recent minor release whereas 2.10 is listed as the most recent
major release.
Is this an error, or is there something to the definition of minor/major
which I haven't caught on to?
--FC
90 matches
Mail list logo