Recursion over lists
Hello everyone, I am just learning to program in Haskell, and I found recursion very interesting. However, I need to write a recursive function over two lists. The function must check the elements in the two lists and return an element that is common to both lists if there is any. Any assistance would be appreciated. Thank you. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC build failures on Mac OS X Leopard: ppc x86
Sean Leather: I tried to build GHC stable on my two computers, a PowerBook G4 and a MacBook, both running 10.5.2. This is the first time I've ever tried, so I'm somewhat clueless about a lot of it. I went with the basic instructions (./configure; make) with no 'mk/build.mk' and no configure options other than '--prefix'. [..] The MacBook build apparently completed stage1 and failed in trying to build stage2 (i.e. -o stage2/ghc-inplace). I can't help you with the PPC, but on the MacBook try building with make EXTRA_AR_ARGS=-s It's a known bug with Cabal. Manuel x86 build output ../compiler/stage1/ghc-inplace -no-user-package-conf -cpp stage2/ghc-inplace.c -o stage2/ghc-inplace ld: in /Users/leather/Projects/ghc-stable/ghc/libraries/haskell98/ dist/build/libHShaskell98-1.0.1.0.a, archive has no table of contents collect2: ld returned 1 exit status make[2]: *** [stage2/ghc-inplace] Error 1 make[1]: *** [stage2] Error 2 make: *** [bootstrap2] Error 2 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Recursion over lists
On Mon, 18 Feb 2008, TOPE KAREM wrote: Hello everyone, I am just learning to program in Haskell, and I found recursion very interesting. However, I need to write a recursive function over two lists. The function must check the elements in the two lists and return an element that is common to both lists if there is any. Any assistance would be appreciated. Imagine for a moment that instead of two lists you have a pair of lists, and thus each time you recurse you must generate a new pair of lists. After that it should be more or less business as usual if you're comfortable working on one list. -- [EMAIL PROTECTED] There is no magic bullet. There are, however, plenty of bullets that magically home in on feet when not used in exactly the right circumstances. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC build failures on Mac OS X Leopard: ppc x86
Hi, Manuel M T Chakravarty: I can't help you with the PPC, but on the MacBook try building with make EXTRA_AR_ARGS=-s It's a known bug with Cabal. Thanks, Manuel, it builds now. Afterwards, I ran 'make' in 'testsuite/tests/ghc-regress' and got this: OVERALL SUMMARY for test run started at Mon Feb 18 17:55:20 CET 2008 2084 total tests, which gave rise to 10640 test cases, of which 0 caused framework failures 2160 were skipped 7487 expected passes 372 expected failures 0 unexpected passes 621 unexpected failures That seems like a large number of unexpected failures; however, I haven't seen a summary from a build of Mac OS X on x86, so I don't know what to expect. At a glance, many of the failures refer to ghci (at least that's what I assume the (ghci) next to the name means). Here is a sample: = user001(ghci) cd ../../../libraries/unix/tests '/Users/leather/Projects/ghc-stable/ghc/compiler/stage1/ghc-inplace' -no-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin user001.hs --interactive -v0 -ignore-dot-ghci -package unix user001.genscript 1user001.interp.stdout 2user001.interp.stderr Wrong exit code (expected 0 , actual 1 ) Stdout: Stderr: *** unexpected failure for user001(ghci) Is this reasonable? In other words, is something broken? Another thing I need to tweak, perhaps? Thanks, Sean ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: a help for install
On Mon, Feb 18, 2008 at 12:46:19PM -0600, Carlos Gomez A. wrote: hi, my name is carlos I need information for correct installor what are dependencies on ghc ? I have a Debian System. I have this message error to install the ghc: Debian-System/haskell/ghc-6.8.2# ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu Canonicalised to: i386-unknown-linux checking for ghc... no checking for ghc-pkg matching ... no checking for ghc-pkg... no checking whether ghc has readline package... no checking for nhc... no checking for nhc98... no checking for hbc... no checking for ld... /usr/bin/ld configure: error: GHC is required unless bootstrapping from .hc files. Debian-System/haskell/ghc-6.8.2# As the message indicatied, you need GHC if you want to install from source. If you don't have GHC, get a binary (there is one in apt). Stefan signature.asc Description: Digital signature ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: GHC build failures on Mac OS X Leopard: ppc x86
Sean Leather: Manuel M T Chakravarty: I can't help you with the PPC, but on the MacBook try building with make EXTRA_AR_ARGS=-s It's a known bug with Cabal. Thanks, Manuel, it builds now. Afterwards, I ran 'make' in 'testsuite/tests/ghc-regress' and got this: OVERALL SUMMARY for test run started at Mon Feb 18 17:55:20 CET 2008 2084 total tests, which gave rise to 10640 test cases, of which 0 caused framework failures 2160 were skipped 7487 expected passes 372 expected failures 0 unexpected passes 621 unexpected failures That seems like a large number of unexpected failures; however, I haven't seen a summary from a build of Mac OS X on x86, so I don't know what to expect. At a glance, many of the failures refer to ghci (at least that's what I assume the (ghci) next to the name means). Here is a sample: I haven't run the full test suite on the 6.8 branch. Try make Validating=YES fast stage=2 CLEANUP=1 That should go through (sometimes when test outputs changes due to changes on the HEAD), it takes a while until the tests are adapted to expect different outputs for 6.8. Manuel ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users