.)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
he current set of restrictions on errors does not seem very
satisfactory, IMHO.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
see my .sig ;-)
P.S. Is this list archived anywhere?
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
implementing Haskell slightly
more difficult and (b) reduce efficiency, for interpreters and JIT
compilers.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL
ble
to all Haskell implementations?
Also, what is the situation in this regard with respect to the
existing Haskell implementations?
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: fin
.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
, String, F) - (Int, String)
foo (i, s, MkF f) = (f i, f s)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
Ambiguous use of operator "foo" with "bar"
Ah. Thank you for reading my mind.
Now why can't ghc and Hugs do that? ;-) ;-)
Sorry about that. (I really should think a bit harder before mailing
this list, lest I make a habit of looking really silly...)
--
Fergus Henderson
-flow. I find this
very confusing.
--
Fergus Henderson | Designing grand concepts is fun;
[EMAIL PROTECTED] | finding nitty little bugs is just work.
http://www.cs.mu.oz.au/~fjh | -- Brooks, in "The Mythical Man-Month".
PGP key fingerprint: 00 D7 A2 27 65 09
-- see http://www.cs.mu.oz.au/mercury.
Unfortunately there aren't any great debugging environments for Mercury
yet either... though we hope to be able to remedy that situation
sometime in the not-to-distant future.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursui
sugar expand to code that uses
plain `' or `Prelude.'?
The Haskell 1.4 report is not clear on this point, IMHO.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL
.
C++ doesn't have an ISO/ANSI standard, yet C++ does seem to be pretty
widely used in industry. The same is true for Delphi.
(Well, Delphi is not used nearly as much as C++, but it is probably
used much much more than Haskell.)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always
ng ISO of this would be a significant hurdle to
overcome.
In any case, I agree with Dave Barton that ISO standardization for
Haskell should not be considered until after the current effort
at defining "Standard Haskell" is complete.
--
Fergus Henderson [EMAIL PROTECTED] | "I hav
implementing a graph structure, and
efficient traversal is just pointer dereferencing.
Another example of something that is common in C/C++ but which
in difficult to do efficiently in Haskell is hash tables.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW:
g instance declarations, in an arguably
clearer way.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.
ading underscores,
I suppose you could use `v2_').
So, sing ho for regression tests, but sing louder for static analysis ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
this problem is
unsafe_cast :: a - b
However, this is of course less safe, and prone to abuse ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL
Technical Report 96/45, Department of Computer Science,
University of Melbourne, December 1996,
http://www.cs.mu.OZ.AU/publications/tr_db/mu_96_45.ps.gz
Obviously there will be some differences in Haskell, but
I think quite a bit of the interface could carry over into Haskell.
--
Fergus
design documentation
for the Mercury compiler, which are available at
http://www.cs.mu.oz.au/mercury/developer/compiler_design.html,
you will find almost nothing that is specific to the implementation
language. The compiler could just as easily have been implemented
in C using the exact same high-level
) was written in C for efficiency.
ghc was written in Haskell, and hence is big, fat, and slow.
Please correct me if I am wrong ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
P
of
constraints, and type inference is the process of solving those
constraints. This is a pretty declarative, non-operational
way of viewing things, IMHO. (Sorry, I don't have any specific
references to hand -- maybe someone else can assist.)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always
allocating the full size even for data that doesn't
occupy the full size. Thus I think it unlikely that an
implementation would adopt such a strategy.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal
, such as median-of-three
partitioning. For descriptions of that and other ways to speed
up quicksort, see Sedgewicks "Algorithms in C" or "Algorithms in Pascal"
(I'm afraid Sedgewick didn't write an "Algorithms in Haskell" ;-).
--
Fergus Henderson [EMAIL PROTE
method is called.
Note that writing
foo _ r@(Right c) = classmethod (Right c)
would result in compile error (or worse) due to an uninstantiated
type variable.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au
are very common, so it's probably worth optimizing
these cases.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
also does a conservative scan of the C stack, so the same would
apply there. However, for implementations such as ghc, you may not
be able to get away with this. Instead, you might have to explicitly
register and unregister any pointers to Haskell data structures from
the C data areas.
--
Fergus Hender
On 10-May-1998, S. Alexander Jacobson [EMAIL PROTECTED] wrote:
On Fri, 8 May 1998, Fergus Henderson wrote:
Note that consolidating multiple passes into single passes is not
always a win. For example, if your machine has 10 available registers,
and each pass uses 8 of them, then combining
modified code below.
Wouldn't it be a good idea for the modified code to actually disallow
the use of | directly, then?
A module system that can enforce encapsulation is a wonderful thing.
But of course it can't do any good if no-one uses it! ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I
plications.
I think I've seen this. It didn't seem to go down to well if my memory
is correct.
True, but maybe considerations such as these will sway the balance a bit! ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh |
ethod such as
name :: Organization a = a - String
you can do things like
orgnames :: [String]
orgnames = map name orgs
Does that help? I'm about to put existentials into GHC.
I'm glad to see it. We're currently in the process of putting
existentials into Mercury :-)
--
Fergus Hend
?
Quantifiers can be very confusing even if everyone agrees on the
same terminology. Are you sure you want to go against the established
terminology here?
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a let
* laziness! ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "The three principal virtues of a
WWW: http://www.cs.mu.oz.au/~fjh | programmer are Laziness, Impatience,
PGP: finger [EMAIL PROTECTED]| and Hubris." --Larry Wall.
s are rare, so there's no need to go to that effort,
and even if you did, the increased space costs and resulting
decreased locality would probably make it not worthwhile.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | o
On 10-Jun-1998, Hans Aberg [EMAIL PROTECTED] wrote:
At 01:09 +1000 98/06/11, Fergus Henderson wrote:
There's little point trying to implement C++-like so-called "zero-overhead"
exceptions in any language with garbage collection. It would
probably result in a perfor
y functional code,
and is much easier to implement efficienctly.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
On 10-Jun-1998, S. Alexander Jacobson [EMAIL PROTECTED] wrote:
On Thu, 11 Jun 1998, Fergus Henderson wrote:
It would make debugging easier if the exception picked was consistent
accross implementations. It doesn't matter which one, but it does matter
that it is the same. (maybe you
ast time I looked, I think implementations of Java for
those platforms simply didn't conform to the spec.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]
`hyperstrict handle` (const (return []))
print list
P.S. Is there any reason why something like `HyperEval'
isn't built in to Haskell, or at least include in the
Haskell Library report? Is there any implementation-specific
precedent for something like this in say ghc
things like this. But generally covert communication
channels are not an issue. So in general it's enough to say that
whether or not you get a HeapOverflow resource failure is nondeterministic.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW:
On 12-Jun-1998, Alastair Reid [EMAIL PROTECTED] wrote:
Fergus Henderson [EMAIL PROTECTED] points out that our exception handling
scheme hits problems if you hit an infinite loop instead of an exception.
Yes, this is a problem - and not a pretty one.
Fixes:
...
3) Add timeouts (and ctrl
On 15-Jun-1998, Peter White peter@galois wrote:
On June 15, Fergus Henderson writes
As noted earlier, things like heap overflow, and stack overflow
are different from other kinds of exceptions. They can't be modelled
using the domain-theoretic semantics. Rather, they reflect
On 15-Jun-1998, Fergus Henderson [EMAIL PROTECTED] wrote:
On 12-Jun-1998, Scott Turner [EMAIL PROTECTED] wrote:
At 14:40 1998-06-10 +0100, you wrote:
Here's a reasonable design for exceptions in Haskell:
* handle :: (String - IO a) - IO a - IO a
You probably realized more
n
constitute program bugs, this is not so much of a worry.
The nondeterminism doesn't make testing any more difficult, for example.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
allowing mutually recursive handlers?
This is also allowed by the current proposal -- it's quite straightforward:
handler1 e = stuff1 `handle` handler2
handler2 e = stuff2 `handle` handler1
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW:
lled here yet. But I don't have an implementation for
the exception handling primitives I proposed, so I haven't
actually tested it. Thus it is quite possible that it may
contain the odd bug or two.
Cheers,
Fergus.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pur
= grep(blah)
h = wc(-l)
then the line above is h(g(f)).
Or `h $ g $ f'.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last wor
1 with n=0 in the grammar rule for import.
This one I support.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
It may be reasonable to require module headers, but I don't think poor
compiler diagnostics is a sufficiently good reason, since it really
isn't that hard to just fix the compiler diagnostics.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: ht
the ones that would otherwise be ambiguous.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
be disambiguated by the context, and in fact even if you
don't even make use of the overloaded name at all.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -
examples are enough to make my point ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
?
There will still be problems with things like
instance Foo [m] = Foo m
Fergus Henderson writes of:
the monomorphism restriction (which exists for a similar reason,
to ensure termination of type inference).
Is this true?
Well, I had assumed that was the reason. I could be wrong
On 15-Jul-1998, Alex Ferguson [EMAIL PROTECTED] wrote:
Fergus Henderson writes of:
the monomorphism restriction (which exists for a similar reason,
to ensure termination of type inference).
Is this true? The rationale normally given for it by its advocates
(boo, hiss) seems invariably
ated tasks.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
the possibility that accessing the page
may fail... or at least put off dealing with such failures until
Haskell has better exception support. So I don't think it should affect
your interface.
But I think it would be better for the interface to use the IO Monad anyway.
--
Fergus Henderson [EMAIL
s should be spelled out in the copyright notice, I think.
Definitely.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
On 21-Jul-1998, Hans Aberg [EMAIL PROTECTED] wrote:
At 23:28 +1000 98/07/21, Fergus Henderson wrote:
I ANAL, but I believe the phrase "public domain" is a well-defined concept.
It does not mean why Simon L Peyton Jones means by it, though.
If something is public domain, then anyo
eld(mktag(0), Univ, UNIV_OFFSET_FOR_TYPEINFO);
Value = field(mktag(0), Univ, UNIV_OFFSET_FOR_DATA);
").
%-%
:- end_module format.
%-%
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known
e only uses the type
of the sample, not the value. Of course, if you provide it this way,
then you need an explicit type annotation on the sample, which sort
of defeats the purpose...
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.
that supports such types.
Of course, no-one is stopping you from writing such a package ;-)
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
t;.
Or better, just leave out the definition for "/=".
The default definition, which is
x /= y = not (x==y)
should work fine.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is
g a winner from a preferential votes using the
Quota Preferential method is available at
http://www.cs.mu.oz.au/~lee/prsa/count/count_form.html.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal hab
y simple, but turned
out to be a bit trickier than I had originally thought -- the current
development version still has several unfixed bugs relating to nested
modules.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of exc
istributed
in precompiled binary format rather than as source code. In general
it requires architecture-specific complicated munging of the generated
library files (`.a', `.so', `.DLL', etc.).
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.c
by the CC system.
Perhaps, but standard configuration systems such as RCS and CVS
don't provide that sort of control -- they only provide per-user
access control similar to (and with the same problems as)
Unix permissions.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always
this.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
that it does what it says.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
tax. 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 named the same?
Why should I have to explicitly differentiate if the meaning is clear
from the context
collision between
field names or constructor names. In those cases, the compiler
often has enough information to resolve the ambiguity without
even needing any explicit type declarations or type qualifications,
but Haskell doesn't allow it.
--
Fergus Henderson [EMAIL PROTECTED] | "I have a
inventing a lot of names;
I find the resulting namespace polution can be a bit ugly.
It is bad style to have trivial definitions for class methods, in which case
you are lying to the user.
I don't know what you mean here. Could you explain this in more detail?
--
Fergus Henderson [EMAIL PROTECTED
error", why shouldn't Monads have "mfail"?
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]| -- the last words of T. S. Garp.
ng "hiding":
instead of
import Foo renaming bar as baz
you have
import Foo hiding bar
baz = Foo.bar
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
On 05-Nov-1998, Lennart Augustsson [EMAIL PROTECTED] wrote:
If Integers can have "error", why shouldn't Monads have "mfail"?
I'm objecting less to mfail then mzero.
OK, in that case I agree with you.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known t
].
BTW, this is easily done using majordomo -- you just set the
"subject_prefix" variable in the configuration file.
--
Fergus Henderson [EMAIL PROTECTED] | "I have always known that the pursuit
WWW: http://www.cs.mu.oz.au/~fjh | of excellence is a lethal habit"
PGP: fin
On 09-Nov-1998, S. Alexander Jacobson [EMAIL PROTECTED] wrote:
On Sat, 7 Nov 1998, Fergus Henderson wrote:
But if we have to add new syntax to make it work then it
is getting to be more trouble than its worth.
Since the application is code generation, I don't think the extra
syntax
On 12-Nov-1998, Lennart Augustsson [EMAIL PROTECTED] wrote:
[...] if you dislike tuples you can use nested pairs
At the cost of losing a little type-safety.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever
On 12-Nov-1998, D. Tweed [EMAIL PROTECTED] wrote:
On Fri, 13 Nov 1998, Fergus Henderson wrote:
It would
avoid the nastiness of a special definition for each tuple type and and
lead to more flexibility.
I want each tuple arity to be a different type, so that I get a compile
error
not) give you reasonable results
for comparing List and Random Access List, but for comparisons with
Array I'd advise you use something that is close to what you will use
for the final implementation.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au
ous memory, at least for optimizing compilers.
Implementations using association lists would IMHO only be
suitable only for non-optimizing compilers.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: fin
be pretty useful. Maybe the same will
be true of arrows.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
specific
implementation.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
kAnyFoo 1.0] == [1,2]
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
to accomplish what I want by using a bit of a
kludge:
What's wrong with
class Foo a b where
write :: a - b - IO ()
?
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: fin
Gofer, ghc, Mercury, etc. all seems to confirm this.
So if undecidability per se is used as an argument against any particular
proposal for extending the type system, I think that argument should be
considerd a rather a weak one.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries ma
lkp = lookupFM
...
or perhaps this
class Tab t k where
lkp :: t - k - Maybe Value
addT :: t - k - Value - t
-- instance definition same as before
?
--
Fergus Henderson [EMAIL PROTECTED
typename ZeroIfEqualtypename FactorialFive::t,
HundredAndTwenty::t res2;
typedef typename res2::check_is_zero checkme2;
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever
tCoord = MkRect Float Float
class Coord t where ...
instance Coord PolarCoord where ...
instance Coord RectCoord where ...
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
to create very
complicated type systems. But when it comes to things like
proving that `==' is reflexive, symmetric, and transitive,
I think it may well be much clearer if these kinds of
properties are expressed more directly, rather than by
cleverly encoding them in the type system.
--
Fergus
this correctly?
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
believe "//" here is a C++/Java/C9X-style comment.
Just read it as if "//" were "--". Everything from
the "//" until the end of line is a comment.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but
wrong -- I think Cayenne is a very interesting
language, and it's a very promising line of research. I'm just
saying that I think we should be very cautious about adopting
this kind of thing into Haskell-2.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au
separation would not allow min2, would it?
It would allow min3, above. I'm not sure what min2 buys you over min3.
If the `Sorted' type is defined in terms of `sorted', then a compiler
ought to be able to optimize min3 just as well as min2, I think.
--
Fergus Henderson [EMAIL PROTECTED] | &qu
operator... ;-)
Seriously, I like John Hughes' proposal.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
in Haskell 2?
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]| -- leaked Microsoft memo.
in my previous post. But this idea is growing on me.
Implementations could resolve things statically where possible and
using memoing only in cases that can't easily be resolved statically.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au
tion of sort, then no it won't type check.
But if you return a proof defined as e.g.
proof = proof
then if I understand things correctly it will type check.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives fo
On 24-Feb-1999, Carl R. Witty [EMAIL PROTECTED] wrote:
Fergus Henderson [EMAIL PROTECTED] writes:
What if the body of min2 were defined so that it returned
something different in the two cases? Your code has no proof that the
code for the two cases is equivalent. If it's
On 25-Feb-1999, Carl R. Witty [EMAIL PROTECTED] wrote:
Fergus Henderson [EMAIL PROTECTED] writes:
Certainly a language with dependent types should define exactly what
types the type checker will infer. But when generating code, the
compiler ought to be able to make use of more accurate
possible to preserve
the desirable property that adding type declarations won't change the
program's behaviour.
--
Fergus Henderson [EMAIL PROTECTED] | "Binaries may die
WWW: http://www.cs.mu.oz.au/~fjh | but source code lives forever"
PGP: finger [EMAIL PROTECTED]|
1 - 100 of 392 matches
Mail list logo