[Haskell-cafe] Splitting Hackage Packages and re-exporting entire modules (with same module name)
All, I have decided it would be beneficial to split System.Crypto.Random and the rest of crypto-api into different packages. Is there I way I can create a package, "entropy", with System.Crypto.Random but continue to expose that module from crypto-api (allowing people who use that module some time to move)? If so, how? If not, does anyone else see value in this and how it can be added to the infrastructure? Cheers, Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Implementors Workshop 2011, Second CFT
Call for Talks ACM SIGPLAN Haskell Implementors' Workshop http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2011 Tokyo, Japan, September 23rd, 2011 The workshop will be held in conjunction with ICFP 2011 http://www.icfpconference.org/icfp2011/ Important dates Proposal Deadline: 22nd July 2011 Notification:8th August2011 Workshop: 23rd September 2011 The Haskell Implementors' Workshop is to be held alongside ICFP 2011 this year in Tokyo, Japan. There will be no proceedings; it is an informal gathering of people involved in the design and development of Haskell implementations, tools, libraries, and supporting infrastructure. This relatively new workshop reflects the growth of the user community: there is a clear need for a well-supported tool chain for the development, distribution, deployment, and configuration of Haskell software. The aim is for this workshop to give the people involved with building the infrastructure behind this ecosystem an opportunity to bat around ideas, share experiences, and ask for feedback from fellow experts. We intend the workshop to have an informal and interactive feel, with a flexible timetable and plenty of room for ad-hoc discussion, demos, and impromptu short talks. Scope and target audience - It is important to distinguish the Haskell Implementors' Workshop from the Haskell Symposium which is also co-located with ICFP 2011. The Haskell Symposium is for the publication of Haskell-related research. In contrast, the Haskell Implementors' Workshop will have no proceedings -- although we will aim to make talk videos, slides and presented data available with the consent of the speakers. In the Haskell Implementors' Workshop we hope to study the underlying technology. We want to bring together anyone interested in the nitty gritty details necessary to turn a text file into a deployed product. Having said that, members of the wider Haskell community are more than welcome to attend the workshop -- we need your feedback to keep the Haskell ecosystem thriving. The scope covers any of the following topics. There may be some topics that people feel we've missed, so by all means submit a proposal even if it doesn't fit exactly into one of these buckets: * Compilation techniques * Language features and extensions * Type system implementation * Concurrency and parallelism: language design and implementation * Performance, optimisation and benchmarking * Virtual machines and run-time systems * Libraries and Tools for development or deployment Talks - At this stage we would like to invite proposals from potential speakers for a relatively short talk. We are aiming for 20 min talks with 10 mins for questions and changeovers. We want to hear from people writing compilers, tools, or libraries, people with cool ideas for directions in which we should take the platform, proposals for new features to be implemented, and half-baked crazy ideas. Please submit a talk title and abstract of no more than 200 words to b...@cse.unsw.edu.au We will also have a lightning talks session which will be organised on the day. These talks will be 2-10 minutes, depending on available time. Suggested topics for lightning talks are to present a single idea, a work-in-progress project, a problem to intrigue and perplex Haskell implementors, or simply to ask for feedback and collaborators. Organisers -- * Rebekah Leslie (Portland State University) * Ben Lippmeier - co-chair (University of New South Wales) * Andres Loeh (Well-Typed LLP) * Oleg Lobachev(University of Marburg) * Neil Mitchell - co-chair (Standard Chartered) * Dimitrios Vytiniotis (Microsoft Research) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] NVIDIA's CUDA and Haskell
There's a lot of active work: Direct access to CUDA: http://hackage.haskell.org/package/cuda CUDA in Haskell: http://hackage.haskell.org/package/language-c-quote Direct access to OpenCL: http://hackage.haskell.org/package/OpenCLRaw High-level pure data parallelism targetting your GPU: http://hackage.haskell.org/package/accelerate On Mon, Jul 4, 2011 at 8:09 PM, Vasili I. Galchin wrote: > Hi, > > NVIDIA's CUDA library seems to be really hot in the massively parallel > world: http://www.nvidia.com/object/cuda_home_new.html. I realize that given > CUDA seems to be implemented in an extension of ANSI C that it is pervaded > by statefulness. However, is there any effort to build "a bridge" between > Haskell and CUDA, foreign language bindings or maybe better yet a monad to > encapsulate state?? > > Kind regards, > > Vasili > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] NVIDIA's CUDA and Haskell
Hi, NVIDIA's CUDA library seems to be really hot in the massively parallel world: http://www.nvidia.com/object/cuda_home_new.html. I realize that given CUDA seems to be implemented in an extension of ANSI C that it is pervaded by statefulness. However, is there any effort to build "a bridge" between Haskell and CUDA, foreign language bindings or maybe better yet a monad to encapsulate state?? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
> From: Logo Logo > > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causing this error other > than reviewing the code manually? > I'd like to point out that a stack-space overflow in Haskell isn't quite the same thing as in other functional languages. In particular, it's possible for tail-recursive functions to overflow the stack because of laziness. Consider this tail-recursive sum function: > trSum :: [Int] -> Int > trSum l = go 0 l > where > go acc [] = acc > go acc (x:xs) = go (acc+x) xs It's tail-recursive. But if you enter this in ghci and run it, you'll find that it uses increasing stack space, and will likely cause a stack overflow for large enough inputs. The problem is that the accumulator 'acc' isn't strict and builds up a thunk of the form: 0+n1+n2+...+nn The solution is to add strictness. For this example, a '!' on the accumulator will do. GHC will sometimes spot cases where extra strictness is helpful (it'll figure this one out when compiled with -O), but it often needs help. I'd recommend Edward Yang's series of blog posts about debugging, space leaks, and the Haskell heap. One useful article is http://blog.ezyang.com/2011/05/anatomy-of-a-thunk-leak/ , but you may want to start at the beginning of the heap series. John L. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
Hi Don, I find this answer confusing. The SO question you're linking to is about heap size, not stack overflow. The stack size in this example is 8M. The whole heap size may be much bigger (and increasing the stack size may actually remove the overflow). It would be interesting to learn about success stories of investigation of a stack overflow using heap profiling. * Don Stewart [2011-07-04 12:08:05-0400] > Profile!! > > E.g. > > http://stackoverflow.com/questions/6429085/haskell-heap-issues-with-parameter-passing-style/6429888#6429888 > > > > On Mon, Jul 4, 2011 at 11:44 AM, Logo Logo wrote: > > Hi, > > > > For the following error: > > > > Stack space overflow: current size 8388608 bytes. > > Use `+RTS -Ksize -RTS' to increase it. > > > > I want to find out the culprit function and rewrite it tail-recursively. Is > > there a way to find out which function is causing this error other > > than reviewing the code manually? -- Roman I. Cheplyaka :: http://ro-che.info/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: doctest-0.4.0
I just uploaded a new version of doctest[1] to Hackage. WHAT IS doctest? doctest is a port of Python's doctest[2] to Haskell. It can be used to verify, that examples in Haddock comments[3] do still work. This also provides you with a simple mechanism to write unit test, without the burden of maintaining a dedicated test suite. A basic example of usage is at [4]. WHAT'S NEW IN THIS VERSION? === doctest's functionality is now exposed as a library, this allows for integration with existing test frameworks. Sakari Jokinen is working on integration with test-framework[5]. Thanks to Sakari Jokinen for both, his contributions to the doctest API and his work on test-framework-doctest! Cheers, Simon [1] http://hackage.haskell.org/package/doctest [2] http://docs.python.org/library/doctest.html [3] http://www.haskell.org/haddock/doc/html/ch03s08.html#id566093 [4] https://github.com/sol/doctest-haskell#readme [5] https://github.com/sakari/test-framework-doctest ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
On 4 July 2011 16:44, Logo Logo wrote: > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causing this error other > than reviewing the code manually? It's possible that building your program with profiling and then running with "+RTS -xc" will print a useful call stack. Cheers, Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
You can use the heap profiling options in GHC to find out what is using all the memory. You'll want to compile with -prof and -rtsopts, and then invoke the program with +RTS -h, where is one of 'c', 'y', or a few others. Then run hp2ps on the resulting .hp file to get a graph of what's using all the memory. -- Chris Smith On Jul 4, 2011 9:46 AM, "Logo Logo" wrote: > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causing this error other > than reviewing the code manually? > > Thanks, > Loganathan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
Profile!! E.g. http://stackoverflow.com/questions/6429085/haskell-heap-issues-with-parameter-passing-style/6429888#6429888 On Mon, Jul 4, 2011 at 11:44 AM, Logo Logo wrote: > Hi, > > For the following error: > > Stack space overflow: current size 8388608 bytes. > Use `+RTS -Ksize -RTS' to increase it. > > I want to find out the culprit function and rewrite it tail-recursively. Is > there a way to find out which function is causing this error other > than reviewing the code manually? > > Thanks, > Loganathan > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Diagnose stack space overflow
Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? Thanks, Loganathan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
You're welcome :) Adrien On Mon, 4 Jul 2011 19:09:50 +0400, Dmitri O.Kondratiev wrote: I noticed that ) I removed GHC 6 completely. Then installed platform-independent GHC 7 compiler. Next to configure and eventually compile Haskell Platform I had to install libgmp3-dev, zlib and OpenGL libraries. Istall and cabal update went smoothly. Now I got : GHCi, version 7.0.3 Great! Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
On Mon, Jul 4, 2011 at 6:24 PM, anonymous wrote: > No, you shouldn't need to do that. > > Just download the Haskell Platform and GHC 7: > > http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz > http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 > > Extract ghc, change into the directory, run configure, then make install as > root. > After that, extract the haskell platform, change into the directory, > configure, make, make install as root. > Then run cabal update. > > The haskell platform is broken on Natty. > https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 I noticed that ) I removed GHC 6 completely. Then installed platform-independent GHC 7 compiler. Next to configure and eventually compile Haskell Platform I had to install libgmp3-dev, zlib and OpenGL libraries. Istall and 'cabal update' went smoothly. Now I got : GHCi, version 7.0.3 Great! Thanks! > > > > On Mon, Jul 4, 2011 at 9:12 AM, Dmitri O.Kondratiev wrote: > >> >> >> >Adrien Haxaire adrien at adrienhaxaire.org wrote: >> >> >I dropped the idea of installing Haskell Platform with synaptic. I >> >installed it manually and I don't have any problem since then. >> >> To install GHC 7, have you completely de-installed GHC 6.12.3 and all >> related libraries ? >> >> >> On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev wrote: >> >>> Hi, >>> I am trying to install Haskell Platform on latest Ubuntu desktop: >>> ( uname -a: >>> Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC >>> 2011 x86_64 x86_64 x86_64 GNU/Linux ) >>> >>> I started with installing GHC. Ubuntu could only install version 6.12.3: >>> without Cabal! >>> Now I am trying to install haskell-platform which is a separate package. >>> Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). >>> What sould I do now to get GHC + Cabal? Should I: >>> 1) De-insatll GHC 6.12.3 and all related libraries and try then >>> installing Haskell Platform again? >>> 2) Should I install Caball separately and forget about Haskell Platform? >>> 3) Provide somehow for two different installations? >>> >>> Thanks! >>> >>> === Installation errors: >>> >>> This error could be caused by required additional software packages which >>> are missing or not installable. Furthermore there could be a conflict >>> between software packages which are not allowed to be installed at the same >>> time. >>> >>> haskell-platform: Depends: ghc6 (< 6.12.1+) but 6.12.3-1ubuntu7 is to be >>> installed >>> Depends: libghc6-cgi-dev (>= 3001.1.7.2) but 3001.1.7.2-1build1 is to be >>> installed >>> Depends: libghc6-fgl-dev (< 5.4.2.2+) but 5.4.2.2-2build2 is to be >>> installed >>> Depends: libghc6-glut-dev (< 2.1.2.1+) but 2.1.2.1-1build1 is to be >>> installed >>> Depends: libghc6-haskell-src-dev (< 1.0.1.3+) but 1.0.1.3-2build1 is to >>> be installed >>> Depends: libghc6-html-dev (< 1.0.1.2+) but 1.0.1.2-3build2 is to be >>> installed >>> Depends: libghc6-hunit-dev (< 1.2.2.1+) but 1.2.2.1-2build2 is to be >>> installed >>> Depends: libghc6-mtl-dev (< 1.1.0.2+) but 1.1.0.2-10build2 is to be >>> installed >>> Depends: libghc6-network-dev (< 2.2.1.7+) but 2.2.1.7-1build2 is to be >>> installed >>> Depends: libghc6-opengl-dev (< 2.2.3.0+) but 2.2.3.0-2build2 is to be >>> installed >>> Depends: libghc6-parallel-dev (< 2.2.0.1+) but 2.2.0.1-1build1 is to be >>> installed >>> Depends: libghc6-parsec2-dev (< 2.1.0.1+) but 2.1.0.1-2build2 is to be >>> installed >>> Depends: libghc6-quickcheck2-dev (< 2.1.0.3+) but 2.1.0.3-1build2 is to >>> be installed >>> Depends: libghc6-regex-base-dev (< 0.93.1+) but 0.93.1-8build1 is to be >>> installed >>> Depends: libghc6-regex-compat-dev (< 0.92+) but 0.92-6build2 is to be >>> installed >>> Depends: libghc6-regex-posix-dev (< 0.94.1+) but 0.94.1-2build1 is to be >>> installed >>> Depends: libghc6-stm-dev (< 2.1.1.2+) but 2.1.1.2-5build2 is to be >>> installed >>> Depends: libghc6-xhtml-dev (>= 3000.2.0.1) but 3000.2.0.1-6build2 is to >>> be installed >>> Depends: libghc6-zlib-dev (< 0.5.2.0+) but 0.5.2.0-4build2 is to be >>> installed >>> Depends: libghc6-http-dev (>= 4009) but 4009-2build1 is to be >>> installed >>> Depends: libghc6-deepseq-dev (< 1.1.0.0+) but 1.1.0.0-2build1 is to be >>> installed >>> Depends: alex (< 2.3.3+) but 2.3.3-1 is to be installed >>> Depends: happy (< 1.18.4-2+) but 1.18.4-2 is to be installed >>> Depends: haddock but it is a virtual package >>> >>> >>> >> >> >> ___ >> Haskell-Cafe mailing list >> Haskell-Cafe@haskell.org >> http://www.haskell.org/mailman/listinfo/haskell-cafe >> >> > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? I am not sure if uninstalling GHC 6.12.3 is mandatory, but I did it to have a clean Haskell installation. Then I did what anonymous has summarized below: Just download the Haskell Platform and GHC 7: http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz [5] http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 [6] Extract ghc, change into the directory, run configure, then make install as root. After that, extract the haskell platform, change into the directory, configure, make, make install as root. Then run cabal update. The haskell platform is broken on Natty. https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 [7] Adrien ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
No, you shouldn't need to do that. Just download the Haskell Platform and GHC 7: http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 Extract ghc, change into the directory, run configure, then make install as root. After that, extract the haskell platform, change into the directory, configure, make, make install as root. Then run cabal update. The haskell platform is broken on Natty. https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 On Mon, Jul 4, 2011 at 9:12 AM, Dmitri O.Kondratiev wrote: > > > >Adrien Haxaire adrien at adrienhaxaire.org wrote: > > >I dropped the idea of installing Haskell Platform with synaptic. I > >installed it manually and I don't have any problem since then. > > To install GHC 7, have you completely de-installed GHC 6.12.3 and all > related libraries ? > > > On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev wrote: > >> Hi, >> I am trying to install Haskell Platform on latest Ubuntu desktop: >> ( uname -a: >> Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 >> x86_64 x86_64 x86_64 GNU/Linux ) >> >> I started with installing GHC. Ubuntu could only install version 6.12.3: >> without Cabal! >> Now I am trying to install haskell-platform which is a separate package. >> Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). >> What sould I do now to get GHC + Cabal? Should I: >> 1) De-insatll GHC 6.12.3 and all related libraries and try then >> installing Haskell Platform again? >> 2) Should I install Caball separately and forget about Haskell Platform? >> 3) Provide somehow for two different installations? >> >> Thanks! >> >> === Installation errors: >> >> This error could be caused by required additional software packages which >> are missing or not installable. Furthermore there could be a conflict >> between software packages which are not allowed to be installed at the same >> time. >> >> haskell-platform: Depends: ghc6 (< 6.12.1+) but 6.12.3-1ubuntu7 is to be >> installed >> Depends: libghc6-cgi-dev (>= 3001.1.7.2) but 3001.1.7.2-1build1 is to be >> installed >> Depends: libghc6-fgl-dev (< 5.4.2.2+) but 5.4.2.2-2build2 is to be >> installed >> Depends: libghc6-glut-dev (< 2.1.2.1+) but 2.1.2.1-1build1 is to be >> installed >> Depends: libghc6-haskell-src-dev (< 1.0.1.3+) but 1.0.1.3-2build1 is to be >> installed >> Depends: libghc6-html-dev (< 1.0.1.2+) but 1.0.1.2-3build2 is to be >> installed >> Depends: libghc6-hunit-dev (< 1.2.2.1+) but 1.2.2.1-2build2 is to be >> installed >> Depends: libghc6-mtl-dev (< 1.1.0.2+) but 1.1.0.2-10build2 is to be >> installed >> Depends: libghc6-network-dev (< 2.2.1.7+) but 2.2.1.7-1build2 is to be >> installed >> Depends: libghc6-opengl-dev (< 2.2.3.0+) but 2.2.3.0-2build2 is to be >> installed >> Depends: libghc6-parallel-dev (< 2.2.0.1+) but 2.2.0.1-1build1 is to be >> installed >> Depends: libghc6-parsec2-dev (< 2.1.0.1+) but 2.1.0.1-2build2 is to be >> installed >> Depends: libghc6-quickcheck2-dev (< 2.1.0.3+) but 2.1.0.3-1build2 is to be >> installed >> Depends: libghc6-regex-base-dev (< 0.93.1+) but 0.93.1-8build1 is to be >> installed >> Depends: libghc6-regex-compat-dev (< 0.92+) but 0.92-6build2 is to be >> installed >> Depends: libghc6-regex-posix-dev (< 0.94.1+) but 0.94.1-2build1 is to be >> installed >> Depends: libghc6-stm-dev (< 2.1.1.2+) but 2.1.1.2-5build2 is to be >> installed >> Depends: libghc6-xhtml-dev (>= 3000.2.0.1) but 3000.2.0.1-6build2 is to be >> installed >> Depends: libghc6-zlib-dev (< 0.5.2.0+) but 0.5.2.0-4build2 is to be >> installed >> Depends: libghc6-http-dev (>= 4009) but 4009-2build1 is to be >> installed >> Depends: libghc6-deepseq-dev (< 1.1.0.0+) but 1.1.0.0-2build1 is to be >> installed >> Depends: alex (< 2.3.3+) but 2.3.3-1 is to be installed >> Depends: happy (< 1.18.4-2+) but 1.18.4-2 is to be installed >> Depends: haddock but it is a virtual package >> >> >> > > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
>Adrien Haxaire adrien at adrienhaxaire.org wrote: >I dropped the idea of installing Haskell Platform with synaptic. I >installed it manually and I don't have any problem since then. To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev wrote: > Hi, > I am trying to install Haskell Platform on latest Ubuntu desktop: > ( uname -a: > Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 > x86_64 x86_64 x86_64 GNU/Linux ) > > I started with installing GHC. Ubuntu could only install version 6.12.3: > without Cabal! > Now I am trying to install haskell-platform which is a separate package. > Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). > What sould I do now to get GHC + Cabal? Should I: > 1) De-insatll GHC 6.12.3 and all related libraries and try then > installing Haskell Platform again? > 2) Should I install Caball separately and forget about Haskell Platform? > 3) Provide somehow for two different installations? > > Thanks! > > === Installation errors: > > This error could be caused by required additional software packages which > are missing or not installable. Furthermore there could be a conflict > between software packages which are not allowed to be installed at the same > time. > > haskell-platform: Depends: ghc6 (< 6.12.1+) but 6.12.3-1ubuntu7 is to be > installed > Depends: libghc6-cgi-dev (>= 3001.1.7.2) but 3001.1.7.2-1build1 is to be > installed > Depends: libghc6-fgl-dev (< 5.4.2.2+) but 5.4.2.2-2build2 is to be > installed > Depends: libghc6-glut-dev (< 2.1.2.1+) but 2.1.2.1-1build1 is to be > installed > Depends: libghc6-haskell-src-dev (< 1.0.1.3+) but 1.0.1.3-2build1 is to be > installed > Depends: libghc6-html-dev (< 1.0.1.2+) but 1.0.1.2-3build2 is to be > installed > Depends: libghc6-hunit-dev (< 1.2.2.1+) but 1.2.2.1-2build2 is to be > installed > Depends: libghc6-mtl-dev (< 1.1.0.2+) but 1.1.0.2-10build2 is to be > installed > Depends: libghc6-network-dev (< 2.2.1.7+) but 2.2.1.7-1build2 is to be > installed > Depends: libghc6-opengl-dev (< 2.2.3.0+) but 2.2.3.0-2build2 is to be > installed > Depends: libghc6-parallel-dev (< 2.2.0.1+) but 2.2.0.1-1build1 is to be > installed > Depends: libghc6-parsec2-dev (< 2.1.0.1+) but 2.1.0.1-2build2 is to be > installed > Depends: libghc6-quickcheck2-dev (< 2.1.0.3+) but 2.1.0.3-1build2 is to be > installed > Depends: libghc6-regex-base-dev (< 0.93.1+) but 0.93.1-8build1 is to be > installed > Depends: libghc6-regex-compat-dev (< 0.92+) but 0.92-6build2 is to be > installed > Depends: libghc6-regex-posix-dev (< 0.94.1+) but 0.94.1-2build1 is to be > installed > Depends: libghc6-stm-dev (< 2.1.1.2+) but 2.1.1.2-5build2 is to be > installed > Depends: libghc6-xhtml-dev (>= 3000.2.0.1) but 3000.2.0.1-6build2 is to be > installed > Depends: libghc6-zlib-dev (< 0.5.2.0+) but 0.5.2.0-4build2 is to be > installed > Depends: libghc6-http-dev (>= 4009) but 4009-2build1 is to be > installed > Depends: libghc6-deepseq-dev (< 1.1.0.0+) but 1.1.0.0-2build1 is to be > installed > Depends: alex (< 2.3.3+) but 2.3.3-1 is to be installed > Depends: happy (< 1.18.4-2+) but 1.18.4-2 is to be installed > Depends: haddock but it is a virtual package > > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
On Sun, Jul 3, 2011 at 10:02 PM, Jason Dagit wrote: > Hello, > > I'm trying to get some GUI code working on OSX and numerous forums > around the internet keep reiterating that on OSX to correctly handle > GUI events you need to use the original thread allocated to your > process to check for events and to call the Cocoa framework > functionality. Specifically, using a secondary thread (even a bound > thread) is not sufficient with the Cocoa framework. > > I looked at the threading documentation in Control.Concurrent for GHC > and it's not clear to me if this is even possible with GHC without > restricting to the non-threaded RTS. This means that using the GUI > library from GHCI is not an option and using multiple OS threads in > the final application is also not possible. This means that some FFI > libraries will be unusable. > > My main question is, is there a way around this so that I could, for > example, use the library from GHCI? > > My second question is, if there is no current workaround then how can > we remedy this situation? It seems like there could be an api > function like: > runOnOriginalThread :: IO a -> IO a > I've got some code in https://github.com/dpp/LispHaskellIPad that uses an FFI call into ObjC code that invokes a function on the UI thread. In Haskell: runOnMain :: IO () -> IO () runOnMain todo = do func <- funky dispatchFunc func where funky = mkStrCB $ \v -> do todo And in ObjC: void dispatchFunc(void (*fp)(void*)) { // dispatch_async_f(dispatch_get_main_queue(), NULL, fp); id runner = [[PerformOMatic alloc] init]; [runner setFunc:fp]; [runner run]; } And: #import "PerformOMatic.h" @implementation PerformOMatic - (void)run { [self performSelectorOnMainThread:@selector(reallyDoIt:) withObject:self waitUntilDone:TRUE]; } - (void)reallyDoIt:(id)ignore { whatToDo(NULL); releaseMe(whatToDo); [self dealloc]; } - (void)setFunc:(void *)func { whatToDo = func; } @end Pardon the extremely ugly code, I'm a Haskell newbie and my ObjC skills are 20 years old. > > This function would be similar to runInBoundThread except it would be > guaranteed to run on the original thread allocated to the ghc/ghci > process. I believe the above primitive would be sufficient. > > I'll worry about filing a bug or making a libraries proposal after I > have a better understanding of what must be done. > > Thanks, > Jason > > ___ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > -- Lift, the simply functional web framework http://liftweb.net Simply Lift http://simply.liftweb.net Follow me: http://twitter.com/dpp Blog: http://goodstuff.im ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
Sounds like something that could use a GHC Trac feature request. Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] IterIO: How to write use my inumReverse
At Mon, 4 Jul 2011 20:36:33 +1000, John Ky wrote: > > Hi Haskell Cafe, > > enum |$ inumLines .| inumReverse .| inumUnlines .| iter > ... > > iterLines :: (Monad m) => Iter L.ByteString m [L.ByteString] > iterLines = do > line <- lineI > return [line] > > iterUnlines :: (Monad m) => Iter [L.ByteString] m L.ByteString > iterUnlines = (L.concat . (++ [C.pack "\n"])) `liftM` dataI > > iterReverse :: (Monad m) => Iter [L.ByteString] m [L.ByteString] > iterReverse = do > lines <- dataI > return (map L.reverse lines) > > inumLines = mkInum iterLines > inumUnlines = mkInum iterUnlines > inumReverse = mkInum iterReverse > > It all works fine. > > My question is: Is it possible to rewrite inumReverse to be this: > > iterReverse :: (Monad m) => Iter L.ByteString m L.ByteString > iterReverse = do > line <- dataI > return (L.reverse line) > > inumReverse = mkInum iterReverse > > And still be able to use it in the line: > > enum |$ inumLines .| {-- inumReverse goes in here somehow --} .| > inumUnlines .| iter > > The reason I ask is that the Haskell function reverse has the type [a] -> [a], > not [[a]] -> [[a]]. > > I thought perhaps the alternative inumReverse is cleaner than the original as > it behaves more similarly to Haskell's own reverse function. I'm not sure what you are trying to achieve. If you want an iter that works on L.ByteStrings, then you can say: iterReverse :: (Monad m) => Iter L.ByteString m L.ByteString iterReverse = do line <- lineI return (L.reverse line) In that case you don't need inumLines and inumUnlines. If, however, you want the type to be [L.ByteString], and you would rather do this one line at a time, instead of calling map, then you could do something like the following: iterReverse :: (Monad m) => Iter [L.ByteString] m [L.ByteString] iterReverse = do line <- headI return [L.reverse line] But the code you have above should also work, so it all depends on what you are trying to achieve. David ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
On Mon, Jul 4, 2011 at 2:38 AM, Jason Dagit wrote: > (I believe the way the FFI works I'll have > to make a new wrapper for each "thing" because I can't directly call > objective-c). Probably, yes. > I suppose I should try adding wrappers around all the GLFW functions > so that it sends the request over to the main thread and see if it > solves my problem. The downside is that it would be a lot of wrapper > code and it would be nice to have solution that other libraries can > use. Do you mean, on each function of GLFW's API? Usually it's better to call postGUISync/postGUIAsync alikes with the largest number of function calls possible because (a) of the overhead (especially postGUISync's) and (b) it's safer to assume that postGUIAsyncs can be reordered. That is, if you need to call 'do {foo; bar}', instead of using 'do {fooS; barS}' where these are wrapped functions, call 'postGUISync $ do {foo; bar}'. This solution is general in the sense that you only have to code it once for everything Cocoa-related. Cheers! =) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
Hello, I encountered the same kind of problems with the dependencies, GHC 6.12 etc. I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any problem since then. I installed first a precompiled binary version GHC 7 then the Haskell Platform 2011. It takes more time (about 2 hours on my case), but you are sure to have the lastest version of GHC and Haskell Platform. I had to assign some symlinks manually, but it took me 5 min. Adrien On Mon, 4 Jul 2011 17:04:41 +0400, Dmitri O.Kondratiev wrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! === Installation errors: This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. haskell-platform: Depends: ghc6 (< 6.12.1+) but 6.12.3-1ubuntu7 is to be installed Depends: libghc6-cgi-dev (>= 3001.1.7.2) but 3001.1.7.2-1build1 is to be installed Depends: libghc6-fgl-dev (< 5.4.2.2+) but 5.4.2.2-2build2 is to be installed Depends: libghc6-glut-dev (< 2.1.2.1+) but 2.1.2.1-1build1 is to be installed Depends: libghc6-haskell-src-dev (< 1.0.1.3+) but 1.0.1.3-2build1 is to be installed Depends: libghc6-html-dev (< 1.0.1.2+) but 1.0.1.2-3build2 is to be installed Depends: libghc6-hunit-dev (< 1.2.2.1+) but 1.2.2.1-2build2 is to be installed Depends: libghc6-mtl-dev (< 1.1.0.2+) but 1.1.0.2-10build2 is to be installed Depends: libghc6-network-dev (< 2.2.1.7+) but 2.2.1.7-1build2 is to be installed Depends: libghc6-opengl-dev (< 2.2.3.0+) but 2.2.3.0-2build2 is to be installed Depends: libghc6-parallel-dev (< 2.2.0.1+) but 2.2.0.1-1build1 is to be installed Depends: libghc6-parsec2-dev (< 2.1.0.1+) but 2.1.0.1-2build2 is to be installed Depends: libghc6-quickcheck2-dev (< 2.1.0.3+) but 2.1.0.3-1build2 is to be installed Depends: libghc6-regex-base-dev (< 0.93.1+) but 0.93.1-8build1 is to be installed Depends: libghc6-regex-compat-dev (< 0.92+) but 0.92-6build2 is to be installed Depends: libghc6-regex-posix-dev (< 0.94.1+) but 0.94.1-2build1 is to be installed Depends: libghc6-stm-dev (< 2.1.1.2+) but 2.1.1.2-5build2 is to be installed Depends: libghc6-xhtml-dev (>= 3000.2.0.1) but 3000.2.0.1-6build2 is to be installed Depends: libghc6-zlib-dev (< 0.5.2.0+) but 0.5.2.0-4build2 is to be installed Depends: libghc6-http-dev (>= 4009) but 4009-2build1 is to be installed Depends: libghc6-deepseq-dev (< 1.1.0.0+) but 1.1.0.0-2build1 is to be installed Depends: alex (< 2.3.3+) but 2.3.3-1 is to be installed Depends: happy (< 1.18.4-2+) but 1.18.4-2 is to be installed Depends: haddock but it is a virtual package ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] IterIO: How to write use my inumReverse
Hi Haskell Cafe, I've defined the following reverse echo server that echos text back in reverse: module Programs.TcpEchoIterServer where import Control.Concurrent import Control.Exception import Control.Monad import Control.Monad.Trans import Data.IterIO import Data.IterIO.Inum import Network import System.IO import System.IO.Error (isEOFError) import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 as C iterHandle' :: (MonadIO m) => Handle -> IO (Iter L.ByteString m (), Onum L.ByteString m a) iterHandle' = iterHandle main = withSocketsDo $ do sListen <- listenOn (PortNumber 8000) putStrLn "Listening on Port 8000" forkIO $ forever $ do (sSession, hostname, port) <- accept sListen hSetBuffering sSession NoBuffering putStrLn ("Connected to " ++ hostname ++ ":" ++ show port) forkIO $ do (iter, enum) <- iterHandle' sSession enum |$ inumLines .| inumReverse .| inumUnlines .| iter putStrLn "Press to quit." exitOnCtrlD iterLines :: (Monad m) => Iter L.ByteString m [L.ByteString] iterLines = do line <- lineI return [line] iterUnlines :: (Monad m) => Iter [L.ByteString] m L.ByteString iterUnlines = (L.concat . (++ [C.pack "\n"])) `liftM` dataI iterReverse :: (Monad m) => Iter [L.ByteString] m [L.ByteString] iterReverse = do lines <- dataI return (map L.reverse lines) inumLines = mkInum iterLines inumUnlines = mkInum iterUnlines inumReverse = mkInum iterReverse exitOnCtrlD = try getLine >>= either (\e -> unless (isEOFError e) $ ioError e) (const exitOnCtrlD) It all works fine. My question is: Is it possible to rewrite inumReverse to be this: iterReverse :: (Monad m) => Iter L.ByteString m L.ByteString iterReverse = do line <- dataI return (L.reverse line) inumReverse = mkInum iterReverse And still be able to use it in the line: enum |$ inumLines .| {-- inumReverse goes in here somehow --} .| inumUnlines .| iter The reason I ask is that the Haskell function reverse has the type [a] -> [a], not [[a]] -> [[a]]. I thought perhaps the alternative inumReverse is cleaner than the original as it behaves more similarly to Haskell's own reverse function. Cheers, -John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Data.Time
On Mon, 2011-07-04 at 10:38 +0300, Yitzchak Gale wrote: > > Leap second data is there too, so it should be possible to create a > > Data.Time.Clock.TAI.LeapSecondTable from it. > > No, unfortunately. There is a place in the data structure > for leap second information, but no live Olson > file has every populated it AFAIK. Have a look at the "right/UTC" timezone, I think leap-second data is represented there. But "zdump right/UTC" does not give you the TAI time. Quite the opposite, it gives you the UTC time if your clock is set to TAI. -- Ashley Yakeley ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Data.Time
I wrote: >> Not exactly. A "TimeZone" in Data.Time doesn't really >> represent a time zone - it represents a specific clock setting >> in a time zone. Ashley Yakeley wrote: > I still regret this! I should have called it TimeOffset or somesuch. Oh, it's not your fault. Every other time library in the world calls that a "time zone". You've gotten so many other more substantial things right that so many others got wrong. This name is nothing to worry about. >> To get a TimeZoneSeries, representing a time zone with >> all of its known clock changes throughout history and some >> years into the future, use the timezone-olson package[2] to >> read an Olson time zone file. On Linux and Mac OS X >> systems, Olson time zone files are available in the directory >> /usr/share/zoneinfo. > Leap second data is there too, so it should be possible to create a > Data.Time.Clock.TAI.LeapSecondTable from it. No, unfortunately. There is a place in the data structure for leap second information, but no live Olson file has every populated it AFAIK. That's not so important though. There have been very few leap seconds in history, and they occur rarely. Their release cycle has been slower than the usual release cycle of software packages. So this is something that could easily be done manually. > Also, it might be worth creating an OS-specific package > that dealt with the filepaths for you, so for instance you > could read in a TimeZoneSeries given > a time zone name such as America/Los_Angeles. That would be nice. Perhaps a higher priority would be to add support for Windows, where the Olson data is in the registry rather than in the file system. Right now, people on Windows are still dependent on asking a favor from their friends to lend them copies of the latest Olson files. Another important enhancement would be support for POSIX rules. Olson files still supply explicit clock changes for about two decades into the future. But I believe that will gradually end now that the new Olson file format supports POSIX rules for clock changes beyond the last one explicitly specified. (And besides being supported, recently released Olson files actually do contain the POSIX rules. So does the Windows registry.) Thanks, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe