Re: [Haskell-cafe] a simple question about types

2010-11-17 Thread Alexander Solla
On Nov 17, 2010, at 10:09 AM, Jerzy M wrote: So my question is: why (in this second example) Integer is inferred? What makes a difference? I think there are two things going on. First, the monomorphism restriction is causing the types to be different. I'm not sure why Integer -> Integ

[Haskell-cafe] OT: Mailing list for testing email

2010-11-21 Thread Alexander Solla
Hi everybody This is kind of off topic, but mailing list related. I've been messing around with my email server, to help fix some issues with the new version of Postfix (with regards to my old configuration). I seem to be receiving email intermittently. Does anybody know of a mailing li

Re: [Haskell-cafe] semantics

2011-02-08 Thread Alexander Solla
On Tue, Feb 8, 2011 at 7:04 AM, Patrick Browne wrote: > Consider the following definitions: > 1. Denotational semantics can be considered as relation between syntax > and mathematical objects (the meaning of the syntax). > 2. Operational semantics can be considered as set of rules for > performing

Re: [Haskell-cafe] Proving correctness

2011-02-11 Thread Alexander Solla
On Fri, Feb 11, 2011 at 3:06 AM, C K Kashyap wrote: > Hi Folks, > > I've come across this a few times - "In Haskell, once can prove the > correctness of the code" - Is this true? > > I know that static typing and strong typing of Haskell eliminate a whole > class of problems - is that related to

Re: [Haskell-cafe] : Gathering ideas for the Google Summer of Code

2011-02-13 Thread Alexander Solla
> Last year we worked hard to come up with a good list of projects for the > 2010 Google Summer of Code. A list drafted at ZuriHac is here: > > > http://donsbot.wordpress.com/2010/04/01/the-8-most-important-haskell-org-gsoc-projects/ > > And we ended up with quite a few of those funded, > > > http

Re: [Haskell-cafe] Unit propagation

2011-02-14 Thread Alexander Solla
On Mon, Feb 14, 2011 at 7:43 AM, PatrickM wrote: > > This is my last part from a project and I need some help with the > following > function: > "If a clause in a propositional formula contains only one literal, then > that > literal must be true (so that the > particular clause can be satisfied

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Alexander Solla
On Thu, Feb 24, 2011 at 12:45 PM, Andrew Coppin wrote: > > > Ah, yes, well there is one *small* problem... If you do that, the function > becomes too strict. > > The input list is being read from disk by lazy I/O. With the original > implementation, the input file gets read at the same time as th

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Alexander Solla
On Thu, Feb 24, 2011 at 2:42 PM, Andrew Coppin wrote: >Anybody have any hints on how to get around this? >> >> Use a lazy state monad? >> > > That's not going to work. It still needs to read the input to determine > which monadic action comes next, and hence what the final result will be. So >

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-03 Thread Alexander Solla
On Wed, Mar 2, 2011 at 10:09 PM, Karthick Gururaj < karthick.guru...@gmail.com> wrote: > Hello, > > I'm learning Haskell from the extremely well written (and well > illustrated as well!) tutorial - http://learnyouahaskell.com/chapters. > I have couple of questions from my readings so far. > > In "

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-03 Thread Alexander Solla
On Thu, Mar 3, 2011 at 1:58 PM, Richard O'Keefe wrote: > > I can't think of an approach that doesn't require all but one of > the tuple elements to have Bounded types. It's not possible. Such an enumeration could potentially have an uncomputable order-type, possibly equal to the order-type of

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-04 Thread Alexander Solla
On Fri, Mar 4, 2011 at 8:45 AM, Markus Läll wrote: > > Would this also have an uncomputable order type? At least for comparing > tuples you'd just: You can tell if an enumeration will have an uncomputable order type by whether or not your enumeration has to "count to infinity" before it can con

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-04 Thread Alexander Solla
On Thu, Mar 3, 2011 at 10:14 PM, wren ng thornton wrote: > On 3/3/11 2:58 AM, Antti-Juhani Kaijanaho wrote: > >> On Thu, Mar 03, 2011 at 12:29:44PM +0530, Karthick Gururaj wrote: >> >>> Thanks - is this the same "unit" that accompanies IO in "IO ()" ? In >>> any case, my question is answered sinc

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-07 Thread Alexander Solla
On Sat, Mar 5, 2011 at 5:06 AM, wren ng thornton wrote: > On 3/4/11 4:33 PM, Alexander Solla wrote: > >> On Thu, Mar 3, 2011 at 10:14 PM, wren ng thornton >> wrote: >> >>> On 3/3/11 2:58 AM, Antti-Juhani Kaijanaho wrote: >>> >>>> On Thu, Ma

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-07 Thread Alexander Solla
On Mon, Mar 7, 2011 at 3:38 PM, Alexander Solla wrote: > > > This can be detected by seq: the left-hand side doesn't terminate, whereas >> the right-hand side does. And moreover, this can mess up other things (e.g., >> monads) by introducing too much laziness. Space

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-27 Thread Alexander Solla
On Wed, Apr 27, 2011 at 6:07 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > > Thomas Davie wrote: >> >>> This completely misses what laziness gives Haskell – it gives a way of >>> completing a smaller number of computations than it otherwise would have to >>> at run time. (...)

Re: [Haskell-cafe] Parsing binary 'hierachical' objects for lazy developers

2011-04-27 Thread Alexander Solla
On Wed, Apr 27, 2011 at 11:16 AM, John Obbele wrote: > Hi Haskellers, > > > I'm currently serializing / unserializing a bunch of bytestrings > which are somehow related to each others and I'm wondering if > there was a way in Haskell to ease my pain. > > The first thing I'm looking for, is to be

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-28 Thread Alexander Solla
On Thu, Apr 28, 2011 at 1:18 PM, Dan Doel wrote: > (Sorry if you get this twice, Ertugrul; and if I reply to top. I'm > stuck with the gmail interface and I'm not used to it.) > > On Thu, Apr 28, 2011 at 11:27 AM, Ertugrul Soeylemez wrote: > > I don't see any problem with this. Although I usual

Re: [Haskell-cafe] code review?

2011-05-22 Thread Alexander Solla
Good points. Here are a few more. Use more explicit types. You can cut down on if-then-else's by using pattern matching and guards. (For example, the first if-then-else in postStatus can be turned into: newtype PostToAllNetworks = PostToAll Bool newtype FirstPost = FirstPost Bool postToAllNet

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-23 Thread Alexander Solla
On Mon, May 23, 2011 at 9:20 AM, michael rice wrote: > What's the best way to end up with a list composed of only the Just values, > no Nothings? > > Michael > > == > > import Control.Monad.State > import Data.Maybe > > > type GeneratorState = State Int > > tick :: Generat

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-24 Thread Alexander Solla
On Mon, May 23, 2011 at 6:21 PM, Richard O'Keefe wrote: > > On 24/05/2011, at 5:49 AM, Alexander Solla wrote: > > There's a library function for it, but also: > > > > > filter ((/=) Nothing) > > The problem with that in general is that it only &g

Re: [Haskell-cafe] [Maybe Int] sans Nothings

2011-05-24 Thread Alexander Solla
> > > > Personally, I find non-functional values without Eq instances to be > > degenerate. So I really do not mind superfluous Eq constraints. I > > would not hesitate to use filter ((/=) Nothing) in a function whose type > > has no free type variables. It's just a bit of plumbing inside of a >

Re: [Haskell-cafe] Code critique - Was [Maybe Int] sans Nothings

2011-05-24 Thread Alexander Solla
00 > Blessed is the LORD, and cried unto thee, Thy face, LORD, will I remember > thee from the beginning: and every one that is weaned of his heart to any > wicked transgressors. Selah. They return at evening: they make ready their > arrow upon the people; and thou hast destroyed all them

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Alexander Solla
2011/5/25 Jonas Almström Duregård > I don't see the similarity (from reading this: > http://www.haskell.org/haskellwiki/Idiom_brackets). My suggestion is > just a way of using layout to avoid parenthesis. > > This is "exactly" the applicative style, where idiom brackets come from. Use Control.Ap

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Alexander Solla
operators away. > > But from what I can tell it also reintroduces the parenthesis? How would > you write f (x a) (y b) in idiom brackets? > I prefer the applicative style, so I would use that. > > /J > > > On 25 May 2011 22:06, Alexander Solla wrote: > >

Re: [Haskell-cafe] representing spreadsheets

2011-05-27 Thread Alexander Solla
On Fri, May 27, 2011 at 3:11 PM, Eric Rasmussen wrote: > Stephen, thanks for the link! The paper was an interesting read and > definitely gave me some ideas. > > Tillmann -- you are correct in that it's very similar to a database. > > I frequently go through this process: > > 1) Receive a flat fil

Re: [Haskell-cafe] representing spreadsheets

2011-05-27 Thread Alexander Solla
On Fri, May 27, 2011 at 3:11 PM, Eric Rasmussen wrote: Stephen, thanks for the link! The paper was an interesting read and definitely gave me some ideas. Tillmann -- you are correct in that it's very similar to a database. I frequently go through this process: 1) Receive a flat file (various fo

Re: [Haskell-cafe] SIGPLAN Programming Languages Software Award

2011-06-08 Thread Alexander Solla
On Wed, Jun 8, 2011 at 2:00 AM, Malcolm Wallace wrote: > > > More seriously, the influence of Haskell over F# (and even Python) is > undoubted, but do you really think Haskell influenced Java Generics? (IMHO > they were more inspired from C++ templates) > > (That is a question, not an assertion).

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 93, Issue 58

2011-06-08 Thread Alexander Solla
On Wed, Jun 8, 2011 at 8:17 PM, Gregory Guthrie wrote: > An earlier note on students reactions to the imperative style forced on > them by some Haskell libraries ("do ...") is interesting, and seems similar > to an observation in a project I was developing for students; making a > version of a si

[Haskell-cafe] Fixed points

2011-06-09 Thread Alexander Solla
Hi Everybody, I have a function which computes a fixed point in terms of iterate: equivalenceClosure :: (Ord a) => Relation a -> Relation a equivalenceClosure = fst . List.head-- "guaranteed" to exist . List.dropWhile (uncurry (/=)) -- removes pairs that are no

Re: [Haskell-cafe] Fixed points

2011-06-10 Thread Alexander Solla
On Thu, Jun 9, 2011 at 6:04 PM, Felipe Almeida Lessa wrote: > Something like this? > > equivalenceClosure = fix $ \f e -> >let e' = reflexivity . symmetry . transitivity $ e >in if e' == e then e else f e' > > Cheers, > > -- > Felipe. > I managed something even "clearer". I still have

Re: [Haskell-cafe] Fixed points

2011-06-10 Thread Alexander Solla
On Fri, Jun 10, 2011 at 12:05 PM, Alexander Solla wrote: > On Thu, Jun 9, 2011 at 6:04 PM, Felipe Almeida Lessa < > felipe.le...@gmail.com> wrote: > >> Something like this? >> >> equivalenceClosure = fix $ \f e -> >>let e' = reflexivity . symme

Re: [Haskell-cafe] How do you test a parser?

2011-06-11 Thread Alexander Solla
On Sat, Jun 11, 2011 at 10:06 AM, Sean Perry wrote: > Choices, choices. > > The first one is to use unit tests. Look at the grammar and make sure the > obvious stuff fails or succeeds. "a + b", "a :+ b", etc. You can do this at > the Haskell level with parser objects. > > Next you can write small

Re: [Haskell-cafe] Fixed points

2011-06-11 Thread Alexander Solla
On Sat, Jun 11, 2011 at 3:19 AM, Max Rabkin wrote: > On Fri, Jun 10, 2011 at 21:05, Alexander Solla > wrote: > > equivalenceClosure :: (Ord a) => Relation a -> Relation a > > equivalenceClosure = fix (\f -> reflexivity . symmetry . transitivity) > > If you wa

[Haskell-cafe] Unexpected type error

2011-06-12 Thread Alexander Solla
Hi everybody, I'm having a bit of a problem with Parsec. The most relevant error message is: Couldn't match expected type `Text.Parsec.Prim.ParsecT String () Control.Monad.Identity.Identity String' against inferred type `parsec-2.1.0.1:Text.ParserC

Re: [Haskell-cafe] Unexpected type error

2011-06-13 Thread Alexander Solla
On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter wrote: > Types from differing versions of the same module are specifically not > compatible - even if they are defined identically (in this case they > are different, though). > > You can do one of two things: > > 1. Edit the package description of

Re: [Haskell-cafe] Unexpected type error

2011-06-13 Thread Alexander Solla
On Mon, Jun 13, 2011 at 10:45 AM, Antoine Latter wrote: > On Mon, Jun 13, 2011 at 12:34 PM, Alexander Solla > wrote: > > > > > > On Sun, Jun 12, 2011 at 7:12 PM, Antoine Latter > wrote: > >> > >> Types from differing versions of the same module a

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 93, Issue 58

2011-06-13 Thread Alexander Solla
On Mon, Jun 13, 2011 at 4:45 PM, M.C.A. (Marco) Devillers < marco.devill...@gmail.com> wrote: > > The urge to do I/O at all the wrong places is a born instinct. > > > The original poster was well aware how to factor out IO out of his program, > as made apparent by his initial comment: "An option I

Re: [Haskell-cafe] Acquiring a random set of a specific size (w/o dups) from a range of Ints

2011-06-13 Thread Alexander Solla
On Mon, Jun 13, 2011 at 4:56 PM, michael rice wrote: > Is there an (existing) way to select 5 Ints randomly (no duplicates) from a > population, say 1-20 (inclusive)? > > Michael > This is as close as I have gotten, but it is only probabilistically true. take_n_unique_randoms_in_range :: ( Ord

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-15 Thread Alexander Solla
On Wed, Jun 15, 2011 at 7:49 AM, kaffeepause73 wrote: > Its also worth looking at Arch Linux - they have a rolling release and are > therefore > very up to date and have from first glance a very good haskell integration. > The community > is excellent as well. > > Arch Linux is my development dist

Re: [Haskell-cafe] Haskell *interpreter* on iPad? (Scheme and Ocaml are there)

2011-06-18 Thread Alexander Solla
On Sat, Jun 18, 2011 at 10:46 AM, John Velman wrote: > > To further emphasize, I'd like to type in (or paste in) Haskell code and > have it executed on the iPad. To reiterate: Something like Hugs, or ghci > on the iPad. Since the iPhone OS is pretty much OS X for ARM, and GHC apparently now su

Re: [Haskell-cafe] Haskell *interpreter* on iPad? (Scheme and Ocaml are there)

2011-06-19 Thread Alexander Solla
On Sun, Jun 19, 2011 at 8:44 AM, Tom Murphy wrote: > On 6/18/11, Alexander Solla wrote: > > > > Since the iPhone OS is pretty much OS X for ARM, and GHC apparently now > > supports cross-compilation, you can compile GHC for iOS. > > > Can you provide a link for inf

Re: [Haskell-cafe] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-21 Thread Alexander Solla
On Tue, Jun 21, 2011 at 3:31 AM, Uli Kastlunger wrote: > Hello Haskell fellows, > > recently there has been a huge progress in generating real programs by > specifying them in interactive theorems prover like Isabelle or Coq, in > particular a verified C Compiler has been generated out of a speci

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-21 Thread Alexander Solla
On Tue, Jun 21, 2011 at 12:53 PM, Elliot Stern wrote: > A tuple is basically an anonymous product type. It's convenient to not > have to spend the time making a named product type, because product types > are so obviously useful. > > Tuples are not so anonymous. Although syntactic sugar complica

Re: [Haskell-cafe] Category theory as a design tool

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 12:06 AM, Arnaud Bailly wrote: > Thanks Sebastien, > This paper has passed in my radar's field but I must confess that > although I think I grasped the idea, I was quickly lost in the > profusion of symbols and notations. I am no mathematician, only a > simple developer, al

Re: [Haskell-cafe] Verifying Haskell programs vs. generating verified Haskell programs

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 8:11 AM, Dominic Mulligan < dominic.p.mulli...@googlemail.com> wrote: > > There's a second (haha) approach, which I use basically every day. > > > Use the typing language fragment from a strongly typed programming > language to express a specification, and then rely on "fr

Re: [Haskell-cafe] Why aren't there anonymous sum types in Haskell?

2011-06-22 Thread Alexander Solla
On Wed, Jun 22, 2011 at 1:25 PM, pipoca wrote: > > > Also, I don't think that the formulation of (:|:) above is > sufficient. Suppose: > > foo :: Foo -> Bar > baz :: Baz -> Quux > > foobaz :: [Foo :|: Baz] > > -- map foo and baz over foobaz > barquux :: [Bar :|: Quux] > barquux = map f foobaz > h

Re: [Haskell-cafe] Category theory as a design tool

2011-06-23 Thread Alexander Solla
On Wed, Jun 22, 2011 at 5:03 PM, Gregg Reynolds wrote: Well, you're way ahead of me. I don't even "get" adjunctions, to tell you > the truth. By which I mean that I have no intuition about them; it's not so > hard to understand the formal definition, but it's another thing altogether > to grasp

Re: [Haskell-cafe] Category theory as a design tool

2011-06-23 Thread Alexander Solla
On Thu, Jun 23, 2011 at 1:15 PM, wren ng thornton wrote: > > > To put a different spin on it, in the dual case we can show that Haskell's > (,) is not a categorical product. There's a good deal of historical debate > about why it works the way it does, but if we're looking to make a better > syst

Re: [Haskell-cafe] Category theory as a design tool

2011-06-24 Thread Alexander Solla
On Thu, Jun 23, 2011 at 9:14 PM, wren ng thornton wrote: > On 6/23/11 4:30 PM, Alexander Solla wrote: > > Please read "Fast and Loose Reasoning is Morally Correct". > > > http://www.comlab.ox.ac.uk/people/jeremy.gibbons/publications/fast+loose.pdf > > &g

Re: [Haskell-cafe] Enumerators, Enumeratees and Iterators

2011-06-28 Thread Alexander Solla
On Mon, Jun 27, 2011 at 7:21 PM, Sævar Berg wrote: > > The first question is, I think, to be solved with enumeratees but I can't > really grok how. > Let's say I have an iteratee that consumes all input. Is it possible to > implement an enumeratee or something else to stick between the enumerator

Re: [Haskell-cafe] ANNOUNCING: Hac PDX II - A Portland Haskell Hackathon

2011-06-30 Thread Alexander Solla
On Thu, Jun 30, 2011 at 12:55 PM, Thomas DuBuisson < thomas.dubuis...@gmail.com> wrote: > WHAT: A Haskell Hackathon > > WHEN: > July 22-24 (Friday, Saturday, Sunday) > 10:00 AM to 5:30 PM > > WHERE: > Forth Avenue Building (FAB, 1900 SW 4th Ave) Room 10 > Portland, Oregon 97201 > ... > Registratio

Re: [Haskell-cafe] Is there Functor instance of Enumerator'

2011-07-01 Thread Alexander Solla
On Fri, Jul 1, 2011 at 7:38 AM, yi huang wrote: > Say i want to compose Enumerator ByteString m b and Iteratee Builder > m b, so I try to transform the enum to Enumerator Builder m b, > providing function ByteString -> Builder. It's like implement a > Functor instance for Enumerator. But i faile

Re: [Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Alexander Solla
On Sun, Jul 3, 2011 at 5:16 PM, Jason Dagit wrote: > Hello, > > I have a GUI program that when I compile it and run it there are no > problems. When I load it into GHCI and type, "main", it loads the > main window but there are no window decorations and the program hangs > to the point where I h

[Haskell-cafe] Network.CGI strangeness

2011-07-21 Thread Alexander Solla
Hi Everybody, I'm having some strange issues with Network.CGI's pathInfo action, or else some other strangeness with pattern matching. My "mainCGI" CGI action is: mainCGI :: CGI CGIResult mainCGI = pathInfo >>= outputSlotTHtml . packagesPage outputSlotTHtml is irrelevant to my problem. package

Re: [Haskell-cafe] More QuickCheck Questions

2011-07-25 Thread Alexander Solla
On Mon, Jul 25, 2011 at 3:01 AM, Mark Spezzano wrote: > > Also, I think that class CoArbitrary can help to generate random *functions > *(as opposed to values; but tell me if I'm wrong) but I don't see how this > could be useful. > How would you test that a function with the type endo :: Functo

Re: [Haskell-cafe] Library for Sparse Vectors?

2011-07-26 Thread Alexander Solla
On Tue, Jul 26, 2011 at 1:30 PM, dokondr wrote: > Hi, > Can't find on hackage any sparse vector library. Does such thing exist? > I need efficient storage and dot product calculation for very sparse > vectors with about 10 out of 40 000 non-zero components. > One solution would be to represent Sp

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-26 Thread Alexander Solla
On Tue, Jul 26, 2011 at 1:52 PM, Tim Cowlishaw wrote: > On Tue, Jul 26, 2011 at 7:46 PM, Evan Laforge wrote: > > > Could you give a specific example of the problem you're trying to solve? > > Sorry, yes, that'd be useful :-) > > So, the project I'm working on involves developing a simulation of a

Re: [Haskell-cafe] Library for Sparse Vectors?

2011-07-26 Thread Alexander Solla
On Tue, Jul 26, 2011 at 3:27 PM, dokondr wrote: > Thanks for the detailed reply and example! > Using IntMap as a vector seems to be a good idea. > In your example: > 1) I would use: > >dot = dot' * dot' >dot' = sum . elems . intersectionWith (*) >norm = sum . fmap (**2)

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-27 Thread Alexander Solla
On Tue, Jul 26, 2011 at 11:58 PM, Tim Cowlishaw wrote: > On Tue, Jul 26, 2011 at 11:14 PM, Alexander Solla > wrote: > > > data OrderType = Market Size | Limit LimitPrice Expiration Size | Stop > > (Either Percent Price) > > newtype Sell = Sell OrderType >

Re: [Haskell-cafe] For class Monoid; better names than mempty & mappend might have been: mid (mident) & mbinop

2011-08-08 Thread Alexander Solla
On Mon, Aug 8, 2011 at 1:56 AM, Henning Thielemann < schlepp...@henning-thielemann.de> wrote: > On 24.07.2011 22:20, Antoine Latter wrote: > >> On Sat, Jul 23, 2011 at 1:41 PM, KC wrote: >> >>> It would be easier for beginners to "grok". >>> >>> >> I think that assumes that all beginners have a s

Re: [Haskell-cafe] Declarative configuration languages?

2011-08-08 Thread Alexander Solla
On Sun, Aug 7, 2011 at 6:58 PM, Richard O'Keefe wrote: > A colleague just asked me >I'm trying to kick off some work into middleware for configuration > of large-scale, >distributed systems. Have you come across any elegant, declarative > configuration >languages used for

Re: [Haskell-cafe] why the name lambda calculus?

2011-08-23 Thread Alexander Solla
On Tue, Aug 23, 2011 at 10:58 AM, Ezra Cooper wrote: > An algebra is a specific kind of structure which is itself formalized > mathematically. I've never seen a formalization of the notion of "a > calculus" and I believe it to be a looser term, as KC defined it. > > Specifically, an algebra consi

Re: [Haskell-cafe] Conflict with Network.CGI and System.Random

2011-08-23 Thread Alexander Solla
CGI m a is an instance of MonadIO if m is, so import Control.Monad.Trans cgiTMain = do gen <- liftIO getStdGen ... should work. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Off-topic: Mathematics

2011-08-30 Thread Alexander Solla
Use Usenet. sci.math, sci.math.research, and sci.logic are some of the best mathematics and logic resources on the internet. On Mon, Aug 29, 2011 at 1:34 AM, Andrew Coppin wrote: > This is fairly wildly off-topic but... does anybody know of a good forum > where I can ask questions about mathemat

Re: [Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Alexander Solla
On Sun, Sep 11, 2011 at 1:38 PM, Scott Lawrence wrote: > Hey all, > > Trying to match C-style comments, I have: > > between (string "/*") (string "*/") $ many anyChar > > Which doesn't work, because it is equivalent (ignoring returned values) to > > do {string "/*"; many anyChar; string "*/"} >

Re: [Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-20 Thread Alexander Solla
On Tue, Sep 20, 2011 at 1:22 PM, Jake McArthur wrote: > On Tue, Sep 20, 2011 at 3:48 PM, Chris Smith wrote: > > But it would be the *wrong* thing to use as a desugaring for list range > > notation. List ranges are very unlikely to be useful or even meaningful > > for most such enumerations (what

Re: [Haskell-cafe] [Alternative] summary of my understanding so far

2011-12-18 Thread Alexander Solla
On Sun, Dec 18, 2011 at 6:44 PM, Gregory Crosswhite wrote: > > On Dec 19, 2011, at 12:39 PM, Brandon Allbery wrote: > > On Sun, Dec 18, 2011 at 20:42, Richard O'Keefe wrote: > >> No. Not by a country mile. >> It's better than "non-existent". >> It's better than "misleading". >> But it's not even

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-19 Thread Alexander Solla
On Mon, Dec 19, 2011 at 11:20 AM, Robert Clausecker wrote: > Image you would create your own language with a paradigm similar to > Haskell or have to chance to change Haskell without the need to keep any > compatibility. What stuff would you add to your language, what stuff > would you remove and

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-20 Thread Alexander Solla
On Tue, Dec 20, 2011 at 1:46 AM, Ben Lippmeier wrote: > > On 20/12/2011, at 6:06 PM, Roman Cheplyaka wrote: > > > * Alexander Solla [2011-12-19 19:10:32-0800] > >> * Documentation that discourages thinking about bottom as a 'value'. > It's >

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-21 Thread Alexander Solla
On Tue, Dec 20, 2011 at 9:16 PM, MigMit wrote: > > On 21 Dec 2011, at 08:24, Alexander Solla wrote: > > > I would rather have an incomplete semantic, and have all the incomplete > parts collapsed into something we call "bottom". > > I don't see the reaso

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-21 Thread Alexander Solla
On Tue, Dec 20, 2011 at 10:30 PM, Gregory Crosswhite wrote: > > On Dec 21, 2011, at 2:24 PM, Alexander Solla wrote: > > I would rather have an incomplete semantic, and have all the incomplete > parts collapsed into something we call "bottom". We can then be smart

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-24 Thread Alexander Solla
On Wed, Dec 21, 2011 at 8:39 PM, MigMit wrote: > > On 22 Dec 2011, at 06:25, Alexander Solla wrote: > > > Denotational semantics is unrealistic. > > And so are imaginary numbers. But they are damn useful for electrical > circuits calculations, so who cares? > Not a fa

<    1   2   3