Re: [Haskell-cafe] (Co/Contra)Functor and Comonad

2010-12-23 Thread C. McCann
On Thu, Dec 23, 2010 at 5:25 PM, Stephen Tetley stephen.tet...@gmail.com wrote: On 23 December 2010 21:43, Mario Blažević mblaze...@stilo.com wrote: Why are Cofunctor and Comonad classes not a part of the base library? [SNIP] Later on I found that this question has been raised before by Conal

Re: [Haskell-cafe] (Co/Contra)Functor and Comonad

2010-12-23 Thread C. McCann
On Thu, Dec 23, 2010 at 11:46 PM, Mario Blažević mblaze...@stilo.com wrote: I don't personally care what's it called, as long as it's available. Can anybody point to an authoritative source for the terminology, though? Wikipedia claims that cofunctor is a contravariant functor. Does nLab

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread C. McCann
On Wed, Dec 8, 2010 at 5:41 AM, Ketil Malde ke...@malde.org wrote: I'm a bit surprised to find that there seems to be a lot of opposition to this view, but perhaps the existing structure is more secure than I thought? The difference is in the ability to influence other packages and metadata, I

Re: [Haskell-cafe] the beginning of the end

2010-12-06 Thread C. McCann
On Mon, Dec 6, 2010 at 2:33 AM, David Virebayre dav.vire+hask...@gmail.com wrote: Level 5 I'm out of layers here. I think this is all there is to it. Level 5 is after you've spent way too much time writing questions and/or answers that people like and have over 10k reputation. This unlocks

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread C. McCann
On Mon, Nov 15, 2010 at 12:43 PM, Ling Yang ly...@cs.stanford.edu wrote: Specifically: There are some DSLs that can be largely expressed as monads, that inherently play nicely with expressions on non-monadic values. We'd like to use the functions that already work on the non-monadic values for

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread C. McCann
On Sun, Nov 7, 2010 at 7:40 PM, Mitar mmi...@gmail.com wrote: I have a class Neuron which has (among others) two functions: attach and deattach. I would like to make a way to call a list/stack/bunch of attach functions in a way that if any of those fail (by exception), deattach for previously

Re: [Haskell-cafe] Serialization of (a - b) and IO a

2010-11-12 Thread C. McCann
On Fri, Nov 12, 2010 at 4:24 AM, Ketil Malde ke...@malde.org wrote: IMO, it's morally different, you're now operating on a file, and you shouldn't rely on the contents being predictable.  You can make the sin-bin argument that IO can do anything, but I think there's a moral distinction between

Re: [Haskell-cafe] Serialization of (a - b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 10:53 AM, Ketil Malde ke...@malde.org wrote: ..and you are able to tell the difference.  Am I wrong in thinking that this could be made to work if serialization was to/from an opaque type instead of (Byte)String, so that the *only* operations would be serialization and

[Haskell-cafe] Serialization of (a - b) and IO a

2010-11-11 Thread C. McCann
Oops, forgot to send this to the list... sorry, Sjoerd. On Thu, Nov 11, 2010 at 11:54 AM, Sjoerd Visscher sjo...@w3future.com wrote: You would lose many uses of equational reasoning in your programs. Have you every substituted 'x * 2' for the expression 'x + x' in one of your programs, or vice

Re: [Haskell-cafe] Serialization of (a - b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 1:57 PM, Stephen Tetley stephen.tet...@gmail.com wrote: On 11 November 2010 18:01, C. McCann c...@uptoisomorphism.net wrote: For instance, assuming serialize can be applied to functions of any type, it would probably be trivial to write a function (isExpr :: a - Bool

Re: [Haskell-cafe] Serialization of (a - b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 3:30 PM, Stephen Tetley stephen.tet...@gmail.com wrote: The conclusion notes in passing that OCaml's persistence isn't referentially transparent. If the Haskell version wasn't, I'd expect a mea culpa from the authors at this point. From a quick glance at the paper, the

Re: [Haskell-cafe] Is let special?

2010-11-03 Thread C. McCann
2010/11/3 Petr Pudlak d...@pudlak.name: f = (\x - x x) (\y - y) g = let x = \y - y in x x The function f is not typable in the Hindley-Milner type system, while g is is (and its type is a - a). The reason is that in the first case (f), the typing system tries to assign a single type to x,

Re: [Haskell-cafe] Edit Hackage

2010-10-30 Thread C. McCann
On Sat, Oct 30, 2010 at 11:34 AM, Ketil Malde ke...@malde.org wrote: Stack Overflow and Reddit are at least improvements over the traditional web forums, starting to acquire some of the features Usenet had twenty years ago.  Much like Planet-style meta-blogs and RSS syndication makes it

Re: [Haskell-cafe] who's in charge?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 8:31 AM, Ben Millwood hask...@benmachine.co.uk wrote: Besides, I'd think that often what Haskell developers lack is time more than skill - there are plenty of tasks that could be done without advanced knowledge of deep abstractions, if only someone could put aside a few

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Thu, Oct 28, 2010 at 9:13 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: IIUC, [one of] the prime motivating factor[s] behind both reddit and StackOverflow is the accumulation of karma, which leads to people posting just to try and accumulate karma even if they don't know what

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 6:13 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: So you'd prefer to have the discussion about a blog post be made distinct from the blog post itself?  Why not keep them together, also so that people finding the blog post from someplace other than reddit

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 7:54 PM, wren ng thornton w...@freegeek.org wrote: I'm sort of torn on this issue. On the one hand (#) has great potential as an operator, on the other hand I've found that having something like -XMagicHash (or TeX's \makeatletter and \makeatother) can be really helpful

Re: [Haskell-cafe] Re: Current thinking on CompositionAsDot issue in haskell prime?

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 10:30 PM, wren ng thornton w...@freegeek.org wrote: I suggest U+2621. I'm not sure I'd've ever recognized a funny 'z' as caution sign... :) Well, I'm operating under the assumption that it's one of these: http://en.wikipedia.org/wiki/Bourbaki_dangerous_bend_symbol I

Re: [Haskell-cafe] Re: Who is afraid of arrows, was Re: ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-13 Thread C. McCann
On Wed, Oct 13, 2010 at 3:50 AM, Heinrich Apfelmus apfel...@quantentunnel.de wrote: Combined with = / you have multiple reading direction in the same expression, as in expression      ( c . b . a ) `liftM` a1 = a2 = a3 reading order     6   5   4            1      2      3 That's why I'm

Re: Who is afraid of arrows, was Re: [Haskell-cafe] ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-12 Thread C. McCann
On Tue, Oct 12, 2010 at 8:56 AM, Uwe Schmidt u...@fh-wedel.de wrote: No, but there is no point in using a formalism that adds complexity without adding functionality.  Arrows are more awkward to use than monads because they were intentionally designed to be less powerful than monads in order

Re: Who is afraid of arrows, was Re: [Haskell-cafe] ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-12 Thread C. McCann
On Tue, Oct 12, 2010 at 3:00 PM, Paolo G. Giarrusso p.giarru...@gmail.com wrote: Were you writing a paper, your comment would be fully valid. Here we're talking about a library for people to use in practice. In the middle, somebody should make sure that people without a PhD can learn arrows,

Re: [Haskell-cafe] BPMN and BPEL

2010-09-08 Thread C. McCann
On Wed, Sep 8, 2010 at 3:38 PM, Hector Guilarte hector...@gmail.com wrote: If somebody can point out really good reasons on why I should use Haskell to do my work, please let me know them, they might help me convincing my bosses. On the other hand, if you believe Haskell is a bad language for

Re: [Haskell-cafe] Restricted type classes

2010-09-03 Thread C. McCann
On Fri, Sep 3, 2010 at 11:47 AM, John Lato jwl...@gmail.com wrote: On Fri, Sep 3, 2010 at 1:29 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 3 September 2010 22:23, John Lato jwl...@gmail.com wrote: Do you have a kind * implementation of Foldable?  I'd be interested in

Re: [Haskell-cafe] Re: Hackage on Linux

2010-08-27 Thread C. McCann
On Fri, Aug 27, 2010 at 7:40 AM, Andrew Coppin andrewcop...@btinternet.com wrote: Unfortunately, I haven't found anything for Windows yet which has syntax hilighting for Haskell. I use SciTE, which has hilighting for a bazillion languages (including XML and JSON), but not Haskell sadly.

Re: [Haskell-cafe] Haskell and SciTE (was: Hackage on Linux)

2010-08-27 Thread C. McCann
On Fri, Aug 27, 2010 at 12:57 PM, Andrew Coppin andrewcop...@btinternet.com wrote: C. McCann wrote: On Fri, Aug 27, 2010 at 7:40 AM, Andrew Coppin andrewcop...@btinternet.com wrote: Unfortunately, I haven't found anything for Windows yet which has syntax hilighting for Haskell. I use

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread C. McCann
On Mon, Aug 23, 2010 at 11:41 PM, wren ng thornton w...@freegeek.org wrote: I believe the denotation of an iteratee is the transition function for an automaton (or rather a transducer). I hesitate to speculate on the specific kind of automaton without thinking about it, so maybe finite, maybe

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread C. McCann
On Tue, Aug 24, 2010 at 11:44 AM, John Lato jwl...@gmail.com wrote: Aren't they closer - in implementation and by supported operations - to resumptions monads? See many papers by William Harrison here: http://www.cs.missouri.edu/~harrisonwl/abstracts.html I'm not familiar with resumption

Re: [Haskell-cafe] the overlapping instance that wasn't?

2010-08-24 Thread C. McCann
On Tue, Aug 24, 2010 at 4:42 PM, Michael Vanier mvanie...@gmail.com wrote: Adding OverlappingInstances to the language pragmas fixes the problem.  My question is: why is this an overlapping instance?  It would make sense if Int was an instance of Nat, but it isn't.  Is this just a limitation in

Re: [Haskell-cafe] More Flexible Monad Transformer OR Bad Coding Style

2010-08-09 Thread C. McCann
On Mon, Aug 9, 2010 at 3:42 PM, Job Vranish job.vran...@gmail.com wrote: For monads like StateT, WriterT, ReaderT, the order doesn't matter (except perhaps for some pesky performance details). However, for monad transformers like ErrorT or ListT, the order _does_ matter. Is it really correct

Re: [Haskell-cafe] Comments on Haskell 2010 Report

2010-07-12 Thread C. McCann
On Sat, Jul 10, 2010 at 6:40 PM, Julian Fleischer julian.fleisc...@fu-berlin.de wrote: I guess I'm actually messing things up using the word natural - how can expand the multiplication of zero with itself zero times be natural? How could it not be? That is to say, what initial value would

Re: [Haskell-cafe] checking types with type families

2010-07-07 Thread C. McCann
On Sat, Jul 3, 2010 at 4:28 PM, Dan Doel dan.d...@gmail.com wrote: It's potentially not just a violation of intent, but of soundness. The following code doesn't actually work, but one could imagine it working:  class C a b | a - b  instance C () a  -- Theoretically works because C a b, C a

Re: [Haskell-cafe] Type-Level Programming

2010-06-26 Thread C. McCann
On Sat, Jun 26, 2010 at 3:27 AM, Jason Dagit da...@codersbase.com wrote: The types can depend on values.  For example, have you ever notice we have families of functions in Haskell like zip, zip3, zip4, ..., and liftM, liftM2, ...? Each of them has a type that fits into a pattern, mainly the

Re: [Haskell-cafe] Type-Level Programming

2010-06-26 Thread C. McCann
On Sat, Jun 26, 2010 at 6:55 PM, Erik de Castro Lopo mle...@mega-nerd.com wrote: One problem with dependent types as I understand it is that type inference is not guaranteed to terminate. Full type inference is undecidable in most interesting type systems anyway. It's possible for the

Re: [Haskell-cafe] Re: How does one get off haskell?

2010-06-18 Thread C. McCann
On Fri, Jun 18, 2010 at 8:37 AM, Daniel Fischer daniel.is.fisc...@web.de wrote: Haven't you heard?  Enough unit tests give you almost the same security as a good static type system at the expense of more code! Uh, wait, why is that an advantage again? :p Duh, because it's much faster to

Re: [Haskell-cafe] A question on existential types and Church encoding

2010-06-01 Thread C. McCann
On Tue, Jun 1, 2010 at 3:40 PM, Cory Knapp cory.m.kn...@gmail.com wrote: In the new type, the parameter 'a' is misleading. It has no connection to the 'a's on the right of the equals sign. You might as well write:  type CB = forall a. a - a - a Ah! That makes sense. Which raises a new

Re: [Haskell-cafe] Why Either = Left | Right instead of something like Result = Success | Failure

2010-05-27 Thread C. McCann
On Thu, May 27, 2010 at 10:25 AM, Ionut G. Stan ionut.g.s...@gmail.com wrote: I was just wondering if there's any particular reason for which the two constructors of the Either data type are named Left and Right. I'm thinking that something like Success | Failure or Right | Wrong would have

Re: [Haskell-cafe] Chuch encoding of data structures in Haskell

2010-05-27 Thread C. McCann
2010/5/27 Günther Schmidt gue.schm...@web.de: I'm exploring the use of church encodings of algebraic data types in Haskell. Since it's hard to imagine being the first to do so I wonder if folks here could point me to some references on the subject. I'm looking for examples of church

Re: [Haskell-cafe] Re: Chuch encoding of data structures in Haskell

2010-05-27 Thread C. McCann
On Thu, May 27, 2010 at 9:11 PM, Stefan Monnier monn...@iro.umontreal.ca wrote: I.e. to make such an encoding really usable, you need deep polymorphism (which GHC supports just fine, but which is not part of the Haskell standard). Ah, yes, and thank you for pointing that out. My message

Re: [Haskell] Re: [Haskell-cafe] Work on Video Games in Haskell

2010-05-26 Thread C. McCann
On Wed, May 26, 2010 at 11:01 PM, Ben Lippmeier b...@ouroborus.net wrote: While we can all acknowledge the technical impossibility of identifying the original source language of a piece of code... Uh, ∀p (PieceOfCode(p) - CanIdentifySourceLanguage(p)) is clearly false, while ∃p

Re: [Haskell-cafe] Haskell, Queries and Monad Comprehension

2010-05-24 Thread C. McCann
2010/5/23 Günther Schmidt gue.schm...@web.de: is there anybody currently using Haskell to construct or implement a query language? I've a half-baked, type-indexed (in HList style) implementation of relational algebra lying around somewhere, if that counts as a query language. I was

Re: [Haskell-cafe] ambiguous type variable problem when using forall, multiparameter type classes, and constraints on polymorphic values (and syb-with-class)

2010-05-21 Thread C. McCann
On Fri, May 21, 2010 at 12:30 PM, Jeremy Shaw jer...@n-heptane.com wrote: Adding all the scoped type variable stuff does not seem to help. Alas, I can not figure out if this is a limitation of the type-checker, or something that is fundamentally impossible. Nor can I figure out how to work

Re: [Haskell-cafe] Proposal to solve Haskell's MPTC dilemma

2010-05-20 Thread C. McCann
On Thu, May 20, 2010 at 12:25 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: Available instances are not a natural addition to this list. In particular, using that information can cause programs to become untypeable when the module or *any module it imports transitively* defines a new

Re: [Haskell-cafe] Re: What makes Haskell difficult as .NET?

2010-05-14 Thread C. McCann
On Fri, May 14, 2010 at 8:39 PM, Maciej Piechotka uzytkown...@gmail.com wrote: 1. Haskell Class/Type famillies/... are conceptually different then classes and interfaces. I believe interfaces would be roughly equivalent to the subset of single-parameter type classes such that: - All type

Re: [Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread C. McCann
On Tue, May 11, 2010 at 2:06 PM, John Meacham j...@repetae.net wrote: A better way might be class (Functor f, Functor g) = FunctorPair f g where        transformFunctor :: f a - g a though, I am not sure what your use is, there isn't an obvious instance to me, but I don't know what your