Could someone please explain what the difference (if any!), in semantics
is between
class Foo f = Bar f g where
method1 :: f a - g a
and
class Bar' g where
method2 :: Foo f = f a - g a
? Maybe the translation of the above to something lower level might
help. [Note: f a - g a is just
On 13-09-18 08:54 AM, Roman Cheplyaka wrote:
* Jacques Carette care...@mcmaster.ca [2013-09-18 08:21:51-0400]
Could someone please explain what the difference (if any!), in
semantics is between
class Foo f = Bar f g where
method1 :: f a - g a
and
class Bar' g where
method2 :: Foo f = f
In trying to install the lens package, it eventually tries to install
transformers-compat-0.1.1.1 which in turn depends on
transformers-0.3.0.0 -- however that asksk for
transformers-0.3.0.0-3006d6ea13a2c10770bffd4de7a96dc9
which 1) is weird, and 2) doesn't exist!'
What gives?
Jacques
-chair), Indiana University
Jacques Carette (co-chair), McMaster University
Florian Rabe, Jacobs University Bremen
Emilie Balland, INRIA Bordeaux
Jeremy Siek, University of Colorado, Boulder
Gabriel Dos Reis, Texas AM University
Christophe Raffalli, Savoie University
Anya Helene Bagge, Universitetet i
On 13-03-21 06:32 AM, matteo vezzola wrote:
I'm playing with tagless final interpreters reading [1], using a very simple
language:
class Ints repr where
int :: Integer - repr Integer
(.+.) :: repr Integer - repr Integer - repr Integer
(.*.) :: repr Integer - repr Integer - repr
on.
Program Committee
-
Jeremiah Willcock (co-chair), Indiana University
Jacques Carette (co-chair), McMaster University
Florian Rabe, Jacobs University Bremen
Emilie Balland, INRIA Bordeaux
Jeremy Siek, University of Colorado, Boulder
Gabriel Dos Reis, Texas AM University
Christophe
On 13-03-12 04:06 PM, Jeremy Shaw wrote:
It would be pretty damn cool if you could create a data type for
generically describing a monadic parser, and then use template haskell
to generate a concrete parser from that data type. [...]
I would like to suggest that while it would be cool, it is
On 22/11/2012 11:52 AM, Brandon Allbery wrote:
On Thu, Nov 22, 2012 at 7:56 AM, Jacques Carette care...@mcmaster.ca
mailto:care...@mcmaster.ca wrote:
On 20/11/2012 6:08 PM, Richard O'Keefe wrote:
On 21/11/2012, at 4:49 AM, c...@lavabit.com
mailto:c...@lavabit.com wrote
On 22/11/2012 7:37 PM, Richard O'Keefe wrote:
On 23/11/2012, at 1:56 AM, Jacques Carette wrote:
Actually, here I disagree. It might be much 'easier' for the
programmers to do it for a small core language, but it may turn out
to be much, much less effective. I 'discovered' this when
(co
On 23/11/2012 9:59 AM, Mike Meyer wrote:
[...] I have to ask if your core language for Maple was larger than
Maple?
Yes. Maple 10 had 62 cases in its AST, we had 75 (p.13 of [1])
Jacques
[1] http://www.cas.mcmaster.ca/~carette/publications/scp_MaplePE.pdf
On 20/11/2012 6:08 PM, Richard O'Keefe wrote:
On 21/11/2012, at 4:49 AM, c...@lavabit.com wrote:
Well, I don't know. Would it save some time? Why bother with a core
language?
For a high level language (and for this purpose, even Fortran 66 counts as
high level) you really don't _want_ a
The function
app1 f x = f = ($ x)
or equivalently
app2 f x = join (f * pure x)
with type Monad m = m (a - m b) - a - m b ?
Hoogle did not help.
Jacques
PS: a nice point-free version would be appreciated as well. I can
easily change app1 and app2 myself to point-free with enough
On 12-06-23 04:26 AM, Roman Cheplyaka wrote:
Hi,
1. Minor correction for your tutorial: reverse . reverse = id is
called the involution property, not idempotency.
Indeed! Fixed, thanks.
2. Writing haddock documentation would definitely increase the chances
for GenCheck wide
On 12-06-23 04:38 AM, José Pedro Magalhães wrote:
On Tue, Jun 19, 2012 at 4:04 PM, Jacques Carette care...@mcmaster.ca
mailto:care...@mcmaster.ca wrote:
User beware: this is gencheck-0.1, there are still a few rough
edges. We plan to add a Template Haskell feature to this which
On 20/06/2012 6:56 AM, Henning Thielemann wrote:
QuickCheck is Haskell-98 and thus is very portable. I see that
GenCheck needs some more extensions - type families, multi-parameter
type classes, what else?
FlexibleContexts and FlexibleInstances.
However, I am fairly sure that the
Test.GenCheck is a Haskell library for /generalized proposition-based
testing/. It simultaneously generalizes *QuickCheck* and *SmallCheck*.
Its main novel features are:
* introduces a number of /testing strategies/ and /strategy combinators/
* introduces a variety of test execution methods
[Only cc:ing cafe]
There are definite similarities, yes - I only became aware of
testing-feat very recently. You seem to have concentrated more on
efficiency, while we have focused more on the high-level modular design
and on strategies. We should probably merge our efforts, if you are
On 19/04/2012 4:10 AM, Stefan Holdermans wrote:
Release early, release often. Here's a second version:
http://hackage.haskell.org/package/signed-multiset-0.2
Very cool.
In the literature, we have found [1] that these are sometimes also
called 'hybrid sets'. They do have some rather
On 19/01/2012 10:19 PM, Edward Z. Yang wrote:
In other words,
MonadZero has no place in dealing with pattern match failure!
I completely agree. See Bimonadic semantics for basic pattern matching
calculi [1] for an exploration of just that. In the language of that
paper, the issue is that
On 11-11-23 08:28 PM, Jason Dagit wrote:
On a similar line of reasoning, I've wondered if Perlin style noise
generation could be applied to get a sort of fuzzing effect. This
would be more interesting for cases where writing instances of
arbitrary is hard to do but test cases do exist. Apply
On 22/11/2011 12:42 PM, wren ng thornton wrote:
Something I think would be nice is to see full integration between
SmallCheck and QuickCheck. In particular, I'd like to use SmallCheck
to exhaustively search the small cases, and then use QuickCheck in a
way that ensures that it only tests on
Has a class like
class Decoration t where
type Datum t :: *
value :: t - Datum t
been defined in any of the haskell packages on hackage? [There are so
many variants on naming, it is rather difficult to search for this]
Jacques
___
in software design, with an
emphasis on games, for multiple visual scales, from the iPod Touch to
60inch high-resolution screen panels. The Fellowship is part of the
Gaming Scalability Environment (G-ScalE) project involving Dr. Jacques
Carette (Computing and Software, Faculty of Engineering), Dr
I am trying to install llvm-0.9.0.1 on Windows (through cygwin), on top
of a clean install of Haskell Platform 2010.2.0.0.
I do
cabal install llvm --configure-option --with-llvm-prefix=C:\\llvm
(which is where I unpacked llvm-gcc4.2-2.8-x86-mingw43.tar.bz2). This
fails with
Is anyone working on a Language.C++ module, similar to the wonderful
Language.C ? Right now just the syntax and a pretty-printer would be
really nice to have...
Jacques
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 21/11/2010 8:33 PM, wren ng thornton wrote:
On 11/20/10 6:33 AM, Ketil Malde wrote:
I guess this makes [X] an exponential type, although I don't remember
seeing that term :-)
Nope. (a-b) is the exponential type, namely |a-b| = |b|^|a|.
[_] is just a solution to the recursive equation [x]
On 02/11/2010 8:16 PM, Conal Elliott wrote:
Vector (Complex a) is a vector with respect to both 'a' and 'Complex a'.
Even worse, () is a vector w.r.t. *every* scalar type.
Why is this bad? () is the canonical 0-dimensional vector space.
0-dimensional vector spaces are very useful because
On 23/10/2010 5:19 PM, Daniel Peebles wrote:
Just out of curiosity, why do you (and many others I've seen with
similar proposals) talk about additive monoids? are they somehow
fundamentally different from multiplicative monoids?
People usually use additive notation for commutative monoids,
Daniel Fischer wrote:
On Aug 16, 2010, at 6:03 PM, Jacques Carette wrote:
Any sequence of numbers given by a linear recurrence equation with
constant coefficients can be computed quickly using asymptotically
efficient matrix operations. In fact, the code to do this can be
derived
Since we're off-topic...
Any sequence of numbers given by a linear recurrence equation with
constant coefficients can be computed quickly using asymptotically
efficient matrix operations. In fact, the code to do this can be
derived automatically from the recurrence itself.
Here is what you
Günther Schmidt wrote:
I have recently found something new that might also prove to be useful
for EDSLs.
http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html
Dan's blog post doesn't give any code or implementation but in a way
it tackles the same problem, and since you
Excellent answer! Splitting the Symantics class into pieces is one of
the techniques that we didn't need for solving the original problem
(tagless partial evaluation without resorting to fancy types) that set
us on this track. Which is too bad, because it would have made a nice
addition. The
[I work with Gordon on this]
The problem domain is test frameworks, more specifically
proposition-based testing. We are most of the way through unifying
QuickCheck and SmallCheck (as well as untangling the various 'stages'),
and are now generalizing.
The generator is obvious. The 'reducer'
Mike Dillon wrote:
begin Ivan Lazar Miljenovic quotation:
I take it you haven't had the legal problems that DrIFT had when it used
to be called Derive? http://www.dcs.gla.ac.uk/~nww/Derive/History.html
Looks
like they stopped selling it in June 2007, at least in the UK:
Bradford Larsen wrote:
I don't have the book handy (it was from the library), but I seem to
remember reading something along those lines in ``Datatype-Generic
Programming: International Spring School, SSDGP 2006, Nottingham, UK,
April 24-27, 2006, Revised Lectures'', edited by Backhouse,
I have heard generic programming described tongue-in-cheek as the kind
of polymorphism that a language does not (yet) have. I find this
description rather apt, and it matches fairly what I see called
'generic' in various communities. But who said this, where and when?
Jacques
Bradford Larsen wrote:
On Tue, Apr 27, 2010 at 4:23 PM, Jacques Carette care...@mcmaster.ca wrote:
I have heard generic programming described tongue-in-cheek as the kind of
polymorphism that a language does not (yet) have. I find this description
rather apt, and it matches fairly what I
Sterling Clover wrote:
I first encountered this quip on ltu:
http://lambda-the-ultimate.org/node/1926#comment-23411
However, that comment doesn't give a source either.
Probably where I remembered it from too. I'll continue searching - it's
a good quote!
Jacques
One thing I should have mentionned - TH and camlp4 are really
equivalents. And camlp4 is as-typed-as TH (or not, depending on your
point of view). I am co-author of a camlp4 extension, and I must admit
that coding in camlp4 was not enjoyable, while coding in metaocaml
(eventually) is.
[I
Don Stewart wrote:
I think we don't see as much metaprogramming because of other language
features -- laziness, operator syntax, and type classes -- make a bunch
of common designs work without needing metaprogramming.
While true, there are also 2 other reasons for meta-programmers are not
Jason Dagit wrote:
While true, there are also 2 other reasons for meta-programmers
are not all over Haskell:
1. efficiency nuts are already using C++ templates and don't see
why they would switch,
2. people who care about types use a typed meta-language (like
Casey McCann wrote:
Not to speak for Jacques,
:-)
and then you followed that up with a post with which I fully agree.
Jacques
but my impression is that while TH itself is
typed--it's just more Haskell after all--it doesn't do much to prevent
you from generating code that is not well-typed.
Stephen Tetley wrote:
The finally tagless style is an implementation of the TypeCase pattern
(Bruno C. d. S. Oliveira and Jeremy Gibbons):
One part of our work does that, yes.
The authors of the Finally Tagless note in the long version of their
paper that the GADT TypeCase had some
Günther Schmidt wrote:
In Olegs haskell implementation he is using classes mainly to model
the syntax and instances to use for evaluators / compilers to allow
multiple interpretations.
When there are 3 authors on a paper (and in the implementation file), it
is customary to acknowledge all 3,
Günther Schmidt wrote:
My guess is that finally tagless style allows one to create a syntax
without any initial dependency to an implementation. Ie. once one has
created the syntax in this style one can then proceed to construct terms.
Yes.
So this is my goal, create a syntax for relational
Günther Schmidt wrote:
I do know that I could express my algorithms via list-comprehension or
in a List Monad, all using tuples. And that would be concrete and
grossly inefficient.
You should probably tell us what these algorithms accomplish, rather
than how one implementation goes. From a
I just downloaded a fresh copy of Haskell Platform, and successfully got
cabal to update itself. I installed smallcheck-0.4 successfully too.
But then I tried to install lhs2tex, which 'worked' until the point of
saying:
Linking dist\build\lhs2TeX\lhs2TeX.exe ...
Installing executable(s) in
Which is 'right' in a way, since in the language Conor defined, all
definable terms are infinitely differentiable, and that can be
inferred from the given rules. That, in practice, you only need a
finite number of them in any given computation is derivable from the
instances, but is not a
Stephen Tetley wrote:
Hi Jacques
Does it install properly by the runhaskell Setup.hs configure / build
/ install? I re-installed it this way a couple of weeks ago and it
never mentioned mktexlsr.
No, it doesn't. I first run into issues with exceptions-related issues
(as you did), which I
Some success now.
Reverting to building by hand, if I
1. edit config.ml to put quotes around the name of the GHC executable
(since it contains spaces AND () ),
2. edit Makefile to add -package base-3.0.3.1 on to the --make line,
things proceed through the build and install stage properly.
I'd like to ask the cafe's advice on how to 'do this right'.
The situation is that we've got 2 literate Haskell programs which we
would like to refactor. In fact, this refactoring will ultimately unify
these 2 separate programs into a single framework. Every refactoring
step is well-defined
(sorry for the slow reply on this topic...)
Robert Atkey and Oleg presented some very interesting code in response
to your query. But some of you might (and should!) be asking why on
earth did Jacques use unsafePerformIO?, especially when neither Robert
nor Oleg did.
Simply put: I answered
Just a short note to show how the 3 evaluation orders can be written in
a very symmetric manner:
o...@okmij.org wrote these as:
In call-by-name, we have
lam f = S . return $ (unS . f . S)
In call-by-value, we have
lam f = S . return $ (\x - x = unS . f . S . return)
In
Lennart Augustsson wrote:
Everyone agrees that the Haskell numeric hierarchy is flawed, but I've
yet to see a good replacement.
That's because the good replacement which is mathematically sound
would be a real mess to work with -- for exactly the same reason that
Functor , Applicative and
It's possible, but it's not nice. You need to be able to get out of
the monad to make the types match, i.e.
lam f = I (return $ \x - let y = I (return x) in
unsafePerformIO $ unI (f y))
The use of IO 'forces' lam to transform its effectful input into an even
, that is disappointing in some way, guess I still have a lot to
learn.
Günther
Am 05.10.2009, 18:06 Uhr, schrieb Jacques Carette care...@mcmaster.ca:
It's possible, but it's not nice. You need to be able to get out of
the monad to make the types match, i.e.
lam f = I (return $ \x - let y
I was playing with some of Oleg's code (at end for convenience). After
minor adjustments for ghc 6.10.1, it still didn't work. The error
message is quite puzzling too, as it suggests adding exactly the
constraint which is present... Any ideas?
Jacques
-- Oleg's definition of a vector
Claus Reinke wrote:
{-# LANGUAGE ScopedTypeVariables #-}
without, the 'f's in the instance are independent.
Claus
Thanks - I discovered this (by trial-and-error) at about the same time
you sent the email.
Is there a ticket somewhere to add a warning about this? I expected me
'f's to be the
Andrew Wagner wrote:
Wadler posted a blog entry the other day about a paper on
pattern-matching in Haskell (http://wadler.blogspot.com/). I've taken
a first stab at turning it into actual code for hackage
(http://hpaste.org/13215). There are two commented-out definitions
that don't
I was trying to create a typeclass for an abstract Stack class, and ran
into some problems. The following 'works' fine:
{-# OPTIONS_GHC -XEmptyDataDecls -XFlexibleContexts
-fno-monomorphism-restriction #-}
module Stack where
data Void
class Stack s where
push_ :: s a r - b - s b (s a r)
apfelmus wrote:
Grzegorz Chrupala wrote:
split DOC . words . map toLower = (:[]) . words . map toLower
Since you converted everything to lowercase, the string DOC will
never appear in the text, resulting in a single huge document.
Oops, that should have been obvious, sorry for the dumb
Claus Reinke wrote:
You might find this interesting:
@inproceedings{ fokker95explaining,
author = Jeroen Fokker,
title = Explaining Algebraic Theory with Functional Programs,
booktitle = Functional Programming Languages in Education,
pages = 139-158,
year = 1995,
url =
for this, where
papers from both PLMMS 2007 and 2008 will be considered.
Programme Committee
---
Jacques Carette (Co-Chair) (McMaster University, Canada)
John Harrison (Intel Corporation, USA)
Hugo Herbelin (INRIA, Ecole polytechnique, France)
James McKinna
You can translate the following algorithm (written in Maple 11), which
can be made purely functional. [For the cognoscenti: attributes are
implemented in-place in Maple, but that is really just an instance of
the Decorator pattern which can be just as easily implemented with a
functional
Reasoning.
There will be a separate submission and review phase for this, where
papers from both PLMMS 2007 and 2008 will be considered.
Programme Committee
---
Jacques Carette (Co-Chair) (McMaster University, Canada)
John Harrison (Intel Corporation, USA)
Hugo
I think HOPS is what you are looking for
http://www.cas.mcmaster.ca/~kahl/HOPS/
It may advertize itself otherwise, but the main thing you 'see' when
running programs in fully explicit mode is exactly all the graph reductions.
Jacques
___
in a journal; papers from both PLMMS 2007
and 2008 will be considered here (details to follow).
Programme Committee
---
Jacques Carette (Co-Chair) (McMaster University, Canada)
John Harrison (Intel Corporation, USA)
Hugo Herbelin (INRIA, Ecole polytechnique
[EMAIL PROTECTED] wrote:
But... tell me please, ANYONE, who takes part in this inspiring exchange:
How many COBOL programs have you written in your life?
How many programs in Cobol have you actually SEEN?
Shudder. In '86, I had to modify a COBOL code generator, *written in
COBOL*. The
Carl Witty wrote:
On Mon, 2007-10-22 at 10:54 -0400, Brent Yorgey wrote:
The Online Encyclopedia of Integer Sequences should really
contain more
Haskell code for describing the sequences.
Agreed! I propose an OEIS party where we all sit around one day and
[Sorry for the long quote, but context is important]
Dan Piponi wrote:
It's fairly standard practice, when documenting functions of a complex
variable, to specify precisely which 'branch cuts' are being used.
Here's a quote from the Mathematica documentation describing their Log
function:
Others have already pointed this out, but it is worth saying again:
Maybe is not the only monadic effect which makes sense during
pattern-matching. Wolfram Kahl and I have explored some of these things
as part of the Pattern Matching Calculus,
http://sqrl.mcmaster.ca/~kahl/PMC/
[If you want
Jon Harrop wrote:
On Tuesday 12 June 2007 18:41:34 Tomasz Zielonka wrote:
On Sun, May 13, 2007 at 02:19:55PM +0100, Andrew Coppin wrote:
Writing *insanely* efficient number chrunking software requires a deep
understanding of the target architecture, and lots of playing with very
Andrew Coppin wrote:
Lennart Augustsson wrote:
Why do you seem so in awe of Mathematica?
Oh, well, I guess it is only the most powerful maths software ever
written... no biggie.
No, it is one of several. In very little time I can find 20 things that
Maple does better than Mathematica. In
Jon Harrop wrote:
Arbitrary precision integers are quite a performance burden and they
are rarely used. I would not expect a language that is trying to be
efficient to impose arbitrary precision integers (or floats).
Apparently you have looked inside a computer *algebra* system, one that
Personally I would like
{-# OPTIONS -fglasgow-exts -fgenerics -}
module Blog.Types where
family Usual = (Eq, Ord, Read, Show, Typeable)
data BlogEntry = Entry EpochSeconds Name Email Title Body deriving Usual
newtype Name = Name String deriving Usual
newtype Title = Title String deriving
30, 2007: Notification
June 29-30, 2007: Workshop
Program Committee
Lennart Augustsson [Credit Suisse]
Wieb Bosma [Radboud University Nijmegen, Netherlands]
Jacques Carette (co-Chair) [McMaster University, Canada]
David Delahaye [CNAM, France]
Jean-Christophe Filliâtre [CNRS and Université de
Magnus Jonsson wrote:
I have the same problem too when using Haskell. The more I try to
enforce static guarantees the more I get lots of datatypes that are
similar except for one or two constructors. The best way I have found
to avoid this is to simply give up on some of the static guarantees
Josef Svenningsson wrote:
On 4/24/07, Jacques Carette [EMAIL PROTECTED] wrote:
In Ocaml, you can frequently use polymorphic variants to get the same
effect.
Which means that if you are willing to do enough type-class-hackery, it
should, in principle, be possible to do the same in Haskell
Bryan Burgers wrote:
On 3/31/07, Scott Brown [EMAIL PROTECTED] wrote:
It's working now, thank you.
I changed the definition to
binom n j = div (fac n) ((fac j)*(fac (n - j)))
bernoulli n p j = fromIntegral(binom n j)*(p ^ j) * ((1 - p)^(n - j))
As a matter of style suggestion, it might
Vivian McPhail wrote:
What I want to push is a 'mathematically sound' numeric prelude. A proper
numerical prelude should have bona fide mathematical obects like groups,
rings, and fields underlying common numerical classes. It would be edifying
to the student who discovered that the particular
My main worry is that this can be a horrible time sink without a clear
path to success and, worse, known obstacles in the way.
For example: we know that all Monads are Functors, but that is not
expressed in the type classes, because it would be too much a pain to do
so. That pain is heavily
Alfonso Acosta wrote:
Just in case it helps, I ported the code of Norvigs Paradigms of
Artificial Intelligence Programming chapter 8 (integrals and
derivates) for a collage course.
A link to this code would have been / would still be most appreciated.
Jacques
Deadline
June 29-30, 2007: Workshop
Program Committee
Lennart Augustsson http://www.cs.chalmers.se/%7Eaugustss [Credit Suisse]
Wieb Bosma http://www.math.ru.nl/%7Ebosma/[Radboud University
Nijmegen, Netherlands]
Jacques Carette http://www.cas.mcmaster.ca/%7Ecarette (co-Chair)
[McMaster
If I have a class, say
class Symantics repr where
int:: Int - repr Int
and so on, I would like to *require* that 'repr' be covariant. Is there
any way to do that?
Jacques
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Since my last query was answered so quickly, let's try another.
I have looked on Hoogle. I would have asked Djinn, but I don't have it
around. So, can someone find a term that inhabits
(forall a. a - b) - (forall a. m a - m b)
? I think of this as the type of functions that, given a
There is a Maple plug-in for Excel. If you have Maple (on Windows),
just start Excel and you'll see extra buttons.
This allows you to have cells containing symbols, as well as access to
all of Maple's functions. This easily gets you a (very impure!)
higher-order functional language
Tim Newsham wrote:
I have to write:
do {
x - getSomeNum
y - anotherWayToGetANum
return (x + y)
}
even if the computation of x and y are completely independant of
each other.
I too have really missed a parallel composition operator to do
something like the above.
Brian Hulley wrote:
Would it be possible to augment Haskell's type system so that it was
the same as that used in Epigram?
No, no! Epigram is a wonderfully pure research experiment in one corner
of the design space. The corner it is exploring is not particularly
Haskell like, though the
Lennart Augustsson wrote:
I must second this opinion. There's this (false) perception that you
need all
kinds of extensions to make Haskell usable. It's simply not true.
Certain
extensions can make your life easier, but that's it.
To write code in Haskell, this is true.
However, one of
Neil Mitchell wrote:
In other words, you can program in Haskell just fine without
extensions. But if you want that next level in type safety,
extensions is where it's at, at least for the kind of code I write.
What level of safety do these type extensions give you?
Check out many, many, many
Yes, dependent types have a lot to do with all this. And I am an eager
lurker of all this Epigram.
Scott Brickner wrote:
Jacques Carette wrote:
Array out-of-bounds, fromJust, head on an empty list, and
pattern-match failures are in my list of things I wish the type
system could help me
David Roundy wrote:
The trouble is that your solution doesn't allow you to use do-notation with
the IxMonad. And if you did allow yourself to use do-notation by rebinding
(=), etc, then you wouldn't be able to use ordinary monads with
do-notation in the same module. That's what makes things
[As recently seen on LtU - http://lambda-the-ultimate.org/node/1919] An
amazing paper
http://www.dbmcintyre.pwp.blueyonder.co.uk/index_f/menu_f/j_f/apl95.pdf
on composition as seen from APL and J. The terminology (using verbs,
nouns, adverbs, etc) is _so_ much more evocative than the
First, I believe that this paper
http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf
is intimately related to WitnessMonad.
David Roundy wrote:
Rebinding the do notation is at least reasonably clean, it's just that we
don't want to lose the ability to mix with ordinary monads.
This
Robert Dockins wrote:
Or how about ??
lookupVarible target env =
case [ v | (n,v) - env, n==target ] of
(x:_) - x
_ - assert False $ BUG: Unexpected variable out of scope
++(show target)++ in environment ++(show env)
Other have pointed out that, in the CURRENT Haskell
Greg Buchholz wrote:
I guess it just looks really strange to my eyes. For example, foo
and bar are legal, but baz isn't. That's what I was thinking of the
situation, but I guess the type classes iron out the differences.
foo :: Int - Int - Int - Int
foo 0 = (+)
bar :: Int - Int - Int
Whenever people start discussing the Numeric type classes, the true
scope of what a refactoring can (and should?) be is frequently
under-estimated. The 'structure' of algebraic objects in mathematics
has been studied quite a lot (in mathematics and in CS, but not so much
by programming
David Menendez wrote:
* Having (+) work on lists, tuples and all the other monoids would
make error messages more complicated.
It gets worse than that. Imagine trying to explain to someone why 1 +
sin is actually \a - const 1 a + sin a.
It isn't that hard - it is done routinely in
[EMAIL PROTECTED] wrote:
That is what polymorphism is all about!
Not in this context, sorry. This is a convention. Another one may give
you
an abomination, e.g., 1+sin means 1 plus the addres of the sin routine.
(Of course not in a 'decent' language, but I know a few undecent.
No, it is
Your solution would imply[1] that all Rational are multiplicatively
invertible -- which they are not.
The Rationals are not a multiplicative group -- although the _positive_
Rationals are. You can't express this in Haskell's type system AFAIK.
Your basic point is correct: if you are willing
1 - 100 of 138 matches
Mail list logo