-cafe/2012-May/101460.html
[4]
http://hackage.haskell.org/packages/archive/pipes/2.0.0/doc/html/Control-Pipe-Common.html
Chris
On Sun, Jan 27, 2013 at 11:03 AM, Petr P petr@gmail.com wrote:
Dear Haskellers,
I read some stuff about attribute grammars recently [1] and how UUAGC [2
Roman, this is interesting. Is this arrow generalization in some library
already? And does it have a name?
Best regards,
Petr Pudlak
2013/1/27 Roman Cheplyaka r...@ro-che.info
* Petr P petr@gmail.com [2013-01-26 23:03:51+0100]
Dear Haskellers,
I read some stuff about attribute
Hi Erik,
there seem to be several options. Tie simplest one is that you'll call
getEvent with some reasonable timeout in a loop and check some
communication channel an update from the calculation thread.
Probably the correct way how to handle it involves three threads:
(1) The computation
Dear Haskellers,
I read some stuff about attribute grammars recently [1] and how UUAGC [2]
can be used for code generation. I felt like this should be possible inside
Haskell too so I did some experiments and I realized that indeed
catamorphisms can be represented in such a way that they can be
2013/1/25 Daniel Díaz Casanueva dhelta.d...@gmail.com
Yes, you're right about the type context. I always forget that Functor is
not a superclass of Monad. Anyway, the `fmap` can be done only with `Monad`
in the context.
Instead of adding `Functor m` constraint you could write just
f n
Hi, trying to understand UndecidableInstances (and to find and answer to
http://stackoverflow.com/q/14476230/1333025), I was trying to find out why
mtl needs UndecidableInstances.
The reason is that instances like
instance MonadState s m = MonadState s (ContT r m) where
don't satisfy the
2013/1/23 John Wiegley jo...@fpcomplete.com
John Wiegley jo...@fpcomplete.com writes:
Never mind, when/unless + left work just fine for this.
You know, it's been a humorous day.
...
Don't take it so hard. Trying to reinvent something is always a great
exercise and makes you really
Dear Haskellers,
I've been playing with par and pseq, and I wonder: Is there any reason to
use
a `par` b `pseq` (a + b)
instead of
a `par` b `par` (a + b)
except that the second version sparks twice instead of just once (which
probably degrades performance a bit)? It seems to me that the
Dear Haskellers,
could somebody recommend me study materials for learning Hindley-Milner
type inference algorithm I could recommend to undergraduate students? The
original paper is harder to understand, I'm looking for something more
didactic. The students are familiar with the lambda calculus,
Dear Haskellers,
I'm working on a sorting library for MArrays. Speed is important, so I want
to optimize it as much as possible.
Currently, I simply INLINE the sorting function. This speeds up the code
more than 10 times. However this can easily explode code size if the
function is used in
Hi all,
I'm working on a library for fast sorting of MArrays. The library is
primarily about speed, so I added
ghc-options: -O2
to the cabal file. Now cabal sdist complains with:
'ghc-options: -O2' is rarely needed. Check that it is giving a real
benefit and not just imposing longer
Hi,
I also support Jon's proposal for standalone of { ... }. Seems to me
clearer and more useful than the special \case construct.
I suppose 'of { ... }' could be generalized to multiple arguments, so that
of (Just x) (Just y) - x ++ y
would create an anonymous function of type 'Maybe String
Hi Alvaro,
I think you need something wha Scala has - the ability to create a partial
function from a case expression. In Scala you could write
def update[A](f: PartialFunction[A,A])(v: A): A =
f.orElse({ case x = x } : PartialFunction[A,A]).apply(v);
and then use it like
update[Int]({
Dear Haskellers,
I'm working on a small library for representing semigroup (or monoid)
actions on a set http://hackage.haskell.org/package/semigroups-actions.
The MultiParamTypeClasses extension seems to be best suited for the task,
as a group can act on many sets, and a set can be acted on by
.
-- Kim-Ee
On Fri, Dec 21, 2012 at 7:38 PM, Petr P petr@gmail.com wrote:
Dear Haskellers,
I'm working on a small library for representing semigroup (or monoid)
actions on a set http://hackage.haskell.org/package/semigroups-actions.
The MultiParamTypeClasses extension seems to be best
Hi Christopher,
a data type can be an instance of Category only if it has kind * - * - *.
It must have 2 type parameters so that you could have types like 'cat a a'.
Some simple examples:
import Prelude hiding (id, (.))
import Control.Category
import Data.Monoid
-- See
Hi Alvaro,
by default Hoogle only searches some standard set of packages, which is
only a relatively small subset of all Hackage content. From
http://www.haskell.org/haskellwiki/Hoogle#Scope_of_Web_Searches :
Using the standard web interface, Hoogle searches: array, arrows, base,
bytestring,
Hi,
just an idea (using Seq from Data.Seq and Map from Data.Map):
newtype DataTable a b = DataTable (Map b (Seq a))
or if you know you won't have repeated values, you could have
newtype DataTable a b = DataTable (Map b (Set a))
Both those ideas sort the data (partially or fully). If you
2012/12/15 Brent Yorgey byor...@seas.upenn.edu
On Sat, Dec 15, 2012 at 08:13:44AM +0100, Petr P wrote:
This is strange, I thought that cpphs should be specified in
build-tools:, not in build-depends:.
http://www.haskell.org/cabal/users-guide/developing-packages.html#build-information
A small library that extends System.Timeout.timeout. It adds the
possibility of
saving partial results. Useful for AI-like algorithms that should return the
best result found within a time limit.
It comes in two variants:
(1) Simple, which only allows computations to save partial results, not
This is strange, I thought that cpphs should be specified in
build-tools:, not in build-depends:.
http://www.haskell.org/cabal/users-guide/developing-packages.html#build-information
Best regards,
Petr
2012/12/13 Michael Snoyman mich...@snoyman.com
On Thu, Dec 13, 2012 at 9:51 PM, Daniel
both sides have a horse in this race :)
- Clark
On Wed, Dec 12, 2012 at 9:51 AM, kudah kudahkuka...@gmail.com wrote:
On Wed, 12 Dec 2012 10:06:23 +0100 Petr P petr@gmail.com wrote:
2012/12/12 David Thomas davidleotho...@gmail.com
Yet another solution would be
what
Dear Haskellers,
following up the recent discussion about copyleft licenses, I'd suggest a
(hopefully minor) improvement of Hackage: For each package, gather the list
of the licenses of everything it depends on. I think this would help
considerably people who don't want or can't use software
2012/12/12 David Thomas davidleotho...@gmail.com
IANAL, but reviewing what others have written, it sounds like it may be
possible to maintain *some* distinction between LGPL and GPL in Haskell,
but it's a different distinction than with an LGPL shared library, so even
if applicable it's
I asked that on SO: http://programmers.stackexchange.com/q/179084/61231
So far the best answer is wxWidget's license (LGPL + linking exception)
which at least has been approved by OSI (although FSF approval would have
been better).
Best regards,
Petr
2012/12/12 Ivan Lazar Miljenovic
Dear Haskellers,
I'd like to announce a small library tie-knot:
Ties the knot on a given set of structures that reference each other by
keys - replaces the keys with their respective values. Takes Map k (v k)
and converts into Map k v' where v' is the fixed point of v.
Motivation: I
Hi all,
I'd say that a type class declares functions and specifies laws (in the
docs)
what its implementations must adhere to. It's not the job of a type class to
fulfill the laws, it's the job of its implementations. So the reason for
'Monoid w' in 'MonadWriter' cannot be that then
An additional thought: I'd say 'contained' is sort of inverse to 'writer':
writer = contained = id
contained . writer = return
Petr Pudlak
2012/12/9 Petr P petr@gmail.com
Hi all,
I'd say that a type class declares functions and specifies laws (in the
docs)
what its
The class is defined as
class (Monoid w, Monad m) = MonadWriter w m | m - w where
...
What is the reason for the Monoid constrait? It seems superfluous to me. I
recompiled the whole package without it, with no problems.
Of course, the Monoid constraint is necessary for most _instances_,
Thanks Brent, that's just what I needed. I'm switching to recursion-schemes
immediately.
Best regards,
Petr
2012/12/6 Brent Yorgey byor...@seas.upenn.edu
On Wed, Dec 05, 2012 at 08:22:32PM +0100, Petr P wrote:
Dear Haskellers,
I've made some minor improvements of fixpoint package
Dear Haskellers,
I've made some minor improvements of fixpoint package
http://hackage.haskell.org/package/fixpoint. I tried to contact the
original maintainer twice, but without success. The package hasn't been
updated for 4 years. How should I proceed? Should I start a new fork of the
, 2012 at 10:00 AM, Petr P petr@gmail.com wrote:
Hi,
recently I found out that some recursive functions can be greatly
optimized just by rewriting them using `let` so that they're not recursive
themselves any more (only the inner let is). To give an example:
fix :: (a - a) - a
fix f
Hi,
recently I found out that some recursive functions can be greatly optimized
just by rewriting them using `let` so that they're not recursive themselves
any more (only the inner let is). To give an example:
fix :: (a - a) - a
fix f = f (fix f)
isn't optimized, because it's a recursive
Hi
I believe the reason is that it uses TemplateHaskell for automatic
derivation of labels. And TemplateHaskell is of course unsafe, since
it could convert your code into something entirely different.
Best regards,
Petr Pudlak
2012/10/29 Greg Fitzgerald gari...@gmail.com:
Why are getters
2012/10/28 Francesco Mazzoli f...@mazzo.li:
At Sun, 28 Oct 2012 00:20:16 +0100,
Niklas Hambüchen wrote:
(I have mentioned this several times on #haskell, but nothing has
happened so far.)
Are you aware that all haskell.org websites (hackage, HaskellWiki, ghc
trac) allow unencrypted http
Erik,
does cabal need to do any authenticated stuff? For downloading
packages I think HTTP is perfectly fine. So we could have HTTP for
cabal download only and HTTPS for everything else.
Best regards,
Petr Pudlak
2012/10/28 Erik Hesselink hessel...@gmail.com:
While I would love to have
2012/10/28 Iustin Pop iu...@k1024.org:
On Sun, Oct 28, 2012 at 01:38:46PM +0100, Petr P wrote:
does cabal need to do any authenticated stuff? For downloading
packages I think HTTP is perfectly fine. So we could have HTTP for
cabal download only and HTTPS for everything else.
Kindly disagree
2012/10/28 Changaco chang...@changaco.net:
It doesn't matter what kind of certificate the server uses since the
client generally doesn't know about it, especially on first connection.
Some programs remember the certificate between uses and inform you
when it changes, but that's not perfect
Hi,
Haskell compilers optimize tail recursive functions as cycles, which
improves both memory and CPU complexity. However, it's easy to make a
mistake and break the conditions under which a function can be tail
recursive and thus optimized. Is there a way to tell a Haskell
compiler that a
2012/10/18 Strake strake...@gmail.com:
On 17/10/2012, Petr P petr@gmail.com wrote:
Hi,
(this is a literate Haskell post.)
lately I was playing with the Writer monad and it seems to me that it
is too tightly coupled with monoids. Currently, MonadWriter makes the
following assumptions
Hi,
(this is a literate Haskell post.)
lately I was playing with the Writer monad and it seems to me that it
is too tightly coupled with monoids. Currently, MonadWriter makes the
following assumptions:
(1) The written value can be read again later.
(2) For that to be possible it has to be
41 matches
Mail list logo