Re: [Haskell-cafe] Counting beta reductions for a Haskell program...

2008-11-21 Thread damodar kulkarni
Yes Hugs has a option "+s" but it counts some sort of reductions not exactly the beta reductions. Thanks. -Damodar 2008/11/22 Adrian Neumann <[EMAIL PROTECTED]> > Hugs has, afaik, a "output reduction count" option somewhere. At least it > had one the last time I used it. > > - Adrian > > Am 22.11

Re: [Haskell-cafe] Counting beta reductions for a Haskell program...

2008-11-21 Thread Adrian Neumann
Hugs has, afaik, a "output reduction count" option somewhere. At least it had one the last time I used it. - Adrian Am 22.11.2008 um 06:22 schrieb kk08: Thanks. I heard that a Gofer compiler (a Haskell dialect) supports counting the Beta reductions. Hence I thought GHC/Hugs would have a

Re: [Haskell-cafe] Counting beta reductions for a Haskell program...

2008-11-21 Thread kk08
Thanks. I heard that a Gofer compiler (a Haskell dialect) supports counting the Beta reductions. Hence I thought GHC/Hugs would have a similar facility. Ryan Ingram wrote: > > This doesn't make a whole lot of sense. One of the reasons > GHC-compiled code is so fast is that it turns into strai

Re: [Haskell-cafe] Counting beta reductions for a Haskell program...

2008-11-21 Thread Ryan Ingram
This doesn't make a whole lot of sense. One of the reasons GHC-compiled code is so fast is that it turns into straight-line code whenever possible, via inlining, primitive optimizations, etc. I suppose there could be an option for the STG machine[1] to increment a counter on every "Enter", which

[Haskell-cafe] Counting beta reductions for a Haskell program...

2008-11-21 Thread kk08
Does GHC supports/has a command for counting total beta reductions taken by a program? Thanks. -- View this message in context: http://www.nabble.com/Counting-beta-reductions-for-a-Haskell-program...-tp20623025p20623025.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.c

Re: [Haskell-cafe] Extensible Exceptions

2008-11-21 Thread Ross Mellgren
I think catch is now basically what catchJust was -- you can just do > thing_to_try `catch` (\ (ErrorCall s) -> putStrLn s) and it will only catch ErrorCall exceptions. -Ross David F. Place wrote: Hi, All. I am trying to understand the new exceptions package in base-4 Control.Exceptions. T

[Haskell-cafe] Extensible Exceptions

2008-11-21 Thread David F. Place
Hi, All. I am trying to understand the new exceptions package in base-4 Control.Exceptions. The documentation for catchJust is the same as in Control.OldException including this example: result <- catchJust errorCalls thing_to_try handler Control.OldException provides the predicate errorCalls,

[Haskell-cafe] Do I need an account to report build of Hacakge packages?

2008-11-21 Thread Ahn, Ki Yung
I am just curious about how cabal report works. I recently figured out that there is a report command in cabal and it reports the reports generated by --build-reports option when building a package. Is this because I don't have an account on Hackage yet, or because of some other reasons? And if

[Haskell-cafe] Re: Fixity parsing, Template Haskell

2008-11-21 Thread Reiner Pope
It occurs to me that changing the Template Haskell representation to a less-information representation is disadvantageous when code has been reified for examination by a Template Haskell-using library. In that case, the library would want maximum knowledge about the fixities. Perhaps the best solu

Re: [Haskell-cafe] varargs zip

2008-11-21 Thread Dan Doel
On Friday 21 November 2008 9:40:14 am Jason Dusek wrote: > It came up on IRC last night that there is no "generic" zip in > Haskell. I decided to write one as an example, but it only > half works. > > When the argument lists are all definitely of one type, > instance selection works as ex

Re: [Haskell-cafe] varargs zip

2008-11-21 Thread Jason Dusek
Sean Leather <[EMAIL PROTECTED]> wrote: > > example = zip [1,2::Int] ['a','b'] ["1","b"] :: > > [(Int,Char,String)] > > BTW, I realized that this example also works in yours. You > weren't giving enough type annotations. Yes, exactly. Or in other words, the class definition does not correctly

[Haskell-cafe] Hackage/Cabal/Haddock question

2008-11-21 Thread Robert Greayer
How does Hackage run 'haddock' on uploaded packages? I had assumed it directly runs the cabal 'haddock' target, e.g. runhaskell Setup.hs haddock but it appears to perhaps be more complex than that. Some backrgound -- haddock doesn't seem to like quasiquotation - running haddock on a source tr

Re: [Haskell-cafe] varargs zip

2008-11-21 Thread Sean Leather
> It came up on IRC last night that there is no "generic" zip in > Haskell. I decided to write one as an example, but it only > half works. > That depends on how you define "generic." ;) EMGM [1] has a generic zipWith [2]: > zipWith :: FRep3 ZipWith f => (a -> b -> c) -> f a -> f b -> Maybe (

Re: [Haskell-cafe] varargs zip

2008-11-21 Thread Jason Dusek
That would solve the problem that solving the problem would solve, but it does not solve the problem I asked about! -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] varargs zip

2008-11-21 Thread Henning Thielemann
On Fri, 21 Nov 2008, Jason Dusek wrote: It came up on IRC last night that there is no "generic" zip in Haskell. I decided to write one as an example, but it only half works. I think that the ZipList type for Applicative functors is a solution. http://www.haskell.org/ghc/docs/latest/html/l

[Haskell-cafe] varargs zip

2008-11-21 Thread Jason Dusek
It came up on IRC last night that there is no "generic" zip in Haskell. I decided to write one as an example, but it only half works. When the argument lists are all definitely of one type, instance selection works as expected; however, with numeric types, for example, things don't wor

[Haskell-cafe] Fixity parsing, Template Haskell

2008-11-21 Thread Reiner Pope
This post follows on from a discussion about a month ago, called "Haskell Syntax Inside Quasiquote". To summarise, suppose I want to create a Haskell quasiquoter for lists, eg [$list|1,x^2,y,3|] (representing the list [1,x^2,y,3]) Ideally, this would allow arbitrary Haskell expressions for

[Haskell-cafe] Re: Begginer question about alignment in Storable

2008-11-21 Thread Mauricio
Thanks! This is actually a really nice tutorial! Do you mind if I try to find a place for it in the wiki? Go right ahead (...) For reference: http://haskell.org/haskellwiki/FFI_cook_book Best, MaurĂ­cio ___ Haskell-Cafe mailing list Haskell-Cafe@ha

RE: [Haskell-cafe] System Fc in GHC

2008-11-21 Thread Simon Peyton-Jones
Yes, Fc is the intermediate language. The data type is in compiler/coreSyn/CoreSyn.lhs. The Commentary give a lot more context (albeit not Fc-specific). http://hackage.haskell.org/trac/ghc/wiki/Commentary Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hugo Pacheco Sent:

[Haskell-cafe] System Fc in GHC

2008-11-21 Thread Hugo Pacheco
Since System Fc is implemented in the latest releases of GHC, is it implemented in Haskell so that I can play with the translator? Can I find it in the ghc sources? Thanks, hugo -- www.di.uminho.pt/~hpacheco ___ Haskell-Cafe mailing list Haskell-Cafe@h

RE: [Haskell-cafe] Possible issue with Hoogle and Haddock?

2008-11-21 Thread Mitchell, Neil
> > I was noticing recently that there seems to be a problem > with Hoogle > > and Haddock. In particular, I just hoogled "bracket" and got the > > following result: > > bracket :: IO a -> a -> IO b -> a -> IO c -> IO c > Clearly this is the > > wrong type, as it should be > > brack