Here's an idea that (I think) is useful and backwards compatible:
fractional and negative fixity.
There have been 3 separate times where I've wanted an operator just
above 0 ($) but less than 1 (>>= or >>>), or else just below 0 (like a
superlow $$)
infix 0.5 ???
infix -1 $$
The only cha
Hi,
You probably want to read up on:
Monomorphism restriction (I don't think this applies here, but I'm
never too sure!):
http://www.haskell.org/hawiki/MonomorphismRestriction
Defaulting:
http://www.haskell.org/onlinereport/decls.html#sect4.3.4
I don't understand either to any great degree,
Donald Bruce Stewart wrote:
>
>
>
> Hmm, are you missing a -O ? Does that help at all?
>
> -- Don
>
>
>
Adding the -O does not stop the memory leak problem. As for the profiler,
it does make the CAF:main function show more erratic memory spikes, however
no memory ramping is revealed eve
Hello alaiyeshi,
Friday, November 3, 2006, 4:23:40 PM, you wrote:
> But I guess in this problem the first input line and the other are
> different in their meaning. Thus if I use interact I should "parse" the
> input(again), I guess.
it seems that you don't understand that functional programmin
"Chad Scherrer" <[EMAIL PROTECTED]> wrote:
> > afaik, seq cost is zero (except for evaluating expressions, of
> > course)
>
> So if x has already been evaluated, does x `seq` y evaluate just as
> quickly as y alone, or does it require extra cycles to make sure x has
> been evaluated?
My understa
On 11/2/06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
Hello Chad,
Thursday, November 2, 2006, 8:49:17 PM, you [Chad] wrote:
> Would it be possible for the type system to distinguish at compile
> time whether something would need to be evaluated, and optimize away
> redundant `seq`s? Maybe this
Wow! Thank you for your suggestion.
But I guess in this problem the first input line and the other are different in
their meaning. Thus if I use interact I should "parse" the input(again), I
guess.___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Henning Thielemann wrote:
On Thu, 2 Nov 2006, Sebastian Sylvan wrote:
On 11/2/06, Maurício <[EMAIL PROTECTED]> wrote:
Hi,
Is there a function to get that? I'm using
\x -> x - fromIntegral(floor x)
since I was not able to find something better, but I guess I have missed
something in t
On 11/3/06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
Hello Slavomir,
Thursday, November 2, 2006, 9:59:38 PM, you wrote:
>> one is okay, though, but you have to start ghc with
>> -fallow-undecidable-instances and -fglasgow-exts I'm afraid.
> Thanks, Sebastian. That was helpful. Are there any
Hello Donald,
Thursday, November 2, 2006, 2:21:31 PM, you wrote:
>> 10-20 times difference is typical for GHC programs.
> It's really more like 2-4x. Sometimes better than C.
> Where's this huge figure coming from Bulat? If you have code that
> behaves like this, you should report it.
are you
Hello alaiyeshi,
Thursday, November 2, 2006, 9:26:37 PM, you wrote:
> I've met replicateM_ for the first time;-) This could be a
> "template" for doing online-judge exercises I guess. And it's very useful for
> newbies like me.
make an date for 'interact' :)))
--
Best regards,
Bulat
Hello Slavomir,
Thursday, November 2, 2006, 5:47:37 PM, you wrote:
> class Show a => Visible a where
> toString :: a -> String
> toString = show
> size :: a -> Int
> size = length . show
it's not that you need. it's definition of subclass, say
class Set a => OrderedSet a
--
B
Hello Slavomir,
Thursday, November 2, 2006, 9:59:38 PM, you wrote:
>> one is okay, though, but you have to start ghc with
>> -fallow-undecidable-instances and -fglasgow-exts I'm afraid.
> Thanks, Sebastian. That was helpful. Are there any papers on the subject?
i recommend you to read in the fo
On Thu, 2 Nov 2006, Sebastian Sylvan wrote:
> On 11/2/06, Maurício <[EMAIL PROTECTED]> wrote:
> >Hi,
> >
> >Is there a function to get that? I'm using
> >
> > \x -> x - fromIntegral(floor x)
> >
> > since I was not able to find something better, but I guess I have missed
> > something
Hello Slavomir,
Thursday, November 2, 2006, 5:51:17 PM, you wrote:
> I wouldn't like to manually define instances of Visible for all types
> that have Show instances.
believe it or not but i had the same problems
> I think I need something like that:
> class Visible a where
> instance Show a =
Hello Chad,
Thursday, November 2, 2006, 8:49:17 PM, you wrote:
> Would it be possible for the type system to distinguish at compile
> time whether something would need to be evaluated, and optimize away
> redundant `seq`s? Maybe this is what the strictness analyzer does
> already.
afaik, seq cost
Steve Schafer wrote:
> I have a list of text strings:
>
> ["Alice", "Bob", "Cindy", "Bob", "Bob", "Dave", "Cindy"]
>
> As you can see, some of the strings occur only once; others appear two
> or more times.
>
> I would like to end up with a new list, according to the following
> rules:
>
> 1)
17 matches
Mail list logo