I am playing around with KiCS and I have a strange problem, when I
evaluate a goal the variable bindings are not displayed, I see only
the value of the expression.
The idea is, that you decide yourself which bindings you want to see.
For example, you write (let x free in (not x,x)) to get
On Tue, Dec 1, 2009 at 7:01 PM, Michael P Mossey m...@alumni.caltech.edu
wrote:
Perhaps someone could either (1) help me do what I'm trying to do, or (2)
show me a better way.
In this one example, in a OO way of thinking, I have data called
AssignedNumbers that assigns integers to unique
On Tue, Dec 1, 2009 at 7:55 PM, Michael Mossey m...@alumni.caltech.edu
wrote:
Thanks for the reply. Was there something specific you were referring to,
or
Maybe http://plucky.cs.yale.edu/cs431/reading.htm Chapter 9 An Algebra of
Music.
___
Haskell-Cafe
Hi Mike
There used to be some slides available commenting on Haskore's CSound
interface. But they seem to have vanished (I have a copy rendered to
pdf when they were available). Like all slide presentations there's a
lot of reading between the lines to get a good picture after the fact:
On Sat, 2009-06-06 at 21:43 -0700, Iavor Diatchki wrote:
Hi,
I have been trying to build the package network from hackage
(version 2.2.1.3) on Windows Vista, and I could really use some help.
Unfortunately, if I try to use my package to build an
executable application I get a linker error,
I feel that Data.Set and Data.Map should be working together more
closely. For example you can already get the keyset of a Map, but the
`other way' is not built-in. I mean a function with a signature like
Ord k = Data.Set.Set k - (k-v) - Data.Map.Map k v
You can implement it in O(n):
assoc
Wizards,
I've the following small piece of code
\begin{code}
pairs :: [a] - [b] - [[(a, b)]]
pairs l1 = map (zip l1) . takeKFromN l1
takeKFromN :: [b] - [a] - [[a]]
takeKFromN s l = case s of
[] - [[]]
_ : r - [ a : b | a - l, b - takeKFromN r l]
\end{code}
I have a predicate:
p :: (a,
I agree this is wrong. I've created a Trac bug report
http://hackage.haskell.org/trac/ghc/ticket/3714
Thanks for pointing it out
Simon
| -Original Message-
| From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-
| boun...@haskell.org] On Behalf Of Martijn van Steenbergen
| Sent:
On Wed, 2 Dec 2009 01:12:23 +0100 Daniel Fischer daniel.is.fisc...@web.de
wrote:
DF No, quite the opposite. foldr is wonderful for lazy list processing.
DF I just need to make my function a wee bit lazier:
...
DF No, foldl cannot produce anything before the whole list has been traversed,
so it
Am Mittwoch 02 Dezember 2009 14:49:21 schrieb Christian Maeder:
Wizards,
I've the following small piece of code
\begin{code}
pairs :: [a] - [b] - [[(a, b)]]
pairs l1 = map (zip l1) . takeKFromN l1
takeKFromN :: [b] - [a] - [[a]]
takeKFromN s l = case s of
[] - [[]]
_ : r - [ a : b
Stephen Tetley wrote:
Hi Mike
There used to be some slides available commenting on Haskore's CSound
interface. But they seem to have vanished (I have a copy rendered to
pdf when they were available). Like all slide presentations there's a
lot of reading between the lines to get a good picture
Hi Gregg,
Yes, I've read his book School of Expression and I'll have to check up on
this draft.
His ideas are very useful at the level of composing music, where an
algebraic representation is natural and flies free and high. It's when that
representation grinds against an old quaint system
Or:
fpairs p s l = sequence [[(a,b) | b - filter (p a) l] | a - s]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Michael P Mossey wrote:
Perhaps someone could either (1) help me do what I'm trying to do, or
(2) show me a better way.
I have a problem that is very state-ful and I keep thinking of it as OO,
which is driving me crazy. Haskell is several times harder to use than
Python in this instance,
Thanks a lot, works as expected and is super short!
Cheers Christian
Daniel Fischer schrieb:
Or:
fpairs p s l = sequence [[(a,b) | b - filter (p a) l] | a - s]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Am Mittwoch 02 Dezember 2009 17:10:02 schrieb Christian Maeder:
Thanks a lot, works as expected and is super short!
You're welcome.
However, according to a couple of tests, the funkyName version is somewhat
faster and
allocates less.
Cheers Christian
Daniel Fischer schrieb:
Or:
Am Mittwoch 02 Dezember 2009 16:55:01 schrieb Michael Mossey:
Does this seem more functional in style?
Much more :)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Daniel Fischer schrieb:
However, according to a couple of tests, the funkyName version is somewhat
faster and
allocates less.
My timing tests showed that your fpairs version is fastest.
(first argument True selects filteredPairs, False funkyName)
My initial version myf is almost unusable.
On Tue, Dec 1, 2009 at 4:44 PM, Luke Palmer lrpal...@gmail.com wrote:
Existential types only buy you power when the quantified variable
appears more than once on the right hand side, for example: forall a.
Num a = (a,a). But even those can usually be factored out into more
direct
Am Mittwoch 02 Dezember 2009 18:54:51 schrieb Christian Maeder:
Daniel Fischer schrieb:
However, according to a couple of tests, the funkyName version is
somewhat faster and allocates less.
My timing tests showed that your fpairs version is fastest.
(first argument True selects
Hi,
I am trying to solve this problem: https://www.spoj.pl/problems/LASTDIG/
It is very simple. Given a and b, return the last digit of a^b. b
could be large, so I used logarithmic exponentiation and
wrote/submitted the code below for this problem:
aditya87:
Hi,
I am trying to solve this problem: https://www.spoj.pl/problems/LASTDIG/
It is very simple. Given a and b, return the last digit of a^b. b
could be large, so I used logarithmic exponentiation and
wrote/submitted the code below for this problem:
Hi,
Am Montag, den 30.11.2009, 00:30 + schrieb Duncan Coutts:
I should also note that distros will not look kindly on solutions that
require N * M separate packages.
with my Debian-Developer hat on I can very much support this statement.
Which is why I’m so interested in a proper solution
Am Mittwoch 02 Dezember 2009 22:44:01 schrieb Don Stewart:
aditya87:
Hi,
I am trying to solve this problem: https://www.spoj.pl/problems/LASTDIG/
It is very simple. Given a and b, return the last digit of a^b. b
could be large, so I used logarithmic exponentiation and
Just to mention
Today I was setting up a my new, and I wanted to put Haskell on it.
Rather than download GHC itself, I decided to install the Haskell
Platform instead, just to see what it's like.
Much to my surprise, I couldn't actually find any reference to its
existence anywhere from the haskell.org home
andrewcoppin:
Today I was setting up a my new, and I wanted to put Haskell on it.
Rather than download GHC itself, I decided to install the Haskell
Platform instead, just to see what it's like.
Much to my surprise, I couldn't actually find any reference to its
existence anywhere from
On Dec 2, 2009, at 2:26 PM, Andrew Coppin wrote:
Subsequently, I realise [as somebody will no doubt point out] that the link
is actually there, on the front page, right next to GHC, Hugs, et al.
On Dec 2, 2009, at 2:29 PM, Don Stewart wrote:
It is listed right on the front page, twice.
So here's a totally wild idea Sjoerd and I came up with.
What if newtypes were unwrapped implicitly?
What advantages and disadvantages would it have?
In what cases would this lead to ambiguous code?
Thanks,
Martijn.
___
Haskell-Cafe mailing list
Isn't that the point of type-classes?
Martijn van Steenbergen wrote:
So here's a totally wild idea Sjoerd and I came up with.
What if newtypes were unwrapped implicitly?
What advantages and disadvantages would it have?
In what cases would this lead to ambiguous code?
Thanks,
Martijn.
Am Donnerstag, den 03.12.2009, 01:16 +0100 schrieb Martijn van
Steenbergen:
So here's a totally wild idea Sjoerd and I came up with.
What if newtypes were unwrapped implicitly?
What advantages and disadvantages would it have?
In what cases would this lead to ambiguous code?
1)
instance
The idea is that there's just enough unwrapping such that you don't need to use
getDual and appEndo.
On Dec 3, 2009, at 1:25 AM, Holger Siegel wrote:
Am Donnerstag, den 03.12.2009, 01:16 +0100 schrieb Martijn van
Steenbergen:
So here's a totally wild idea Sjoerd and I came up with.
What
Nicolas Pouillard wrote:
Excerpts from Heinrich Apfelmus's message of Tue Dec 01 11:29:24 +0100 2009:
I propose to (trivially) generalize this type to list with an end
data ListEnd a b = Cons a (ListEnd a b)
| End b
because it may have other uses than just lazy error
Out of curiosity, why would one want a newtype that were unwrapped
implicitly, rather than just using type?
Personally, whenever I use a newtype it is precisely because I *want* the
compiler not to implicitly turn it into something else in order to protect
myself.
Cheers,
Greg
On Dec 2,
Gregory Crosswhite gcr...@phys.washington.edu wrote:
Out of curiosity, why would one want a newtype that were unwrapped
implicitly, rather than just using type?
One reason might be because you only switched from 'type' to 'newtype'
so that you could write more refined Arbitrary instances for
On Wed, Dec 2, 2009 at 6:08 PM, Greg Fitzgerald gari...@gmail.com wrote:
Gregory Crosswhite gcr...@phys.washington.edu wrote:
Out of curiosity, why would one want a newtype that were unwrapped
implicitly, rather than just using type?
One reason might be because you only switched from 'type'
Ah, that's a really good point. It seems then that there is a use for
implicitly unwrapped newtypes, but perhaps only when you never really wanted to
use a newtype to begin with but had to in order to use a different instance
declaration for the same type. That suggests that the feature we'd
On Wed, Dec 02, 2009 at 11:03:52PM +0100, Joachim Breitner wrote:
Hi,
Am Montag, den 30.11.2009, 00:30 + schrieb Duncan Coutts:
I should also note that distros will not look kindly on solutions that
require N * M separate packages.
with my Debian-Developer hat on I can very much
That suggests that the feature we'd really like is a way
to declare that we want a type in a context to act as if it
had a different instance declaration for a given typeclass,
without having to go through newtype.
I'd want implicit type coercion from subtypes, so that you wouldn't
need an
It's not too late to write something for Issue 15 of the Monad.Reader!
Whether you're an established academic or have only just started
learning Haskell, if you have something to say, please consider
writing an article for The Monad.Reader! The submission deadline
for Issue 15 is
Recently, in changing my work schedule to work mainly from home, I
switched from mainly using a work Wintel machine running Windows XP
Professional, Service Pack 3, to mainly using my home PowerPC G4
PowerBook Macintosh, currently upgraded to Mac OS X 10.5.8 Leopard.
However, to my surprise,
Hey everyone,
Is there some secret to getting Haddock to work with literate Haskell sources
that I am missing?
For example, when I download Takusen and type
cabal configure
cabal haddock
It produces HTML files complete with a table of contents, but with all of the
Hello
Thanks for all the help!
I only have a couple of questions.
On Thu, Dec 3, 2009 at 03:45, Daniel Fischer daniel.is.fisc...@web.de wrote:
Am Mittwoch 02 Dezember 2009 22:44:01 schrieb Don Stewart:
aditya87:
Hi,
I am trying to solve this problem:
But it seems to me like the whole point of using newtype is because you
*don't* want your new type to be used everywhere that the old type can be used;
otherwise you would just use type to create an alias. The only convincing
exception I have heard to this (as you helpfully explained to me)
2009/12/3 Gregory Crosswhite gcr...@phys.washington.edu:
But it seems to me like the whole point of using newtype is because you
*don't* want your new type to be used everywhere that the old type can be
used; otherwise you would just use type to create an alias. The only
convincing
44 matches
Mail list logo