Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Mateusz Kowalczyk
On 31/07/13 06:37, Roman Cheplyaka wrote: Hi Mateusz, This looks great — I'm especially excited about List entries no longer have to be separated by empty lines! Glad to hear that. However, the decision to use Attoparsec (instead of Parsec, say) strikes me as a bit odd, Parsec has a

Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Mats Rauhala
Is Data.Text as an extra dependency really that bad? Remember that you are parsing comments, prose, human produced text, where Data.Text is way more useful than ByteString. -- Mats Rauhala MasseR ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Alexey Uimanov
Regard parameterized SQL: It might be worth using named parameters (e.g. :foo and :bar or something like that) rather than ? as placeholders in SQL/prepared SQL. This will make it slightly more flexible if you need to provide different SQL strings for different databases, but want to reuse

Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Mateusz Kowalczyk
On 31/07/13 08:21, Mats Rauhala wrote: Is Data.Text as an extra dependency really that bad? Remember that you are parsing comments, prose, human produced text, where Data.Text is way more useful than ByteString. It has to come with GHC boot packages and it currently doesn't. I have updated my

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
On Wed, Jul 31, 2013 at 09:45:50AM +0600, Alexey Uimanov wrote: Hello, haskellers. This is the first release of HDBI (Haskell Database Independent interface). Hi, thanks for this Alexey. It's great that there is continued development of this really important infrustructure for Haskell. I have

Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Simon Hengel
Hi Roman, However, the decision to use Attoparsec (instead of Parsec, say) strikes me as a bit odd, as it wasn't intended for parsing source code. In particular, I'm concerned with error messages this parser would produce. In addition to what Mateusz already said, I want to briefly summarize

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Kirill Zaborsky
Alexey, Regarding named parameters - another option is to use numbered parameters like :1, :2 etc. It will help with repeated parameters at least. I didn't understandthe first Bardur's point about different SQL strings though. Kind regards, Kirill Zaborsky 2013/7/31 Alexey Uimanov

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Bardur Arantsson
On 2013-07-31 09:22, Alexey Uimanov wrote: Regard parameterized SQL: It might be worth using named parameters (e.g. :foo and :bar or something like that) rather than ? as placeholders in SQL/prepared SQL. This will make it slightly more flexible if you need to provide different SQL strings

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
On Wed, Jul 31, 2013 at 01:22:42PM +0600, Alexey Uimanov wrote: I also have the idea do not throw the exceptions in IO but return (Either SqlError a) from all the Connection and Statement methods for safe data processing. What do you think about ? I feel very strongly that you should use

Re: [Haskell-cafe] ANN: Angel 0.4.4

2013-07-31 Thread Никитин Лев
  31.07.2013, 05:03, "Michael Xavier" mich...@michaelxavier.net:angel is a daemon  "angel is a background process" sounds better. Sorry for offtopic  ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Alexey Uimanov
The rationale is that the low-level database interface accepts parameters directly instead of inserting them inside the query manually (like HoleyMonoid would do). Postgresql-simple also does parameter substitution on haskell side. This is not safe and may cause to

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
On Wed, Jul 31, 2013 at 05:28:02PM +0600, Alexey Uimanov wrote: The rationale is that the low-level database interface accepts parameters directly instead of inserting them inside the query manually. [...] Low-level database interface knows better how to work with parameters, so the driver

Re: [Haskell-cafe] ANN: Angel 0.4.4

2013-07-31 Thread MigMit
On Jul 31, 2013, at 2:41 PM, Никитин Лев leon.v.niki...@pravmail.ru wrote: 31.07.2013, 05:03, Michael Xavier mich...@michaelxavier.net: angel is a daemon angel is a background process sounds better. You're killing the joke. Sorry for offtopic

[Haskell-cafe] Template Haskell and Haddock

2013-07-31 Thread Jose A. Lopes
Hi, Is there a way to access docstrings through Template Haskell ? For example, access the docstring of a function declaration ? Best regards, Jose ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-31 Thread Erik Hesselink
On Fri, Jul 26, 2013 at 6:44 PM, Andreas Abel andreas.a...@ifi.lmu.de wrote: mapSnd f = (id *** f) As a very small aside, this is just `second` from Control.Arrow. Erik ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Template Haskell and Haddock

2013-07-31 Thread kudah
On Wed, 31 Jul 2013 15:18:32 +0200 Jose A. Lopes jabolo...@google.com wrote: Is there a way to access docstrings through Template Haskell ? For example, access the docstring of a function declaration ? No, but I believe you can access comments and annotations using a ghc plugin. See

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-31 Thread Edward Kmett
Or fmap in this case =) On Wed, Jul 31, 2013 at 11:33 AM, Erik Hesselink hessel...@gmail.comwrote: On Fri, Jul 26, 2013 at 6:44 PM, Andreas Abel andreas.a...@ifi.lmu.de wrote: mapSnd f = (id *** f) As a very small aside, this is just `second` from Control.Arrow. Erik

Re: [Haskell-cafe] Rank N Kinds

2013-07-31 Thread Wvv
OMG! I still have 7.6.3. It has old Typeable. I misunderstood PolyKinds a bit. It looks like k /= **, k ~ ***... But we cannot use CloseKinds like data Foo (a::k) = Foo a -- catch an error Expected kind `OpenKind', but `a' has kind `k' with RankNKinds we could write: data Foo (a::**) =

Re: [Haskell-cafe] Template Haskell and Haddock

2013-07-31 Thread Simon Hengel
On Wed, Jul 31, 2013 at 08:29:18PM +0300, kudah wrote: On Wed, 31 Jul 2013 15:18:32 +0200 Jose A. Lopes jabolo...@google.com wrote: Is there a way to access docstrings through Template Haskell ? For example, access the docstring of a function declaration ? No, but I believe you can

Re: [Haskell-cafe] Rank N Kinds

2013-07-31 Thread Roman Cheplyaka
That's because types that belong to most non-star kinds cannot have values. data Foo (a :: k) = Foo is okay, data Foo (a :: k) = Foo a is bad because there cannot be a field of type a :: k. So no, no useful examples exist, because you wouldn't be able to use such a data constructor even

Re: [Haskell-cafe] Rank N Kinds

2013-07-31 Thread Wvv
How about this, I found it bt myself: data TupleList (t :: **) = TupleNil | TupleUnit t (TupleList t) fstL :: TupleList (a - **) - a fstL TupleNil = error TupleList2 is TupleNil fstL (TupleUnit a _ ) = a sndL :: TupleList (* - a - **) - a sndL TupleNil = error TupleList2 is TupleNil sndL

Re: [Haskell-cafe] Haddock GSOC project progress

2013-07-31 Thread Richard A. O'Keefe
On 31/07/2013, at 8:16 PM, Simon Hengel wrote: * There is no such thing as a parse error in Markdown, and I think we should try to make this true for Haddock markup, too It is very far from clear that this is a virtue in Markdown. In trying to learn Markdown, I found it an excessively