coerce :: a -> b
coerce x = undefined
As an obvious consequence, Haskell type system would be unsound.
So, I assumed that this would be a wrong interpretation.
This is the part of your email which frightens me the most. Of
course Haskell's type system is unsound! What factors lead you to
this kin
On Mar 10, 2004, at 8:56 AM, [EMAIL PROTECTED] wrote:
Example (readers familiar with the problem may
skip this):
Dear Mr.Robert Smith.
This structure is represented by the XML Schema
How would you represent this in Haskell?
A first idea may be to store the enclosing strings:
data Salutation
In the near future I expect to have need of an implementation of some
basic term rewriting system algorithms, most notably:
- term matching and unification
- same, modulo associativity
- same, modulo associativity and commutativity
The first, of course, is easy to do myself; the second, I i
On Dec 24, 2003, at 2:29 AM, Sean L. Palmer wrote:
It occurs to me that Haskell would be quite a bit easier for OO and
traditional programmers to grasp if Haskell would actually use the
correct, or at least more commonly used, names for things.
I don't think changing a few keywords will have any
On woensdag, sep 24, 2003, at 17:46 Europe/Amsterdam, John Hughes wrote:
What's needed is a parser that can parse
comments, and tie them to the *right place* in the abstract syntax
tree.
Figuring out what a comment is really commenting is probably extremely
hard...
The commenting conventions of Ha
On maandag, sep 22, 2003, at 00:07 Europe/Amsterdam, Brandon Michael
Moore wrote:
Can anyone tell me what's wrong with the following derivation?
Without going through your derivation completely, the problem is almost
certainly polymorphic recursion. Vector is a nested datatype---its
definition c
On zaterdag, sep 20, 2003, at 13:01 Europe/Amsterdam, Dominic Steinitz
wrote:
Can anyone tell me why the following doesn't work (and what I have to
do to
fix it)? I thought by specifying the type of coalw as rank-2 would
allow it
to be used both at a and (a,b).
This will never work. A function
On Thursday, Aug 28, 2003, at 08:47 Europe/Amsterdam, Steffen Mazanek
wrote:
Thank you all for your help. I will try this ghc-flag.
It is interesting as well, that in contrast to Haskell Standard ML
ensures,
that pattern-matches are exhaustive and irredundant.
SML has the same limitations w.r.t.
The Kleisli composition (-)* . (-) is sometimes written as (@@):
(@@) :: (Monad m) => (b -> m c) -> (a -> m b) -> (a -> m c)
(f @@ g) x = let m = f x in m >>= g
Man, I can't get anything right today. I meant:
(g @@ f) x = let m = f x in m >>= g
Apologies for the flooding.
Regards,
Frank
_
Frank Atanassow wrote:
Gustavo Villavicencio wrote:
> Hi all,
>
> I am trying to understand the algebraic laws and operators
> behind a functional expression...
>
> f >>= g \equiv g* . f
>
> in the Kleisli Star context. Is this right?
Yep.
Oops, or rather
Gustavo Villavicencio wrote:
Frank Atanassow said:
What do you mean by a "fork"?
So, the question is, if i have
f : A -> T B and g : A -> T C
where T is a monad, i.e. an endofunctor, can i combine f and g as
: A -> T (BxC)
knowing that T involves side effects?
I guess
Gustavo Villavicencio wrote:
> Hi all,
>
> I am trying to understand the algebraic laws and operators
> behind a functional expression...
>
> f >>= g \equiv g* . f
>
> in the Kleisli Star context. Is this right?
Yep.
> If it is so, can I combine g*.f with a fork for example?
What do you mean by
Andrew J Bromage wrote (on 20-02-03 10:26 +1100):
> All that is required of a theorem is that it is correct.
>
> A tool, on the other hand, not only has to work (i.e. it has to
> correctly accomplish some task), it also has to be safe to use, its
> controls must be meaningful to the intended user,
Dmitry Malenko wrote (on 09-02-03 21:57 +0200):
> As part of my research I'm going to create prototype system implementing
> some extentions concerning at most module system to the language and to
> toy with it a little. So I wonder what is the best way to do that?
>
> Should I cope with compiler
[EMAIL PROTECTED] wrote (on 03-12-02 18:18 +0100):
> Perhaps I should rephrase:
> > There's too much mathematics in it, I'm not a mathematician
..and later...
> > lot of mathematics. One of the things I like about FP is that it
> > demands more mathematical sophistication of its practitioners, whi
Andrew J Bromage wrote (on 03-12-02 09:52 +1100):
> On Mon, Dec 02, 2002 at 08:26:06AM +0100, Johannes Waldmann wrote:
>
> > well I love design patterns, it's just that in Haskell-land
> > they are called higher-order functions, or polymorphic functions, etc.
>
> Can I safely translate that as "
John Hughes wrote (on 02-12-02 10:27 +0100):
> > On Mon, 2 Dec 2002, Andrew J Bromage wrote:
> >
> > > ... If you mention a term like "design patterns",
> >
> > well I love design patterns, it's just that in Haskell-land
> > they are called higher-order functions, or polymorphic functions, etc.
> >
David Bergman wrote (on 26-11-02 01:29 -0500):
> I would like to know if anyone (maybe Mark P) knows the status of
> "Cartesian classes" in different Haskell implementations. I.e., does
> anyone implement the suggested functional dependencies or the less
> general parameterized type classes?
>
> I
An Online Bibliography of Haskell Research
http://haskell.readscheme.org/index.html
I didn't see this announced; sorry if I missed it and this is a duplicate.
Kudos to Jim Bender for a nice site!
--
Frank
___
Haskell mailing list
[EMAIL PROTECTED]
http
sentations (effects, links, transitions, ...). If you look at the demo
included with the distribution you will see a slide with a copy of the Ocaml
interpreter running inside a DVI page.
Files using ActiveDVI specials are still viewable with, for example, xdvi, but
of course most of the fea
; functional programming is a real problem for me.
>
> Now i have doing a simple Haskell programming on the
> way. I just know how to import file, declare types
> and display output.
>
> Your help and guidelines is most appreciated.
>
> From,
> Lee Ling Ling
--
Fr
don't open anything suspicious.
BTW, the link above says that
The worm does not install itself and contains no other payload.
so I guess it is sort of chain-letter worm, and relatively benign.
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.0
as arity 1
(i.e., it is a unary relation on types), with the argument being of kind
*->*. This is one of the infelicities of the class system.
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030)
where
since class Functor has arity *. This works because
(->) a = (a ->)
The outer parentheses are only there to ensure that the expression gets parsed
as one argument, and not two.
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO
ory texts,
particularly the book by Hennessy, Pitts' course material on it, Nielson &
Nielson's semantics book, Mike Gordon's notes on specification and
verification, and Pfenning's course notes on theorem proving and deduction.
http://www.cs.uu.nl/~franka/ref.html
--
Frank A
Eray Ozkural wrote (on 16-09-01 17:44 +0300):
> On Sunday 16 September 2001 04:30 pm, Frank Atanassow wrote:
> > A bit off-topic, but after some experience using combinator parsers in
> > Haskell (not just Parsec) where the lexical and syntactical bits were done
> > i
r even further, by
feeding the parser output to another parser. Traditionally we do this to
handle context-sensitive conditions because of limitations in Yacc-style
parser technology; for example, static analyzers and type checkers are usually
context-sensitive. But if your second-stage parser emits ab
is reasonably
accepted by the community and not some Bizarro (I love that word :) extension
which will only ever be implemented in some obscure researcher's pet compiler
project.
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB
there should be rules for introducing
variables, introducing/eliminating "all" types, manipulating environments, a
definition for substitution, etc.
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (03
ey "publish" it. Will they
lose some potential revenue that way? Possibly. But as you suggested, the idea
is to make the audience as _wide_ as possible, not as _rich_ as possible. ;)
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3
x.
OTOH it is possible to declare a function using pat, e.g.:
fun = \x -> x+1
In other words, funlhs is redundant.
---
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508TB Utrecht, The Netherlands
Tel +31 (0)30 253-3261 Fax +31 (0)3
ly named
American bladdernut.
You need any more, just holler, y'hear?
---
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508TB Utrecht, The Netherlands
Tel +31 (0)30 253-3261 Fax +
orms. What I'm thinking is that an M-algebra for a language M gives
you a way of extending a denotational description of the normal forms to one
for the entire language, which is automatically sound for the equational
theory.
Which sounds useful to me for writing interpreters.
--
Frank Atana
Frank Atanassow wrote (on 09-03-01 21:33 +0100):
> > On Fri, 9 Mar 2001, Frank Atanassow wrote:
> > > A monad on category C is a monoid in the category of endofunctors on C.
>
> Surprisingly, my facetious little remark about monads elicited the following
> response
> On Fri, 9 Mar 2001, Frank Atanassow wrote:
> > A monad on category C is a monoid in the category of endofunctors on C.
Surprisingly, my facetious little remark about monads elicited the following
response (whose author I will not disclose, as I haven't obtained
permission yet):
simple enough? ;)
No? Then see "Using Monads" at http://haskell.org/bookshelf/
(Sorry, I just couldn't resist!)
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (03
;
encodings, which clearly "Jpeg", for example, is not.)
* Change "Data.Structures.Trees" and "...Graphs" from plural to
singular. Same for "Data.Encoding.Bits". But not "Data" to "Datum"! :)
* Maybe change "Data.Structur
"(to) jump in."
That makes sense. I was guessing that "kawazu" was the old form of modern
"kawarazu" (`without changing'). Modern `frog' is "kaeru", though, and the
transitive form of "kawaru" (`change') is also "kaeru", so I
Basho
>
> Translation please !
Is it OK if I show off and steal some thunder? :)
"(It's) An old pond! The sound of water steadily dripping in..."
--
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.08
and the official designation of this one is a Type G,
or the G-machine; it was sometimes called the counter machine or
"Zahlwerk-Enigma", because it has a letter counter.
Will this hinder the adoption of Haskell compiler technology in France and
Israel...?
--
Frank Atanassow, I
Sorry, I got carried away with my silly "hacker" post.
Manuel M. T. Chakravarty writes:
> Frank Atanassow <[EMAIL PROTECTED]> wrote, > Proposition > Hackers can like
> FP. [..] > Proof 1: > By contradiction.
> >
> > Nothing could be more
uel's Gtk interface, or Daan's DB interface. Then they need to
see them in action, outperforming existing applications in some way.
Of course, IANAH (I Am Not A Hacker) so you may take my hypocritical remarks
with a grain of salt or three.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
s some fuzzy idea of a lazy abstract
machine. The abstract machine may be simpler, but you still can't reason about
it in a formal way if it's not a part of the standard. The best you can do is
go off and read some papers, written by researchers for researchers, which
describe a lazy mac
anguage has a semantics, it is not very hard to draw a
distinction: you just have to show an appropriate embedding of
lambda-calculus.
If your language has no semantics, then you are in for a world of trouble
anyway, and the question of whether your language is (higher-order) functional
will be
Manuel M. T. Chakravarty writes:
> Frank Atanassow <[EMAIL PROTECTED]> wrote,
>
> > Chris Angus writes:
> > > Aren't most of these "java additions" MS J++ or MS specific
> > > rather than java/jdbc "run-anywhere" though?
Chris Angus writes:
> Aren't most of these "java additions" MS J++ or MS specific
> rather than java/jdbc "run-anywhere" though?
Not as far as I know, but maybe Erik and Daan will clarify.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Pa
o be relatively zipless and compatible with an
> existing JServ/JSP/Apache installation.
Eh? "zipless"?
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
n in a reply.
Anyway, the type system is at least as (more, IMO) important to Haskell as its
evaluation regime, and I find it hard to imagine a reasonable embedding of it
in Eiffel's. It seems far easier to do the reverse!
BTW, the most interesting thing I discovered was that DejaNews ho
tion-dependent, but turned out for me to be the most
important in practice; Hugs' atrocious behavior on this score has caused me to
disregard my own better judgement here for serious projects. I guess it will
become a non-issue soon, though, with Hugs passing on...
--
Frank Atanassow, Dept. of Com
ime, somewhere,
somewhy, a scientist has probably already reported on it.
[These citations are courtesy of the Annals of Improbable Research,
http://www.improbable.com.]
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
27;s
> another story. Jerzy sent one pointer in his last post.
> I hope more papers of this kind will appear in the future.
I'm asking for (er, rather, trying to encourage you to write) a paper on your
QM modules, and your perspective on QM vs. FP as well. (I'm goin
> one dares to use some lazy coding.
>
> Then you can economize a few days of pencil work, and you can spend this
> time rolling on the ground and laughing at the people who claim that
> Haskell is useless for practical computations, because they don't know
> how to imp
actions1
> else do
> actions2
That is a matter of taste.
To me, the second form looks better. The first form is only preferable because
it avoids the problem with deeply-nested expressions heading towards the right
margin.
--
Frank Atanassow
A4.ps
http://research.microsoft.com/Users/luca/Papers/OnUnderstanding.{US,A4}.{ps.pdf}
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
it forall'ing in
Haskell can be confusing in practice. In particular, it makes it hard to talk
unambiguously about types of non-top-level definitions/terms.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
of mathematical foundations.
Fine. If you don't want to give a model for your logic, then I invite you to
prove its consistency. Then publish it all, and we'll all see if it holds
up. What I have tried to show you is completely standard, and you can find it
in any beginner's book on formal
t
tautological. We are trying to establish the truth-value of a proposition with
a free variable; therefore we need a model. A model needs a domain of elements
to draw from. Therefore we need a domain. OK?
--
Frank Atanassow, Dept. of Computer Science, Utrecht University Padualaan 14,
PO Box 80.089, 3508 TB Utrecht, Netherlands Tel +31 (030) 253-1012, Fax +31
(030) 251-3791
Frank Atanassow writes:
> Jan Brosius writes:
> > > Why do some computer scientists have such problems with the good logical
> > > forall
> > > and exist. Remember that good old logic came first.
> > > On it was build SET theory.
&
that for any element Y of D, Y is in C.
In Haskell the situation is complicated by the fact that there are no
"set-theoretic" models (are you even aware that Haskell's type system is
unsound?), and the fact that the domain is multi-sorted. But those facts do
not bear on the distin
to a contradiction, so xs have to
> exist, even if I haven't seen any of them yet - this is not acceptable in
> constructive logics).
>
> [haven't read the papers on a correspondence for classical logic yet, but
> I assume they exist, for otherwise I would contradict
classical proofs: type-theoretic,
categorical, denotational characterizations. In Proceedings of 11th IEEE
Annual Symposium on Logic in Computer Science, IEEE Computer Society Press,
pp. 230-241, 1996.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
of these
system statistics programs when used on a reasonably busy system. It
slowly stirs the output of these gathering programs into a pool of
entropy, much like the linux kernel device, and allows other programs
to read out random bits from this pool.
* GPG = GNU Privacy Guard
-
onstant
of type a.
So what you are really doing in these cases is trying to outsmart the
compiler('s designers), which is IMO a pointless exercise. (Think: "the
compiler as a black box".)
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3
and its associated
functions.
In short, what you want is an OO language. For Haskell, using monads or arrows
to keep track of the computation state is more appropriate, I think.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
2: Class `InstrumentMonad' does not have a method `>>='
You need to define the methods for class Monad (return, >>=) in an instance
for class Monad, and the methods for class InstrumentMonad (yuck) in an
instance for class InstrumentMonad.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
ges and disadvantages of using
> irrefutable matching, including how irrefutable matching is used in general?
> Why and when it is used, etc.
I'm pretty sketchy on this too.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
Frank Atanassow writes:
> Using <- in type signatures has the advantage that the first thing you see in
> a signature is what is produced, rather than what is necessary to produce,
> which is sometimes what you want when you have a set of algebraic functions
> like John
more often the signature for cons
cons :: List a <- List a <- a
would be more intuitive:
cons :: List a <- (a, List a)
(Incidentally, I think Roland Backhouse made this argument, i.e., that we
should prefer (<-) to (->), although he was working with a relational calculus
rather
nism? I looked through
www.eiffel.com but could only find more general descriptions of the
language/compiler.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
efined on the type in
question are required to be strict.
I admit I can't think of any just now, though... :) Maybe someone else can
think of an example?
--
Frank Atanassow, Dept. of Computer Science, Utrecht University Padualaan 14,
PO Box 80.089, 3508 TB Utrecht, Netherlands Tel +31 (030) 253-1012, Fax +31
(030) 251-3791
uld be informative.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
n the planet can dump HTML to text or postscript, and
>no, it won't be artsy, but, gosh, it might just be good enough.
[Was there a #2?]
What's your point? I think we all want to be able to produce HTML... or did I
miss something? I also agree that we should not shoot for too much; but I
think we should agree on what we shoot for, first.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
Ketil Malde writes:
> Frank Atanassow <[EMAIL PROTECTED]> writes:
> > [a nice development environment] is easier to do this in LISP and
> > Smalltalk because they are dynamically typed. You could try for some
> > sort of reflection in Haskell, for example by st
Haskell users; on the
contrary, I want to see a simple and effective documentation system which you
could count on _without_ any special technology.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
Jan Brosius writes:
>
>
>
> > Frank Atanassow <[EMAIL PROTECTED]> wrote:
> >
> >
> > Anyway, I don't think the choice of markup is all that crucial, but I
> > think markup for documenting Haskell should also be as functional and
>
sgmlnorm, I think.
Not in general, because the containment relation goes the other direction.
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
e intimidated by the massive infrastructure (programs:
Jade, DocBook stylesheets, Haskell-specific stylesheets, probably
also PDFlatex; concepts: SGML, DocBook, DSSSL) that is required to
handle his literate code; as if installing GHC wasn't hard enough? :)
--
Frank Atanassow, Dept.
right output type option to do the actual formatting, so it's
really a one-liner if you know the locations of the files (OK, big "if" on a
Unix system...).
--
Frank Atanassow, Dept. of Computer Science, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-1012, Fax +31 (030) 251-3791
George Russell writes:
> "D. Tweed" wrote:
> > Documentation is a vague term: certainly it'd be undesirable for a
> > specification to the libraries to just a literate copy of the code
> > itself. But if you're thinking in terms of an open source project where
> > people fix bugs in the libra
Hi all,
I have seen many systems used backends for the literate part of a literate
Haskell source file. There is the old literate system from GHC (now dead?),
straight HTML, straight TeXinfo, straight LaTeX, {Wiki,Smug,No,Funnel,...}web
and many personal LaTeX style files or programs which usuall
80 matches
Mail list logo