You might want to have a look at the time-recurrence package: <a href="http://hackage.haskell.org/package/time-recurrence">http://hackage.haskell.org/package/time-recurrence</a><div><br></div><div>For your simple cases you would do something like:</div>
<div><br></div><div>Each second:</div><div><br></div><div> starting (UTCTime ...) $ recur secondly</div><div><br></div><div>Each minute:</div><div><br></div><div> starting (UTCTime ...) $ recur minutely</div><div><br>
</div><div>The rules can get quite a bit more complex than that.</div><div><br></div><div>I am the author of time-recurrence, so if you have questions feel free to ping me.</div><div><br></div><div>-Chris<br><br><div class="gmail_quote">
On Fri, Sep 14, 2012 at 6:00 AM, <span dir="ltr"><<a href="mailto:haskell-cafe-request@haskell.org" target="_blank">haskell-cafe-request@haskell.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send Haskell-Cafe mailing list submissions to<br>
<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:haskell-cafe-request@haskell.org">haskell-cafe-request@haskell.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:haskell-cafe-owner@haskell.org">haskell-cafe-owner@haskell.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Haskell-Cafe digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Fwd: How Type inference work in presence of Functional<br>
Dependencies (Dan Doel)<br>
2. Re: [ANN] Cumino 0.2 - Now supports pretty indentation<br>
through stylish-haskell (Brandon Allbery)<br>
3. Re: [ANN] Cumino 0.2 - Now supports pretty indentation<br>
through stylish-haskell (Alfredo Di Napoli)<br>
4. ANNOUNCE: Groundhog 0.1.0.1 - high-level database library<br>
(Boris Lykah)<br>
5. Re: ANNOUNCE: Groundhog 0.1.0.1 - high-level database library<br>
(Tom Murphy)<br>
6. Re: Either Monad and Laziness (wren ng thornton)<br>
7. How do I generate random numbers using random-fu, with<br>
platform-agnostic code? (Andrew Pennebaker)<br>
8. Is Hackage down? (C K Kashyap)<br>
9. Re: Is Hackage down? (damodar kulkarni)<br>
10. What is the good way to work with list comprehension and<br>
UTCTime? (Magicloud Magiclouds)<br>
11. Re: What is the good way to work with list comprehension and<br>
UTCTime? (Karl Voelker)<br>
12. Re: [ANN] Cumino 0.2 - Now supports pretty indentation<br>
through stylish-haskell (Alfredo Di Napoli)<br>
13. Re: Is Hackage down? (John Wiegley)<br>
14. Re: [ANN] Cumino 0.2 - Now supports pretty indentation<br>
through stylish-haskell (Alfredo Di Napoli)<br>
15. Re: What is the good way to work with list comprehension and<br>
UTCTime? (Roman Cheplyaka)<br>
16. Re: What is the good way to work with list comprehension and<br>
UTCTime? (Magicloud Magiclouds)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 13 Sep 2012 10:44:17 -0400<br>
From: Dan Doel <<a href="mailto:dan.doel@gmail.com">dan.doel@gmail.com</a>><br>
Subject: [Haskell-cafe] Fwd: How Type inference work in presence of<br>
Functional Dependencies<br>
To: Haskell Caf? List <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAHEA9tPsGTUX4Ke9eGCpA%2B-f_b_Ky9--y6RZkHPAmN9LW8MxHA@mail.gmail.com">CAHEA9tPsGTUX4Ke9eGCpA+-f_b_Ky9--y6RZkHPAmN9LW8MxHA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Copying the mailing list, because I forgot.<br>
<br>
On Thu, Sep 13, 2012 at 5:18 AM, satvik chauhan <<a href="mailto:mystic.satvik@gmail.com">mystic.satvik@gmail.com</a>> wrote:<br>
> Consider the code below :<br>
><br>
> {-# LANGUAGE<br>
> MultiParamTypeClasses,FlexibleInstances,FunctionalDependencies,UndecidableInstances,FlexibleContexts<br>
> #-}<br>
> class Foo a c | a -> c<br>
> instance Foo Int Float<br>
> f :: (Foo Int a) => Int -> a<br>
> f = undefined<br>
><br>
> Now when I see the inferred type of f in ghci<br>
><br>
>> :t f<br>
><br>
>> f :: Int -> Float<br>
><br>
> Now If I add the following code<br>
><br>
> g :: Int -> Float<br>
> g = undefined<br>
><br>
> h :: (Foo Int a) => Int -> a<br>
> h = g<br>
><br>
><br>
> I get the error<br>
><br>
> Could not deduce (a ~ Float)<br>
><br>
><br>
> I am not able to understand what has happened here ? The restriction "Foo<br>
> Int a" should have restricted the type of h to "Int -> Float" as shown in<br>
> the inferred type of f.<br>
<br>
The answer, I believe, is that the difference between the fundep<br>
implementation and type families is local constraint information.<br>
Fundeps do no local propagation.<br>
<br>
So in your first definition, you've locally provided 'Int -> a', which<br>
is acceptable to GHC. Then it figures out externally to the function<br>
that '(Foo Int a) => Int -> a' is actually Int -> Float.<br>
<br>
In the second definition, you're trying to give 'Int -> Float', but<br>
GHC only knows locally that you need to provide 'Int -> a' with a<br>
constraint 'Foo Int a' which it _won't_ use to determine that a ~<br>
Float.<br>
<br>
This is not inherent to fundeps. One could make a version of fundeps<br>
that has the local constraint rules (easily so by translating to the<br>
new type families stuff). But, the difference is also the reason that<br>
overlapping instances are supported for fundeps and not type families.<br>
But I won't get into that right now.<br>
<br>
-- Dan<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 13 Sep 2012 11:20:51 -0400<br>
From: Brandon Allbery <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty<br>
indentation through stylish-haskell<br>
To: Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>><br>
Cc: Ray <<a href="mailto:i@maskray.tk">i@maskray.tk</a>>, haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<CAKFCL4WAtx6R0NVtP7nxnj1ZFp=<a href="mailto:KHDx1dGeO-s9EsG4H9nMsvQ@mail.gmail.com">KHDx1dGeO-s9EsG4H9nMsvQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
On Thu, Sep 13, 2012 at 2:22 AM, Alfredo Di Napoli <<br>
<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>> wrote:<br>
<br>
> urxvtc -e sh -c 'echo a'<br>
>> xterm -e echo a<br>
>><br>
><br>
> I would like to, and in fact I've already tried, but urxvt is trickier<br>
> than other shells. Using the command you gave me does not create a new<br>
> window, tested both on XMonad and Gnome. This is<br>
> the error you can see using the option "-hold", this way:<br>
><br>
> urxvt --hold -e "echo a"<br>
><br>
> This opens a new window with the error: *urxvt: Unable to exec child.<br>
> *<br>
><br>
<br>
I think you misunderstood; as I read it (and as I would expect it to work<br>
given the above descrtiption) that would be<br>
<br>
urxvt --hold -e sh -c 'echo a'<br>
<br>
--<br>
brandon s allbery <a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a><br>
wandering unix systems administrator (available) <a href="tel:%28412%29%20475-9364" value="+14124759364">(412) 475-9364</a> vm/sms<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/76483291/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/76483291/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 13 Sep 2012 18:16:06 +0200<br>
From: Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty<br>
indentation through stylish-haskell<br>
To: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID: <<a href="mailto:20120913161604.GA31344@gmail.com">20120913161604.GA31344@gmail.com</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
If I remember correctly, I've also tried that combinations, without success.<br>
<br>
Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad<br>
until tomorrow morning: I'll keep you posted!<br>
<br>
Bye,<br>
Alfredo<br>
<br>
><br>
> I think you misunderstood; as I read it (and as I would expect it to work<br>
> given the above descrtiption) that would be<br>
><br>
> urxvt --hold -e sh -c 'echo a'<br>
><br>
> --<br>
> brandon s allbery <a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a><br>
> wandering unix systems administrator (available) <a href="tel:%28412%29%20475-9364" value="+14124759364">(412) 475-9364</a> vm/sms<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 13 Sep 2012 21:23:09 +0300<br>
From: Boris Lykah <<a href="mailto:lykahb@gmail.com">lykahb@gmail.com</a>><br>
Subject: [Haskell-cafe] ANNOUNCE: Groundhog 0.1.0.1 - high-level<br>
database library<br>
To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
Message-ID:<br>
<CADgh=<a href="mailto:y_wwN0-AwWjoMBvERY0XpgByCoMeuxZ1SegVKXinRV4-A@mail.gmail.com">y_wwN0-AwWjoMBvERY0XpgByCoMeuxZ1SegVKXinRV4-A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
I am happy to announce a new version of Groundhog, a library for fast<br>
high-level database access:<br>
<a href="http://hackage.haskell.org/package/groundhog" target="_blank">http://hackage.haskell.org/package/groundhog</a><br>
<a href="http://hackage.haskell.org/package/groundhog-th" target="_blank">http://hackage.haskell.org/package/groundhog-th</a><br>
<a href="http://hackage.haskell.org/package/groundhog-postgresql" target="_blank">http://hackage.haskell.org/package/groundhog-postgresql</a><br>
<a href="http://hackage.haskell.org/package/groundhog-sqlite" target="_blank">http://hackage.haskell.org/package/groundhog-sqlite</a><br>
<br>
Groundhog has been completely overhauled since the last release.<br>
Notably, it got support for PostgreSQL and natural foreign keys. I<br>
believe that it is a big step forward as this brings more flexibility<br>
to the design of the relational schemas while keeping the applications<br>
independent of the storage layer. Some of the solutions, particularly<br>
schema migration were based on Persistent code.<br>
<br>
Please see examples at <a href="http://github.com/lykahb/groundhog/tree/master/examples" target="_blank">http://github.com/lykahb/groundhog/tree/master/examples</a>.<br>
<br>
Features:<br>
* Support for Sqlite and PostgreSQL.<br>
* Natural and composite foreign keys. Earlier it was possible to<br>
reference an entity only by the mandatory integer primary key. Now an<br>
entity can have several keys including autoincrement primary key<br>
(optional) and unique keys which have one or more columns.<br>
* Full support of embedded datatypes. You can access a field that<br>
contains an embedded datatype as a whole, or access some of the inner<br>
subfields individually. This powerful mechanism has allowed<br>
implementation of the composite keys, and can be used in future to<br>
work with PostgreSQL composite types or MongoDB embedded documents.<br>
Instead of serializing value to string, the Groundhog backends flatten<br>
tree of embedded datatypes to db columns.<br>
* Projections. You can choose what columns to query from a table in a<br>
type-safe manner.<br>
* Initialization and migration of database schema.<br>
* Sum types and polymorphic types.<br>
* Expression DSL for use in queries.<br>
* Basic list support.<br>
* YAML-based settings mechanism. It separates datatype definition and<br>
description which facilitates modularity. The settings are inferred<br>
from the analysis of the difinition, and overridden with values set by<br>
user.<br>
<br>
The Criterion benchmarks are available at<br>
<a href="http://lykahb.github.com/groundhog/SqliteBench.html" target="_blank">http://lykahb.github.com/groundhog/SqliteBench.html</a> and<br>
<a href="http://lykahb.github.com/groundhog/PostgreSQLBench.html" target="_blank">http://lykahb.github.com/groundhog/PostgreSQLBench.html</a>.<br>
<br>
Future plans:<br>
* Support for joins<br>
* Database indexes<br>
* Investigate options for implementing MongoDB and MySQL backends<br>
<br>
Your feedback, suggestions for improvement and criticism are welcome.<br>
<br>
--<br>
Regards,<br>
Boris<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Thu, 13 Sep 2012 18:28:34 -0400<br>
From: Tom Murphy <<a href="mailto:amindfv@gmail.com">amindfv@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] ANNOUNCE: Groundhog 0.1.0.1 - high-level<br>
database library<br>
To: Boris Lykah <<a href="mailto:lykahb@gmail.com">lykahb@gmail.com</a>><br>
Cc: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
Message-ID:<br>
<<a href="mailto:CAO9Q0tU187QkJL5UHyL3A6WvQpOhPWHHTHrMeoWYhOTcWEzHqg@mail.gmail.com">CAO9Q0tU187QkJL5UHyL3A6WvQpOhPWHHTHrMeoWYhOTcWEzHqg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
How does this compare with other high-level Haskell db libraries?<br>
<br>
Tom<br>
On Sep 13, 2012 2:25 PM, "Boris Lykah" <<a href="mailto:lykahb@gmail.com">lykahb@gmail.com</a>> wrote:<br>
<br>
> I am happy to announce a new version of Groundhog, a library for fast<br>
> high-level database access:<br>
> <a href="http://hackage.haskell.org/package/groundhog" target="_blank">http://hackage.haskell.org/package/groundhog</a><br>
> <a href="http://hackage.haskell.org/package/groundhog-th" target="_blank">http://hackage.haskell.org/package/groundhog-th</a><br>
> <a href="http://hackage.haskell.org/package/groundhog-postgresql" target="_blank">http://hackage.haskell.org/package/groundhog-postgresql</a><br>
> <a href="http://hackage.haskell.org/package/groundhog-sqlite" target="_blank">http://hackage.haskell.org/package/groundhog-sqlite</a><br>
><br>
> Groundhog has been completely overhauled since the last release.<br>
> Notably, it got support for PostgreSQL and natural foreign keys. I<br>
> believe that it is a big step forward as this brings more flexibility<br>
> to the design of the relational schemas while keeping the applications<br>
> independent of the storage layer. Some of the solutions, particularly<br>
> schema migration were based on Persistent code.<br>
><br>
> Please see examples at<br>
> <a href="http://github.com/lykahb/groundhog/tree/master/examples" target="_blank">http://github.com/lykahb/groundhog/tree/master/examples</a>.<br>
><br>
> Features:<br>
> * Support for Sqlite and PostgreSQL.<br>
> * Natural and composite foreign keys. Earlier it was possible to<br>
> reference an entity only by the mandatory integer primary key. Now an<br>
> entity can have several keys including autoincrement primary key<br>
> (optional) and unique keys which have one or more columns.<br>
> * Full support of embedded datatypes. You can access a field that<br>
> contains an embedded datatype as a whole, or access some of the inner<br>
> subfields individually. This powerful mechanism has allowed<br>
> implementation of the composite keys, and can be used in future to<br>
> work with PostgreSQL composite types or MongoDB embedded documents.<br>
> Instead of serializing value to string, the Groundhog backends flatten<br>
> tree of embedded datatypes to db columns.<br>
> * Projections. You can choose what columns to query from a table in a<br>
> type-safe manner.<br>
> * Initialization and migration of database schema.<br>
> * Sum types and polymorphic types.<br>
> * Expression DSL for use in queries.<br>
> * Basic list support.<br>
> * YAML-based settings mechanism. It separates datatype definition and<br>
> description which facilitates modularity. The settings are inferred<br>
> from the analysis of the difinition, and overridden with values set by<br>
> user.<br>
><br>
> The Criterion benchmarks are available at<br>
> <a href="http://lykahb.github.com/groundhog/SqliteBench.html" target="_blank">http://lykahb.github.com/groundhog/SqliteBench.html</a> and<br>
> <a href="http://lykahb.github.com/groundhog/PostgreSQLBench.html" target="_blank">http://lykahb.github.com/groundhog/PostgreSQLBench.html</a>.<br>
><br>
> Future plans:<br>
> * Support for joins<br>
> * Database indexes<br>
> * Investigate options for implementing MongoDB and MySQL backends<br>
><br>
> Your feedback, suggestions for improvement and criticism are welcome.<br>
><br>
> --<br>
> Regards,<br>
> Boris<br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/96747b7d/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/96747b7d/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Fri, 14 Sep 2012 01:29:32 +0200<br>
From: wren ng thornton <<a href="mailto:wren@freegeek.org">wren@freegeek.org</a>><br>
Subject: Re: [Haskell-cafe] Either Monad and Laziness<br>
To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
Message-ID: <<a href="mailto:50526C5C.40506@freegeek.org">50526C5C.40506@freegeek.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 9/12/12 5:37 PM, Francesco Mazzoli wrote:<br>
> At Wed, 12 Sep 2012 12:04:31 -0300,<br>
> Eric Velten de Melo wrote:<br>
>> It would be really awesome, though, if it were possible to use a<br>
>> parser written in Parsec with this, in the spirit of avoiding code<br>
>> rewriting and enhancing expressivity and abstraction.<br>
><br>
> There is <<a href="http://hackage.haskell.org/package/attoparsec-conduit" target="_blank">http://hackage.haskell.org/package/attoparsec-conduit</a>> and<br>
> <<a href="http://hackage.haskell.org/package/attoparsec-enumerator" target="_blank">http://hackage.haskell.org/package/attoparsec-enumerator</a>>, which turn<br>
> attoparsec parsers into enumerators/conduits, and<br>
> <<a href="http://hackage.haskell.org/package/attoparsec-parsec" target="_blank">http://hackage.haskell.org/package/attoparsec-parsec</a>>, which is a compatibility<br>
> layer between attoaparsec and parsec. Good luck :).<br>
<br>
Not to mention attoparsec-iteratee, for the iteratee minded folks:<br>
<br>
<a href="http://hackage.haskell.org/package/attoparsec-iteratee" target="_blank">http://hackage.haskell.org/package/attoparsec-iteratee</a><br>
<br>
<br>
--<br>
Live well,<br>
~wren<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Thu, 13 Sep 2012 20:04:49 -0400<br>
From: Andrew Pennebaker <<a href="mailto:andrew.pennebaker@gmail.com">andrew.pennebaker@gmail.com</a>><br>
Subject: [Haskell-cafe] How do I generate random numbers using<br>
random-fu, with platform-agnostic code?<br>
To: Haskell Cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<CAHXt_SUvif47+r1gV32hKoQTQCw1yfv2i=<a href="mailto:DYKggntLViDxnXUA@mail.gmail.com">DYKggntLViDxnXUA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I can't figure out how to use <a href="http://Data.Random.Source.IO" target="_blank">Data.Random.Source.IO</a> to generate random<br>
numbers in a multiplatform way.<br>
<br>
I can generate random numbers in Unix using Data.Random.Source.DevRandom,<br>
and there is an example in the GitHub documentation for Windows using<br>
Data.Random.Source.MWC, but there is no example code for using<br>
<a href="http://Data.Random.Source.IO" target="_blank">Data.Random.Source.IO</a>.<br>
<br>
Cheers,<br>
<br>
Andrew Pennebaker<br>
<a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/f63ed3f0/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/f63ed3f0/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Fri, 14 Sep 2012 10:33:40 +0530<br>
From: C K Kashyap <<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>><br>
Subject: [Haskell-cafe] Is Hackage down?<br>
To: Haskell Cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAGdT1gpVt10WoEkOr8tSiunOxfaPN4rk5V2KskAufztcqSa6Cw@mail.gmail.com">CAGdT1gpVt10WoEkOr8tSiunOxfaPN4rk5V2KskAufztcqSa6Cw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Is it just me or is Hackage indeed been going down more frequently of late?<br>
<br>
Regards,<br>
Kashyap<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/14dde1d2/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/14dde1d2/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Fri, 14 Sep 2012 10:38:55 +0530<br>
From: damodar kulkarni <<a href="mailto:kdamodar2000@gmail.com">kdamodar2000@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] Is Hackage down?<br>
To: C K Kashyap <<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>><br>
Cc: Haskell Cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<CAD5Hsyoxt-BqeBOXthp4YA_xm=+<a href="mailto:A0tc-27TKS7CcYYfyrOF1AA@mail.gmail.com">A0tc-27TKS7CcYYfyrOF1AA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
It shows hackage down:<br>
<a href="http://www.downforeveryoneorjustme.com/http://hackage.haskell.org/" target="_blank">http://www.downforeveryoneorjustme.com/http://hackage.haskell.org/</a><br>
<br>
- damodar<br>
<br>
On Fri, Sep 14, 2012 at 10:33 AM, C K Kashyap <<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>> wrote:<br>
<br>
> Is it just me or is Hackage indeed been going down more frequently of late?<br>
><br>
> Regards,<br>
> Kashyap<br>
><br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/c42a51b2/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/c42a51b2/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 10<br>
Date: Fri, 14 Sep 2012 13:29:52 +0800<br>
From: Magicloud Magiclouds <<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>><br>
Subject: [Haskell-cafe] What is the good way to work with list<br>
comprehension and UTCTime?<br>
To: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<CABErt4f8iN5Ozv7_dbTPDn6ZVp=<a href="mailto:4ghf%2Bbcm8f72O1RifBJnLpA@mail.gmail.com">4ghf+bcm8f72O1RifBJnLpA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Hi,<br>
Simple usage, I could make an instance of Enum to UTCTime, so<br>
[utcTime..] could work. But that is so stiff. How if sometimes I want<br>
to step by 1 min, sometimes I want to step by 1 sec?<br>
So I think some way like [ t | addUTCTime last 60 ] could be nice.<br>
But I cannot figure it out....<br>
Any idea?<br>
--<br>
???????<br>
???????<br>
<br>
And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 11<br>
Date: Thu, 13 Sep 2012 23:04:51 -0700<br>
From: Karl Voelker <<a href="mailto:ktvoelker@gmail.com">ktvoelker@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] What is the good way to work with list<br>
comprehension and UTCTime?<br>
To: Magicloud Magiclouds <<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>><br>
Cc: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAFfow0zQc43kEgZkVdsD9Wr6PZJfEoLajPdiCRG5cjbEfOarFg@mail.gmail.com">CAFfow0zQc43kEgZkVdsD9Wr6PZJfEoLajPdiCRG5cjbEfOarFg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
On Thu, Sep 13, 2012 at 10:29 PM, Magicloud Magiclouds <<br>
<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
> Simple usage, I could make an instance of Enum to UTCTime, so<br>
> [utcTime..] could work. But that is so stiff. How if sometimes I want<br>
> to step by 1 min, sometimes I want to step by 1 sec?<br>
> So I think some way like [ t | addUTCTime last 60 ] could be nice.<br>
> But I cannot figure it out....<br>
> Any idea?<br>
><br>
<br>
Try using Prelude.iterate.<br>
<br>
-Karl<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/5ab286e4/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/5ab286e4/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 12<br>
Date: Fri, 14 Sep 2012 06:14:11 +0000<br>
From: Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty<br>
indentation through stylish-haskell<br>
To: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAFqA6%2BX-0LTOir4i%2BoOGqiu64cqR_ayrgGnj-P%2BK2V%2BFrUcOJw@mail.gmail.com">CAFqA6+X-0LTOir4i+oOGqiu64cqR_ayrgGnj-P+K2V+FrUcOJw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Ok, I've added the support for urxvt.<br>
Bear in mind that it partially support urxvt, though: it works fine if you<br>
run GVim or Vim outside an already running tmux session, otherwise it won't<br>
start.<br>
The problem is due to the fact urxvt believes that the new session is<br>
launched within the running tmux session, whining about nested tmux session<br>
and not starting at all.<br>
You can unset the $TERM variable as workaround, but I don't like that<br>
apporach.<br>
If you come up with an alternative solution please let me know :)<br>
A.<br>
<br>
On 13 September 2012 16:16, Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>>wrote:<br>
<br>
> If I remember correctly, I've also tried that combinations, without<br>
> success.<br>
><br>
> Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad<br>
> until tomorrow morning: I'll keep you posted!<br>
><br>
> Bye,<br>
> Alfredo<br>
><br>
> ><br>
> > I think you misunderstood; as I read it (and as I would expect it to work<br>
> > given the above descrtiption) that would be<br>
> ><br>
> > urxvt --hold -e sh -c 'echo a'<br>
> ><br>
> > --<br>
> > brandon s allbery<br>
> <a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a><br>
> > wandering unix systems administrator (available) (412) 475-9364vm/sms<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/34645cae/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/34645cae/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 13<br>
Date: Fri, 14 Sep 2012 01:21:03 -0500<br>
From: "John Wiegley" <<a href="mailto:johnw@newartisans.com">johnw@newartisans.com</a>><br>
Subject: Re: [Haskell-cafe] Is Hackage down?<br>
To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
Message-ID: <<a href="mailto:m2k3vx86r4.fsf@newartisans.com">m2k3vx86r4.fsf@newartisans.com</a>><br>
Content-Type: text/plain<br>
<br>
>>>>> C K Kashyap <<a href="mailto:ckkashyap@gmail.com">ckkashyap@gmail.com</a>> writes:<br>
<br>
> Is it just me or is Hackage indeed been going down more frequently of late?<br>
<br>
It's not just you.<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 14<br>
Date: Fri, 14 Sep 2012 06:50:07 +0000<br>
From: Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] [ANN] Cumino 0.2 - Now supports pretty<br>
indentation through stylish-haskell<br>
To: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<CAFqA6+WT-0Wfv=<a href="mailto:7DcvBbNuBzxk7tDkcaaf8ERD78q4VucqGGtA@mail.gmail.com">7DcvBbNuBzxk7tDkcaaf8ERD78q4VucqGGtA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Sorry the typo, the variable is $TMUX and controls the nesting ot tmux<br>
session. It turns out that if affect not only urxvt but also xterm and<br>
gnome-terminal.<br>
Perhaps it could be useful to unset it programmatically, I'll keep you<br>
posted if I find a workaround.<br>
<br>
A.<br>
<br>
On 14 September 2012 06:14, Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>>wrote:<br>
<br>
> Ok, I've added the support for urxvt.<br>
> Bear in mind that it partially support urxvt, though: it works fine if you<br>
> run GVim or Vim outside an already running tmux session, otherwise it won't<br>
> start.<br>
> The problem is due to the fact urxvt believes that the new session is<br>
> launched within the running tmux session, whining about nested tmux session<br>
> and not starting at all.<br>
> You can unset the $TERM variable as workaround, but I don't like that<br>
> apporach.<br>
> If you come up with an alternative solution please let me know :)<br>
> A.<br>
><br>
><br>
> On 13 September 2012 16:16, Alfredo Di Napoli <<a href="mailto:alfredo.dinapoli@gmail.com">alfredo.dinapoli@gmail.com</a>>wrote:<br>
><br>
>> If I remember correctly, I've also tried that combinations, without<br>
>> success.<br>
>><br>
>> Anyway, I'm not at work so I can't test Cumino against gnome and Xmonad<br>
>> until tomorrow morning: I'll keep you posted!<br>
>><br>
>> Bye,<br>
>> Alfredo<br>
>><br>
>> ><br>
>> > I think you misunderstood; as I read it (and as I would expect it to<br>
>> work<br>
>> > given the above descrtiption) that would be<br>
>> ><br>
>> > urxvt --hold -e sh -c 'echo a'<br>
>> ><br>
>> > --<br>
>> > brandon s allbery<br>
>> <a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a><br>
>> > wandering unix systems administrator (available) (412) 475-9364vm/sms<br>
>><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/0b8897fd/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/0b8897fd/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 15<br>
Date: Fri, 14 Sep 2012 10:03:01 +0200<br>
From: Roman Cheplyaka <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>><br>
Subject: Re: [Haskell-cafe] What is the good way to work with list<br>
comprehension and UTCTime?<br>
To: Magicloud Magiclouds <<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>><br>
Cc: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAD%2BQkRoxe0TuwrO3VayE78emfVFFz_rv1RdE%2BoaX1xanpqpyKg@mail.gmail.com">CAD+QkRoxe0TuwrO3VayE78emfVFFz_rv1RdE+oaX1xanpqpyKg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="gb2312"<br>
<br>
Consider using the time-lens package.<br>
<br>
import Data.Time.Lens<br>
import Data.Lens.Common<br>
<br>
List comprehension style:<br>
<br>
[modL seconds (+ fromIntegral n) t | n <- [0..]]<br>
[modL minutes (+ n) t | n <- [0..]]<br>
<br>
(you need fromIntegral for seconds, because it is of fractional type in<br>
Data.Time).<br>
<br>
iterate style, as suggested by Karl:<br>
<br>
iterate (seconds ^+= 1) t<br>
iterate (minutes ^+= 1) t<br>
<br>
On Fri, Sep 14, 2012 at 7:29 AM, Magicloud Magiclouds <<br>
<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
> Simple usage, I could make an instance of Enum to UTCTime, so<br>
> [utcTime..] could work. But that is so stiff. How if sometimes I want<br>
> to step by 1 min, sometimes I want to step by 1 sec?<br>
> So I think some way like [ t | addUTCTime last 60 ] could be nice.<br>
> But I cannot figure it out....<br>
> Any idea?<br>
> --<br>
> ???????<br>
> ???????<br>
><br>
> And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.<br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/067fc717/attachment-0001.htm" target="_blank">http://www.haskell.org/pipermail/haskell-cafe/attachments/20120914/067fc717/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 16<br>
Date: Fri, 14 Sep 2012 16:25:58 +0800<br>
From: Magicloud Magiclouds <<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>><br>
Subject: Re: [Haskell-cafe] What is the good way to work with list<br>
comprehension and UTCTime?<br>
To: Roman Cheplyaka <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>><br>
Cc: haskell-cafe <<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>><br>
Message-ID:<br>
<<a href="mailto:CABErt4fEAnEaFjhSjbYDMX7y0jJJkCO8WAq-ToXjGc5xRtGg4A@mail.gmail.com">CABErt4fEAnEaFjhSjbYDMX7y0jJJkCO8WAq-ToXjGc5xRtGg4A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
This is nice. Thanks to all.<br>
<br>
On Fri, Sep 14, 2012 at 4:03 PM, Roman Cheplyaka <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>> wrote:<br>
> Consider using the time-lens package.<br>
><br>
> import Data.Time.Lens<br>
> import Data.Lens.Common<br>
><br>
> List comprehension style:<br>
><br>
> [modL seconds (+ fromIntegral n) t | n <- [0..]]<br>
> [modL minutes (+ n) t | n <- [0..]]<br>
><br>
> (you need fromIntegral for seconds, because it is of fractional type in<br>
> Data.Time).<br>
><br>
> iterate style, as suggested by Karl:<br>
><br>
> iterate (seconds ^+= 1) t<br>
> iterate (minutes ^+= 1) t<br>
><br>
> On Fri, Sep 14, 2012 at 7:29 AM, Magicloud Magiclouds<br>
> <<a href="mailto:magicloud.magiclouds@gmail.com">magicloud.magiclouds@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>> Simple usage, I could make an instance of Enum to UTCTime, so<br>
>> [utcTime..] could work. But that is so stiff. How if sometimes I want<br>
>> to step by 1 min, sometimes I want to step by 1 sec?<br>
>> So I think some way like [ t | addUTCTime last 60 ] could be nice.<br>
>> But I cannot figure it out....<br>
>> Any idea?<br>
>> --<br>
>> ???????<br>
>> ???????<br>
>><br>
>> And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.<br>
>><br>
>> _______________________________________________<br>
>> Haskell-Cafe mailing list<br>
>> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
>> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
???????<br>
???????<br>
<br>
And for G+, please use magiclouds#<a href="http://gmail.com" target="_blank">gmail.com</a>.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>
End of Haskell-Cafe Digest, Vol 109, Issue 19<br>
*********************************************<br>
</blockquote></div><br></div>