First of all, apologise if the question is too broad. The background goes
like this: I've implemented a server program in Haskell for my company
intended to replace the previous one written in C which crashes a lot (and
btw the technology of the company is exclusively C-based). When I chose
[Is Haskell-Cafe the right place to discuss DESIGN issues of the Haskell
language? This message is not about a concrete problem...]
Congratulations to all that solved the riddle so quickly. (First answer
in only 8 Minutes!) Now to the point of the exercise: Shocking
realizations.
1.
On 17 July 2012 09:27, Andreas Abel andreas.a...@ifi.lmu.de wrote:
1. Haskell's type inference is NON-COMPOSITIONAL!
In the riddle below, I am defining two things f (rgbliste) and g
(farbliste). Even though they are not strongly connected, but g comes
after f in the definition order, the
Hi all,
I was exploring Text.Regex.Posix and found that I was not able to do a
non-greedy match by modifying the quantifier with a ?. How can I achieve
non-greedy match in Text.Regex.Posix?
Regards,
Kashyap
___
Haskell-Cafe mailing list
You will be warned about the top-level definitions not including a
type-signature if you use the -Wall flag. This isn't really a complete
solution to your gripes, but it does address the change in behaviour
that you saw when adding/removing the commented code, and would draw
your attention to the
1. Haskell's type inference is NON-COMPOSITIONAL!
Yes, it is -- and there are many examples of it. Here is an example
which has nothing to do with MonomorphismRestriction or numeric
literals
{-# LANGUAGE ExtendedDefaultRules #-}
class C a where
m :: a - Int
instance C () where
m _
Actually, both examples show that the problem isn't type inference, it's
defaulting mechanism.
Отправлено с iPhone
Jul 17, 2012, в 12:46, o...@okmij.org написал(а):
1. Haskell's type inference is NON-COMPOSITIONAL!
Yes, it is -- and there are many examples of it. Here is an example
* C K Kashyap ckkash...@gmail.com [2012-07-17 13:31:05+0530]
I was exploring Text.Regex.Posix and found that I was not able to do a
non-greedy match by modifying the quantifier with a ?. How can I achieve
non-greedy match in Text.Regex.Posix?
POSIX regular expressions semantics doesn't have a
Thanks Roman,
I guess I better invest my time in Parsec then :)
Regards,
Kashyap
On Tue, Jul 17, 2012 at 5:05 PM, Roman Cheplyaka r...@ro-che.info wrote:
* C K Kashyap ckkash...@gmail.com [2012-07-17 13:31:05+0530]
I was exploring Text.Regex.Posix and found that I was not able to do a
[This message is more appropriate for a hackage mailing list I presume, but
that doesn't seem to exist. Let me know if there's a better place to send
it.]
I'm having a hackage compile failure for a newly uplodaded package that has
a QuickCheck 2.5 dependence. The error message is:
[13 of 13]
Dear Levent,
I think this [1] could be related.
Regards,
Alexander Foremny
PS. Sent this to Levent directly. Here's a copy for the mailing list.
Sorry for the noise.
[1] http://haskell.1045720.n5.nabble.com/Bad-interface-problem-td5714184.html
-- Forwarded message --
From:
Thanks Alexander. However, I'm not sure how to use the workaround described
so I can get hackage to properly compile my package. It sounds like I have
to add a template-haskell = 2.7.0.0 dependency to my own cabal file,
which sounds like the wrong thing to do in the long-run.
Is there something
On Tue, Jul 17, 2012 at 9:54 AM, C K Kashyap ckkash...@gmail.com wrote:
I guess I better invest my time in Parsec then :)
That's certainly more Haskelly... but it's often possible to rephrase a
regexp in POSIX ERE language without using the non-greedy PCREism. What
exactly are you trying to
Which package are you trying to build? Is it a local package that
fails to build or something on Hackage? Its .cabal file or at least
full dependencies would be of interest.
Regards,
Alexander Foremny
2012/7/17 Levent Erkok erk...@gmail.com:
Thanks Alexander. However, I'm not sure how to use
Dear Levent,
unfortunately I am at a loss here. As far as I understand it this
should be fixed in QuickCheck's .cabal file or on Hackage. But I am
not experienced enough to decide.
You best wait for someone else to comment on this. Depending on
template-haskell in your .cabal file is not the way
With ghc 7.4.1, cabal-install 0.13.3 and Cabal 1.14.0,
% cabal install --avoid-reinstalls sbv-2.2
fails to find a plan without reinstalls, and recommends --solver=modular.
% cabal install --solver=modular --avoid-reinstalls sbv-2.2
reinstalls template-haskell-2.6.0.0, which breaks the GHC
Thanks Alexander.. Here's the shocker: I just checked that page again (
http://hackage.haskell.org/package/sbv) and now it's mysteriously fine!
Hackage must've recompiled the package somehow. Someone watching this
thread must've fixed something on the server and triggered a new compile.
While I'm
Ah, that explains why the hackage page mysteriously got fixed. Thanks for
looking into this Ross.
It still feels like this'll start biting more folks down the road. I've
created the following cabal ticket so it can be tracked:
https://github.com/haskell/cabal/issues/978
However, my
On Mon, 16 Jul 2012, Felipe Almeida Lessa wrote:
On Mon, Jul 16, 2012 at 12:33 PM, Vo Minh Thu not...@gmail.com wrote:
It seems like the infered type (and thus bounds) is different when you
force the result to be a Color or not. Just give explicit type
signatures and conversion functions.
Is there anything in Criterion that allows for a benchmark to run some
code before or after the thing that it's timing? As an example, I'd
like to time a bunch of database inserts, but beforehand I want to
create the target table, and afterwards I'd like to delete it. I
don't really care to have
On 17 July 2012 20:45, tsuraan tsur...@gmail.com wrote:
Is there anything in Criterion that allows for a benchmark to run some
code before or after the thing that it's timing? As an example, I'd
like to time a bunch of database inserts, but beforehand I want to
create the target table, and
On 07/17/2012 08:34 AM, Yifan Yu wrote:
First of all, apologise if the question is too broad. The background goes
like this: I've implemented a server program in Haskell for my company
intended to replace the previous one written in C which crashes a lot (and
btw the technology of the company
On 17 July 2012 22:10, Bardur Arantsson s...@scientician.net wrote:
On 07/17/2012 08:34 AM, Yifan Yu wrote:
I can only tell if I browse the source code. So the question is, how can I
determine all the exceptions that can be thrown by a given function?
Look at its source.
Not sure that's the
On 07/17/2012 10:17 PM, Christopher Done wrote:
On 17 July 2012 22:10, Bardur Arantsson s...@scientician.net wrote:
On 07/17/2012 08:34 AM, Yifan Yu wrote:
I can only tell if I browse the source code. So the question is, how can I
determine all the exceptions that can be thrown by a given
See the second argument of defaultMainWith
http://hackage.haskell.org/packages/archive/criterion/0.6.0.0/doc/html/Criterion-Main.html#v:defaultMainWith.
the prep argument is run before the entire suite is run (i.e. once
per criterion main invocation); I'm looking for some way to run code
before
Hello there Yifan,
exception handling should be done on a per-context basis, where the
developer establishes the notion of context. Most of the time this
boils down to releasing resources:
forkIO (doStuffWith h `finally` hClose h)
In more complicated scenarios, where you actually need to
Cabal doesn't play well with version constraints on the template-haskell
package - it doesn't know it can't reinstall template-haskell.
The workaround is to figure out why QuickCheck has version constraints on
template-haskell and solve that problem in the QuickCheck package a
different way -
On Wed, Jul 18, 2012 at 12:14:12AM +0100, Antoine Latter wrote:
Cabal doesn't play well with version constraints on the template-haskell
package - it doesn't know it can't reinstall template-haskell.
The workaround is to figure out why QuickCheck has version constraints on
template-haskell
Hi all --
Pardon me if this has been answered before: how come there's a
stripPrefix in Data.List, but no matching stripSuffix?
Thanks!
Alvaro
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Jul 17, 2012 at 8:33 PM, Alvaro Gutierrez radi...@google.comwrote:
Pardon me if this has been answered before: how come there's a
stripPrefix in Data.List, but no matching stripSuffix?
Probably because prefixes are easier to do, given the nature of singly
linked lists.
--
brandon s
On Wed, Jul 18, 2012 at 4:10 AM, Bardur Arantsson s...@scientician.netwrote:
The most robust way is probably to use a completely independent
supervisor program, e.g. upstart, systemd, runit, etc. These
usually have facilities for restarting the supervised program, and a
rate limit on exactly
On Wed, Jul 18, 2012 at 7:05 AM, Ertugrul Söylemez e...@ertes.de wrote:
exception handling should be done on a per-context basis, where the
developer establishes the notion of context. Most of the time this
boils down to releasing resources:
forkIO (doStuffWith h `finally` hClose h)
On 18/07/2012, at 12:37 PM, Brandon Allbery wrote:
On Tue, Jul 17, 2012 at 8:33 PM, Alvaro Gutierrez radi...@google.com wrote:
Pardon me if this has been answered before: how come there's a
stripPrefix in Data.List, but no matching stripSuffix?
Probably because prefixes are easier to do,
On Tue, Jul 17, 2012 at 11:34 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote:
Here are two other possible reasons.
It's not just easier, stripPrefix pfx lst is *possible* as long
as pfx is finite, even when lst is infinite. The same would not
be true of a suffix stripper.
Isn't this the case
Hi.
QuickCheck's constraint is template-haskell = 2.4, which doesn't explain
why cabal wanted to install 2.6.0.0 when 2.7.0.0 was already present.
Also, I'd expect --avoid-reinstalls to stop it reinstalling anything,
but apparently it doesn't do that with the modular solver.
Assuming the
35 matches
Mail list logo