Difference between optimized and non-optimized version

2010-09-01 Thread Mitar
g 6.12.3 on Linux x86_64. Best regards Mitar Test.hs Description: Binary data ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Type Families and defaults

2010-09-05 Thread Mitar
regards Mitar Test.hs Description: Binary data Test2.hs Description: Binary data ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: SIGALRM, SIGVTALRM, and third party libraries

2010-09-07 Thread Mitar
t affects the Haskell > world. Hm, write a patch for mysql libs then and send it upstream? Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Type Families and defaults

2010-09-07 Thread Mitar
hard either.  Has anyone else been > bitten by this? It would be great if it would be added. Obviously I am for it. ;-) I think n should be scoped for the whole the class definition, everywhere, not just parameter and return values types. If somebody would define the same name f

Re: Type Families and defaults

2010-09-08 Thread Mitar
ng some basic understanding. > But it'd be worth reading > http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/other-type-extensions.html#scoped-type-variables I had. Thanks. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskel

Non-exhaustive pattern match(es) warning in lambda functions

2010-09-20 Thread Mitar
t; return () -- No pattern match(es) are non-exhaustive, BAD I think it would be quite useful to also catch such situations and issue a warning. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman

Rigid types fun

2010-11-05 Thread Mitar
t move that into the function? I am using GHC 6.12.3. Is this something which will work in 7.0? Mitar Test.hs Description: Binary data ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/g

Re: Rigid types fun

2010-11-05 Thread Mitar
ot;Nerve (Axon a) (AxonAny b)" as a result. If I would call it like "create (AxonAny undefined) (AxonAny undefined)" I would get "Nerve (AxonAny a) (AxonAny b)" as a result. And so on. So I know I can move some hard-coded combination into a function.

Re: Rigid types fun

2010-11-05 Thread Mitar
Hi! On Fri, Nov 5, 2010 at 12:50 PM, Alexey Khudyakov wrote: > I'm not sure what do you exactly want. But what about applicative functors? > They offer nice notation > >> Nerve <$> (Axon <$> newChan) <*> (AxonAny &l

Re: Re[2]: Rigid types fun

2010-11-05 Thread Mitar
skell printf implementation afaik While reading the source code I found that in loadstring you do not make sure that free is called even in a case of an exception. Is this not necessary? Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Printing of asynchronous exceptions to stderr

2010-11-09 Thread Mitar
posed of? Because it can be reused by some other computation? But then my exceptions could be delivered to wrong (new) thread while they were meant for old one? Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
. > It would help if you could show us your code (or parts of it). I hope the code above should satisfy. If not I will make some real example. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
; it outputs: Test.hs: MyTerminateException MVar was successfully taken With "throwIO ThreadKilled" is as expected, just: MVar was successfully taken So MVar is filled. What means that thread gets exception after that. But there is nothing after that. ;-) (At least nothing visible.) Mi

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-10 Thread Mitar
tter than my "hanging threads at the end". And with my throwIO approach I just override MyTerminateException with ThreadKilled. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-11 Thread Mitar
d with maskUninterruptibleExcept function Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-17 Thread Mitar
u want it to warn you when you add additional constructor do Foo data type. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Non-exhaustive pattern match(es) warning in lambda functions

2010-11-18 Thread Mitar
nice solution. But this is a form of closed world assumption. When you write _ as a case you in fact use this assumption. But when you later on extend the "world" with some new case, this assumption could not really hold anymore. Mitar _

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-18 Thread Mitar
why I argue for some way of being able to specify which interrupts you still allow: like mask everything except... (user interrupts, my special exception meant for cleanup code hanging conditions...). Mitar ___ Glasgow-haskell-users mailing li

Eq instance for Chan

2010-11-24 Thread Mitar
already have a consumer and then duplicating it if another (and every additional) consumer would be added. But without Eq it is not possible to check if there is Chan already in a list (and I hope Eq would compare just Chan and not its content). Is there some other way to achieve this? Mitar

Re: Eq instance for Chan

2010-11-25 Thread Mitar
Hi! On Thu, Nov 25, 2010 at 1:05 PM, Simon Marlow wrote: > It's just an oversight.  Send us a patch, or make a ticket for it? Done: http://hackage.haskell.org/trac/ghc/ticket/4526 Mitar ___ Glasgow-haskell-users mailing list Glasgow-haske

Re: [Haskell-cafe] Re: Eq instance for Chan

2010-11-25 Thread Mitar
and send a proposal to the libraries list. I just have. I attached your patch to the ticket. Thanks. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-30 Thread Mitar
ly in my cleanup code I do not really care about new exceptions being ignored. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-12-07 Thread Mitar
sk_ $ a `catches` [ Handler (\(e :: AsyncException) -> case e of UserInterrupt -> throw e ; _ -> uninterruptible a), Handler (\(_ :: SomeException) -> uninterruptible a) ] Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-12-16 Thread Mitar
readId values are passed around, as capability tokens for throwing an exception) and inform/warn you about which exceptions can be thrown in which code segments. And you could specify which exceptions you predict/allow and if there would be a mismatch you would

MVar/Chan Ord instance

2011-01-05 Thread Mitar
this? Is there a way to get MVar internal references somehow (so that what sameMVar# is using)? Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

openFd under -threaded gets interrupted

2009-12-18 Thread Mitar
nd in my case, I would like to make a stand-alone Haskell program. So if it is similar to that bug then maybe it is a bug in Linux kernel. So please help me solve this problem. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@has

Re: openFd under -threaded gets interrupted

2009-12-18 Thread Mitar
RTS is using internally? Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Where did the GHC API go?

2009-12-28 Thread Mitar
t to 404 errors nowadays while trying to access documentation. Mitar ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users