Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  TagLib (linuxlinux2006)
   2.  Error Loading Stdm.lhs in Haskell platform 2012 (Iwan Awaludin)
   3. Re:  Error Loading Stdm.lhs in Haskell platform   2012
      (Eugene Perederey)
   4. Re:  programming with Error monad (Dennis Raddle)


----------------------------------------------------------------------

Message: 1
Date: Mon, 3 Sep 2012 19:55:09 +0400
From: "linuxlinux2006" <linuxlinux2...@rambler.ru>
Subject: [Haskell-beginners] TagLib
To: beginners@haskell.org
Message-ID: <1346687709.409781.3525.36...@saddam4.rambler.ru>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Hello

Please tell me why this program does not work: http://hpaste.org/74171
Tags in audio file are recorded correctly, other programs see them.

Thanks for the help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120903/9e16867d/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 4 Sep 2012 12:08:20 +0700
From: Iwan Awaludin <awalu...@gmail.com>
Subject: [Haskell-beginners] Error Loading Stdm.lhs in Haskell
        platform 2012
To: beginners@haskell.org
Message-ID:
        <CAHd5so7N7nX=diyk9Sv3+553gvqmXhWqGfgcHmAh=5xr0nh...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Dear Sir/Madam
I Installed *Haskell Platform 2012.2.0.0 for
Windows<http://lambda.haskell.org/platform/download/2012.2.0.0/HaskellPlatform-2012.2.0.0-setup.exe>
*and try to load Stdm.lhs which is downloaded from
http://www.dcs.gla.ac.uk/~jtod/discrete-mathematics/Stdm.lhs
I have this error:
stdm.lhs:1160:14: Parse error in pattern: n + 1
Failed, modules loaded: none.

Is there anything I should do to make it right?
Thank you.

-- 
Iwan Awaludin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120904/03d69915/attachment-0001.htm>

------------------------------

Message: 3
Date: Mon, 3 Sep 2012 23:46:49 -0700
From: Eugene Perederey <eugene.perede...@gmail.com>
Subject: Re: [Haskell-beginners] Error Loading Stdm.lhs in Haskell
        platform        2012
To: Iwan Awaludin <awalu...@gmail.com>
Cc: beginners@haskell.org
Message-ID:
        <caftqo17cq4-h_ygjdqzfcfgsuh4eykn40ytge3x5kvxes+v...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

What version of ghc are you using?
In recent versions ghc doesn't support pattern matching of expressions
like (n+1).
You can rewrite that factorial function as
 factorial n = n * factorial (n-1)
instead.

best,
Eugene

On 3 September 2012 22:08, Iwan Awaludin <awalu...@gmail.com> wrote:
> Dear Sir/Madam
> I Installed Haskell Platform 2012.2.0.0 for Windows and try to load Stdm.lhs
> which is downloaded from
> http://www.dcs.gla.ac.uk/~jtod/discrete-mathematics/Stdm.lhs
> I have this error:
> stdm.lhs:1160:14: Parse error in pattern: n + 1
> Failed, modules loaded: none.
>
> Is there anything I should do to make it right?
> Thank you.
>
> --
> Iwan Awaludin
>
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>



------------------------------

Message: 4
Date: Mon, 3 Sep 2012 23:56:55 -0700
From: Dennis Raddle <dennis.rad...@gmail.com>
Subject: Re: [Haskell-beginners] programming with Error monad
To: Haskell Beginners <beginners@haskell.org>
Message-ID:
        <cakxlvor+oxe9bzrte9lxhar7v6larrfsmrdeyekkac1v6a6...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

No one replied to this, but I think I figured out why, when I am using the
Error monad, that every statement in a do construct runs at least part way,
whether or not its data is needed. The final output is a Left or Right
value -- and because a Left anywhere can short-circuit the compuation that
follows, there is no way for the program to decide on a final Left/Right
output without running each computation (or at least up to the point where
it's not a Left).

On Sat, Sep 1, 2012 at 12:59 PM, Dennis Raddle <dennis.rad...@gmail.com>wrote:

> I recently completed a large project and started another one. The first
> project was about processing music, in particular taking MusicXML and/or
> Sibelius files (Sibelius is a music notation program) and producing MIDI
> files according to the specifications I wanted.
>
> The second project is about algorithmic music composition.
>
> To handle errors in the first project, I used "throw" to throw exceptions.
>
> Now I am using the Error monad... actually a combination of ErrorT and
> State. (In the state I hold a random generator for use in algorithms that
> require pseudo-randomness.)
>
> I notice two things now. The first thing is that I can catch and rethrow
> errors to provide annotation about the context. It's like getting a stack
> trace automatically every time there is an error. I realize now this makes
> it easier to debug, and during my first project I spent a lot of time
> debugging that might have been avoidable. (I confess I never could figure
> out the ghci debugger, which might have helped.)
>
> The second thing is that there seems to be less laziness. Every statement
> in a do statement seems to execute even if I don't use result. I think. I
> would have to do some more experiments, but that is what it looks like
> right now. That is another good thing for debugging... less laziness (and
> maybe guaranteed order of execution too?) means it's easier to understand
> what the program is attempting to do.
>
> Does this seem correct?
>
> Dennis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120903/be606012/attachment-0001.htm>

------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 51, Issue 5
****************************************

Reply via email to