Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-23 Thread Brandon Allbery
On Mon, Apr 23, 2012 at 11:39, Gregg Lebovitz glebov...@gmail.com wrote: Am I missing something that makes this problem harder than other systems and languages? Is anyone currently working on the packaging and distribution issues? If not, does anyone else want to work on it? The other dirty

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-23 Thread Brandon Allbery
On Mon, Apr 23, 2012 at 17:16, Gregg Lebovitz glebov...@gmail.com wrote: On 4/23/2012 3:39 PM, Brandon Allbery wrote: The other dirty little secret that is carefully being avoided here is the battle between the folks for whom Haskell is a language research platform and those who use

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-22 Thread Brandon Allbery
On Sun, Apr 22, 2012 at 13:15, Alvaro Gutierrez radi...@google.com wrote: As I understand it, a library can provide any number of unrelated modules, and conversely, a single module could be provided by more than one library. I can see how this affords library authors more flexibility, but at a

Re: [Haskell-cafe] Connection to database

2012-04-16 Thread Brandon Allbery
On Mon, Apr 16, 2012 at 18:14, yrazes yra...@gmail.com wrote: 3. julita@yulys:~/hdbc-mysql$ ls ChangeLog Database README.markdown Test.hs COPYINGHDBC-mysql.cabal Setup.lhstestsrc julita@yulys:~/hdbc-mysql$ runhaskell Test.hs but I got this error message:

Re: [Haskell-cafe] How helpful is h-99 (and should we complete the missing ones)?

2012-04-15 Thread Brandon Allbery
On Sun, Apr 15, 2012 at 09:58, Daniel Hlynskyi abcz2.upr...@gmail.comwrote: And of-course, problems and solutions are not annotated with there typical real world aplications, they are not obvious for average beginners. Why would I make Binary tree balanced, when I don't know, what I'll gain

Re: [Haskell-cafe] strange GHCi type inference behavior involving map and partially applied functions

2012-04-15 Thread Brandon Allbery
On Sun, Apr 15, 2012 at 19:44, Ting Lei tin...@hotmail.com wrote: In my humble opinion, I think the GHC should turn on ExtendedDefaulting if GHCi has it on by default. Otherwise it is confusing for newbies. I think we're kinda tending in the opposite direction: we'd like

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Brandon Allbery
On Thu, Apr 5, 2012 at 01:53, Sutherland, Julian julian.sutherlan...@imperial.ac.uk wrote: data Tree = Node Left Right | Leaf Could be converted to a struct in C/C++: struct Tree { struct Tree* left; struct Tree* right; }; Shouldn't this actually be a tagged union? Not that

Re: [Haskell-cafe] Haskell integration with C/C++ (GSOC)

2012-04-05 Thread Brandon Allbery
On Thu, Apr 5, 2012 at 03:21, Holger Siegel holgersiege...@yahoo.de wrote: Am 05.04.2012 um 08:42 schrieb Brandon Allbery: On Thu, Apr 5, 2012 at 01:53, Sutherland, Julian julian.sutherlan...@imperial.ac.uk wrote: data Tree = Node Left Right | Leaf Could be converted to a struct in C/C

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread Brandon Allbery
On Fri, Mar 30, 2012 at 10:33, Mats Rauhala mats.rauh...@gmail.com wrote: I didn't realize asking how long it's been for him, but he mentioned about new fronts in optimizing compilers and specifically mentioned a compiler that could compile to legible C. I've been following Haskell only for a

Re: [Haskell-cafe] Can't install snap (problem with syb)

2012-03-28 Thread Brandon Allbery
On Wed, Mar 28, 2012 at 17:05, Michael Iles michael.i...@ca.ibm.com wrote: I uninstalled ghc, removed my ~/.cabal directory, reinstalled ghc, then tried to install snap. I get: Did you also remove ~/.ghc? Libraries are actually installed and registered there, not under ~/.cabal. Although

Re: [Haskell-cafe] struggling with blocking shell cmd when using System.Process

2012-03-20 Thread Brandon Allbery
On Tue, Mar 20, 2012 at 17:51, Rouan van Dalen rvda...@yahoo.co.uk wrote: If I try to su the runShell function with the following command, it simply blocks forever: git --no-pager blame your git file here but if I do: git status The runShell function works as expected. Can

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Brandon Allbery
On Mon, Mar 19, 2012 at 17:06, Chris Smith cdsm...@gmail.com wrote: One possible way out of this trap would be if, perhaps, the variant of Haskell you picked were actually GHC's core language. That could (...) It still seems far too ambitious for GSoC, though. And I remain unconvinced how

Re: [Haskell-cafe] Regular Expression with PCRE

2012-03-17 Thread Brandon Allbery
On Fri, Mar 16, 2012 at 20:17, Carter Tazio Schonwald carter.schonw...@gmail.com wrote: Basically this applies in your case because recognizing if a sequence of characters is in a comment block or not for HTML is likely not expressible using regexes. There may be a way for a very controlled

Re: [Haskell-cafe] Prettier pretty-printing of data types?

2012-03-17 Thread Brandon Allbery
On Sat, Mar 17, 2012 at 08:55, Ryan Newton rrnew...@gmail.com wrote: - If the source is available, the compiler could be tweaked to obey a protocol, putting delimiters around collapsable output (possibly non-printing control sequences??) I believe both emacs and vim have folding

Re: [Haskell-cafe] In Haskell, because of the fine layers of abstraction that are possible, it pays to hone one's critical thinking skills.

2012-03-17 Thread Brandon Allbery
On Sat, Mar 17, 2012 at 16:30, Lars Viklund z...@acc.umu.se wrote: On Sat, Mar 17, 2012 at 05:40:56PM +0100, Christopher Done wrote: Are you creating these posts by accident or what's the point of them? They are completely devoid of a message body. KC: It's not customary to have any

Re: [Haskell-cafe] Mapping string to a function

2012-03-15 Thread Brandon Allbery
On Thu, Mar 15, 2012 at 02:21, Haisheng Wu fre...@gmail.com wrote: Thanks Oliver. That's good enough. I was ever curious about whether parse String to the function rather than a mapping. GHC has the ability to embed an interpreter. You do not want to use it. If you want Perl/Python/Ruby,

Re: [Haskell-cafe] Why so many strings in Network.URI, System.Posix and similar libraries?

2012-03-11 Thread Brandon Allbery
On Sun, Mar 11, 2012 at 14:33, Jason Dusek jason.du...@gmail.com wrote: The syntax of URIs is a mechanism for describing data octets, not Unicode code points. It is at variance to describe URIs in terms of Unicode code points. You might want to take a glance at RFC 3492, though. -- brandon

Re: [Haskell-cafe] Why so many strings in Network.URI, System.Posix and similar libraries?

2012-03-11 Thread Brandon Allbery
On Sun, Mar 11, 2012 at 23:05, Jason Dusek jason.du...@gmail.com wrote: Although the intent of the spec is to represent characters, I contend it does not succeed in doing so. Is it wise to assume more semantics than are actually there? It is not; one of the reasons that many experts

Re: [Haskell-cafe] haskell platform - mac lion - installation error

2012-03-10 Thread Brandon Allbery
On Sat, Mar 10, 2012 at 06:57, S D Swierstra doai...@uu.nl wrote: 1) Check whether you have a /Developer directory, and if not 2) look in your Applications folder to see whether you have program called Install XCode and if so run that Xcode 4.3.x does not use /Developer. The new path is

Re: [Haskell-cafe] ghc: could not execute: opt

2012-03-03 Thread Brandon Allbery
On Sat, Mar 3, 2012 at 08:39, Graham Berks gra...@fatlazycat.com wrote: Hi, trying out haskell. Have osx 10.7 and ghc 7.0.4 via homebrew When attempting to compile a program via cabal i get ghc: could not execute: opt Xcode 4 includes only part of LLVM; ghc has apparently found that part

Re: [Haskell-cafe] Problems installing Data.Encoding package

2012-03-02 Thread Brandon Allbery
On Fri, Mar 2, 2012 at 04:58, Pēteris Paikens peter...@gmail.com wrote: /var/folders/xc/jnh69_cx1n32n1qwkgfrlc10gq/T/encoding-0.6.620435/encoding-0.6.6/dist/setup/setup: /var/folders/xc/jnh69_cx1n32n1qwkgfrlc10gq/T/encoding-0.6.620435/encoding-0.6.6/dist/setup/setup: cannot execute

Re: [Haskell-cafe] getAddrInfo: does not exist

2012-02-22 Thread Brandon Allbery
On Wed, Feb 22, 2012 at 06:26, Alexander Vasiliev alexvasil...@gmail.comwrote: I use FreeBsd and get the following error during execution. mvz_server: getAddrInfo: does not exist (servname not supported for ai_socktype) (...) I googled that this error was solved in ghc 6.8. But i use ghc

Re: [Haskell-cafe] Haskell development in Mac OS X after Gatekeeper

2012-02-19 Thread Brandon Allbery
On Sun, Feb 19, 2012 at 23:27, Richard O'Keefe o...@cs.otago.ac.nz wrote: Now *that's* annoying. It turns out that the xattr command is *there*, but 'man xattr' is completely silent. There is nothing for it in /usr/share/man/man1 . I had been using my own command to do the equivalent of

Re: [Haskell-cafe] Haskell-Cafe Tag (was: Optimizations and parallel execution in the IO for a small spellchecker)

2012-02-15 Thread Brandon Allbery
On Wed, Feb 15, 2012 at 14:49, JP Moresmau jpmores...@gmail.com wrote: I was not aware that it was something a poster was supposed to do, but now I notice that while the messages I get from the list have [Haskell-Cafe] on their subject, the ones I post don't. The list software adds it. You

Re: [Haskell-cafe] Error in installing dph-examples on Mac OS X 10.7.3

2012-02-10 Thread Brandon Allbery
On Fri, Feb 10, 2012 at 13:38, mukesh tiwari mukeshtiwari.ii...@gmail.comwrote: Hi Carter Thank you for reply. My mac is 32 bit ( I remember having some issue with ghc-7.2.1 64 bit on 32 bit machine but probably that was on Linux ). I will give it a shot. Macintosh-0026bb610428:tmp mukesh$

Re: [Haskell-cafe] Switching GHC Version

2012-02-06 Thread Brandon Allbery
On Mon, Feb 6, 2012 at 18:27, HASHIMOTO, Yusaku nonow...@gmail.com wrote: Hi, I wrote a simple shell function for switching GHC version on the system. It works only under Mac OSX, and only switch GHCs installed via .pkg installers. It's useful to experiment newer features without worrying

Re: [Haskell-cafe] Named captures in regex-pcre?

2012-01-28 Thread Brandon Allbery
On Sat, Jan 28, 2012 at 15:26, Ilya Portnov port...@iportnov.ru wrote: Is there a way to get named captures from regex using regex-pcre (or maybe other PCRE-package)? For example, I want to write something like regex-pcre is constrained by the common Haskell regex API (used by all the regex-*

Re: [Haskell-cafe] Compiling dph package with ghc-7.4.0.20111219

2012-01-21 Thread Brandon Allbery
On Sat, Jan 21, 2012 at 06:47, mukesh tiwari mukeshtiwari.ii...@gmail.comwrote: I have installed ghc-7.4.0.20111219 and this announcementhttp://www.haskell.org/pipermail/glasgow-haskell-users/2011-December/021310.htmlsays that The release candidate accidentally includes the random,

Re: [Haskell-cafe] Compiling dph package with ghc-7.4.0.20111219

2012-01-21 Thread Brandon Allbery
On Sat, Jan 21, 2012 at 12:50, mukesh tiwari mukeshtiwari.ii...@gmail.comwrote: Hi Brandon Thank you for reply. Could you please tell me how to install dph because cabal install is not working with ghc-7.4.0.20111219 and I have issue with ghc-7.2.1 and dph Sorry, but I don't know. I don't

Re: [Haskell-cafe] Monad-control rant

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 03:47, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: On 01/18/2012 01:52 AM, Brandon Allbery wrote: On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com mailto:mikhail.vorozhtsov@**gmail.commikhail.vorozht...@gmail.com wrote

Re: [Haskell-cafe] black Wikipedia (Was: PhD program at Portland State accepting applications)

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 12:37, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 18 Jan 2012, Nathan Collins wrote: - Portland is a very popular US city, known for beer, bikes, music, and street food:

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 13:11, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 18 Jan 2012, Andrew Butterfield wrote: Just add ?banner=none to the url if you really have to read the page Maybe the intention was to demonstrate that censorship (in this case self-censorship)

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 15:20, Hans Aberg haber...@telia.com wrote: There is the Beastie Boys case, where the judge decided copyright protects what is creatively unique. But such judgments are rare, sadly. And for every Beastie Boys case there's at least one The Verve case. -- brandon s

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 17:15, David Thomas davidleotho...@gmail.comwrote: My understanding is that blocking/redirection is to be done at the DNS level. In which case, there *is* a ?banner hack of sorts - get the IP by some other means. Sadly name-based virtual hosts require a bit more work

Re: [Haskell-cafe] Monad-control rant

2012-01-17 Thread Brandon Allbery
On Tue, Jan 17, 2012 at 06:29, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: I wouldn't be too optimistic about convincing GHC HQ. Even making Applicative a superclass of Monad can make Haskell98 nazis come after you in ninja suits. What?! The only significant complaint I've seen

Re: [Haskell-cafe] Monad-control rant

2012-01-16 Thread Brandon Allbery
On Mon, Jan 16, 2012 at 08:17, Mikhail Vorozhtsov mikhail.vorozht...@gmail.com wrote: As I said, you think of IO too much. I think you two are talking about two related but different things; monad-control is solving a *specific* problem with IO, but you want something more general. I think

Re: [Haskell-cafe] named pipe interface

2012-01-14 Thread Brandon Allbery
On Sat, Jan 14, 2012 at 11:57, Donn Cave d...@avvanta.com wrote: I don't know. When I was younger, I used to track these problems down and try to explain in detail why buffered I/O is a bad bet with pipes, sockets etc. I don't think anyone listened. I think I am going to experiment with I

Re: [Haskell-cafe] parse error in pattern, and byte code interpreter

2012-01-14 Thread Brandon Allbery
On Sat, Jan 14, 2012 at 18:18, TP paratribulati...@free.fr wrote: Times expr1 Plus( expr2 expr3 ) - OCaml pattern syntax is not the same as Haskell pattern syntax. The correct way to write that pattern is Times expr1 (Plus expr2 expr3) This is consistent with Haskell not using

Re: [Haskell-cafe] named pipe interface

2012-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2012 at 12:25, Serge D. Mechveliani mech...@botik.ruwrote: On Fri, Jan 13, 2012 at 04:34:37PM +0100, Chadda?? Fouch?? wrote: Now that seems interesting, but just to be clear : did you choose this solution (and why won't you use the FFI instead) or is this just to see how

Re: [Haskell-cafe] named pipe interface

2012-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2012 at 13:23, Michael Craig mks...@gmail.com wrote: Brandon, can you elaborate? Are you talking about UNIX named pipes or FIFO/queue data structures in general? I mean POSIX named pipes. They work, but they don't do what most people think they do, and they're rather annoying

Re: [Haskell-cafe] How to terminate the process group of a processcreated with createProcess?

2012-01-12 Thread Brandon Allbery
On Thu, Jan 12, 2012 at 06:56, André Scholz andre.sch...@uni-bremen.dewrote: gid - createProcessGroup pid but i get the error message: createProcessGroup: permission denied It's only going to work on BSDish systems; on systems using the SVID/POSIX model, only the current process

Re: [Haskell-cafe] STM: nested atomically error

2012-01-12 Thread Brandon Allbery
On Thu, Jan 12, 2012 at 16:50, Andrew Coppin andrewcop...@btinternet.comwrote: My guess is that your debug printing is causing something to be evaluated when it otherwise wouldn't be, causing a transaction to begin within a transaction. My guess is something is being lazily evaluated as

Re: [Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-11 Thread Brandon Allbery
On Wed, Jan 11, 2012 at 02:12, Eugene Kirpichov ekirpic...@gmail.comwrote: I think a nice fix would be to employ gcc's ability to read options from a file - gcc @file - and write overly long option strings into temp files. What immediately occurs to me is, what if the problem (or another

Re: [Haskell-cafe] GHC exceeding command line length limit with split-objs - and a possible fix

2012-01-11 Thread Brandon Allbery
On Wed, Jan 11, 2012 at 14:50, Eugene Kirpichov ekirpic...@gmail.comwrote: Do you think that what I originally proposed is still a good thing to have before implementing your solution? (it definitely would be for myself, as it's easier to do and I'd then quicker become able to build my

Re: [Haskell-cafe] How to terminate the process group of a process created with createProcess?

2012-01-11 Thread Brandon Allbery
On Wed, Jan 11, 2012 at 16:26, André Scholz andre.sch...@uni-bremen.dewrote: (on unix) creating a process A which spawns itself a subprocess B and terminating process A before it finishes leaves process B as a process on its own. This is because terminateProcess sends the sigterm signal to

Re: [Haskell-cafe] too many open files using snap

2012-01-08 Thread Brandon Allbery
On Sun, Jan 8, 2012 at 09:50, Felipe Almeida Lessa felipe.le...@gmail.comwrote: If you're on Linux, then you may $ ls -lah /proc/PID/fd to see where these open files are pointing to. And on other systems lsof can determine this information. $ lsof -p PID -- brandon s allbery

Re: [Haskell-cafe] Questions on the Haskell 2010 report

2012-01-08 Thread Brandon Allbery
On Sun, Jan 8, 2012 at 12:53, Silvio Frischknecht silvio.fris...@gmail.comwrote: module → module modid [exports] where body | body body→ { impdecls ; topdecls } | { impdecls } | { topdecls } You

Re: [Haskell-cafe] Simple type-class experiment turns out not so simple...

2012-01-08 Thread Brandon Allbery
On Sun, Jan 8, 2012 at 15:55, Christoph Breitkopf chbreitk...@googlemail.com wrote: On Sun, Jan 8, 2012 at 9:25 PM, Brent Yorgey byor...@seas.upenn.eduwrote: On Fri, Jan 06, 2012 at 10:51:58AM +, Steve Horne wrote: If I specify both extensions (-XMultiParamTypeClasses and

Re: [Haskell-cafe] How to split this string.

2012-01-05 Thread Brandon Allbery
On Thu, Jan 5, 2012 at 05:57, Steve Horne sh006d3...@blueyonder.co.ukwrote: -- groupCut - Similar to groupBy, but where groupBy assumes an equivalence relation, -- groupCut takes a function that indicates where to cut. The two parameters to this -- function are always adjacent items

Re: [Haskell-cafe] Package Versioning Policy

2012-01-05 Thread Brandon Allbery
On Thu, Jan 5, 2012 at 12:30, Christoph Breitkopf chbreitk...@googlemail.com wrote: On Thu, Jan 5, 2012 at 6:15 PM, Johan Tibell johan.tib...@gmail.comwrote: c) You are not allowed to add new instances. I don't get this - how is this any worse than b)? You cannot prevent the import of

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-04 Thread Brandon Allbery
On Wed, Jan 4, 2012 at 08:41, Yves Parès limestr...@gmail.com wrote: Would you try: f :: a - a f x = undefined :: a And tell me if it works? IMO it doesn't. It won't; a will be a new type variable unrelated to the one in the signature, in the absence of ScopedTypeVariables and an explicit

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-03 Thread Brandon Allbery
On Tue, Jan 3, 2012 at 05:17, Yucheng Zhang yczhan...@gmail.com wrote: subsome :: [RRule nt t s] - Either String ([t], s) It seems to me that the compiler is not sure the two 'nt' are equal. The ScopedTypeVariables can make the compiler believe they are equal. But ScopedTypeVariables is

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-03 Thread Brandon Allbery
On Tue, Jan 3, 2012 at 05:50, Yucheng Zhang yczhan...@gmail.com wrote: On Tue, Jan 3, 2012 at 6:44 PM, Brandon Allbery allber...@gmail.com wrote: On Tue, Jan 3, 2012 at 05:17, Yucheng Zhang yczhan...@gmail.com wrote: subsome :: [RRule nt t s] - Either String ([t], s) It seems to me

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-03 Thread Brandon Allbery
On Tue, Jan 3, 2012 at 06:35, Yucheng Zhang yczhan...@gmail.com wrote: legSome ((LegGram g)::LegGram nt t s) ntV If you compile this without ScopedTypeVariables extension, GHC will remind you of it: Illegal signature in pattern: LegGram nt t s Use -XScopedTypeVariables to

Re: [Haskell-cafe] Solved but strange error in type inference

2012-01-03 Thread Brandon Allbery
On Tue, Jan 3, 2012 at 06:43, Yves Parès limestr...@gmail.com wrote: That is error-prone. Plus the code does not need ScopedTypeVariables. The real problem comes from the use of a class constraint on the LegGram data constructor. data LegGram nt t s = Ord nt = LegGram (M.Map nt [RRule nt t

Re: [Haskell-cafe] Grok Monad Transformers - some help needed

2012-01-02 Thread Brandon Allbery
On Mon, Jan 2, 2012 at 03:32, Steve Horne sh006d3...@blueyonder.co.ukwrote: BTW - interesting how the signatures of test1 and test2 are reported - I hadn't realised monad transformers were relevant there. Of course it does seem a bit silly to implement both StateT and State when StateT can

Re: [Haskell-cafe] More cabal install problems

2012-01-02 Thread Brandon Allbery
On Mon, Jan 2, 2012 at 21:36, Victor Miller victorsmil...@gmail.com wrote: command line: cannot satisfy -package-id mtl-2.0.1.0-5b7a9cce5565d8cc8721ba4f95becf1b (use -v for more information) However, cabal list tells me: * mtl Synopsis: Monad classes, using functional dependencies

Re: [Haskell-cafe] Installing glib

2012-01-01 Thread Brandon Allbery
On Sun, Jan 1, 2012 at 21:49, Victor Miller victorsmil...@gmail.com wrote: Cannot find gtk2hsC2hs Please install `gtk2hs-buildtools` first and check that the install directory is in your PATH (e.g. HOME/.cabal/bin). The message there is incorrect for Mac OS X; cabal installs executables

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-26 Thread Brandon Allbery
On Mon, Dec 26, 2011 at 12:20, Hans Aberg haber...@telia.com wrote: On 26 Dec 2011, at 16:11, AUGER Cédric wrote: But if you are under Windows, or Mac OS, I cannot tell (as well as I cannot tell if you are under a POSIX system not running xorg, such as the tty1..ttyn consoles) On OS X

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-21 Thread Brandon Allbery
On Wed, Dec 21, 2011 at 04:51, Hans Aberg haber...@telia.com wrote: The one on the list is not a mathematical symbol. It should be ⋆ STAR OPERATOR U+22C6 or ∗ ASTERISK OPERATOR U+2217. ...except, at least in my current font, the former is microscopic and the latter not a whole lot better. The

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-20 Thread Brandon Allbery
On Tue, Dec 20, 2011 at 17:52, Jesse Schalken jesseschal...@gmail.comwrote: On Wed, Dec 21, 2011 at 1:09 AM, Gregory Crosswhite gcrosswh...@gmail.com wrote: That would certainly be a lovely idea *if* we were programming in Agda, but I was under the assumption that this conversation was

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-20 Thread Brandon Allbery
On Tue, Dec 20, 2011 at 21:05, Andrew Cowie and...@operationaldynamics.comwrote: Now we just need λ to replace \, → to replace -, and ≠ to replace /= (which still looks like division assignment no matter how hard I squint my eyes. 25 years of C and C derived languages is hard to forget).

Re: [Haskell-cafe] [Alternative] summary of my understanding so far

2011-12-18 Thread Brandon Allbery
On Sun, Dec 18, 2011 at 20:42, Richard O'Keefe o...@cs.otago.ac.nz wrote: No. Not by a country mile. It's better than non-existent. It's better than misleading. But it's not even on the same *continent* as adequate. +1 -- brandon s allbery

Re: [Haskell-cafe] How to get a file path to the program invoked?

2011-12-15 Thread Brandon Allbery
On Thu, Dec 15, 2011 at 09:48, Peter Wortmann sc...@leeds.ac.uk wrote: path portably from C [1]. Using argv[0] just gave me the path of the GHC wrapper script, for example - as it uses exec without -a. Note that exec -a is a bash-ism and not portable to POSIX shells (ash on *BSD, dash on

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Brandon Allbery
On Wed, Dec 14, 2011 at 21:01, Gregory Crosswhite gcrosswh...@gmail.comwrote: Also, frankly, I haven't seen much of a sign that the community itself has some kind of deep understanding of some/many that I lack. People have been giving me different answers to my question, many of which are not

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Brandon Allbery
On Wed, Dec 14, 2011 at 23:49, Antoine Latter aslat...@gmail.com wrote: Or we could not use 'some' and 'many' with list and maybe :-) Yes, yes, we get the message, a wink and a nod is all that's needed to discard the nonsensical notion that types and typeclasses *mean* something. -- brandon

Re: [Haskell-cafe] [Alternative] change some/many semantics

2011-12-14 Thread Brandon Allbery
On Thu, Dec 15, 2011 at 02:23, Gregory Crosswhite gcrosswh...@gmail.comwrote: On Dec 15, 2011, at 3:36 PM, Antoine Latter wrote: Even the operators at hand ('many' and 'some') are partial in parsing, but I'm not prepared to throw them out. Okay, I must confess that this straw man has been

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Brandon Allbery
On Mon, Dec 12, 2011 at 14:09, Bryan O'Sullivan b...@serpentine.com wrote: On Mon, Dec 12, 2011 at 9:42 AM, Carl Howells chowell...@gmail.comwrote: Well, as I read it, the whole point of this thread was They don't make sense for many instances of Alternative. They should be moved to a

Re: [Haskell-cafe] ANNOUNCE: hxournal-0.5.0.0 - A pen notetaking program written in haskell

2011-12-12 Thread Brandon Allbery
On Mon, Dec 12, 2011 at 19:22, Ian-Woo Kim ianwoo...@gmail.com wrote: A workaround is to make a symbolic link to libstdc++.so.6 with the name of libstdc++.so in /usr/lib or /usr/local/lib or other dynamic library path like the following. ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-11 Thread Brandon Allbery
On Sun, Dec 11, 2011 at 10:44, Antoine Latter aslat...@gmail.com wrote: On Sat, Dec 10, 2011 at 5:31 PM, Brandon Allbery allber...@gmail.com wrote: On Sat, Dec 10, 2011 at 18:25, Peter Simons sim...@cryp.to wrote: src/Parsers.hs:163:52: Couldn't match expected type `Char

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-11 Thread Brandon Allbery
On Mon, Dec 12, 2011 at 00:18, Gregory Crosswhite gcrosswh...@gmail.comwrote: It is only recently that I have been able to grok what some and many are even about (I think), and they seem to only make sense in cases where executing the Alternative action results in a portion of some input being

Re: [Haskell-cafe] [ANNOUNCEMENT] xmobar 0.14

2011-12-10 Thread Brandon Allbery
On Sat, Dec 10, 2011 at 18:25, Peter Simons sim...@cryp.to wrote: previous versions of xmobar used to compile fine with GHC 6.10.4, but the new version no longer does: src/Parsers.hs:163:52: Couldn't match expected type `Char' against inferred type `[Char]' Expected type:

Re: [Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 04:16, Yves Parès limestr...@gmail.com wrote: Why do you people hate 'if' statements? It's more that the language spec does; if statements, along with a number of other things, desugar to case which is the fundamental conditional construct. (And more personally, I find

Re: [Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 05:16, Yves Parès limestr...@gmail.com wrote: I agree with all that, but in *this *special case, I think that I should also note that the OP mentioned using if, but was surprised/confused by the behavior of case, which is why that's what we've been focusing on. --

Re: [Haskell-cafe] Cabal issue

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 06:20, Kevin Jardine kevinjard...@gmail.com wrote: Had problem with deprecated package, was told my only option was to wipe my Haskell install and start over. Is this true and if so, doesn't this mean that Cabal (or the package management system that it is a part of) is

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 17:27, Antoine Latter aslat...@gmail.com wrote: On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink hessel...@gmail.com wrote: Since you ask how other packages solve this problem, and since most packages use template haskell, I have to ask: why can't you use template

Re: [Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-08 Thread Brandon Allbery
On Thu, Dec 8, 2011 at 15:52, Tom Murphy amin...@gmail.com wrote: On Wed, Dec 7, 2011 at 11:46 PM, Brandon Allbery allber...@gmail.comwrote: case () of () | s == reverse s - putStrLn palindrome _ - putStrLn nope This is kind of a hack of case, though. I think

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 06:47, Dan Rosén d...@student.gu.se wrote: I'm using Haskell to run a lot of instances of an Automated Thorem Prover, eprover. I have pasted a smaller version of my program at http://hpaste.org/54954. It runs eprover sequentially on all input files, with a timeout of

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 10:27, Felipe Almeida Lessa felipe.le...@gmail.comwrote: On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery allber...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess. There's also some POSIX stuff

Re: [Haskell-cafe] terminateProcess leaves zombie processes around

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 20:35, Jason Dagit dag...@gmail.com wrote: They *do* terminate; a zombie is a dead process waiting for its parent to reap it with waitForProcess. There's also some POSIX stuff you can do to have them auto-reaped, but doing that correctly and portably is somewhat

Re: [Haskell-cafe] Why doesn't this work? (palindrome :: IO)

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 23:24, Alexej Segeda aloscha_den_st...@hotmail.comwrote: case s of (s == reverse s)- putStrLn (s ++ is a palindrome) otherwise - putStrLn (s ++ is not a palindrome) case does pattern matching, not

Re: [Haskell-cafe] How to get a file path to the program invoked?

2011-12-01 Thread Brandon Allbery
On Thu, Dec 1, 2011 at 14:26, dokondr doko...@gmail.com wrote: On the contrary, standard shell variable $0 - contains a full path to the program location in the directory structure, no matter from what directory the program was called If the shell found it by $PATH search, $0 will be simply

Re: [Haskell-cafe] Using Data,TypeLevel.Num

2011-11-30 Thread Brandon Allbery
On Wed, Nov 30, 2011 at 23:55, Richard O'Keefe o...@cs.otago.ac.nz wrote: The value-level reflection functions in Data.TypeLevel.Num.Ops all seem to be 'undefined'. Those are operations on type level representations, but expressed at the value level; that is, in some sense the opposite of

Re: [Haskell-cafe] Decision procedure for foldr/foldl/foldl'?

2011-11-22 Thread Brandon Allbery
On Tue, Nov 22, 2011 at 09:10, David Fox dds...@gmail.com wrote: I think the other replies in this thread speak for themselves - i found them very helpful. That would be because they mostly back-doored around your stated intent. -- brandon s allbery

Re: [Haskell-cafe] Superset of Haddock and Markdown

2011-11-21 Thread Brandon Allbery
On Mon, Nov 21, 2011 at 12:28, David Fox dds...@gmail.com wrote: On Sun, Nov 20, 2011 at 2:20 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 21 November 2011 03:19, David Fox dds...@gmail.com wrote: I'm not sure the pandoc license (GPL) is compatible with the GHC license.

Re: [Haskell-cafe] os.path.expanduser analogue

2011-11-20 Thread Brandon Allbery
On Sun, Nov 20, 2011 at 20:36, Ben Gamari bgamari.f...@gmail.com wrote: expandUser :: FilePath - IO FilePath expandUser p = if ~/ `isPrefixOf` p then do u - getLoginName return $ u ++ drop 2 p else return p expandUser ~ =

Re: [Haskell-cafe] Documenting strictness properties for Data.Map.Strict

2011-11-18 Thread Brandon Allbery
On Fri, Nov 18, 2011 at 12:16, Roman Cheplyaka r...@ro-che.info wrote: * Johan Tibell johan.tib...@gmail.com [2011-11-18 08:06:29-0800] On Fri, Nov 18, 2011 at 12:09 AM, Roman Cheplyaka r...@ro-che.info wrote: Is it mentioned anywhere that Map is spine-strict? It's not and we should

Re: [Haskell-cafe] Deduce problem.

2011-11-16 Thread Brandon Allbery
On Wed, Nov 16, 2011 at 23:54, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: I think this is where I did not understand from the very beginning. If the the declaration was correct, then why cannot b be H? Referring to Data.List.genericLength, I was confused. Because it doesn't

Re: [Haskell-cafe] Problems with installing the correct version of process. Help?

2011-11-15 Thread Brandon Allbery
On Tue, Nov 15, 2011 at 14:56, Blaine frik...@gmail.com wrote: ** Missing header file: runProcess.h* [blaine@macbook:~/Dropbox/src/berp/compiler Tue Nov 08] 93$ ls /usr/lib/ghc-6.12.1/process-1.0.1.2/include/ HsProcessConfig.h *runProcess.h* Notice it's found in the files for the other

Re: [Haskell-cafe] A Mascot

2011-11-15 Thread Brandon Allbery
On Tue, Nov 15, 2011 at 20:06, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Um do we _really_ need a mascot? And no offence to your artistic abilities, but even if we did, I don't see how a lamb relates to Haskell :/ Lamb-da, obviously. -- brandon s allbery

Re: [Haskell-cafe] FFI / enums

2011-11-07 Thread Brandon Allbery
On Mon, Nov 7, 2011 at 13:44, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Does this work with ghc -XForeignFunctionInterface ? http://en.wikibooks.org/wiki/Haskell/FFI#Enumerations I am getting a syntax error right after #{. But then, the description is for hsc2hs (not ghc).

Re: [Haskell-cafe] memorize function with number parameterized types in GHC

2011-11-06 Thread Brandon Allbery
On Sun, Nov 6, 2011 at 10:31, Bin Jin bjin1...@gmail.com wrote: Then how about p2num, how to memorize this function. Also I think it's okay to memorize this kind of function. The type system ensure all calling of montgKeys have the same type, e.g., it's a pure function without parameter,

Re: [Haskell-cafe] Time zones and IO

2011-11-06 Thread Brandon Allbery
On Sun, Nov 6, 2011 at 17:25, Heller Time hellert...@gmail.com wrote: I rationalized the use of unsafePerformIO in the library by deciding that it was only being used in the case of a LocalTime instance (a user could always stick to UTCTime and avoid the issues) and that unless the machine

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Brandon Allbery
On Tue, Nov 1, 2011 at 06:14, Ketil Malde ke...@malde.org wrote: Max Bolingbroke batterseapo...@hotmail.com writes: This is where it stranded the last time, IIRC. That sentiment makes me a bit uneasy; so you are the official maintainer of a package on Hackage, but you do not want to hear

Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks

2011-11-01 Thread Brandon Allbery
On Tue, Nov 1, 2011 at 08:24, Nick Bowler nbow...@elliptictech.com wrote: On 2011-11-01 12:59 +0100, Daniel Díaz Casanueva wrote: How about to a new optional Cabal field like mail-report? (don't bother about this name, I chose it randomly) Doing anything like this in the .cabal file is a

Re: [Haskell-cafe] control-c only caught once -- bug?

2011-10-29 Thread Brandon Allbery
An interactive program that wants to handle interrupt itself should not rely on default signal behavior, because that has no idea where to stop (and I would argue that attempting to coerce interactive signals into exceptions within the program is not the right way to do things, because they're

Re: [Haskell-cafe] Up and Down the Latter of Abstraction

2011-10-12 Thread Brandon Allbery
On Wed, Oct 12, 2011 at 05:28, Ertugrul Soeylemez e...@ertes.de wrote: Quite the contrary: As we like to write our algorithms purely, interactive visualization becomes almost trivial, once you have a useful library for doing it. The Gloss library is a good start for visualizing I thought

Re: [Haskell-cafe] Is it possible to represent such polymorphism?

2011-10-02 Thread Brandon Allbery
On Sun, Oct 2, 2011 at 15:17, sdiy...@sjtu.edu.cn wrote: But it's so verbose (even more so than similar C++ template code I guess), introduces an additional name (the typeclass) into the current scope, and requires 2 extensions: TypeFamilies and FlexibleInstances.Is there a cleaner way to do

Re: [Haskell-cafe] Fwd: problem with cabal install MissingH-1.1.1.0

2011-09-24 Thread Brandon Allbery
On Thu, Sep 22, 2011 at 23:10, Mariano Cortesi mcort...@gmail.com wrote: When i start EclipseFP, it tries to build the scion-browser, but it fails inmediately with a message from cabal: cabal: The program ghc version =6.4 is required but it could not be found. Google wasn't much help. Is

Re: [Haskell-cafe] regex-applicative library needs your help! (algorithmic challenge)

2011-09-22 Thread Brandon Allbery
On Wed, Sep 21, 2011 at 20:05, Edward Kmett ekm...@gmail.com wrote: I usually enforce constraints like this with ! patterns in the constructors, which lets me enforce the fact that at least I know that any attempt to define a cycle like this will bottom out, so I can safely think only

<    1   2   3   4   >