[Haskell-cafe] runghc dies silently when given large numbers of arguments
Hi all, The other day, I wrote the following program in /tmp/test.hs --8---cut here---start-8--- main = error An Error message --8---cut here---end---8--- Then I ran the following: , | gds@lithium:/tmp$ runghc ./test.hs `seq 1 10` | gds@lithium:/tmp$ ghc -o test test.hs | gds@lithium:/tmp$ ./test `seq 1 10` | test: An Error message | gds@lithium:/tmp$ ` Notice that when I use runghc, my main function doesn't appear to run at all. But when I run the compiled program, my main function does seem to run, and produce the error message I expected. It seems to me like runghc can't cope with that large a number of arguments or size of argument string, or similar. That seems entirely reasonable, but if so, then might it be a good idea to have an error message when we accidentally hit that limit? I'm using ghc 7.6.2 on Ubuntu 13.04. Thanks! Gareth. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: standalone-haddock-1.0
I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell documentation. When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken). standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links: * links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage Thus the resulting directory with HTML is relocatable and publishable. **TL;DR**: it just works. See the [haskell-suite][] documentation for an example output. [haskell-suite]: http://haskell-suite.github.io/docs Usage - Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH] Available options: -h,--helpShow this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed `PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file. For example: standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal **NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option. Cabal dependency The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal). I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much. If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD. [Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16 Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: standalone-haddock-1.0
Hello Roman! Thank you, this is a great contribution. I found myself several times modifying the html output by hand in order to do exactly this. Nice! On Fri, Jun 7, 2013 at 2:15 PM, Roman Cheplyaka r...@ro-che.info wrote: I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell documentation. When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken). standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links: * links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage Thus the resulting directory with HTML is relocatable and publishable. **TL;DR**: it just works. See the [haskell-suite][] documentation for an example output. [haskell-suite]: http://haskell-suite.github.io/docs Usage - Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH] Available options: -h,--helpShow this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed `PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file. For example: standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal **NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option. Cabal dependency The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal). I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much. If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD. [Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16 Roman ___ 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] Question about Newtype op() function arguments.
Hi All, Referring to the following, which is taken from the *Control.Newtype *documentation page: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSourcehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op This function serves two purposes: 1. Giving you the unpack of a newtype without you needing to remember the name. 2. Showing that the first parameter is *completely ignored* on the value level, meaning the only reason you pass in the constructor is to provide type information. Typeclasses sure are neat. As point #2, above, emphasizes, the only purpose for the first argument to the function (i.e. - the constructor (o - n)) is to specify the type of 'n'. However, being a *newtype*, 'n' can have only one constructor. So, why is it necessary to pass in the constructor to this function, when we're already passing in 'n'? Thanks, -db ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] voting sytem DSL
In the package Workflow there is a DSL for workflow patterns that include a very broad notion of voting using monoids. The other workflow combinators resemble a lot the async package, but applied to workflows. Maybe you can draw something from that to construct higuer level votation DSL. The reason to use the workflow monad is because during a votation process there may be machine failures. Decisions with various votation steps can stay running for months, so it is necessary to save and recover the state of the computation. http://hackage.haskell.org/packages/archive/Workflow/0.8. 0.5/doc/html/Control-Workflow-Patterns.HTML 2013/6/5 AlanKim Zimmerman alan.z...@gmail.com Have you looked at http://frictionfreedemocracy.org/ They are using https://github.com/agocorona/Workflow amongst other things to define election work flows. Alan On Jun 5, 2013 11:25 PM, Corentin Dupont corentin.dup...@gmail.com wrote: Hi haskellers! I am trying to make a DSL able to describe a voting system. That DSL should be able to describe many different voting procedures: unanimity or majority, open or secret ballot, one or two turns... It should also work for referendums (yes/no question) or elections (electing one or several people)... Are you aware of any such DSL? In Haskell I haven't see it, maybe in another language? Cheers, Corentin ___ 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 -- Alberto. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: som-4.0 (for data analysis and visualisation)
Do you have some data that you'd like to understand better? I'm happy to announce a new release of a package called som that may help: http://hackage.haskell.org/package/som https://github.com/mhwombat/som/wiki (wiki) A Kohonen Self-organising Map (SOM) maps input patterns onto a regular grid (usually two-dimensional) where each node in the grid is a model of the input data, and does so using a method which ensures that any topological relationships within the input data are also represented in the grid. This implementation supports the use of non-numeric patterns. In layman's terms, a SOM can be useful when you want to discover the underlying structure of some data. I have a brief tutorial in the wiki, which I hope to expand over the next few weeks. WHAT'S NEW - It is now easier to for non-math types to create a SOM (see defaultSOM) - Added another example to the wiki ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: standalone-haddock-1.0
Awesome! I have been wanting to use scoutess to automatically build and upload haddock docs, but getting it to build the docs in an uploadable fashion was so painful! I had crazy code that was rewriting the package database and stuff. This seems like exactly what I need! - jeremy On Fri, Jun 7, 2013 at 7:15 AM, Roman Cheplyaka r...@ro-che.info wrote: I am happy to announce the first release of standalone-haddock. http://feuerbach.github.io/standalone-haddock/ standalone-haddock generates standalone haddock Haskell documentation. When you simply run `cabal haddock`, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken). standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links: * links to identifiers inside this package set are relative * links to identifiers from external packages lead to hackage Thus the resulting directory with HTML is relocatable and publishable. **TL;DR**: it just works. See the [haskell-suite][] documentation for an example output. [haskell-suite]: http://haskell-suite.github.io/docs Usage - Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH] Available options: -h,--helpShow this help text --package-db DB-PATH Additional package database -o OUTPUT-PATH Directory where html files will be placed `PACKAGE-PATH` is the path to the (unpacked) package — i.e. a directory with a `.cabal` file. For example: standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal **NOTE**: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the `--package-db` option. Cabal dependency The program only builds with (unreleased) Cabal 1.17 which you can get from [github](https://github.com/haskell/cabal). I spent some time trying to make it compatible with Cabal 1.16 (see [Cabal-1.16][] branch), but the API seems to have changed too much. If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD. [Cabal-1.16]: https://github.com/feuerbach/standalone-haddock/tree/Cabal-1.16 Roman ___ 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] ANNOUNCE: standalone-haddock-1.0
Awesome! I've wanted that many times. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question about Newtype op() function arguments.
* David Banas capn.fre...@gmail.com [2013-06-07 07:08:19-0700] Hi All, Referring to the following, which is taken from the *Control.Newtype *documentation page: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSourcehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op This function serves two purposes: 1. Giving you the unpack of a newtype without you needing to remember the name. 2. Showing that the first parameter is *completely ignored* on the value level, meaning the only reason you pass in the constructor is to provide type information. Typeclasses sure are neat. As point #2, above, emphasizes, the only purpose for the first argument to the function (i.e. - the constructor (o - n)) is to specify the type of 'n'. However, being a *newtype*, 'n' can have only one constructor. So, why is it necessary to pass in the constructor to this function, when we're already passing in 'n'? Hi David, Note that that argument is in fact not necessary — 'op' without its first argument is exactly 'unpack'. I imagine that 'op' may be useful if you need to disambiguate the instance in an otherwise ambiguous context. One way to do this is, of course, to provide an explicit type signature, but passing a constructor is another, and rather elegant, way to achieve that. I am not a heavy user of the newtype package, so I can't say how often this situation occurs in practice. Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: Ajhc 0.8.0.5 Release
We are happy to announce Ajhc 0.8.0.5. Major change on this release is supporting haddock. You can see Ajhc's internal using web browser. Ajhc's project web site is found at http://ajhc.metasepi.org/. You can get the source code from https://github.com/ajhc/ajhc/tags. ## Changes * Support haddock. You can read haddock on http://hackage.haskell.org/package/ajhc, hopefully. * Split library from Ajhc program. * Better NAIVEGC. * Add arity arena to all functions compiled by Ajhc. For supporting reentrant in future. * Run SelfTest and rtstest on travis-ci. * Add jahm command to download file from Hackage DB, because sometime perl script occurs error. Enjoy. :) - - - Metasepi team ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question about Newtype op() function arguments.
On Fri, Jun 07, 2013 at 07:08:19AM -0700, David Banas wrote: op :: Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSourcehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op This function serves two purposes: 1. Giving you the unpack of a newtype without you needing to remember the name. 2. Showing that the first parameter is *completely ignored* on the value level, meaning the only reason you pass in the constructor is to provide type information. Typeclasses sure are neat. As point #2, above, emphasizes, the only purpose for the first argument to the function (i.e. - the constructor (o - n)) is to specify the type of 'n'. However, being a *newtype*, 'n' can have only one constructor. So, why is it necessary to pass in the constructor to this function, when we're already passing in 'n'? I am puzzled by this too. What does op stand for? I hypothesis opposite in the sense of inverse, since as Roman points out op Constructor :: n - o is the inverse of Constructor :: o - n. But I admit I do not see how this provides value over unpack itself. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question about Newtype op() function arguments.
The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... On Jun 7, 2013 2:53 PM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Fri, Jun 07, 2013 at 07:08:19AM -0700, David Banas wrote: op :: Newtype http://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSource http://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op This function serves two purposes: 1. Giving you the unpack of a newtype without you needing to remember the name. 2. Showing that the first parameter is *completely ignored* on the value level, meaning the only reason you pass in the constructor is to provide type information. Typeclasses sure are neat. As point #2, above, emphasizes, the only purpose for the first argument to the function (i.e. - the constructor (o - n)) is to specify the type of 'n'. However, being a *newtype*, 'n' can have only one constructor. So, why is it necessary to pass in the constructor to this function, when we're already passing in 'n'? I am puzzled by this too. What does op stand for? I hypothesis opposite in the sense of inverse, since as Roman points out op Constructor :: n - o is the inverse of Constructor :: o - n. But I admit I do not see how this provides value over unpack itself. Tom ___ 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] Question about Newtype op() function arguments.
On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote: The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... I don't understand this. Scoped type variables are used when you want to use a type variable from the top level within the body of a function. If you use op and specify a particular constructor then you don't have a variable but a concrete instance of a type. But maybe I'm missing some more powerful way this can be used ... Tom On Jun 7, 2013 2:53 PM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Fri, Jun 07, 2013 at 07:08:19AM -0700, David Banas wrote: op :: Newtype http://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype n o = (o - n) - n - oSource http://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op This function serves two purposes: 1. Giving you the unpack of a newtype without you needing to remember the name. 2. Showing that the first parameter is *completely ignored* on the value level, meaning the only reason you pass in the constructor is to provide type information. Typeclasses sure are neat. As point #2, above, emphasizes, the only purpose for the first argument to the function (i.e. - the constructor (o - n)) is to specify the type of 'n'. However, being a *newtype*, 'n' can have only one constructor. So, why is it necessary to pass in the constructor to this function, when we're already passing in 'n'? I am puzzled by this too. What does op stand for? I hypothesis opposite in the sense of inverse, since as Roman points out op Constructor :: n - o is the inverse of Constructor :: o - n. But I admit I do not see how this provides value over unpack itself. Tom ___ 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 mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question about Newtype op() function arguments.
On 6/7/2013 4:51 PM, Tom Ellis wrote: On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote: The phantom parameter solves the same problem as scoped type variables. Granted, if you find yourself in that kind of polymorphic soup you have deeper problems... I don't understand this. Scoped type variables are used when you want to use a type variable from the top level within the body of a function. If you use op and specify a particular constructor then you don't have a variable but a concrete instance of a type. But maybe I'm missing some more powerful way this can be used ... Tom You can use scoped type variables to correct an ambiguous type error. You can think of op as a variation on asTypeOf, as documented here on http://www.haskell.org/haskellwiki/Scoped_type_variables#Avoiding_Scoped_Type_Variables. If I tried to come up with an example that's specific to op, it would only be horribly contrived. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe