Re: ghci value printing
On 4/27/07, Frederik Eaton [EMAIL PROTECTED] wrote: Hello, It seems the printing behaviour of ghci has changed recently? $ ghci --version The Glorious Glasgow Haskell Compilation System, version 6.4.2 $ ghci ... return 5 --(a0) x - return 5 --(b0) Leaving GHCi. $ ghci --version The Glorious Glasgow Haskell Compilation System, version 6.6.20070420 $ ghci ... return 5 --(a1) 5 x - return 5 --(b1) 5 Leaving GHCi. I like the new printing behaviour for (a1), but not for (b1). How do I bind a variable to the result of an IO action without printing that variable? Sometimes the variable is so large that 'show' runs out of memory. Perhaps I should fix my code so this doesn't happen but I think it would also be nice to go back to behaviour (b0) where values assigned to variables are not printed... http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html#ghci-stmts -- Cheers, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: your mail
On 12/19/06, mm [EMAIL PROTECTED] wrote: My original intentention was to report a bug with ghci. GHCi prints its welcome message to stdout instead of stderr. This makes it hard to use it in scripts :) Disable it with -v0? -- Cheers, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: BUG in HAskell! Help! Bad interface file: IO.hi
On 12/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \/\/ /_/\/|_| Type :? for help. Loading package base ... linking ... done. interactive:1:84: Bad interface file: IO.hi IO.hi: openBinaryFile: does not exist (No such file or directory) ghc-6.6: panic! (the 'impossible' happened) (GHC version 6.6 for i386-unknown-solaris2): interactiveUI:flush Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug z03-uname -a SunOS z03 5.10 Generic_118855-19 i86pc i386 i86pc z03-cat/etc/motd bash: cat/etc/motd: No such file or directory z03-gcc -v Using built-in specs. Target: i386-pc-solaris2.10 Configured with: ../gcc-4.0.3/configure --prefix=/usr/local/lang -program-suffix=_4.0.3 --enable-64bit --with-gnu-as --with-as=/usr/local/bin/gnu-as --with-ld=/usr/ccs/bin/ld --enable-version-specific-runtime-libs --enable-languages=c : (reconfigured) ../gcc-4.0.3/configure --prefix=/usr/local/lang -program-suffix=_4.0.3 --enable-64bit --with-gnu-as --with-as=/usr/local/bin/gnu-as --with-ld=/usr/ccs/bin/ld --enable-version-specific-runtime-libs --enable-languages=c,c++ Thread model: posix gcc version 4.0.3 How did you install GHC? -- Cheers, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: smart relinking bug
On 10/21/06, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Simon, ghc 6.6 includes smart relinking capability which don't relink exe file if it already exists and .hs source files was not changed. that's great but ignores other .o files that can be also linked to program, for example those that was compiled from C sources: gcc -c -o a.o a.c ghc --make Main.hs a.o this command incorrectly don't relinks executable if a.c was changed but Main.hs wasn't Did you mean a.o instead of a.c? -- Cheers, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: Cabal on OS X; ghc segfault?
On 7/22/05, Gregory Wright [EMAIL PROTECTED] wrote: Hi, I'm trying to get caballized package deployment working on Mac OS X. However, trying to build a package using runhaskell results in: crossroads-able runhaskell Setup.hs configure Warning: No license-file field. Configuring harp-0.2... configure: searching for ghc in path. configure: found ghc at /opt/local/bin/ghc runhaskell: waitForProcess: interrupted (Interrupted system call) This was trying to build the harp module in the haskell-src-exts package (a prerequisite for hs-plugins). hs-plugins depends on haskell-src-exts, not harp. -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-pkg issue
On 6/26/05, Frederik Eaton [EMAIL PROTECTED] wrote: This is kind of annoying: $ ghc-pkg --version GHC package manager version 6.4 $ ghc-pkg unregister WASHHTML ghc-pkg: package WASHHTML matches multiple packages: WASHHTML, WASHHTML-0.14.8 $ ghc-pkg describe WASHHTML ghc-pkg: package WASHHTML matches multiple packages: WASHHTML, WASHHTML-0.14.8 $ ghc-pkg describe WASHHTML- ghc-pkg: cannot parse 'WASHHTML-' as a package identifier $ ghc-pkg describe WASHHTML-. ghc-pkg: cannot parse 'WASHHTML-.' as a package identifier $ ghc-pkg describe WASHHTML\* ghc-pkg: cannot parse 'WASHHTML*' as a package identifier How about? $ ghc-pkg describe WASHHTML-1.14.8 Fixed by editing package.conf by hand. By the way, doing that would be a little easier if package.conf contained newlines! Frederik -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: signal handling weirdness
On 4/17/05, Volker Wysk [EMAIL PROTECTED] wrote: Hello. I'm trying to install a handler for the TERM signal: import System.Posix.Signals import System.Posix.Unistd import Monad main = do installHandler sigTERM handler Nothing sequence (repeat (putStrLn bla sleep 5)) return () handler = Catch (putStrLn caught SIGTERM) -- handler = Ignore When you type ^C, the current pause gets cut short, but the program continues to output bla. It then terminates after another three to five bla's. Installing a signal handler has no effect at all, regardless of whether it's Ignore or Catch (...). /tmp $ ghc -o sig sig.hs -package posix /tmp $ ./sig bla bla bla bla bla sig: interrupted I'm using GHC 6.4 on Debian Linux. From sleep(3): sleep() makes the current process sleep until 'seconds' seconds have elapsed or a signal arrives which is not ignored. So 'sleep' returns when a signal arrives and C-c emits an interrupt signal (sigINT) and not a termination signal (sigTERM), which is why the pause gets cut short. You may wanna use Control.Concurrent.threadDelay instead of sleep. -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: loop performance bug
We can make it a little faster by not doing bound checks: test4 :: IO () test4 = do (arr :: IOUArray Int Bool) - newArray_ (0,100*100-1) doFromTo 0 $ \_ - doFromTo 0 99 $ \y - doFromTo 0 99 $ \x - unsafeWrite arr (x*(y+1)) False Timings (compiled with -O2): test1: 12.6s test2: 8.5s test3: 1.9s test4: 1.3s -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: loop performance bug
On Tue, 15 Mar 2005 02:06:06 +0100, Lemmih [EMAIL PROTECTED] wrote: We can make it a little faster by not doing bound checks: test4 :: IO () test4 = do (arr :: IOUArray Int Bool) - newArray_ (0,100*100-1) doFromTo 0 $ \_ - doFromTo 0 99 $ \y - doFromTo 0 99 $ \x - unsafeWrite arr (x*(y+1)) False Timings (compiled with -O2): test1: 12.6s test2: 8.5s test3: 1.9s test4: 1.3s A small update making the test more fair: test5 :: IO () test5 = do (arr :: IOUArray Int Int) - newArray_ (0,100*100-1) doFromTo 0 $ \_ - doFromTo 0 99 $ \y - doFromTo 0 99 $ \x - unsafeWrite arr (x*(y+1)) 0 I previously though that Bools were optimized away, guess I was wrong. test5: 0.8s -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main when using --make
On Tue, 11 Jan 2005 21:19:49 +0100, Volker Wysk [EMAIL PROTECTED] wrote: Hello I'm trying to ghc --make -package hsshellscript Main.hs and get this: Chasing modules from: Main.hs Compiling Main ( Main.hs, Main.o ) Linking ... ghc-6.2.2: unknown package name: Main The program is this: import HsShellScript main = putStrLn hello The error only occurs with -package hsshellscript, which is a library of mine, in conjunction with --make. From the GHC users guide: To compile a module which is to be part of a new package, use the -package-name option: -package-name foo This option is added to the command line when compiling a module that is destined to be part of package foo. If this flag is omitted then the default package Main is assumed. It sounds like you forgot that flag when you compiled hsshellscript. -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc.exe: panic! (the `impossible' happened, GHC version 6.3): urk
Greetings, I encountered the same problem and tracked it to ghc/compiler/simplCore/Simplify.lhs, line 1504: ... coreRefineTys tvs' (error urk) ... and ghc/compiler/types/Unify.lhs, line 209: ... coreRefineTys ex_tvs subst@(TvSubst in_scope orig_env) ... which performs a strict pattern match on its second argument. On Wed, 29 Dec 2004 05:05:06 -0800, Satnam Singh [EMAIL PROTECTED] wrote: I was trying to build GHC 6.3 for Windows and got the following error: elapsed) :ghc (cd Text/ParserCombinators/Parsec/Language_split /c/MinGW/bin/ld -r -x -o ../ Language.o *.o); rm -f Text/ParserCombinators/Parsec/Perm.o; if [ ! -d Text/ParserCombinators/Par sec/Perm_split ]; then mkdir Text/ParserCombinators/Parsec/Perm_split; else /usr /bin/find Text/ParserCombinators/Parsec/Perm_split -name '*.o' -print | xargs rm -f __rm_food; fi; ../../ghc/compiler/ghc-inplace -H16m -O -fglasgow-exts -ignore-package parsec -O -Rghc-timing -package base -split-objs-c Text/ParserCombinators/Parsec/Per m.hs -o Text/ParserCombinators/Parsec/Perm.o -ohi Text/ParserCombinators/Parsec /Perm.hi ghc.exe: panic! (the `impossible' happened, GHC version 6.3): urk Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, or http://sourceforge.net/projects/ghc/. ghc: 29176908 bytes, 7 GCs, 1359038/262 avg/max bytes residency (2 samples ), 16M in use, 0.01 INIT (0.00 elapsed), 0.13 MUT (0.14 elapsed), 0.05 GC (0.05 elapsed) :ghc make[2]: *** [Text/ParserCombinators/Parsec/Perm.o] Error 1 make[1]: *** [all] Error 1 make[1]: Leaving directory `/c/src/ghc/fptools/libraries' make: *** [build] Error 1 satnams-thinkpad Which asked me to report this as a compiler bug. Cheers, Satnam Satnam Singh Microsoft One Microsoft Way Redmond Washington 98052-6399 USA Email: [EMAIL PROTECTED] Telephone: +1 425 705 8208 Cell: +1 408 718 2588 Pager: [EMAIL PROTECTED] eFax: +1 815 550 4055 ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs -- Friendly, Lemmih ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs