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. Re: Problems with installing lambdabot (Brandon Allbery) 2. Re: Functional Parses (Robert Heum?ller) 3. Re: Functional Parses (Brandon Allbery) 4. Re: Problems with installing lambdabot (Antoras) 5. Re: Problems with installing lambdabot (Brent Yorgey) 6. Re: Problems with installing lambdabot (Brent Yorgey) ---------------------------------------------------------------------- Message: 1 Date: Tue, 3 Jul 2012 15:47:30 -0400 From: Brandon Allbery <allber...@gmail.com> Subject: Re: [Haskell-beginners] Problems with installing lambdabot To: Antoras <m...@antoras.de> Cc: beginners@haskell.org Message-ID: <CAKFCL4UD8D10S2SHrv+nDBiW0=9-f7K97d4g6cSb-=9kch5...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Tue, Jul 3, 2012 at 3:16 PM, Antoras <m...@antoras.de> wrote: > Loading package readline-1.0.1.0 ... <command line>: can't load .so/.DLL > for: > /usr/lib/gcc/x86_64-unknown-**linux-gnu/4.7.1/../../../../**lib/libncurses.so > (-lncursesw: cannot open shared object file: No such file or directory) > Your Linux distribution pulled a cute stunt that throws the dynamic loader (used for TH and ghci and a few other things) for a loop: libncurses.so, for backward compatibility purposes, is a GNU ld linker script which references libncursesw.so in a way the dynamic loader doesn't understand. You can work around this in one of two ways: 1. replace /usr/lib/libncurses.so with a symlink to /usr/lib/libncursesw.so; OR 2. edit /usr/lib/libncurses.so, which is a text file (linker script), to reference "/usr/lib/libncursesw.so" instead of "-lncursesw". -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120703/9d8c9339/attachment-0001.htm> ------------------------------ Message: 2 Date: Tue, 3 Jul 2012 23:02:21 +0200 From: Robert Heum?ller <mail...@heum.de> Subject: Re: [Haskell-beginners] Functional Parses To: beginners@haskell.org Message-ID: <20120703230221.4df7aeff@thor> Content-Type: text/plain; charset=US-ASCII Thank you very much. I'll check out the code on the website tomorrow and hopefully this will solve the problem. Whenever monads apper things seem to get tricky - sadly there won't be a lecture on functional programming in the next semester at the university I study at :( Am Tue, 3 Jul 2012 18:01:32 +0100 schrieb Stephen Tetley <stephen.tet...@gmail.com>: > On 3 July 2012 15:13, Christian Maeder <christian.mae...@dfki.de> > wrote: > > > This type synonym is unsuitable for a Monad instance. > > Better would be: > > newtype Parser a = Parser (String -> [(a, String)]) > > but that would require to change your code below. > > This is alluded to in the closing chapter remarks (section 8.9) of > Graham Hutton's book and there is code available on the website that > accompanies the book that "solves" the problem. Unfortunately, this > chapter does seem to trip people up who use the book for self study. > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners ------------------------------ Message: 3 Date: Tue, 3 Jul 2012 17:09:20 -0400 From: Brandon Allbery <allber...@gmail.com> Subject: Re: [Haskell-beginners] Functional Parses To: Robert Heum?ller <mail...@heum.de> Cc: beginners@haskell.org Message-ID: <cakfcl4uz0huk4sq+j8xecc6tvcpqntg_hxmwgxifkueo06r...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Tue, Jul 3, 2012 at 5:02 PM, Robert Heum?ller <mail...@heum.de> wrote: > Whenever monads apper things seem to get tricky - sadly there won't be > a lecture on functional programming in the next semester at the > university I study at :( > The only trick here is that the text wants to introduce you to monads by doing something that won't work in a normal Haskell; you need to put the compiler in a mode which allows you to in effect rebuild them from scratch. (You can't simply provide your own definitions because "do" notation is hardwired to use the standard ones anyway, unless you use the RebindableSyntax extension to tell it to use yours. You'd also have to make sure you don't get the standard definitions, which means NoImplicitPrelude and manually importing Prelude minus the standard machinery. I don't think RebindableSyntax let you rebind "do" notation properly when that textbook was written, btw, so when it was written *no* Haskell compiler supported the direct use of its examples.) This was a rather unfortunate choice on Hutton's part, as it means his examples *only* work on paper. -- brandon s allbery allber...@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120703/90c05ea2/attachment-0001.htm> ------------------------------ Message: 4 Date: Tue, 03 Jul 2012 23:23:58 +0200 From: Antoras <m...@antoras.de> Subject: Re: [Haskell-beginners] Problems with installing lambdabot Cc: beginners@haskell.org Message-ID: <4ff362ee.50...@antoras.de> Content-Type: text/plain; charset="utf-8"; Format="flowed" Ok, after changing this the linker error is gone. But now I get a compile error close to the place the linker error previously occurred: [28 of 79] Compiling Plugin.Activity ( Plugin/Activity.hs, dist/build/lambdabot/lambdabot-tmp/Plugin/Activity.o ) [...] Loading package IOSpec-0.2.5 ... linking ... done. Plugin/Activity.hs:18:10: Illegal instance declaration for `Module ActivityModule ActivityState' (All instance types must be of the form (T a1 ... an) where a1 ... an are *distinct type variables*, and each type variable appears at most once in the instance head. Use -XFlexibleInstances if you want to disable this.) In the instance declaration for `Module ActivityModule ActivityState' cabal: Error: some packages failed to install: lambdabot-4.2.3.2 failed during the building phase. The exception was: ExitFailure 1 On 07/03/2012 09:47 PM, Brandon Allbery wrote: > On Tue, Jul 3, 2012 at 3:16 PM, Antoras <m...@antoras.de > <mailto:m...@antoras.de>> wrote: > > Loading package readline-1.0.1.0 ... <command line>: can't load > .so/.DLL for: > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../lib/libncurses.so > (-lncursesw: cannot open shared object file: No such file or > directory) > > > Your Linux distribution pulled a cute stunt that throws the dynamic > loader (used for TH and ghci and a few other things) for a loop: > libncurses.so, for backward compatibility purposes, is a GNU ld > linker script which references libncursesw.so in a way the dynamic > loader doesn't understand. You can work around this in one of two ways: > > 1. replace /usr/lib/libncurses.so with a symlink to > /usr/lib/libncursesw.so; OR > 2. edit /usr/lib/libncurses.so, which is a text file (linker script), > to reference "/usr/lib/libncursesw.so" instead of "-lncursesw". > > -- > brandon s allbery allber...@gmail.com <mailto:allber...@gmail.com> > wandering unix systems administrator (available) (412) 475-9364 vm/sms > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20120703/4e765fa1/attachment-0001.htm> ------------------------------ Message: 5 Date: Tue, 3 Jul 2012 20:51:33 -0400 From: Brent Yorgey <byor...@seas.upenn.edu> Subject: Re: [Haskell-beginners] Problems with installing lambdabot To: beginners@haskell.org Message-ID: <20120704005133.ga20...@seas.upenn.edu> Content-Type: text/plain; charset=us-ascii This is what I mean by lambdabot being notoriously difficult to install. If you work through this one there will probably be another, and another... I did get it to compile once but it took quite a bit of effort. You would probably be better off getting lambdabot's source from the darcs repository (http://code.haskell.org/lambdabot/) and trying to build that. Note that the last upload of the lambdabot package to Hackage was in January 2011 -- no one has a particular incentive to make sure the package stays up-to-date. This particular error, I think, is caused by a change in the way GHC handles certain extensions. Apparently lambdabot has not been updated to match. You could fix it by editing Plugin/Activity.hs and adding {-# LANGUAGE FlexibleInstances #-} to the top. -Brent On Tue, Jul 03, 2012 at 11:23:58PM +0200, Antoras wrote: > Ok, after changing this the linker error is gone. But now I get a > compile error close to the place the linker error previously > occurred: > > > [28 of 79] Compiling Plugin.Activity ( Plugin/Activity.hs, > dist/build/lambdabot/lambdabot-tmp/Plugin/Activity.o ) > [...] > Loading package IOSpec-0.2.5 ... linking ... done. > > Plugin/Activity.hs:18:10: > Illegal instance declaration for `Module > ActivityModule ActivityState' > (All instance types must be of the form (T a1 ... an) > where a1 ... an are *distinct type variables*, > and each type variable appears at most once in the instance head. > Use -XFlexibleInstances if you want to disable this.) > In the instance declaration for `Module ActivityModule ActivityState' > cabal: Error: some packages failed to install: > lambdabot-4.2.3.2 failed during the building phase. The exception was: > ExitFailure 1 > > > On 07/03/2012 09:47 PM, Brandon Allbery wrote: > >On Tue, Jul 3, 2012 at 3:16 PM, Antoras <m...@antoras.de > ><mailto:m...@antoras.de>> wrote: > > > > Loading package readline-1.0.1.0 ... <command line>: can't load > > .so/.DLL for: > > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../lib/libncurses.so > > (-lncursesw: cannot open shared object file: No such file or > > directory) > > > > > >Your Linux distribution pulled a cute stunt that throws the dynamic > >loader (used for TH and ghci and a few other things) for a loop: > >libncurses.so, for backward compatibility purposes, is a GNU ld > >linker script which references libncursesw.so in a way the dynamic > >loader doesn't understand. You can work around this in one of two > >ways: > > > >1. replace /usr/lib/libncurses.so with a symlink to > >/usr/lib/libncursesw.so; OR > >2. edit /usr/lib/libncurses.so, which is a text file (linker > >script), to reference "/usr/lib/libncursesw.so" instead of > >"-lncursesw". > > > >-- > >brandon s allbery allber...@gmail.com <mailto:allber...@gmail.com> > >wandering unix systems administrator (available) (412) 475-9364 vm/sms > > > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners ------------------------------ Message: 6 Date: Tue, 3 Jul 2012 21:12:13 -0400 From: Brent Yorgey <byor...@seas.upenn.edu> Subject: Re: [Haskell-beginners] Problems with installing lambdabot To: beginners@haskell.org Message-ID: <20120704011213.ga31...@seas.upenn.edu> Content-Type: text/plain; charset=us-ascii Aha, I just found this which you may find helpful: https://github.com/DanBurton/lambdabot-remedies -Brent On Tue, Jul 03, 2012 at 08:51:33PM -0400, Brent Yorgey wrote: > This is what I mean by lambdabot being notoriously difficult to > install. If you work through this one there will probably be another, > and another... I did get it to compile once but it took quite a bit of > effort. > > You would probably be better off getting lambdabot's source from the > darcs repository (http://code.haskell.org/lambdabot/) and trying to > build that. Note that the last upload of the lambdabot package to > Hackage was in January 2011 -- no one has a particular incentive to > make sure the package stays up-to-date. > > This particular error, I think, is caused by a change in the way GHC > handles certain extensions. Apparently lambdabot has not been updated > to match. You could fix it by editing Plugin/Activity.hs and adding > > {-# LANGUAGE FlexibleInstances #-} > > to the top. > > -Brent > > On Tue, Jul 03, 2012 at 11:23:58PM +0200, Antoras wrote: > > Ok, after changing this the linker error is gone. But now I get a > > compile error close to the place the linker error previously > > occurred: > > > > > > [28 of 79] Compiling Plugin.Activity ( Plugin/Activity.hs, > > dist/build/lambdabot/lambdabot-tmp/Plugin/Activity.o ) > > [...] > > Loading package IOSpec-0.2.5 ... linking ... done. > > > > Plugin/Activity.hs:18:10: > > Illegal instance declaration for `Module > > ActivityModule ActivityState' > > (All instance types must be of the form (T a1 ... an) > > where a1 ... an are *distinct type variables*, > > and each type variable appears at most once in the instance head. > > Use -XFlexibleInstances if you want to disable this.) > > In the instance declaration for `Module ActivityModule ActivityState' > > cabal: Error: some packages failed to install: > > lambdabot-4.2.3.2 failed during the building phase. The exception was: > > ExitFailure 1 > > > > > > On 07/03/2012 09:47 PM, Brandon Allbery wrote: > > >On Tue, Jul 3, 2012 at 3:16 PM, Antoras <m...@antoras.de > > ><mailto:m...@antoras.de>> wrote: > > > > > > Loading package readline-1.0.1.0 ... <command line>: can't load > > > .so/.DLL for: > > > > > > /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../lib/libncurses.so > > > (-lncursesw: cannot open shared object file: No such file or > > > directory) > > > > > > > > >Your Linux distribution pulled a cute stunt that throws the dynamic > > >loader (used for TH and ghci and a few other things) for a loop: > > >libncurses.so, for backward compatibility purposes, is a GNU ld > > >linker script which references libncursesw.so in a way the dynamic > > >loader doesn't understand. You can work around this in one of two > > >ways: > > > > > >1. replace /usr/lib/libncurses.so with a symlink to > > >/usr/lib/libncursesw.so; OR > > >2. edit /usr/lib/libncurses.so, which is a text file (linker > > >script), to reference "/usr/lib/libncursesw.so" instead of > > >"-lncursesw". > > > > > >-- > > >brandon s allbery allber...@gmail.com <mailto:allber...@gmail.com> > > >wandering unix systems administrator (available) (412) 475-9364 vm/sms > > > > > > > > > > _______________________________________________ > > Beginners mailing list > > Beginners@haskell.org > > http://www.haskell.org/mailman/listinfo/beginners > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://www.haskell.org/mailman/listinfo/beginners ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 49, Issue 5 ****************************************