On Tue, 2008-10-14 at 18:15 +0100, John Lato wrote:
> Are you advocating introducing existential types to beginning
> Haskellers? I think something with the scary name
Invalid argument.
> "existential
> quantification" would greatly increase the head'splodin' on the
> learnin' slope.
Invalid ar
On Tue, 2008-10-14 at 12:31 -0400, David Roundy wrote:
> On Tue, Oct 14, 2008 at 05:20:35PM +0100, Jules Bean wrote:
> > David Roundy wrote:
> >> On Tue, Oct 14, 2008 at 04:05:23PM +0100, Jules Bean wrote:
> >>> Constants are mathematical and universal, like pi. That is what the
> >>> semantics of
On Mon, 2008-10-13 at 13:37 -0700, Daryoush Mehrtash wrote:
> Question 1: Why are there lazy and strict modules of some monads?
> (e.g. Control.Monad.State)
Because both are useful, for different purposes. (For the same reason
that it's helpful, in general, to have both eager and lazy evaluation
On Mon, 2008-10-13 at 19:51 +0100, Andrew Coppin wrote:
> {-# LANGUAGE FlexibleInstances #-}
>
> module Overload where
>
> class Silly s where
> go :: s
>
> instance Silly ([x] -> [x]) where
> go = reverse
>
> instance Silly (Int -> Int) where
> go = (+1)
>
>
>
>
>
> Don't even ask.
On Mon, 2008-10-13 at 18:58 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> >> I see... I was under the impression that "mplus" is just any arbitrary
> >> binary operation over a given monad. How do you know what it does for a
> >> specific monad?
On Mon, 2008-10-13 at 18:38 +0100, Andrew Coppin wrote:
> Ryan Ingram wrote:
> > I would go further than that. To Andrew's question, I say:
> >
> > Yes, we want to encourage "these people" to learn Haskell. We want to
> > smash all their expectations into tiny little pieces. We want their
> > br
On Mon, 2008-10-13 at 18:28 +0100, Andrew Coppin wrote:
> Reid Barton wrote:
> > It's not difficult: the operation is called
> >
> > mplus :: MyMonad a -> MyMonad a -> MyMonad a
> >
> > and already exists (assuming the author of ListT has not forgotten to
> > write a MonadPlus instance).
> >
>
On Sun, 2008-10-12 at 21:34 -0500, John Goerzen wrote:
> On Sun, Oct 12, 2008 at 06:39:58PM -0700, Jonathan Cast wrote:
> > On Fri, 2008-10-10 at 18:13 -0500, John Goerzen wrote:
> > > On Fri, Oct 10, 2008 at 02:29:54PM -0700, Jonathan Cast wrote:
> > > > > I'
On Fri, 2008-10-10 at 18:13 -0500, John Goerzen wrote:
> On Fri, Oct 10, 2008 at 02:29:54PM -0700, Jonathan Cast wrote:
> > > I've
> > > got a Haskell book here (Hutton, 170 pages) that doesn't even mention
> > > how to open a file!
> >
> >
On Fri, 2008-10-10 at 22:43 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > Why would I want to do I/O, when I don't know how to do anything
> > interesting with the input yet, or how to generate interesting output?
> > I think the `I/O comes first' attitud
On Fri, 2008-10-10 at 22:49 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > Newcomers flounder because they expect to keep programming the same way
> > they always have.
>
> _Some_ newcommers flounder because they expect Haskell to be just
> another VB / C++ /
On Fri, 2008-10-10 at 22:40 +0100, Andrew Coppin wrote:
> Iain Barnett wrote:
> > On 10 Oct 2008, at 9:50 pm, Don Stewart wrote:
> >> Haskell makes
> >> constructing true parsers just as easy,
> >>
> >
> > You're not speaking for me there! :) I really like regex. It's a
> > domain specific funct
On Fri, 2008-10-10 at 17:13 -0400, Steve Schafer wrote:
> On Fri, 10 Oct 2008 11:05:43 -0700, Jonathan Cast wrote:
>
> >No reason not to expose newcomers to Haskell to the thing it does best.
>
> This is precisely why newcomers flounder.
Newcomers flounder because t
On Fri, 2008-10-10 at 19:27 +0100, Iain Barnett wrote:
> On 10 Oct 2008, at 7:05 pm, Jonathan Cast wrote:
>
> > On Fri, 2008-10-10 at 19:08 +0100, Iain Barnett wrote:
>
> > In Haskell it is.
> >
> > Parsec makes recursive descent parsers as easy to use in Haskel
On Fri, 2008-10-10 at 22:24 +0100, Iain Barnett wrote:
> On 10 Oct 2008, at 9:00 pm, Tommy M. McGuire wrote:
>
> > Iain Barnett wrote:
> >> On 9 Oct 2008, at 9:33 pm, Andrew Coppin wrote:
> >>> I think it's just the teaching of the language that needs work,
> >>> not so much the language itself
On Fri, 2008-10-10 at 15:00 -0500, Tommy M. McGuire wrote:
> On 10 Oct 2008, at 7:05 pm, Jonathan Cast wrote:
> > Parsec makes recursive descent parsers as easy to use in Haskell as
> > regexps are in Perl. No reason not to expose newcomers to Haskell to
> > the thing it
On Fri, 2008-10-10 at 11:14 -0700, Daryoush Mehrtash wrote:
>
> I don't think any clarity is added by made-up notation. I
> think you
> mean
> In fact I was "trying" to be correct on this.
Great!
> Is it wrong to show:
>
> [()] >> f = f
>
> as was doing:
>
> [()] ma
On Fri, 2008-10-10 at 19:08 +0100, Iain Barnett wrote:
> On 9 Oct 2008, at 9:33 pm, Andrew Coppin wrote:
>
> > I think it's just the teaching of the language that needs work,
> > not so much the language itself.
>
>
> As a newer user myself, I'd agree with this statement. I'd like to
> see
On Fri, 2008-10-10 at 10:59 -0700, Daryoush Mehrtash wrote:
> I was in fact trying to figure out how "guard" worked in the "do".
> The interesting (for a beginner) insight is that:
>
> [()] map f = [f]
I don't think any clarity is added by made-up notation. I think you
mean
map f [
On Thu, 2008-10-09 at 20:20 +0200, apfelmus wrote:
> Daryoush Mehrtash wrote:
> > Assuming A, B, C are monadic operation. How do you read the following
> > function:
> >
> > do
> > A 'mplus' B
> > C
> >
> > I expect this to translate to:
> >
> > (A 'mplus' B) >>= C
>
> It
On Fri, 2008-10-03 at 21:12 +0100, Andrew Coppin wrote:
> Brandon S. Allbery KF8NH wrote:
> > On Oct 3, 2008, at 15:10 , Andrew Coppin wrote:
> >> Again, it looks like MonadPlus == Monad + Monoid, except all the
> >> method names are different. Why do we have this confusing duplication?
> >
> > Be
On Fri, 2008-10-03 at 12:59 -0700, Jonathan Cast wrote:
> On Fri, 2008-10-03 at 21:02 +0100, Andrew Coppin wrote:
> > Jonathan Cast wrote:
> > > On Fri, 2008-10-03 at 20:43 +0100, Andrew Coppin wrote:
> > >
> > >> OK. So it's broken "
On Fri, 2008-10-03 at 21:02 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > On Fri, 2008-10-03 at 20:43 +0100, Andrew Coppin wrote:
> >
> >> OK. So it's broken "for compatibility" then? (Presumably any time you
> >> change
On Fri, 2008-10-03 at 20:43 +0100, Andrew Coppin wrote:
> David Menendez wrote:
> > It wasn't until fairly recently that people realized
> > that you could do useful things if you had "return" and "ap", but not
> > (>>=), which why we have some unfortunate limitations in the Haskell
> > prelude, li
On Fri, 2008-10-03 at 10:08 -0700, David Leimbach wrote:
>
>
> On Fri, Oct 3, 2008 at 4:36 AM, minh thu <[EMAIL PROTECTED]> wrote:
> 2008/10/3 Mitchell, Neil <[EMAIL PROTECTED]>:
>
> >
> > Hi
> >
> >
> >> > > You mean shared libraries witho
On Thu, 2008-10-02 at 20:53 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > On Thu, 2008-10-02 at 18:18 +0100, Andrew Coppin wrote:
> >
> >> After an insane amount of time making my head hurt, I disocvered that
> >> the type "Either ErrorType
On Thu, 2008-10-02 at 18:18 +0100, Andrew Coppin wrote:
> Consider the following beautiful code:
>
> run :: State -> Foo -> ResultSet State
>
> run_and :: State -> Foo -> Foo -> ResultSet State
> run_and s0 x y = do
> s1 <- run s0 x
> s2 <- run s1 y
> return s2
>
> run_or ::
On Tue, 2008-09-30 at 09:30 -0700, Jonathan Cast wrote:
> On Tue, 2008-09-30 at 18:33 +0200, Ketil Malde wrote:
> > David Roundy <[EMAIL PROTECTED]> writes:
> >
> > > Actually, it's no problem having any of those characters in your
> > > arguments,
&g
On Tue, 2008-09-30 at 18:33 +0200, Ketil Malde wrote:
> David Roundy <[EMAIL PROTECTED]> writes:
>
> > Actually, it's no problem having any of those characters in your
> > arguments,
>
> My point is that using 'words' on the argument sting to 'runProcess' and
> expecting the same result as 'runCo
On Mon, 2008-09-29 at 20:34 +0200, Achim Schneider wrote:
> Jonathan Cast <[EMAIL PROTECTED]> wrote:
>
> > On Mon, 2008-09-29 at 19:50 +0200, Achim Schneider wrote:
> > > "Sean Leather" <[EMAIL PROTECTED]> wrote:
> > >
> > > > >
On Mon, 2008-09-29 at 19:50 +0200, Achim Schneider wrote:
> "Sean Leather" <[EMAIL PROTECTED]> wrote:
>
> > > > (\x y -> y)
> > >
> > > *shudder*
> > >
> > > I just can't stand such things.
> > >
> >
> > What is it that you can't stand? Would you prefer "flip const"?
> >
> It's the missing "x" o
On Mon, 2008-09-29 at 17:59 +0200, Achim Schneider wrote:
> Malcolm Wallace <[EMAIL PROTECTED]> wrote:
>
> > (\x y -> y)
>
> *shudder*
>
> I just can't stand such things.
Then call it `flip const'.
jcc
___
Haskell-Cafe mailing list
Haskell-Cafe@has
On Sat, 2008-09-27 at 02:09 +0100, Simon Richard Clarkstone wrote:
> Darn, I sent this as personal mail the first time.
>
> Evan Laforge wrote:
> >> In Haskell,
> >> "The sequence enumFromTo e1 e3 is the list [e1,e1+1,e1+2,...e3].
> >> The list is empty if e1 > e3."
> >
> > I like it, since it m
On Fri, 2008-09-26 at 15:25 -0700, Jason Dusek wrote:
> Can someone explain, why is it that Set can not be a Monad?
It can't even be a functor (which all monads are). You can't implement
fmap (+) $ Set.fromList [1, 2, 3]
with Data.Set, because you can't order functions of type Integer ->
In
On Fri, 2008-09-26 at 09:48 -0700, Jonathan Cast wrote:
> On Fri, 2008-09-26 at 18:50 +0200, Achim Schneider wrote:
> > Jonathan Cast <[EMAIL PROTECTED]> wrote:
> >
> > > On Fri, 2008-09-26 at 18:26 +0200, Achim Schneider wrote:
> > > &g
On Fri, 2008-09-26 at 18:50 +0200, Achim Schneider wrote:
> Jonathan Cast <[EMAIL PROTECTED]> wrote:
>
> > On Fri, 2008-09-26 at 18:26 +0200, Achim Schneider wrote:
> > > Jonathan Cast <[EMAIL PROTECTED]> wrote:
> > >
> > > > On Fri,
On Fri, 2008-09-26 at 18:45 +0200, Thomas Davie wrote:
> On 26 Sep 2008, at 17:51, Jonathan Cast wrote:
>
> > On Fri, 2008-09-26 at 12:17 +0200, Thomas Davie wrote:
> >> On 26 Sep 2008, at 12:12, Janis Voigtlaender wrote:
> >>
> >>> Manlio Perillo wr
On Fri, 2008-09-26 at 18:26 +0200, Achim Schneider wrote:
> Jonathan Cast <[EMAIL PROTECTED]> wrote:
>
> > On Fri, 2008-09-26 at 13:01 -0300, Marco Túlio Gontijo e Silva wrote:
> > > Op vrijdag 26-09-2008 om 11:45 uur [tijdzone -0400], schreef Stefan
> > > M
On Fri, 2008-09-26 at 13:01 -0300, Marco Túlio Gontijo e Silva wrote:
> Op vrijdag 26-09-2008 om 11:45 uur [tijdzone -0400], schreef Stefan
> Monnier:
> > > When I compare GPL and MIT/BSD licenses, I do a simple reasoning.
> > > Suppose a doctor in a battle field meet a badly injuried enemy.
> > >
On Fri, 2008-09-26 at 12:17 +0200, Thomas Davie wrote:
> On 26 Sep 2008, at 12:12, Janis Voigtlaender wrote:
>
> > Manlio Perillo wrote:
> >> When I compare GPL and MIT/BSD licenses, I do a simple reasoning.
> >> Suppose a doctor in a battle field meet a badly injuried enemy.
> >> Should he help t
On Wed, 2008-09-24 at 22:44 +0100, Iain Barnett wrote:
> On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
> > For one approach, check
> > out 'replicate' to make copies of something, and then 'sequence' to
> > run them and return a list.
> Thanks, I haven't found anything that explains 'sequence'
On Tue, 2008-09-23 at 00:46 +0400, Bulat Ziganshin wrote:
> Hello Jonathan,
>
> Tuesday, September 23, 2008, 12:30:19 AM, you wrote:
>
> >> yes, in asm number of instructions executed more or less define
> >> number of CPU cycles used.
>
>
>
> well, i more or less know all this stuff. but
On Tue, 2008-09-23 at 00:20 +0400, Bulat Ziganshin wrote:
> Hello Isaac,
>
> Monday, September 22, 2008, 11:49:30 PM, you wrote:
>
> >> i mean that naive haskell code is very slow and 3 or 5 or twelve libs
> >> can't solve the problem of ghc generating slow code
>
> > Is there something particul
On Fri, 2008-09-19 at 16:30 +0100, Lennart Augustsson wrote:
> I agree that lazy IO is a can with some worms in it. But it's not that
> strange.
> The readFile operation is in the IO monad, so it has an effect on the world.
> This effect is not finished when readFile returns, and from the world
>
On Thu, 2008-09-18 at 10:33 +0100, Simon Marlow wrote:
> Jonathan Cast wrote:
> > An OS thread (Linux/Plan 9) stores:
> >
> > * Stack (definitely a stack pointer and stored registers (> 40 bytes on
> > i686) and includes a special set of page tables on Plan 9)
>
On Wed, 2008-09-17 at 21:20 +, Aaron Denney wrote:
> On 2008-09-17, Jonathan Cast <[EMAIL PROTECTED]> wrote:
> >> In my mind pooling vs new-creation is only relevant to process vs
> >> thread in the performance aspects.
> >
> > Say what? This discussion
On Wed, 2008-09-17 at 23:42 +0200, Arnar Birgisson wrote:
> On Wed, Sep 17, 2008 at 23:20, Aaron Denney <[EMAIL PROTECTED]> wrote:
> >>> The central aspect in my mind is a default share-everything, or
> >>> default share-nothing.
> >>
> [..snip...]
> > These are, in fact, process models. They are
On Wed, 2008-09-17 at 13:44 -0700, Evan Laforge wrote:
> >> systems that don't use an existing user-space thread library (such as
> >> Concurrent Haskell or libthread [1]) emulate user-space threads by
> >> keeping a pool of processors and re-using them (e.g., IIUC Apache does
> >> this).
> >
> > Y
On Wed, 2008-09-17 at 20:29 +, Aaron Denney wrote:
> On 2008-09-17, Jonathan Cast <[EMAIL PROTECTED]> wrote:
> > On Wed, 2008-09-17 at 18:40 +, Aaron Denney wrote:
> >> On 2008-09-17, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
> >> > Hi Manlio and
On Wed, 2008-09-17 at 18:40 +, Aaron Denney wrote:
> On 2008-09-17, Arnar Birgisson <[EMAIL PROTECTED]> wrote:
> > Hi Manlio and others,
> >
> > On Wed, Sep 17, 2008 at 14:58, Manlio Perillo <[EMAIL PROTECTED]> wrote:
> >>> http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-o
On Fri, 2008-09-12 at 18:35 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote:
> >
> >> And what exactly does a "strip" mean, then?
> >>
> >
> > Remove the
On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote:
> Bulat Ziganshin wrote:
> > Hello Andrew,
> >
> > Thursday, September 11, 2008, 11:24:24 PM, you wrote:
> >
> >
> >> interestingly, XN seems to make GHC-compiled binary files dramatically
> >> *smaller*... huh??)
> >>
> >
> > probably
On Thu, 2008-09-11 at 18:34 +0200, Johannes Waldmann wrote:
> >> if support for this simple shape of dependencies ( ... | a -> b ) ...
>
> > For backwards-compatibility reasons,
>
> Yes.
This gives point, then, to my concerns about letting Haskell become a
practical language. At some point, p
On Thu, 2008-09-11 at 13:23 +0200, Johannes Waldmann wrote:
> > Well, it's a library that others might use, so I would prefer to avoid
> > using language extensions, especially functional deps which I don't
> > understand, and which seem to have an uncertain future.
>
> I think there will be a sto
On Wed, 2008-09-10 at 21:32 -0300, Mauricio wrote:
> Do you have any reference for that use of infixing
> constructors by start their name with ':'?
> (...)
>
> > (...) for data constructors, go to
> >
> > http://haskell.org/onlinereport/lexemes.html
> >
> > and search for `O
On Wed, 2008-09-10 at 11:54 -0400, Brandon S. Allbery KF8NH wrote:
> On 2008 Sep 10, at 8:53, Bulat Ziganshin wrote:
> > Wednesday, September 10, 2008, 4:07:41 PM, you wrote:
> >> Do you have any reference for that use of infixing
> >> constructors by start their name with ':'? That's
> >> interest
On Tue, 2008-09-09 at 20:15 +0100, Andrew Coppin wrote:
> When coding in a POSIX-compliant environment, you can usually write
> special escape codes to the console to change the text colour and so
> forth. However, this does not work on Windows.
>
> (Ignore all references you see to enabling ANS
On Thu, 2008-09-04 at 18:41 +0100, Andrew Coppin wrote:
> Ryan Ingram wrote:
> > It's pretty simple, I think.
> >
> > type ExpGen = ReaderT [String] Gen
> >
> > arbExp :: ExpGen Expression
> > -- exercise for the reader
> >
> > instance Arbitrary Expression where
> > arbitrary = runReaderT arbE
On Tue, 2008-09-02 at 20:25 +, Henry Laxen wrote:
> Dear Group,
>
> When I fire up ghci and define:
>
> increment x = return (x+1)
>
> I can say:
> Main> increment 1
>
> and ghci dutifully replies 2. Also as expected, the type signature of
> increment is: (Num a, Monad m) => a -> m a
>
>
On Mon, 2008-09-01 at 01:07 -0700, Ryan Ingram wrote:
> Jonathan, I think we are going to end up just disagreeing on this
> subject, but I'd like to point out the reasons why we disagree.
>
> On Sun, Aug 31, 2008 at 7:27 PM, Jonathan Cast
> <[EMAIL PROTECTED]> wrote:
&
On Mon, 2008-09-01 at 01:20 -0700, Don Stewart wrote:
> ryani.spam:
> > On Sun, Aug 31, 2008 at 7:27 PM, Jonathan Cast
> > <[EMAIL PROTECTED]> wrote:
> > > This concept of `day-to-day work' is a curious one. Haskell is not a
> > > mature language, an
On Sun, 2008-08-31 at 19:06 -0700, Ryan Ingram wrote:
> On Sun, Aug 31, 2008 at 4:21 PM, Jonathan Cast
> <[EMAIL PROTECTED]> wrote:
> > It seems as if you're proposing that
> >
> > doubleSet :: Set.Set Int -> Set.Set Int
> > doubleSet = m
On Sun, 2008-08-31 at 16:08 -0700, Ryan Ingram wrote:
> In particular I do NOT want each function in its own typeclass; the
> previous post saying:
> > foo x = map (bar x)
> should be rejected as ambiguous without a type signature somewhere
What type signature do you propose?
It seems as if you'r
On Sun, 2008-08-31 at 17:29 +0100, Andrew Coppin wrote:
> Ryan Ingram wrote:
> > On Sun, Aug 31, 2008 at 12:46 AM, Andrew Coppin
> > <[EMAIL PROTECTED]> wrote:
> >
> >> Right. So if I have, say, the factorial function defined using the Y
> >> combinator, there's no way to stop the interpretter e
On Fri, 2008-08-29 at 21:48 +0100, Conor McBride wrote:
> Hi
>
> On 29 Aug 2008, at 21:12, Jonathan Cast wrote:
>
> >
> > If you want to avoid infinite normal forms (or just plain lack of
> > normal
> > forms, as in let x = x in x or (\x -> x x) (\ x
On Fri, 2008-08-29 at 20:56 +0100, Andrew Coppin wrote:
> Neil Mitchell wrote:
> > Hi
> >
> >
> >> I'm writing a simple interpretter for a small extended-lambda-calculus sort
> >> of language. And I'd just like to say... RECURSIVE LET-BINDS! GH!!! >_<
> >>
> >
> > Agreed :-)
> >
>
>
On Thu, 2008-08-28 at 14:45 -0700, Jonathan Cast wrote:
> On Thu, 2008-08-28 at 22:24 +0100, Adrian Hey wrote:
> > Jonathan Cast wrote:
> > > This has been answered repeatedly, at least implicitly. Unless you
> > > insist that getWhatever should live in the IO monad a
On Thu, 2008-08-28 at 22:24 +0100, Adrian Hey wrote:
> Jonathan Cast wrote:
> > This has been answered repeatedly, at least implicitly. Unless you
> > insist that getWhatever should live in the IO monad and have no
> > functional arguments (why?), there is no reas
On Thu, 2008-08-28 at 20:28 +0100, Adrian Hey wrote:
> Lennart Augustsson wrote:
> > I don't think anyone has claimed that any interface can be implemented
> > without globals.
> > Of course some can't (just pick an interface that is the specification
> > of a global variable).
>
> I said in the o
On Thu, 2008-08-28 at 10:00 +0100, Adrian Hey wrote:
> Lennart Augustsson wrote:
> > I don't don't think global variables should be banned, I just think
> > they should be severly discouraged.
>
> If you're saying a language should not provide a sound way to do
> this (as I believe you are), the
On Wed, 2008-08-27 at 23:00 +0100, Lennart Augustsson wrote:
> IMO, there's no justification for having IORefs etc in the IO monad.
> They should be in a separate monad. There could then be an operation
> to lift that monad to the IO monad, if you so wish.
> But wait, we already have that, it's th
On Wed, 2008-08-27 at 14:50 -0700, Jonathan Cast wrote:
> On Thu, 2008-08-28 at 01:23 +0400, Bulat Ziganshin wrote:
> > Hello Jonathan,
> >
> > Thursday, August 28, 2008, 1:11:35 AM, you wrote:
> > >> IORefs got their names because they are implemented in IO mon
On Thu, 2008-08-28 at 01:23 +0400, Bulat Ziganshin wrote:
> Hello Jonathan,
>
> Thursday, August 28, 2008, 1:11:35 AM, you wrote:
> >> IORefs got their names because they are implemented in IO monad :)
>
> > But why are they implemented in the IO monad?
>
> because they need its features. but i/
On Wed, 2008-08-27 at 23:20 +0200, Daniel Fischer wrote:
> Am Mittwoch, 27. August 2008 22:57 schrieb Jonathan Cast:
> > On Thu, 2008-08-28 at 00:53 +0400, Bulat Ziganshin wrote:
> > > Hello Jonathan,
> > >
> > > Wednesday, August 27, 2008, 8:12:42 PM, you wro
On Thu, 2008-08-28 at 01:09 +0400, Bulat Ziganshin wrote:
> Hello Jonathan,
>
> Thursday, August 28, 2008, 12:57:19 AM, you wrote:
>
> >> s/it/exchange with external world, i.e., essentially, I/O/
>
> > Bald assertion. I don't buy it. What do IORefs have to do with
> > exchange with the extern
On Thu, 2008-08-28 at 00:53 +0400, Bulat Ziganshin wrote:
> Hello Jonathan,
>
> Wednesday, August 27, 2008, 8:12:42 PM, you wrote:
>
> > * I wonder why that name was chosen? The design doesn't seem to have
> > anything to do with IO, it's more of a `we have this in C so we want it
> > in Haskell
On Wed, 2008-08-27 at 13:34 -0700, Aaron Tomb wrote:
> On Aug 27, 2008, at 12:23 PM, Dan Weston wrote:
>
> > Huh? Type safety buys you not having to worry about dereferencing
> > stale nonnull pointers (lifetime of reference exceeding lifetime of
> > referent), but nothing about dereferencing
On Wed, 2008-08-27 at 12:23 -0700, Dan Weston wrote:
> Tim Docker wrote:
> >
> > David Roundy wrote:
> >
> >> Which illustrates the point that it's not type safety
> >> that protects us from segfaults, so much as bounds checking,
> >> and that's got a non-trivial runtime cost. At least, most
>
On Wed, 2008-08-27 at 20:14 +0100, C.M.Brown wrote:
> Hi,
>
> I may be wrong here, but I don't belive it's just let-patterns that have
> this property. I.e. what's the difference between...
>
> (Just x) = _|_
>
> f = x
>
> vs.
>
> f = let (Just x) = _|_ in x
>
> vs.
>
> f = x where (Just x)
On Wed, 2008-08-27 at 11:53 +0100, Adrian Hey wrote:
> John Meacham wrote:
> > As with all design decisions, it is sometimes the right thing and
> > sometimes the wrong one. And sometimes the most expedient. (which,
> > occasionally, is a perfectly valid driving force behind a certain bit of
> > co
On Mon, 2008-08-25 at 15:44 -0700, Jason Dusek wrote:
> Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote:
> > Jason Dusek wrote:
> > >
> > > It is inconvenient for certain things. If I want to declare a
> > > special `instance Show [MyType] where...` I am out of luck.
> >
> > In this particular c
On Wed, 2008-08-06 at 19:06 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > instance Show x => Show (Foo x) where
> > showsPrec n foo = ("list_foo "++) . shows (foo_list foo)
> >
> > You use the n parameter if you've got an infix operator in yo
On Thu, 2008-08-07 at 10:35 -0700, Dan Weston wrote:
> Shouldn't that be "posta elettronica" (or "posteletta" along the lines
> of the Frence "courriel")?
eposta, surely...
jcc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell
On Wed, 2008-08-06 at 22:50 -0700, Jason Dusek wrote:
> Jonathan Cast <[EMAIL PROTECTED]> wrote:
> > Jason Dusek wrote:
> > > It is an arrow that takes a C to an arrow that takes an A
> > > and makes the product C x A. I want to write curry(C x A)
> > >
On Wed, 2008-08-06 at 13:56 -0700, Jason Dusek wrote:
> The problem as stated is to find the unit for the adjunction:
>
> ((- x A), (-)^A x A)
>
> The latter functor takes an arrow f to (f . -) x id_A and does
> the obvious thing for objects. The co-unit diagram is given
> as:
>
>
On Wed, 2008-08-06 at 18:21 +0200, Johan Tibell wrote:
> On Wed, Aug 6, 2008 at 5:44 PM, Jules Bean <[EMAIL PROTECTED]> wrote:
> > Johan Tibell wrote:
> >> You probably knew this already but there's nothing in the "with idiom"
> >> that prevents the resource to escape.
> >
> > And, it doesn't alway
On Tue, 2008-08-05 at 20:28 +0100, Andrew Coppin wrote:
> Suppose we have the following:
>
> data Foo x
> list_foo :: [x] -> Foo x
> foo_list :: Foo x -> [x]
>
> What would be the best way to write a Show instance?
>
> The thing that I came up with is
>
> instance (Show x) => Show (Foo
On Mon, 2008-08-04 at 23:04 +0100, Brian Hulley wrote:
> Jonathan Cast wrote:
> > On Mon, 2008-08-04 at 19:51 +0100, Brian Hulley wrote:
> >> For example, why is there any distinction between a type "variable" and
> >> a type "constant"?
> &
On Mon, 2008-08-04 at 19:51 +0100, Brian Hulley wrote:
> Hi,
> I'm familiar with the capitalization rules for identifiers in Haskell
> and know that they are very useful and practical e.g. by allowing
> variables to be distinguished from "constants" in patterns etc.
>
> However I'm trying to und
On Sun, 2008-07-13 at 21:03 -0400, Brandon S. Allbery KF8NH wrote:
> On 2008 Jul 13, at 19:50, Jonathan Cast wrote:
>
> > On Sun, 2008-07-13 at 18:28 -0500, Derek Elkins wrote:
> >> On Thu, 2008-07-10 at 10:59 -0700, Jonathan Cast wrote:
> >>> On Thu, 2008-
On Sun, 2008-07-13 at 18:28 -0500, Derek Elkins wrote:
> On Thu, 2008-07-10 at 10:59 -0700, Jonathan Cast wrote:
> > On Thu, 2008-07-10 at 14:53 -0300, Marco Túlio Gontijo e Silva wrote:
> > > Hello,
> > >
> > > how do I unbox a existential quantificated data
On Thu, 2008-07-10 at 14:53 -0300, Marco Túlio Gontijo e Silva wrote:
> Hello,
>
> how do I unbox a existential quantificated data type?
You can't. You have to use case analysis:
case foo of
L l ->
where none of the information your case analysis discovers about the
actual type of l can
On Thu, 2008-07-10 at 03:16 -0700, Grzegorz Chrupala wrote:
> Hi all,
>
> Is there a less ugly way of avoiding laziness in the code pasted below then
> the use of seq in the last line?
> The program is supposed to split a large input file into chunks and check in
> how many of those chunks each of
On Wed, 2008-07-09 at 12:36 +0200, Henning Thielemann wrote:
> On Wed, 9 Jul 2008, Neil Mitchell wrote:
>
> > For example, in the module I'm currently working on:
> >
> > module Hoogle.DataBase.TypeSearch.Graph(
> >Graph, newGraph,
> >GraphResult(..), ArgPos, Binding,
> >graphSearch
>
On Fri, 2008-07-04 at 15:15 -0700, Badea Daniel wrote:
> The file I'm trying to parse contains mixed sections like:
>
> ...
>
>
> ... script including arithmetic expressions ...
>
> /end_section>
>
> ...
>
> so I defined two parsers: one for the 'outer' language and
> the other one for the
On Wed, 2008-07-02 at 02:17 -0400, Brandon S. Allbery KF8NH wrote:
> On 2008 Jul 2, at 2:15, Jonathan Cast wrote:
>
> > It seems as though it can return -1 if given non-sensical input.
> > But in
>
> The POSIX spec says it returns EINVAL in that case.
Are you sure?
On Wed, 2008-07-02 at 02:07 -0400, Brandon S. Allbery KF8NH wrote:
>
> On 2008 Jul 2, at 1:42, Galchin, Vasili wrote:
>
> > errno <- throwErrnoIfMinus1 "aioError" (c_aio_error p_aiocb)
> >
> > "ghc" thinks that "Errno" should be an instance of "Num":
> >
> > System/Posix/Aio.hsc:117:15:
On Mon, 2008-06-23 at 04:03 -0700, leledumbo wrote:
> >> Don't give up so fast !! (Note that you can't do what you asked for in
> >> Pascal either, in fact Pascal don't support n-uplet)
> I'm not going to use n-uplet, dynamic array of array of Byte is enough.
> Though not very optimizing, I can us
On Wed, 2008-06-18 at 16:00 +0100, PR Stanley wrote:
> >>It seems to me that if a PHP developer sees the Haskell community as
> >>a resource for advice on programming language implementation, we
> >>should take this as a compliment to the Haskell community. Repaying
> >>that compliment with "your
On Wed, 2008-06-18 at 06:36 +0200, Karoly Negyesi wrote:
> > (a) I would *never* want to use an implementation of closures like that.
> > (b) Closures as proposed are *far* better than not having closures.
>
> Could you elaborate on a) ?
I dislike the habit of implicit declaration --- strongly
201 - 300 of 581 matches
Mail list logo