Hello Haskellers,
Having been pretty much impressed by Don Stewart's "Practical Haskell"
(http://donsbot.wordpress.com/2010/08/17/practical-haskell/), I
started to write a Haskell script to run maven jobs (yes, I know...).
In the course of undertaking this fantastic endeavour, I started to
use the
On Sep 13, 12:22 pm, Michael Lazarev
wrote:
> Thanks for examples and pointers.
> Since I came from Lisp, it never occurred to me that let and lambda
> are different constructs in Haskell.
You're not alone, I didn't believe my eyes when I first read about the
difference (I learned Scheme, but th
On Sep 13, 6:25 pm, Maciej Piechotka wrote:
> I started experiment with strict functors. I come to:
> > import Control.Exception
> > import Foreign
> > import Prelude hiding (catch)
>
> > data StrictMonad a = StrictMonad a deriving Show
>
> > instance Functor StrictMonad where
> > f `fmap` St
On Sep 13, 6:27 pm, aditya siram wrote:
> Hi all,
> I was trying to read the documentation on monoids and the Sum type.
> When I searched Hayoo for "Monoid" or "Data.Monoid", the Data.Monoid
> module in "base" did not show up - Hoogle found it without a problem.
> The same goes for the "Sum" type,
Hi all,
I would like to share a new very cool result given by the current
Cabal: if packages FOO, BAR and FOOBAR exist, such that FOO depends on
BAR which depends on FOOBAR, and all three are installed, you just
can't safely upgrade FOOBAR. When the same version of BAR is ever
recompiled against t
Andrew Coppin wrote:
Also, I commented that the links generated were broken, but it appears
that if you have a sufficiently new version of Haddock, the links work
just fine. (In other words, this particular bug is already fixed.)
Heh, nope. The correct information is actually this: It *always*
On Sep 13, 1:52 pm, Ross Paterson wrote:
> On Sat, Sep 11, 2010 at 12:17:27PM -0700, Jason Dagit wrote:
> > "To avoid this problem in the future, avoid upgrading core packages.
> > The latest version of cabal-install has disabled the upgrade command
> > to make it a bit harder for people to break
On Sun, Sep 12, 2010 at 20:46, Tillmann Rendel
wrote:
> Paolo Giarrusso wrote:
>> in a tracker entry you linked to,
>> http://hackage.haskell.org/trac/hackage/ticket/704, duncan argues that
>> "we also want to be able to do things like linking multiple versions
>> of a Haskell package into a singl
On Sun, Sep 12, 2010 at 9:24 AM, Dominique Devriese
wrote:
>> However, it would make more sense to have it be a type family, without
>> the overhead of data (both in space and in typing).
>
> You can make Tensor a data family and use "newtype instances". As I
> understand these, there should not b
On Mon, Sep 13, 2010 at 3:26 AM, Petr Prokhorenkov
wrote:
> I really didn't expect mapAccumL to have quadratic complexity. Thank you a
> lot for the fix!
No problem. By the way, in my benchmarks, mapAccumL on Text is now faster
than on ByteString :-)
_
Hi all,
I was trying to read the documentation on monoids and the Sum type.
When I searched Hayoo for "Monoid" or "Data.Monoid", the Data.Monoid
module in "base" did not show up - Hoogle found it without a problem.
The same goes for the "Sum" type, Hayoo does not seem to find it but
Hoogle does.
-
I started experiment with strict functors. I come to:
> import Control.Exception
> import Foreign
> import Prelude hiding (catch)
>
> data StrictMonad a = StrictMonad a deriving Show
>
> instance Functor StrictMonad where
> f `fmap` StrictMonad v = return $ f v
>
> instance Applicative Stri
Hi!
OK, System.Timeout's timeout does not have this problem. ;-)
Mitar
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
For completeness, using fclabels (yet another record package) you can write it
like this:
> {-# LANGUAGE TemplateHaskell #-}
> module Records where
>
> import Data.Record.Label
>
> data MyRecord = MyRecord { _field1 :: String, _field2 :: Int, _field3 :: Bool
> }
>
> $(mkLabels [''MyRecord])
Am Samstag, den 11.09.2010, 11:21 -0600 schrieb Jonathan Geddes:
> I know that record updates is a topic that has become a bit of a dead
> horse, but here I go anyway:
>
> I find that most of the record updates I read and write take the form
>
> >someUpdate :: MyRecord -> MyRecord
> >someUpdate m
On Mon, Sep 13, 2010 at 8:21 AM, Alexander Kotelnikov wrote:
> And, also, would it make any difference if
>
>
> do {p <- e; stmts} = let ok p = do {stmts}
> ok _ = fail "..."
> in e >>= ok
>
> is redefined as "e >>= (\p -> do {stmts})"?
This is the magic that allows pattern-match f
On Sat, Sep 11, 2010 at 12:17:27PM -0700, Jason Dagit wrote:
> From the FAQ linked by Paolo:
>
> http://www.haskell.org/cabal/FAQ.html#dependencies-conflict
>
> "To avoid this problem in the future, avoid upgrading core packages.
> The latest version of cabal-install has disabled the upgrade comm
2010/9/13 Daniel Fischer :
> On Monday 13 September 2010 11:50:14, Vo Minh Thu wrote:
>> 2010/9/13 David Virebayre :
>> > Does it help to compile with ghc --make -O2 -funbox-strict-fields ??
>>
>> No, it doesn't. Can I assume you don't have the problem I described?
>
> Currently, GHC's native code
On Monday 13 September 2010 11:50:14, Vo Minh Thu wrote:
> 2010/9/13 David Virebayre :
> > Does it help to compile with ghc --make -O2 -funbox-strict-fields ??
>
> No, it doesn't. Can I assume you don't have the problem I described?
Currently, GHC's native code generator is not too good at optimi
I really didn't expect mapAccumL to have quadratic complexity. Thank you a
lot for the fix!
On Mon, Sep 13, 2010 at 5:06 AM, Bryan O'Sullivan wrote:
> On Sun, Sep 12, 2010 at 12:23 PM, Petr Prokhorenkov <
> prokhoren...@gmail.com> wrote:
>
>> I experienced a following problem while dealing with
Thanks for examples and pointers.
Since I came from Lisp, it never occurred to me that let and lambda
are different constructs in Haskell.
I thought that
let x = y in f
is really
(\x -> f) y
It turns out that let is about declarations which are not the same as
function applications above.
On 09/13/2010 12:45 PM, Gleb Alexeyev wrote:
is, pardon my pun, not ok, because f is let-bound and, therefore,
monomorphic
This line doesn't make sense, I was too hasty to hit the 'Send' button,
I meant to write 'lambda-bound', of course, apologies for that.
_
On Mon, 13 Sep 2010, Gleb Alexeyev wrote:
On 09/13/2010 12:38 PM, Thomas Davie wrote:
There's no "later" here at all.
Two seperate definitions in a Haskell program act as if they have always
been defined, are defined, and always will be defined, they are not dealt
with in sequence (except
2010/9/13 David Virebayre :
> Does it help to compile with ghc --make -O2 -funbox-strict-fields ??
No, it doesn't. Can I assume you don't have the problem I described?
Thanks,
Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskel
On 09/13/2010 12:38 PM, Thomas Davie wrote:
On 13 Sep 2010, at 10:28, Gleb Alexeyev wrote:
On 09/13/2010 12:23 PM, Michael Lazarev wrote:
2010/9/13 Henning Thielemann:
It means that variables bound by let, may be instantiated to different types
later.
Can you give an example, please?
tes
Does it help to compile with ghc --make -O2 -funbox-strict-fields ??
David.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 13 Sep 2010, at 10:28, Gleb Alexeyev wrote:
> On 09/13/2010 12:23 PM, Michael Lazarev wrote:
>> 2010/9/13 Henning Thielemann:
>>> It means that variables bound by let, may be instantiated to different types
>>> later.
>>
>> Can you give an example, please?
>
> testOk = let f = id in (f 42, f
On 09/13/2010 12:23 PM, Michael Lazarev wrote:
2010/9/13 Henning Thielemann:
It means that variables bound by let, may be instantiated to different types
later.
Can you give an example, please?
testOk = let f = id in (f 42, f True)
--testNotOk :: Monad m => m (Int, Bool)
--testNotOk = do f
2010/9/13 Henning Thielemann :
> It means that variables bound by let, may be instantiated to different types
> later.
Can you give an example, please?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Hi!
I have X11 code which looks something like the following. The problem
is that TimerInterrupt gets sometimes thrown in a way that it kills
the whole main thread. Probably it gets thrown in the middle of some
nested function which unblocked exceptions. I found:
http://hackage.haskell.org/trac/g
On Mon, 13 Sep 2010, Alexander Kotelnikov wrote:
Hello.
http://www.haskell.org/onlinereport/exps.html#sect3.14 a obscure (to me) note
which says
"As indicated by the translation of do, variables bound by let have fully polymorphic
types while those defined by <- are lambda bound and are thu
Brandon S Allbery KF8NH schrieb:
> On 9/11/10 13:46 , Henning Thielemann wrote:
>> Would it be better to write canlib in a way that works on both Windows
>> and Unix? Otherwise all packages that import canlib have to add this switch.
>
> The phrasing of the original request leads me to believe tha
JP Moresmau schrieb:
> Users may not want to edit the files directly, but they'll be happy to
> be able to open them with proper syntax highlighting, for example.
Sure, but is showing the line numbers of the original file a bug or a
feature?
___
Haskell
Hello.
http://www.haskell.org/onlinereport/exps.html#sect3.14 a obscure (to me) note
which says
"As indicated by the translation of do, variables bound by let have fully
polymorphic types while those defined by <- are lambda bound and are thus
monomorphic."
What actually does it mean?
And, a
Mitar wrote:
> I run multiple threads where I would like that exception from any of
> them (and main) propagate to others but at the same time that they can
> gracefully cleanup after themselves (even if this means not exiting).
> I have this code to try, but cleanup functions (stop) are interrup
35 matches
Mail list logo