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 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 (PieceOfCode(p) -> Ca

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 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 been a > little better.

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

2010-05-27 Thread C. McCann
2010/5/27 Günther Schmidt : > 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 encodings in Haskell

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 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 involved a great deal of h

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 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 question: Is

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 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 develop in a dynami

Re: [Haskell-cafe] Type-Level Programming

2010-06-26 Thread C. McCann
On Sat, Jun 26, 2010 at 3:27 AM, Jason Dagit 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 arity > increases.

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 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 simply-typed λ-calculus, but

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 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 c implies

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 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 make sense for folding (*)

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 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 to say that order do

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 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 > deterministic,

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 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 monads.

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 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 the > way overla

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

2010-08-27 Thread C. McCann
On Fri, Aug 27, 2010 at 7:40 AM, Andrew Coppin 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. Veering somewhat offtopic,

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 wrote: > C. McCann wrote: >> >> On Fri, Aug 27, 2010 at 7:40 AM, Andrew Coppin >> wrote: >> >>> >>> Unfortunately, I haven't found anything for Windows yet which has syntax >>> hilighting f

Re: [Haskell-cafe] Restricted type classes

2010-09-03 Thread C. McCann
On Fri, Sep 3, 2010 at 11:47 AM, John Lato wrote: > On Fri, Sep 3, 2010 at 1:29 PM, Ivan Lazar Miljenovic > wrote: >> On 3 September 2010 22:23, John Lato wrote: >> > Do you have a kind * implementation of Foldable?  I'd be interested in >> > seeing it, because I was unable to create a usable i

Re: [Haskell-cafe] BPMN and BPEL

2010-09-08 Thread C. McCann
On Wed, Sep 8, 2010 at 3:38 PM, Hector Guilarte 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 this > kind of tas

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 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 to cover s

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 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, by providing docume

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 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 usually

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

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 8:31 AM, Ben Millwood 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 weekends for them. F

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Thu, Oct 28, 2010 at 9:13 PM, Ivan Lazar Miljenovic 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 > they're talking about

Re: [Haskell-cafe] Edit Hackage

2010-10-29 Thread C. McCann
On Fri, Oct 29, 2010 at 6:13 PM, Ivan Lazar Miljenovic 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 > (e.g. planet.haskell.or

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 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 > when you want

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 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 would not be a

Re: [Haskell-cafe] Edit Hackage

2010-10-30 Thread C. McCann
On Sat, Oct 30, 2010 at 11:34 AM, Ketil Malde 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 liveable to follow

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 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 motivating

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 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 class methods are functi

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 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 instance. This leads t

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 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 around the issue. I

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

2010-05-24 Thread C. McCann
2010/5/23 Günther Schmidt : > 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 experimenting with using it

Re: [Haskell-cafe] Is "let" special?

2010-11-03 Thread C. McCann
2010/11/3 Petr Pudlak : >> 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] Serialization of (a -> b) and IO a

2010-11-11 Thread C. McCann
On Thu, Nov 11, 2010 at 10:53 AM, Ketil Malde 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 deserializat

[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 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 versa? You ca

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 wrote: > On 11 November 2010 18:01, C. McCann 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) that report

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 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 Haskell version is re

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 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 > >  serial

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 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 monadic values wi

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 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 already attac

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 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 some basic moderation too

Re: [Haskell-cafe] Offer to mirror Hackage

2010-12-08 Thread C. McCann
On Wed, Dec 8, 2010 at 5:41 AM, Ketil Malde 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 think. You c

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 wrote: > On 23 December 2010 21:43, Mario Blažević 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 Elliott, >> nearly four years ago. >>

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ć 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 count as sufficientl