Re: Exposing newtype coercions to Haskell

2013-07-03 Thread Joachim Breitner
Hi, Am Dienstag, den 02.07.2013, 16:28 + schrieb Simon Peyton-Jones: | I also noticed a problem with my logic for creating the NT-lifting | function. Suppose | data C a = MkC (Foo a) | Just having the constructors of C in scope is not sufficient | to safely provide | NT a b -

Re: Exposing newtype coercions to Haskell

2013-07-03 Thread Joachim Breitner
Hi, Am Dienstag, den 02.07.2013, 12:56 -0500 schrieb Nicolas Frisby: For my light experimentation, I have recovered these two values from the ModGuts that all plugins receive. Hopefully someone will shout out if there's pitfalls to avoid. * The mg_rdr_env field is of type GlobalRdrEnv.

Re: Exposing newtype coercions to Haskell

2013-07-03 Thread Nicolas Frisby
On Wed, Jul 3, 2013 at 5:33 AM, Joachim Breitner m...@joachim-breitner.dewrote: [snip] strange, why did I miss that? But I can’t get [the GlobalRdrEnv lookup] to work, even looking up an element that I took from the GRE itself returns []: let e' = head (head (occEnvElts env))

RE: Exposing newtype coercions to Haskell

2013-07-03 Thread Simon Peyton-Jones
| Is this really the compiler’s job here? After all, the programmer would be able to | write | | deriving cNT' :: NT (Foo a) (Foo b) - NT (C a) (C b) | cNT :: NT a b - NT (C a) (C b) | cNT = cNT' . fooNT | | and expose just cNT to his users, so no expressiveness

Re: Exposing newtype coercions to Haskell

2013-07-03 Thread Joachim Breitner
Hi again, Am Mittwoch, den 03.07.2013, 10:01 +0200 schrieb Joachim Breitner: Am Dienstag, den 02.07.2013, 16:28 + schrieb Simon Peyton-Jones: | I also noticed a problem with my logic for creating the NT-lifting | function. Suppose | data C a = MkC (Foo a) | Just having the

[Haskell] Liber Amicorum for Doaitse Swierstra.

2013-07-03 Thread Jurriaan Hage
Dear all, Prof. Doaitse Swierstra is retiring on August 1 of this year, and is leaving the very functional programming minded Software Technology group that he has led for many decades. We have compiled a Liber Amicorum in his honour that we handed to him after his farewell speech on May 30th.

[Haskell] Haskell Weekly News: Issue 272

2013-07-03 Thread Daniel Santa Cruz
Welcome to issue 272 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of June 23 to 29, 2013. Quotes of the Week * kmc: johnw: I'm rejoining this channel after months away just to tell you how incredibly wrong

[Haskell] Call for Demo Proposals: Workshop on Functional Art, Music, Modeling and Design

2013-07-03 Thread Brent Yorgey
Hi all, Below is the call for demonstration proposals for FARM 2013. Please forward to anyone who might be interested -- apologies if you receive multiple copies! Brent Yorgey publicity chair for FARM 2013 ==

[Haskell-cafe] How to use Template Haskell based on code that generated by another Template?

2013-07-03 Thread Magicloud Magiclouds
I have a yesod project, which generated, say, UserPassword in module Model. Then I wrote my template code which generate a piece of code to use UserPassword. I imported Model in my code. Then I got Illegal variable name: `UserPassword' When splicing a TH declaration: -- 竹密岂妨流水过 山高哪阻野云飞 And

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread B B
Emscripten is meant to translate ANY LLVM IR code to javascript and it should work (as I belive). I've tried to compile 'hello wrold' Haskell program to JS using Emscripten but I faced a problem, that in generated LLVM IR code there is no C-like main function

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Luite Stegeman
On Wed, Jul 3, 2013 at 11:06 AM, B B blackbox.dev...@gmail.com wrote: Emscripten is meant to translate ANY LLVM IR code to javascript and it should work (as I belive). It cannot compile ANY LLVM code: It's heavily geared towards porting C and C++ code to JavaScript, and still there are some

[Haskell-cafe] Liber Amicorum for Doaitse Swierstra.

2013-07-03 Thread Jurriaan Hage
Dear all, Prof. Doaitse Swierstra is retiring on August 1 of this year, and is leaving the very functional programming minded Software Technology group that he has led for many decades. We have compiled a Liber Amicorum in his honour that we handed to him after his farewell speech on May 30th.

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread B B
Thank you for your response :) Could you please answer one additional question - why you, while creating GHCJS didn't base on emscripten? Why haven't you patched it and created custom solution? Is GHCJS production ready? Also - Can I use GHCJS to compile big projects (like GHC or GHCI) to

[Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-03 Thread Nikita Karetnikov
I'm trying to update a package that uses 'Control.OldException' (works with GHC 6.10.4). Here is a relevant (and simplified) part: import Control.OldException -- | A predicate matching synchronous exceptions. syncExceptions :: Exception - Maybe Exception syncExceptions (AsyncException _) =

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Luite Stegeman
On Wed, Jul 3, 2013 at 12:26 PM, B B blackbox.dev...@gmail.com wrote: Thank you for your response :) Could you please answer one additional question - why you, while creating GHCJS didn't base on emscripten? Why haven't you patched it and created custom solution? I didn't know a good way to

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-03 Thread Erik Hesselink
Perhaps you can use `catches` [0]? Erik [0] http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception.html#v:catches On Wed, Jul 3, 2013 at 12:47 PM, Nikita Karetnikov nik...@karetnikov.org wrote: I'm trying to update a package that uses 'Control.OldException' (works

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-03 Thread Nikita Karetnikov
Perhaps you can use `catches` [0]? Maybe, but my idea is to replace 'syncExceptions' with a similar function. Otherwise, it'll be necessary to change (at least) all functions that use 'syncExceptions'. I'd like to avoid that. pgp3z2Qli9UKD.pgp Description: PGP signature

Re: [Haskell-cafe] Custom Setup.hs and Paths module

2013-07-03 Thread Daniel Díaz Casanueva
Hello Erik. Yes, that solution may work, but seems ad-hoc to me. I would like to see a way to actually import the Paths module. In the meanwhile, I will be using your idea. Thank you for the response. Anybody knows how to hack the Setup.hs so I can use the real Paths module? On Wed, Jul 3,

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread B B
I think GHCJS should be able to compile all Haskell code in GHC, but we haven't tested this yet. The tricky bit is probably getting foreign code work, and creating a working installation that includes all other things, like libraries and a package database. Usually, GHCi loads object files

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Brandon Allbery
On Wed, Jul 3, 2013 at 6:26 AM, B B blackbox.dev...@gmail.com wrote: Could you please answer one additional question - why you, while creating GHCJS didn't base on emscripten? Why haven't you patched it and created custom solution? I'd like to point out that the LLVM code from GHC is

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Luite Stegeman
On Wed, Jul 3, 2013 at 3:13 PM, B B blackbox.dev...@gmail.com wrote: I think GHCJS should be able to compile all Haskell code in GHC, but we haven't tested this yet. The tricky bit is probably getting foreign code work, and creating a working installation that includes all other things, like

Re: [Haskell-cafe] How to use Template Haskell based on code that generated by another Template?

2013-07-03 Thread adam vogt
On Wed, Jul 3, 2013 at 2:25 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Then I got Illegal variable name: `UserPassword' When splicing a TH declaration: Hi Magicloud, GHC seems to be trying to tell you that variables are lowercase in haskell. Since you don't have code,

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Luite Stegeman
Similarly I would expect that generating any sort of sensible Javascript would require something fairly tightly tied to GHC; otherwise the output's going to have horrible performance because it's not going to understand the input and will fall back to the slowest but most general translation.

[Haskell-cafe] GHC 7.8 (GHCJS)

2013-07-03 Thread B B
Hi, on the GHCJS website () I found an information: If you are from the future, you have GHC 7.8 or higher installed, and Cabal 1.18, run the following: $ cabal install ghcjs $ ghcjs-boot --auto Is it possible currently to get somehow GHC 7.8 or this information means that AFTER release of 7.8

Re: [Haskell-cafe] GHC 7.8 (GHCJS)

2013-07-03 Thread Luite Stegeman
That's just a joke, because GHCJS is a bit tricky to install, but it will be easier after 7.8 is released and they have merged our patches (unless you really are from the future, then you can just install it, but please send me the code of all the bugs i'll have fixed by then). The easiest way to

Re: [Haskell-cafe] ghci ghc - JS (Emscripten)

2013-07-03 Thread Daniel Frumin
On Jul 3, 2013, at 5:13 PM, B B blackbox.dev...@gmail.com wrote: I think GHCJS should be able to compile all Haskell code in GHC, but we haven't tested this yet. The tricky bit is probably getting foreign code work, and creating a working installation that includes all other things,

Re: [Haskell-cafe] Custom Setup.hs and Paths module

2013-07-03 Thread Erik de Castro Lopo
Daniel Díaz Casanueva wrote: Hello Erik. Yes, that solution may work, but seems ad-hoc to me. I would like to see a way to actually import the Paths module. In the meanwhile, I will be using your idea. Thank you for the response. Anybody knows how to hack the Setup.hs so I can use the

Re: [Haskell-cafe] Catch multiple exceptions using 'Control.Exception'

2013-07-03 Thread Roman Cheplyaka
* Nikita Karetnikov nik...@karetnikov.org [2013-07-03 15:50:16+0400] Perhaps you can use `catches` [0]? Maybe, but my idea is to replace 'syncExceptions' with a similar function. Otherwise, it'll be necessary to change (at least) all functions that use 'syncExceptions'. I'd like to avoid

[Haskell-cafe] Haskell Weekly News: Issue 272

2013-07-03 Thread Daniel Santa Cruz
Welcome to issue 272 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of June 23 to 29, 2013. Quotes of the Week * kmc: johnw: I'm rejoining this channel after months away just to tell you how incredibly wrong

[Haskell-cafe] bug in Data.ByteString.Lazy or in me?

2013-07-03 Thread John MacFarlane
On a 64-bit Windows 8 server EC2 instance, with Haskell Platform freshly installed from the package installer, GHCI :m + Data.ByteString.Lazy GHCI Data.ByteString.Lazy.hGetContents stdin gives me an immediate error hGetBufSome: resource exhausted (Not enough space), while GHCI :m +

[Haskell-cafe] Product-Categories

2013-07-03 Thread Lyndon Maydwell
Hi Café. I'm wracking my brain trying to figure out a simple, reasonably general, implementation for a category instance for pairs of categories. So far I've looked at [1], which seems great, but doesn't use the built-in category instance, and [2], which I'm just not sure about. Ideally I'd

Re: [Haskell-cafe] How to use Template Haskell based on code that generated by another Template?

2013-07-03 Thread Magicloud Magiclouds
Yes, I misunderstood the generated code and splice shown in error message. Thanks. On Wed, Jul 3, 2013 at 11:04 PM, adam vogt vogt.a...@gmail.com wrote: On Wed, Jul 3, 2013 at 2:25 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Then I got Illegal variable name:

[Haskell-cafe] Call for Demo Proposals: Workshop on Functional Art, Music, Modeling and Design

2013-07-03 Thread Brent Yorgey
Hi all, Below is the call for demonstration proposals for FARM 2013. Please forward to anyone who might be interested -- apologies if you receive multiple copies! Brent Yorgey publicity chair for FARM 2013 ==