Re: [Haskell-cafe] Cabal && license combinations

2011-02-09 Thread Vivian McPhail
> > It seems then that a package should be the least restrictive > > combination of all the licenses in all the contained modules. > > Omit the words "least restrictive" and I think you are correct. > > To combine licences, just aggregate them. There is no lattice of > subsumption; no "more" or "l

[Haskell-cafe] Haskell Weekly News: Issue 168 - February 09, 2011

2011-02-09 Thread Daniel Santa Cruz
Welcome to issue 168 of the HWN, a newsletter covering developments in the [1]Haskell community. This release covers the week of January 30 to February 5, 2011. Announcements Maciej Piechotka [2]announced version 0.1.1 of nanoparsec. "Nanoparsec is currently simply a port of attopa

[Haskell-cafe] [Cabal-devel] Cabal && license combinations

2011-02-09 Thread Dan Knapp
I haven't heard anyone mention this yet, and it's a biggie, so I guess I'd better de-lurk and explain it. The issue is this: There is a legal distinction between static and dynamic linking, or at least some licenses (the GPL is the one I'm aware of) believe that there is. In particular, they a

[Haskell-cafe] Haskell Summers of Code retrospective (updated for 2010)

2011-02-09 Thread Gwern Branwen
2 years ago in February 2009, I wrote up a history of Summers of Code through 2008 (http://www.haskell.org/pipermail/haskell-cafe/2009-February/055489.html). But the Wheel turns, and years come and pass, leaving memories that fade into 404s; a wind rose in Mountain View, whispering of the coming S

Re: [Haskell-cafe] Where is "All about monads"?

2011-02-09 Thread Henk-Jan van Tuyl
On Wed, 09 Feb 2011 09:21:49 +0100, Magicloud Magiclouds wrote: Hi, Just noticed that the link was deprecated. Googling shows that this thing does not exist on haskell.org any more? This is one of the things that weren't transferred to the new server; I have a backup on my disk. If you

[Haskell-cafe] coding a queue with reactive

2011-02-09 Thread sam . roberts . 1983
Hi all, I hope someone is interested in helping me out with the reactive library. I am trying to implement a function "queue" in reactive: queue :: Double -> Event a -> Event a This is a simple queue: events from the event stream coming into the queue, queue up waiting to be processed one by on

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Bas van Dijk
On 9 February 2011 19:33, Alexey Khudyakov wrote: > On 09.02.2011 20:57, Chris Smith wrote: >> >> On Wed, 2011-02-09 at 18:15 +0100, Cristiano Paris wrote: >>> >>> I've a type problem that I cannot solve and, before I keep banging my >>> head against an unbreakable wall, I'd like to discuss it wit

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Alexey Khudyakov
On 09.02.2011 23:16, Cristiano Paris wrote: On Wed, Feb 9, 2011 at 19:33, Alexey Khudyakov wrote: ... If Private is not exported one cannot add instances to PRead. Nice trick. I would have thought of hiding the classes PRead and PWrite but I'm not sure if it could break the code. It shouldn

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Cristiano Paris
On Wed, Feb 9, 2011 at 20:14, Alexey Khudyakov wrote: > ... >> instance            PRead (WRead ::: b) >> instance PRead b => PRead (a ::: b) > >> instance             PWrite (WWrite ::: b) >> instance PWrite b => PWrite (a ::: b) Brilliant! I was thinking to something like this but as a replacem

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Cristiano Paris
On Wed, Feb 9, 2011 at 20:14, Alexey Khudyakov wrote: > ... > My solution is based on heterogenous lists and require number of > language extensions. I'd recomend to read paper "Strongly typed > heterogeneous collections"[1] which describe this technique in detail Curious: I read the paper just b

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Cristiano Paris
On Wed, Feb 9, 2011 at 19:33, Alexey Khudyakov wrote: > ... > If Private is not exported one cannot add instances to PRead. Nice trick. I would have thought of hiding the classes PRead and PWrite but I'm not sure if it could break the code. Thank you! -- Cristiano GPG Key: 4096R/C17E53C6 2010

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Alexey Khudyakov
On 09.02.2011 20:15, Cristiano Paris wrote: Now the problem. I would like to enforce permissions not at the role level, but at the permissions level. Let's say that I want to leave "unseal" unchanged, I'd like to "construct" a p-value for unseal "combining" functions checking for single permissi

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Alexey Khudyakov
On 09.02.2011 20:57, Chris Smith wrote: On Wed, 2011-02-09 at 18:15 +0100, Cristiano Paris wrote: I've a type problem that I cannot solve and, before I keep banging my head against an unbreakable wall, I'd like to discuss it with the list. If I'm understanding your high-level goals correctly,

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Chris Smith
On Wed, 2011-02-09 at 18:15 +0100, Cristiano Paris wrote: > I've a type problem that I cannot solve and, before I keep banging my > head against an unbreakable wall, I'd like to discuss it with the > list. If I'm understanding your high-level goals correctly, then you're going about things the wro

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Cristiano Paris
On Wed, Feb 9, 2011 at 18:43, Steffen Schuldenzucker wrote: > ... let good = appendLog "Foo" "Bar" :: Sealed Admin String unseal (undefined :: Admin) good > "FooBar" That's true, but putting apart the problem I posed, in my construction I wouldn't expose unseal directly nor the Sealed c

Re: [Haskell-cafe] Synthetic values?

2011-02-09 Thread Steffen Schuldenzucker
In ghci I get >>> let evil = appendLog "Foo" "Bar" :1:11: Ambiguous type variable `p' in the constraints: `PRead p' arising from a use of `appendLog' at :1:11-31 `PWrite p' arising from a use of `appendLog' at :1:11-31 Probable fix: add a type signature that f

Re: [Haskell-cafe] forkIO on GHCI does not seem to spawn the thread in the background on some OSs

2011-02-09 Thread David Leimbach
> > It is not always a thread. ForkIO creates a spark and then the > > scheduler decides when sparks should be scheduled to threads. Thus > > you get a guarantee of concurrent but not parallel execution. > > That is not correct - it is "par" that creates sparks may be discarded. > I guess I s

[Haskell-cafe] Synthetic values?

2011-02-09 Thread Cristiano Paris
Hi all, I've a type problem that I cannot solve and, before I keep banging my head against an unbreakable wall, I'd like to discuss it with the list. Consider the following code: module Main where class PRead p where {} class PWrite p where {} newtype Sealed p a = Sealed a instan

[Haskell-cafe] haskell prop. logic

2011-02-09 Thread Patrick M
Hello all I'm working on a project and I'm down to my last 3 functions.I need some help(in any form) with them as I'm a beginner in haskell.I tried to create a description on how the functions should behave below ,if you still have some questions don't hesitate to ask. Also here is the code for

Re: [Haskell-cafe] Possible bug in Control.Concurrent

2011-02-09 Thread Holger Reinhardt
You've been bitten by the following bug: http://hackage.haskell.org/trac/ghc/ticket/4154 In short, isEmptyChan will block because of the concurrent call to readChan. The "solution" is to not use isEmptyChan or switch to STM. 2011/2/9 Krzysztof Skrzętnicki > Hello Cafe, > > Here is a simple pro

Re: [Haskell-cafe] Possible bug in Control.Concurrent

2011-02-09 Thread Neil Brown
On 09/02/11 15:34, Krzysztof Skrzętnicki wrote: Hello Cafe, Here is a simple program that yields strange results: module Main where import Control.Concurrent import Control.Concurrent.Chan import Control.Monad main = do c <- newChan writeChan c 1 forkIO $ forever $ do i <- readChan c

Re: [Haskell-cafe] Possible bug in Control.Concurrent

2011-02-09 Thread Krzysztof Skrzętnicki
Shame on me, I forgot to include the software versions I use: $ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 $ uname -a Linux raptor 2.6.37-ARCH #1 SMP PREEMPT Sat Jan 29 20:00:33 CET 2011 x86_64 Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz GenuineIntel GNU/Linux This

[Haskell-cafe] Possible bug in Control.Concurrent

2011-02-09 Thread Krzysztof Skrzętnicki
Hello Cafe, Here is a simple program that yields strange results: module Main where import Control.Concurrent import Control.Concurrent.Chan import Control.Monad main = do c <- newChan writeChan c 1 forkIO $ forever $ do i <- readChan c print ("forkio",i) isEmptyChan c >>= print First

Re: [Haskell-cafe] forkIO on GHCI does not seem to spawn the thread in the background on some OSs

2011-02-09 Thread David Leimbach
On Tuesday, February 8, 2011, C K Kashyap wrote: > > I can't reproduce this. What are you using as the action? > > I've tried bottoms, and tight loops whose Core contains no allocations, and > not > managed to lock up the prompt, or seen ghci using more threads than I have > cores. > > One thing

[Haskell-cafe] ANN: monad-control-0.2 & a challenge

2011-02-09 Thread Bas van Dijk
Dear all, I just released control-monad-0.2 a library for lifting control operations, like exception catching, through monad transformers: http://hackage.haskell.org/package/monad-control-0.2 darcs get http://bifunctor.homelinux.net/~bas/monad-control/ To quote the NEWS file: * Use RunInBase i

[Haskell-cafe] Problems with (projects|community).haskell.org

2011-02-09 Thread Erik de Castro Lopo
Hi all, Still a couple of problems with these servers. Firstly, community.haskell.org shows the default Apache "It works" page. It would be nice to have something better there. Secondly the mailman web interface on projects.haskell.org [0] is giving a Service Temporarily Unavailable message (and

Re: [Haskell-cafe] Split function

2011-02-09 Thread Anton Kholomiov
There is a 'spit' library on hackage. Maybe you are looking for this http://hackage.haskell.org/package/split ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Where is "All about monads"?

2011-02-09 Thread Magicloud Magiclouds
Hi, Just noticed that the link was deprecated. Googling shows that this thing does not exist on haskell.org any more? -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe