On 8 Mar 2012, at 13:21, Mark Wright wrote:
It might work without -fpic on x86 (32 bit):
http://www.mail-archive.com/gentoo-dev@gentoo.org/msg01420.html
On OS X, it is always on; I tried the example on 10.7, Xcode 4.3. I had to add
ln -s /Applications/Xcode.app/Contents/Developer
On 24 Jan 2012, at 11:06, Christopher Brown wrote:
I have stumbled across language-c on hackage and I was wondering if anyone is
aware if there exists a full C++ parser written in Haskell?
There is a yaccable grammar
On 18 Jan 2012, at 18:49, Andrew Butterfield wrote:
Just add ?banner=none to the url if you really have to read the page
Or stop the loading before the banner comes up.
Hans
On 18 Jan 2012, at 17:37, Henning Thielemann wrote:
On Wed, 18 Jan 2012, Nathan Collins wrote:
- Portland is
On 18 Jan 2012, at 19:32, John Meacham wrote:
Not to mention ebay, craigslist, etc..
http://www.techdirt.com/articles/20111005/10082416208/monster-cable-claims-ebay-craigslist-costco-sears-are-rogue-sites.shtml
when there is no burden of proof for someone to take down a site then
things
On 18 Jan 2012, at 23:11, Brandon Allbery wrote:
There is the Beastie Boys case, where the judge decided copyright protects
what is creatively unique.
But such judgments are rare, sadly. And for every Beastie Boys case there's
at least one The Verve case.
I did not know that. But it was
the
code uploaded, but the targets of any urls within said
code/description... and retroactively remove stuff if said links
change to contain objectional material. (for a very vauge definition
of objectionable). it is a really messed up law.
John
On Wed, Jan 18, 2012 at 2:46 PM, Hans Aberg
On 11 Jan 2012, at 13:38, John Lato wrote:
I used https://github.com/kennethreitz/osx-gcc-installer/downloads to
get a real gcc on Lion. Biggish download, but it worked. I've also
seen reports of success by self-compiling gcc, or by installing XCode
4 on top of an existing XCode 3
On 26 Dec 2011, at 16:11, AUGER Cédric wrote:
There is
http://www.stixfonts.org/
For typesetting with Xe[La]TeX or Lua[La]TeX, use XITS (in the
TeXLive package).
(And then we'll have to deal with folks trying to use the letter,
because everyone knows the Roman alphabet is the only one
On 26 Dec 2011, at 19:29, AUGER Cédric wrote:
Le Mon, 26 Dec 2011 18:20:55 +0100,
Hans Aberg haber...@telia.com a écrit :
On 26 Dec 2011, at 16:11, AUGER Cédric wrote:
Under Xorg, XCompose might be your friend! I have a whole bunch of
them for Coq programing.
Having something like
On 26 Dec 2011, at 23:03, Brandon Allbery wrote:
But if you are under Windows, or Mac OS, I cannot tell (as well as I
cannot tell if you are under a POSIX system not running xorg, such as
the tty1..ttyn consoles)
On OS X one can make ones owns key maps, like with the program on the link
On 27 Dec 2011, at 01:02, Donn Cave wrote:
Quoth Hans Aberg,
...
For example, I set one entry so that typing x |- a becomes x ↦ a, the
TeX \mapsto, in Unicode ↦ RIGHTWARDS ARROW FROM BAR U+21A6.
It might be tedious to make a lot of entries, though, but something to
start
On 21 Dec 2011, at 04:15, Brandon Allbery wrote:
On Tue, Dec 20, 2011 at 21:05, Andrew Cowie and...@operationaldynamics.com
wrote:
Now we just need λ to replace \, → to replace -, and ≠ to replace /=
(which still looks like division assignment no matter how hard I squint
my eyes. 25 years
On 21 Dec 2011, at 04:27, Ashok Gautham wrote:
On Tue, Dec 20, 2011 at 11:17:32PM +0100, Hans Aberg wrote:
The monospace characters U+1D670-1D6A3 might be used for keywords. Font:
http://www.stixfonts.org/
I feel that monospace fonts should be used for all of programming. A
language could
On 21 Dec 2011, at 11:03, Brandon Allbery wrote:
On Wed, Dec 21, 2011 at 04:51, Hans Aberg haber...@telia.com wrote:
The one on the list is not a mathematical symbol. It should be ⋆ STAR
OPERATOR U+22C6 or ∗ ASTERISK OPERATOR U+2217.
...except, at least in my current font, the former
readable, taking away the fact that it may
take some time to get used to it, since monospace has been used so much.
For such alignments, one would either to write to code so it does not depend on
it, or find some other means to do it.
Hans
On Wed, Dec 21, 2011 at 8:58 PM, Hans Aberg haber
On 21 Dec 2011, at 11:22, Andrew Coppin wrote:
On 21/12/2011 10:09 AM, Jesse Schalken wrote:
IIRC, Scite's default configuration is with non-monospace font. I
actually found it quite appealing, and in fact forgot about it entirely
after some usage. It is much easier on the eyes to read. The
On 20 Dec 2011, at 22:51, Chris Wong wrote:
One thing that concerns me is the use of capital letters to distinguish type
and class names and constructors from values. If I was doing it over I
would use a typographical distinction like italics for types, bold for
classes. That way we could
On 16 Nov 2011, at 05:18, John Meacham wrote:
People tend to concentrate on the lambda which cooresponds to the
functional aspect of haskell when designing logos. Not nearly enough
attention is paid to the other striking feature, the laziness. The
'bottom' symbol _|_ should feature
On 16 Nov 2011, at 23:49, heathmatlock wrote:
I took Jerzy's suggestions into consideration and made the lamb skinnier,
maybe it looks less like a penguin now.
http://imgur.com/4oeJz
A formula that is Haskell specific is
\x - ⊥ ≠ ⊥
It is mentioned in the Haskell 98 Report, sec. 6.2,
On 30 Dec 2010, at 03:05, Mark Spezzano wrote:
... regarding formal definitions of FREE and BOUND variables he
gives Defn 5.2 as
It is the occurrence of a variable that is free or bound. An
occurrence of a variable is bound if it is in the scope of something
that binds it; otherwise it
When trying to load Haskore in Hugs Sept 2006 (say by :l), it does not
work because it is in a subdirectory Haskore/Src/, despite that the
Hugs searchpath includes
/usr/local/lib/hugs/packages/*
I could of course change this searchpath, but I'm curios about how to
fix it without it - it
On 21 Aug 2010, at 20:24, Henning Thielemann wrote:
When trying to load Haskore in Hugs Sept 2006 (say by :l), it does
not work because it is in a subdirectory Haskore/Src/, despite that
the Hugs searchpath includes
/usr/local/lib/hugs/packages/*
I could of course change this searchpath,
On 21 Aug 2010, at 20:24, Henning Thielemann wrote:
When trying to load Haskore in Hugs Sept 2006 (say by :l), it does
not work because it is in a subdirectory Haskore/Src/, despite that
the Hugs searchpath includes
/usr/local/lib/hugs/packages/*
I could of course change this searchpath,
On 21 Aug 2010, at 20:57, Henning Thielemann wrote:
Did you install Haskore with Cabal or is it a version of Haskore
that is shipped with Hugs?
It is the version that comes with Hugs. It is the same as listed on http://haskell.org/haskore/
. What other version do you have in mind.
There
On 21 Aug 2010, at 20:57, Henning Thielemann wrote:
Did you install Haskore with Cabal or is it a version of Haskore
that is shipped with Hugs?
It is the version that comes with Hugs. It is the same as listed on http://haskell.org/haskore/
. What other version do you have in mind.
There
On 21 Aug 2010, at 21:51, Henning Thielemann wrote:
and one that I have messed
http://hackage.haskell.org/package/haskore
What changes have you made? - perhaps the packages should be unified.
I changed almost everything: Divided modules, designed a hierarchy
for module names, generalized
On 12 Aug 2010, at 12:49, Benedict Eastaugh wrote:
On 11 August 2010 15:49, Ozgur Akgun ozgurak...@gmail.com wrote:
Personally, I'd like to use the macports version, if the ghc
version there
was resonably recent (having 2 versions, a stable and an edge could
be a
good idea?)
You could
On 12 Aug 2010, at 14:08, Ozgur Akgun wrote:
On
http://wiki.github.com/mxcl/homebrew/installation
it says:
delete /usr/local/include and/usr/local/lib
So its not for those that also installs standard distributions, it
seems.
I thought this was just a recommendation.
It also says:
On 12 Aug 2010, at 20:46, Gaius Hammond wrote:
its not for those that also installs standard distributions, it
seems.
But what's wrong with the binaries listed here:
http://haskell.org/ghc/
Fairly easy to install.
Yes and no; on OSX 10.5.8 it works better to install GHC from the
binary
On 6 Aug 2010, at 09:48, Andrew Coppin wrote:
Hello, does anyone happen to have the lambdacats page cached? The
domain (arcanux.org http://arcanux.org) and server have
disappeared and the wayback machine doesn't have the images.
Somebody else noticed, eh?
Good thing I grabbed most of the
On 3 Aug 2010, at 23:51, aditya siram wrote:
I am doing an Intro To Monads talk in September [1]. The audience
consists of experienced non-Haskell developers but they will be
familiar with basic functional concepts (closures, first-class
functions etc.).
I am looking for suggestions on
On 19 Feb 2010, at 00:52, Richard O'Keefe wrote:
Turning to the Wikipedia article, we find
The word kangaroo derives from the Guugu Yimidhirr word gangurru,
referring to a grey kangaroo
Thanks, particularly for giving the name of the native language. Hope
the Wikipedia article can be
On 19 Feb 2010, at 00:05, Nick Rudnick wrote:
Mathematicians though stick to their own concepts and definitions
individually. For example, I had conversations with one who calls
monads triads, and then one has to cope with that.
Yes. But isn't it also an enrichment by some way?
Yes, one
On 19 Feb 2010, at 00:55, Daniel Fischer wrote:
I'd always assumed ring was generalised from Z[n].
As in cyclic group, arrange the numbers in a ring like on a
clockface?
Maybe. As far as I know, the term ring (in the mathematical sense)
first
appears in chapter 9 - Die Zahlringe des
On 19 Feb 2010, at 12:12, Daniel Fischer wrote:
...As far as I know, the term ring (in the mathematical sense)
first
appears in chapter 9 - Die Zahlringe des Körpers - of Hilbert's Die
Theorie der algebraischen Zahlkörper. Unfortunately, Hilbert gives
no hint
why he chose that name (Dedekind,
On 18 Feb 2010, at 14:48, Nick Rudnick wrote:
* the definition of open/closed sets in topology with the boundary
elements of a closed set to considerable extent regardable as facing
to an «outside» (so that reversing these terms could even appear
more intuitive, or «bordered» instead of
On 18 Feb 2010, at 20:20, Daniel Fischer wrote:
+ definition backtracking: «A closure operation c is defined by the
property c(c(x)) = c(x).
Actually, that's incomplete, ...
That's right, it is just the idempotency relation.
...missing are
- c(x) contains x
- c(x) is minimal among the
On 18 Feb 2010, at 19:19, Nick Rudnick wrote:
agreed, but, in my eyes, you directly point to the problem:
* doesn't this just delegate the problem to the topic of limit
operations, i.e., in how far is the term «closed» here more
perspicuous?
* that's (for a very simple concept) the way
On 18 Feb 2010, at 22:06, Daniel Fischer wrote:
...missing are
- c(x) contains x
- c(x) is minimal among the sets containing x with y = c(y).
It suffices*) with a lattice L with relation = (inclusion in the
case
of sets) satifying
i. x = y implies c(x) = c(y)
ii. x = c(x) for all x in
On 18 Feb 2010, at 23:02, Nick Rudnick wrote:
418 bytes in my file system... how many in my brain...? Is it
efficient, inevitable?
Yes, it is efficient conceptually. The idea of closed sets let to
topology, and in combination with abstractions of differential
geometry led to cohomology
On 3 Feb 2010, at 07:38, 조광래 wrote:
hi i was trying to solve it but
All i got is
type Matrix=[[Double]]
multMM :: Matrix - Matrix - Matrix --multiplies two matrices
multMM m t =[[sum (zipWith (*) (head m)(a)) ] ]where a = [head
a | a- t]
Main multMM [[2,1,-6],[1,-3,2]]
On 2 Feb 2010, at 03:05, Richard O'Keefe wrote:
A simple hash-function for strings is to simply exclusive-or the
bytes and then reduce modulo a prime number,
Simply exclusive-oring the bytes will give you at most 256 distinct
results. (For an ASCII source, 128 distinct results.) After
On 2 Feb 2010, at 13:15, 조광래 wrote:
define functions
type Matrix=[[Double]]
multMM :: Matrix - Matrix - Matrix --multiplies two matrices
det :: Matrix - Double --computes the determinant of a matrix
inv :: Matrix - Matrix --inverts a matrix
i stuck on those problems
can any one help me out?
On 28 Jan 2010, at 10:54, Dušan Kolář wrote:
Could anyone provide a link to some paper/book (electronic version
of both preferred, even if not free) that describes an algorithm of
translation of untyped lambda calculus expression to a set of
combinators? Preferably SKI or BCKW. I'm either
On 31 Jan 2010, at 20:07, John Lato wrote:
Or are you suggesting an actual hash table?
The hash function folds the keys onto an interval. Since you have
Int values
k, you might just use a mod k n function for that.
If it's the
latter, I'm not certain where the array fits into the
On 30 Jan 2010, at 20:59, michael rice wrote:
I'm not sure where I got this PICK function from, and don't
understand why it's written as it is, so I wanted to test it for
randomness. It seems random enough. But if I understand the
algorithm correctly, instead of selecting one of the
On 29 Jan 2010, at 12:52, John Lato wrote:
There are minimal perfect hash functions; there are some libraries
mentioned here, though they are not in Haskell code:
http://en.wikipedia.org/wiki/Perfect_hash_function
This is suitable when you do a lot of lookups with few key updates.
An
On 29 Jan 2010, at 15:57, John Lato wrote:
That looks interesting too. Yet another idea: use arrays
http://haskell.org/haskellwiki/Arrays
Then build a hash table, say just taking mod k n, and have values
in some
lookup map. If n set of keys, average time complexity is O(1),
and arrays
On 28 Jan 2010, at 03:09, Twan van Laarhoven wrote:
For example, in Map String Integer (sparse representation of
monomials) compute the minimum value of all associative pairs with
the same key (the gcd); if only one key is present, the absent
should be treated as having value 0. So
On 28 Jan 2010, at 20:07, Steve Schafer wrote:
The data are currently in a large lookup table. To save space, I'd
like
to convert that into a sort of hash function:
hash :: key - value
My question is this: Is there any kind of generic approach that can
make
use of the knowledge about the
I need ideally some generalizations of unionWith and unionWithKey, for
efficiency matters (i.e. avoiding conversions and traversing the maps
more than once). I could use a modification of the code in Map.hs, but
then the problem is that the module Map interface does not export the
On 27 Jan 2010, at 14:56, Jan-Willem Maessen wrote:
So here, one would want:
(a - c) - (b - c) - (a - b - c) - Map k a - Map k b - Map
k c
where the two first functions are applied when the first or second
key is missing.
Ah, the swiss army knife function on maps. This particular
On 27 Jan 2010, at 16:33, Jan-Willem Maessen wrote:
I'm not sure why you want to throw in functions between maps in the
two first arguments. Then there is no requirement that single keys
are preserved.
But it is a good idea to have a Maybe so that one can remove keys
on the fly.
A good
On 27 Jan 2010, at 21:29, Jan-Willem Maessen wrote:
I'm thinking about
(k - Maybe a - Maybe b - Maybe c) - Map k a - Map k b - Map k c
The first two Maybe's tell if the keys are present, the last if one
wants it in the resulting map.
That has the same behavior semantically, but it's no more
On 17 Jan 2010, at 11:44, Andrew Coppin wrote:
Urg, but that's *ugly*. Is there no way I can reduce the amount of
indentation to something more reasonable?
main = do
putStrLn Line 1
putStrLn Line 2
let xs = do
x - [1..10]
y - [1..10]
return (x+y)
print xs
That
On 15 Nov 2009, at 12:55, Stephen Tetley wrote:
http://hackage.haskell.org/packages/archive/haskore/0.1/doc/html/Haskore-Basic-Pitch.html
but maybe it is not what you need, since it distinguishes between
C sharp
and D flat and so on.
The enharmonic doublings and existing Ord instance
On 15 Jul 2009, at 12:25, Eugene Kirpichov wrote:
If ++ could be pattern matched, what should have been the result of
let (x++y)=[1,2,3] in (x,y)?
It will branch. In terms of unification, you get a list of
substitutions.
Hans
___
On 15 Jul 2009, at 13:22, Luke Palmer wrote:
If ++ could be pattern matched, what should have been the result of
let (x++y)=[1,2,3] in (x,y)?
It will branch. In terms of unification, you get a list of
substitutions.
f :: [a] - ([a],[a])
f (x ++ y) = (x,y)
For an argument s, any pair (x,
On 2 May 2009, at 04:05, Steve wrote:
Why is gcd 0 0 undefined?
In math, one may define gcd(x, y) as a generator of the ideal
generated by x and y in the ring of integers Z. The gcd(x, y) then
always exists as the ring Z is a PID (principal ideal domain), i.e.,
all ideals can be
, if there are system ones
available, then may be used - a GCC quirk. So in such cases, one might
have to edit the libpath so that the system libraries are not at all
there, moving selected one out of the way, using libtools or
something. This is very technical, though.
Hans Aberg
is Version 3.1.2, though I do not
know if it is the absolutely latest).
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 22 Mar 2009, at 12:45, Colin Adams wrote:
No. It's all recent.
And MacPorts installs its own gcc. Achim Scheider pointed out that the
compiler name is missing, so the shell tries to execute '-DNDEBUG' as
a program. When I try it, I get:
$ sudo port install python_select
Password:
---
On 22 Mar 2009, at 11:32, Colin Adams wrote:
I tried issuing the sudo port install command on the wiki page.
What did you try to install? ...
After some time running it failed with:
To fully complete your installation and make python 2.5 the default,
please run
sudo port install
On 22 Mar 2009, at 13:42, Colin Adams wrote:
After some time running it failed with:
To fully complete your installation and make python 2.5 the default,
please run
sudo port install python_select
sudo python_select python25
...The thing is that when I removed python_select and
On 21 Mar 2009, at 01:10, Brandon S. Allbery KF8NH wrote:
On 2009 Mar 20, at 17:02, Hans Aberg wrote:
Therefore, as mentioned before, it might be best to install the GHC
binaries and install libraries like Gtk+ from MacPorts. There is
also Intel Gtk+ that binds directly to Aqua
which does safety checks.)
Hans Aberg
# Add to end of searchpath:
append_path()
{
if ! eval test -z \\${$1##*:$2:*}\ -o -z \\${$1%%*:$2}\ -o -
z \\${$1##$2:*}\ -o -z \\${$1##$2}\ ; then
eval $1=\$$1:$2
fi
}
# Add to beginning of searchpath:
prepend_path()
{
if ! eval test -z
On 20 Mar 2009, at 22:44, Miguel Mitrofanov wrote:
Here is info about ghc:
$ port info ghc
ghc 6.8.3, Revision 1, lang/ghc (Variants: universal, darwin_6,
darwin_7, darwin_8_powerpc, darwin_8_i386, darwin_9_powerpc,
darwin_9_i386, no_opengl)
http://haskell.org/
A bit out of date:
On 20 Mar 2009, at 22:44, Miguel Mitrofanov wrote:
A bit out of date:
MigMit:~ MigMit$ port info ghc
ghc @6.10.1, Revision 8 (lang, haskell)
...blah-blah...
Maybe, your $(port version) is still 1.600?
Yes, now it worked:
$ port version
Version: 1.700
$ port info ghc
ghc @6.10.1, Revision 9
(and since the interval [0, 1] and R can be shown having the same
cardinalities), GHC implies card R = card 2^ω. (Here, ω is a lower
case omega, denoting the first infinite ordinal.)
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
hypothesis is 2^Aleph_0 == Aleph_1, which is
quite
something different from 2^Aleph_0 == card(R).
Yes, right, card R = 2^Aleph_0, as you said, and Aleph_1 is defined as
the smallest cardinal greater than Aleph_0.
Hans Aberg
___
Haskell-Cafe
classes are then at most countable. So one can set up a
bijection on each equivalence class: easy for at most countable sets.
Then paste it together. The axiom of choice probably implicit here.
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe
.
Mendelson says AC is in fact equivalent proving
all x, y: card x = card y or card y = card x
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
addition needed is to add the objects (x_1, ..., x_n), n =
0, 1, 2, ..., to your language. You can still curry the functions if
you like to - a convention, just as already noted.
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 8 Dec 2008, at 23:15, Joachim Breitner wrote:
Am Montag, den 08.12.2008, 15:59 -0600 schrieb Nathan Bloomfield:
Slightly off topic, but the A^B notation for hom-sets also makes the
natural isomorphism we call currying expressable as A^(BxC) = (A^B)
^C.
So A^(B+C) = A^B × A^C ?
Oh,
On 7 Dec 2008, at 11:34, Luke Palmer wrote:
On Sun, Dec 7, 2008 at 3:05 AM, Hans Aberg [EMAIL PROTECTED] wrote:
One can define operators
a ^ b := b(a) -- Application in inverse.
(a * b)(x) := b(a(x)) -- Function composition in inverse.
(a + b)(x) := a(x) * b(x)
O(x) := I
On 7 Dec 2008, at 04:30, George Pollard wrote:
This is a little bit random, but I was just wondering if anyone knew
where the $ low-precedence parenthesis-eliminating application
operator
originated. The Haskell Report doesn't mention anything, and I can't
search for $ on Google. So... who
On 18 Apr 2008, at 20:04, Martin Sulzmann wrote:
Let's consider our running example
class D a b | a - b
instance D a b = D [a] [b]
which we can write in CHR notation
D a b, D a c == b=c(FD)
D [a] [b] = D a b (Inst)
These rules overlap.
I experimented with translations into GNU
On 25 Apr 2008, at 14:20, Tom Schrijvers wrote:
Prolog works under the assumption of a closed world. That's
contrary to the open world view of regular type classes. So these
aren't the intended semantics.
By which I gather you mean the interpretation of :- as logical
connective = rather
On 25 Apr 2008, at 15:38, Tom Schrijvers wrote:
Prolog works under the assumption of a closed world. That's
contrary to the open world view of regular type classes. So these
aren't the intended semantics.
By which I gather you mean the interpretation of :- as logical
connective = rather
as the
length of the second argument.
Hans Aberg
import Control.Monad.State
f :: Monad a = a b - a c - a c
f x y = x = (return y)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
On 16 Apr 2008, at 15:22, Daniel Fischer wrote:
The point is the
instance Monad ((-) a) where
return x = const x
f = g = \x - g (f x) x
which is defined in Control.Monad.Instances...
Thank you. I suspected there was an instance somewhere, and I wanted
to know where it is defined.
On 16 Apr 2008, at 15:14, Miguel Mitrofanov wrote:
Before somebody noticed: I'm wrong.
It's not List monad, but also a (-) x monad, also defined in
Control.Monad.
Therefore, return y is just const y. Therefore,
x = (return y) = x = (const y) = x y
Right. It is an interesting monad, but
On 9 Apr 2008, at 17:49, Henning Thielemann wrote:
Additionally I see the problem, that we put more interpretation
into standard symbols by convention. Programming is not only about
the most general formulation of an algorithm but also about error
detection. E.g. you cannot compare complex
On 9 Apr 2008, at 11:26, Jules Bean wrote:
Using 'hugs -98', I noticed it accepts:
instance Monad m = Functor m where
fmap f x = x = return.f
Has this been considered (say) as a part of the upcoming Haskell
Prime?
This forbids any Functors which are not monads. Unless you allow
On 9 Apr 2008, at 15:23, Henning Thielemann wrote:
I don't know if it is possible to extend the syntax this way, but
it would be closer to math usage. And one would avoid duplicate
definitions just to indicate different operator names, like:
class AdditiveMonoid a where
o :: a
(+) :: a -
On 9 Apr 2008, at 15:23, Henning Thielemann wrote:
I also recognized that problem in the past, but didn't know how to
solve it. In Haskell 98, methods are resolved using the types of
the operands. How would the compiler find out which implementation
of (+) to choose for an expression like
On 9 Apr 2008, at 16:26, Henning Thielemann wrote:
I think a classical example are number sequences which can be
considered as rings in two ways:
1. elementwise multiplication
2. convolution
and you have some function which invokes the ring multiplication
f :: Ring a = a - a
and a
On 9 Apr 2008, at 16:26, Henning Thielemann wrote:
1. elementwise multiplication
2. convolution
and you have some function which invokes the ring multiplication
f :: Ring a = a - a
and a concrete sequence
x :: Sequence Integer
what multiplication (elementwise or convolution) shall be used
On 9 Apr 2008, at 17:49, Henning Thielemann wrote:
Additionally I see the problem, that we put more interpretation
into standard symbols by convention. Programming is not only about
the most general formulation of an algorithm but also about error
detection. E.g. you cannot compare complex
On 9 Apr 2008, at 17:49, Henning Thielemann wrote:
Also (2*5 == 7) would surprise people, if (*) is the symbol for a
general group operation, and we want to use it for the additive
group of integers.
One might resolve the Num binding of (+) problem by putting all
operators into an
On 8 Apr 2008, at 00:30, Bulat Ziganshin wrote:
At least Hugs complains if one does not indent deriving ..., but I
do not know what the standard says. If is required, then it can be
changed.
deriving is a part of data clause and indentation just allows us to
continue clause from prev. line. if
Using 'hugs -98', I noticed it accepts:
instance Monad m = Functor m where
fmap f x = x = return.f
Has this been considered (say) as a part of the upcoming Haskell Prime?
Hans Aberg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
On 8 Apr 2008, at 10:47, Bulat Ziganshin wrote:
deriving which I think is not used elsewhere. It will break a lot
of code, but it is easy to change, and also easy to make a
compatibility mode.
it's also easy to replace all the books, update all code repositories
and reteach all the programmers
On 8 Apr 2008, at 15:26, PR Stanley wrote:
I'm sure you could introduce change gradually without too much pain.
So then you only have to get the compilers to gradually understand
it :-).
I personally think deriving is a descriptive term, now that I
understand its role better.
There are
On 8 Apr 2008, at 16:32, Anton van Straaten wrote:
There are two processes here: deriving, i.e., inheriting an
interface; and instantiating, i.e., producing running code.
Haskell denotes derivation by =. And data a deriving
(b_1, ..., b_k) is really a short for
data a
instance b_1
On 8 Apr 2008, at 16:57, Anton van Straaten wrote:
So what is the difference from the current state?
None. See how efficient a solution it is? ;)
So for a change, you propose it should be the same. So you are one of
those A-programmers :-).
Seriously, there's only so much connotational
On 8 Apr 2008, at 17:03, Christian Maeder wrote:
deriving Eq i.e. following data List a = List a creates an
instance
like:
instance Eq a = Eq (List a) where compiler implementation
The problem was discussed for Stand-alone deriving declarations:
On 2 Apr 2008, at 16:20, Loup Vaillant wrote:
class AdditiveSemiMonoid a where
(+) :: a - a - a
Err, why *semi* monoid? Plain monoid would not be accurate?
I found an example where it is crucial that the monoid has a unit:
When given a monoid m, then one can also define an m-algebra, by
be
able to distinguish
data Bool = False | True
instance (Eq)
from
data Bool = False | True
instance Eq Bool where
x == y = ...
One wants to be able to do that with as little lookahead as possible.
Hans Aberg
___
Haskell-Cafe mailing list
On 7 Apr 2008, at 21:48, Brandon S. Allbery KF8NH wrote:
But here, one would have to think about how the compiler should be
able to distinguish
data Bool = False | True
instance (Eq)
from
data Bool = False | True
instance Eq Bool where
x == y = ...
Layout already does that,
1 - 100 of 234 matches
Mail list logo