Annotations
I've just noticed that there is no GHC language extension for annotations http://www.haskell.org/ghc/docs/latest/html/users_guide/extending-ghc.html#annotation-pragmas That feels like an oversight. Yes, they are in a pragma, but you may get an error message if you compile with a stage-1 compiler, for example. Plus, the language extensions should truthfully report what extra stuff you are using. I'm inclined to add a language extension Annotations. * Without it {-# ANN ... #-} pragmas are ignored as comments * With it, they are treated as annotations Do you agree? I don't know whether this can (or even should) land in 7.8.1. Do you care either way? Guidance welcome Simon Microsoft Research Limited (company number 03369488) is registered in England and Wales Registered office is at 21 Station Road, Cambridge, CB1 2FB ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Annotations
On Wed, 6 Nov 2013 10:55:09 +, Simon Peyton-Jones simo...@microsoft.com writes: I’m inclined to add a language extension “Annotations”. · Without it {-# ANN … #-} pragmas are ignored as comments · With it, they are treated as annotations Do you agree? I generally agree that this should be a language extension. My only worry is around the just implemented TH additions regarding annotations. I don't clearly see what would happen if: - a TH library exports a function that generates annotations when spliced. - and the user uses this function in a .hs file, - without specifying the language extension. I'd it to work even in that case. I guess the behavior in this corner case depends heavily on how this is actually implemented. If e.g. the reader is the only component that checks if the language extension is turned on, then I imagine that the TH way of putting in the annotation into the AST would just work. On the other hand if the reader recognizes the annotations either way and some component after TH splicing is checking for the language extension, then my use-case would blow up. TH currently is lenient in cases like this. E.g. if you know that a Name is exported from a module and you reference it directly, without importing it everything will just work. I'd like to have the same behavior for annotations. Thanks, Gergely ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Annotations
| My only worry is around the just implemented TH additions regarding | annotations. I don't clearly see what would happen if: | - a TH library exports a function that generates annotations when | spliced. | - and the user uses this function in a .hs file, | - without specifying the language extension. But this is true for ANY language extension. If a TH library exports a function that generates (say) a type family declaration, and you splice that into a file, do you need -XTypeFamilies in the client file? I think currently you do. So your point is a good one but it's orthogonal. Simon | -Original Message- | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of | Gergely Risko | Sent: 06 November 2013 11:57 | To: ghc-d...@haskell.org | Cc: glasgow-haskell-users@haskell.org | Subject: Re: Annotations | | On Wed, 6 Nov 2013 10:55:09 +, Simon Peyton-Jones | simo...@microsoft.com writes: | | I’m inclined to add a language extension “Annotations”. | | · Without it {-# ANN … #-} pragmas are ignored as comments | | · With it, they are treated as annotations | | Do you agree? | | I generally agree that this should be a language extension. | | My only worry is around the just implemented TH additions regarding | annotations. I don't clearly see what would happen if: | - a TH library exports a function that generates annotations when | spliced. | - and the user uses this function in a .hs file, | - without specifying the language extension. | | I'd it to work even in that case. | | I guess the behavior in this corner case depends heavily on how this is | actually implemented. If e.g. the reader is the only component that | checks if the language extension is turned on, then I imagine that the | TH way of putting in the annotation into the AST would just work. | | On the other hand if the reader recognizes the annotations either way | and some component after TH splicing is checking for the language | extension, then my use-case would blow up. | | TH currently is lenient in cases like this. E.g. if you know that a | Name is exported from a module and you reference it directly, without | importing it everything will just work. I'd like to have the same | behavior for annotations. | | Thanks, | Gergely | | ___ | ghc-devs mailing list | ghc-d...@haskell.org | http://www.haskell.org/mailman/listinfo/ghc-devs ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: Annotations
Currently, in all the cases I can think of if the splice generates something that uses an extension then the module must have that flag turned on. Sent from my iPhone On Nov 6, 2013, at 6:57 AM, Gergely Risko gerg...@risko.hu wrote: On Wed, 6 Nov 2013 10:55:09 +, Simon Peyton-Jones simo...@microsoft.com writes: I’m inclined to add a language extension “Annotations”. · Without it {-# ANN … #-} pragmas are ignored as comments · With it, they are treated as annotations Do you agree? I generally agree that this should be a language extension. My only worry is around the just implemented TH additions regarding annotations. I don't clearly see what would happen if: - a TH library exports a function that generates annotations when spliced. - and the user uses this function in a .hs file, - without specifying the language extension. I'd it to work even in that case. I guess the behavior in this corner case depends heavily on how this is actually implemented. If e.g. the reader is the only component that checks if the language extension is turned on, then I imagine that the TH way of putting in the annotation into the AST would just work. On the other hand if the reader recognizes the annotations either way and some component after TH splicing is checking for the language extension, then my use-case would blow up. TH currently is lenient in cases like this. E.g. if you know that a Name is exported from a module and you reference it directly, without importing it everything will just work. I'd like to have the same behavior for annotations. Thanks, Gergely ___ ghc-devs mailing list ghc-d...@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: love for hpc?
Evan, if you want to get involved in working on HPC, go for it! theres many many pieces of ghc that need more proactive ownership. i should probably use HPC a bit as i start getting my numerical libs out, and i'm sure future me will appreciate current you working on making it better -Carter On Thu, Nov 7, 2013 at 12:03 AM, Evan Laforge qdun...@gmail.com wrote: Is anyone out there using HPC? It seems like it was gotten into a more or less working if not ideal state, and then abandoned. Things I've noticed lately: The GHC runtime just quits on the spot if there's already a tix file. This bit me when I was parallelizing tests. It's also completely unsafe when run concurrently, mostly it just overwrites the file, sometimes it quits. Sure to cause headaches for someone trying to parallelize tests. You can't change the name of the output tix file, so I worked around by hardlinking the binary to a bunch of new ones, and then doing 'hpc sum' on the results. The hpc command is super slow. It might have to do with it doing its parsing with Prelude's 'read', and it certainly doesn't help the error msgs. And the whole thing is generally minimally documented. I can already predict the answer will be yes, HPC could use some love, roll up your sleeves and welcome! It does look like it could be improved a lot with just a bit of effort, but that would be a yak too far for me, at the moment. I'm presently just curious if anyone else out there is using it, and if they feel like it could do with a bit of polishing. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: love for hpc?
So Evan's prediction was accurate ;-) * Carter Schonwald carter.schonw...@gmail.com [2013-11-07 00:29:24-0500] Evan, if you want to get involved in working on HPC, go for it! theres many many pieces of ghc that need more proactive ownership. i should probably use HPC a bit as i start getting my numerical libs out, and i'm sure future me will appreciate current you working on making it better -Carter On Thu, Nov 7, 2013 at 12:03 AM, Evan Laforge qdun...@gmail.com wrote: Is anyone out there using HPC? It seems like it was gotten into a more or less working if not ideal state, and then abandoned. Things I've noticed lately: The GHC runtime just quits on the spot if there's already a tix file. This bit me when I was parallelizing tests. It's also completely unsafe when run concurrently, mostly it just overwrites the file, sometimes it quits. Sure to cause headaches for someone trying to parallelize tests. You can't change the name of the output tix file, so I worked around by hardlinking the binary to a bunch of new ones, and then doing 'hpc sum' on the results. The hpc command is super slow. It might have to do with it doing its parsing with Prelude's 'read', and it certainly doesn't help the error msgs. And the whole thing is generally minimally documented. I can already predict the answer will be yes, HPC could use some love, roll up your sleeves and welcome! It does look like it could be improved a lot with just a bit of effort, but that would be a yak too far for me, at the moment. I'm presently just curious if anyone else out there is using it, and if they feel like it could do with a bit of polishing. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users signature.asc Description: Digital signature ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
[Haskell] Haskell Weekly News: Issue 285
Welcome to issue 285 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the weeks of October 20 to November 02, 2013. Quotes of the Week * roconnor: edwardk: is comonad Haskell 1.4? I liked Haskell 1.4. * Peaker: Don't trust the @src, luke * dmwit: If it fits in a tweet, you haven't included enough information to debug it yet. Top Reddit Stories * The Haskell Cast #3 - Simon Peyton Jones on GHC Domain: haskellcast.com, Score: 88, Comments: 11 On Reddit: [1] http://goo.gl/0sGzlg Original: [2] http://goo.gl/wQ4FKi * Elm 0.10 released: faster strings, nice colors, bug fixes, and searchable documentation Domain: elm-lang.org, Score: 74, Comments: 9 On Reddit: [3] http://goo.gl/HJ2fc7 Original: [4] http://goo.gl/xFJJMN * Procrustean Mathematics by Edward Kmett Domain: fpcomplete.com, Score: 71, Comments: 17 On Reddit: [5] http://goo.gl/AsB0CM Original: [6] http://goo.gl/E1iDNM * Haskell hurdle: uninteresting world Domain: gundersen.net, Score: 68, Comments: 58 On Reddit: [7] http://goo.gl/W8l3T1 Original: [8] http://goo.gl/uBVp1f * websockets-0.8 released: with browser shell example + bonus section on pipes vs. conduit vs. io-streams Domain: jaspervdj.be, Score: 65, Comments: 9 On Reddit: [9] http://goo.gl/0XvXZa Original: [10] http://goo.gl/eUDMn1 * IHaskell: Haskell for Interactive Computing Domain: gibiansky.github.io, Score: 61, Comments: 26 On Reddit: [11] http://goo.gl/ZpNpq8 Original: [12] http://goo.gl/A8iccI * ShellCheck – static analysis and linting tool for sh/bash script Domain: shellcheck.net, Score: 55, Comments: 10 On Reddit: [13] http://goo.gl/z0giaP Original: [14] http://goo.gl/zF3DLB * Micro-tutorial: liftM by accident Domain: self.haskell, Score: 54, Comments: 29 On Reddit: [15] http://goo.gl/d6ReRs Original: [16] http://goo.gl/d6ReRs * Barclays are hiring: Haskell developers in London and Kiev Domain: self.haskell, Score: 52, Comments: 14 On Reddit: [17] http://goo.gl/Fq7JPE Original: [18] http://goo.gl/Fq7JPE * License monads Domain: joeyh.name, Score: 52, Comments: 18 On Reddit: [19] http://goo.gl/oZ9La1 Original: [20] http://goo.gl/9C1Stp * Show Reddit: My weekend project, PureScript Domain: functorial.com, Score: 49, Comments: 61 On Reddit: [21] http://goo.gl/sRx1Eh Original: [22] http://goo.gl/TJBCYN * Deamortized ST by Edward Kmett Domain: fpcomplete.com, Score: 49, Comments: 57 On Reddit: [23] http://goo.gl/Vck3Ij Original: [24] http://goo.gl/wtaueO * HaLVM 2.0 Developer's Release (trans: buggy but API-stable pre-release) now available for folks to try. GHC 7.8, threaded RTS, SMP HaLVM support, 0-copy networking, and more. Domain: community.galois.com, Score: 44, Comments: 13 On Reddit: [25] http://goo.gl/5Psg7B Original: [26] http://goo.gl/xQFUA2 * Could you explain why complexity of monadic IO is worth it? Domain: self.haskell, Score: 43, Comments: 128 On Reddit: [27] http://goo.gl/esFCc4 Original: [28] http://goo.gl/esFCc4 * London Haskell User Group 18/09/2013: Oliver Charles on pipes [video] Domain: ocharles.org.uk, Score: 42, Comments: 14 On Reddit: [29] http://goo.gl/8kDKnw Original: [30] http://goo.gl/hi3L3P * C-- as a project separate from GHC Domain: cminusminus.org, Score: 42, Comments: 14 On Reddit: [31] http://goo.gl/fvUjIk Original: [32] http://goo.gl/VueAA * How to start a new Haskell project Domain: jabberwocky.eu, Score: 42, Comments: 26 On Reddit: [33] http://goo.gl/6dRRXn Original: [34] http://goo.gl/btWJYS * The let-no-escape optimization Domain: lambda.jstolarek.com, Score: 41, Comments: 1 On Reddit: [35] http://goo.gl/l8xhuP Original: [36] http://goo.gl/J8uekI * Improving Applicative do-notation Domain: tmorris.net, Score: 40, Comments: 150 On Reddit: [37] http://goo.gl/MXoPdz Original: [38] http://goo.gl/y1I8Tx * Odersky: The Trouble with Types - Strange Loop 2013 [InfoQ] Domain: infoq.com, Score: 39, Comments: 55 On Reddit: [39] http://goo.gl/5QEJfz Original: [40] http://goo.gl/Ir4kwG Top StackOverflow Questions * Haskell Thrift library 300x slower than C++ in performance test votes: 34, answers: 5 Read on SO: [41] http://goo.gl/timvYf * Creating methods bound to records in Haskell votes: 10, answers: 1 Read on SO: [42] http://goo.gl/4E4Sgh * Installing Building GHC with OSX Mavericks GHC votes: 10, answers: 1 Read on SO: [43] http://goo.gl/44PIaj * How to properly communicate compile-time information to Template Haskell functions? votes: 10, answers: 0 Read on SO: [44] http://goo.gl/YQkGbl * Data.Text vs String