Re: [Haskell-cafe] unable to run ghci (7.4.1)?

2012-05-03 Thread Brandon Allbery
On Thu, May 3, 2012 at 12:35 PM, Morel Pisum wrote: > Weird. The "base" package is actually the most important package and > should be included in the haskell-platform. > > Anyway; you could try to do "cabal install base" or so. > cabal-install cannot install base; it is and must be part of the c

Re: [Haskell-cafe] unable to run ghci (7.4.1)?

2012-05-03 Thread Brandon Allbery
On Thu, May 3, 2012 at 12:29 PM, Baojun Wang wrote: > /usr/lib64/ghc-7.4.1/base-4.5.0.0/HSbase-4.5.0.0.o: unknown symbol > `stat' > This is not a missing package, as some respondents seem to think; it's a sign that something went very wrong during building it and the result is broken at runtime.

Re: [Haskell-cafe] Learn you

2012-05-02 Thread Brandon Allbery
On Wed, May 2, 2012 at 2:02 PM, Bardur Arantsson wrote: > On 05/02/2012 07:37 PM, Brandon Allbery wrote: > >> The English title does require a little context for the humor: it >> leverages a chain of poor-translation memes going back (at least) to >> all-your-base. >&

Re: [Haskell-cafe] Learn you

2012-05-02 Thread Brandon Allbery
On 2 May 2012 18:18, Brent Yorgey wrote: > I am curious how the title was translated. Of course, the English > title "Learn You a Haskell for Great Good" uses intentionally > ungrammatical/unidiomatic English for humorous effect. Is the > On Wed, May 2, 2012 at 1:25 PM, Colin Adams wrote: > I

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

2012-04-23 Thread Brandon Allbery
On Mon, Apr 23, 2012 at 17:16, Gregg Lebovitz 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 it t

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

2012-04-23 Thread Brandon Allbery
On Mon, Apr 23, 2012 at 11:39, Gregg Lebovitz 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 little secret t

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

2012-04-22 Thread Brandon Allbery
On Sun, Apr 22, 2012 at 13:15, Alvaro Gutierrez 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 cost: > there i

Re: [Haskell-cafe] Connection to database

2012-04-16 Thread Brandon Allbery
On Mon, Apr 16, 2012 at 18:14, yrazes 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: > > Database/HDBC/MyS

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 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 NoMonomorphismRestriction to be the

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 wrote: > 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 >> (except balanced

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 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 > > > > C

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

2012-04-04 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? N

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 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 couple of years, so

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 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 this shouldn't be a prob

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 wrote: > If I try to su the runShell function with the following command, it simply > blocks forever: > > git --no-pager blame > > but if I do: > > git status > > The runShell function works as expected. Can someone shed some light on > why

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 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 useful it rea

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 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 information in

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 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 submodes which

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 cont

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

2012-03-14 Thread Brandon Allbery
On Thu, Mar 15, 2012 at 02:21, Haisheng Wu 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, please use tho

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 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 protested the acceptance o

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 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 s allbery

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 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 /Applications

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

2012-03-03 Thread Brandon Allbery
On Sat, Mar 3, 2012 at 08:39, Graham Berks 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 and is trying

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 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 binary file >

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

2012-02-22 Thread Brandon Allbery
On Wed, Feb 22, 2012 at 06:26, Alexander Vasiliev wrote: > 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 7.0.3. Can > anyo

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 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 xattr -d. Bzuh?

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 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 don't see it beca

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 wrote: > 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$ uname -a > Darwin Macin

Re: [Haskell-cafe] Switching GHC Version

2012-02-06 Thread Brandon Allbery
On Mon, Feb 6, 2012 at 18:27, HASHIMOTO, Yusaku 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 breaking environme

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

2012-01-28 Thread Brandon Allbery
On Sat, Jan 28, 2012 at 15:26, Ilya Portnov 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-* packages), which

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 wrote: > 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 follow or use DPH, I jus

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 wrote: > I have installed ghc-7.4.0.20111219 and this > announcementsays > that "The > release candidate accidentally includes the random, primitive, vector and > dph l

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 17:15, David Thomas wrote: > 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 than that... --

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Brandon Allbery
On Wed, Jan 18, 2012 at 15:20, Hans Aberg 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 allbery

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-ce

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: >> >> http://en.wikipedia.org/wiki/**Portland_Oregon

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 >> > <mailto:mikhail.vorozhtsov@**gmail.com>> >> wrote

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 s

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] parse error in pattern, and byte code interpreter

2012-01-14 Thread Brandon Allbery
On Sat, Jan 14, 2012 at 18:18, TP 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 parentheses for function par

Re: [Haskell-cafe] named pipe interface

2012-01-14 Thread Brandon Allbery
On Sat, Jan 14, 2012 at 11:57, Donn Cave 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 am old, so l

Re: [Haskell-cafe] named pipe interface

2012-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2012 at 13:23, Michael Craig 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 to work with i

Re: [Haskell-cafe] named pipe interface

2012-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2012 at 12:25, Serge D. Mechveliani wrote: > 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 to work it

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

2012-01-12 Thread Brandon Allbery
On Thu, Jan 12, 2012 at 16:50, Andrew Coppin wrote: > 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 usual, but if that is forc

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 wrote: >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 can be converted in

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 wrote: > (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 the > process only and

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 wrote: > 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 application > with split-

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 wrote: > 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 manifestation of same)

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 wrote: > >> On Fri, Jan 06, 2012 at 10:51:58AM +, Steve Horne wrote: >> > If I specify both extensions (-XMultiParamTypeClasses and >> > -XFlexibleInstances) it

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 wrote: >module → module modid [exports] where body >| body >body→ { impdecls ; topdecls } >| { impdecls } >| { topdecls } > > You can't see it in thi

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 wrote: > 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] 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 wrote: > >> >> 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 new insta

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

2012-01-05 Thread Brandon Allbery
On Thu, Jan 5, 2012 at 05:57, Steve Horne wrote: > -- 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 from the list, and if the

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 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 forall in the

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 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 s]) > > Short an

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 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 permit it > R

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 wrote: > On Tue, Jan 3, 2012 at 6:44 PM, Brandon Allbery > wrote: > > On Tue, Jan 3, 2012 at 05:17, Yucheng Zhang wrote: > >> > >> subsome :: [RRule nt t s] -> Either String ([t], s) > >> > >> It se

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 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 enabled already.

Re: [Haskell-cafe] More cabal install problems

2012-01-02 Thread Brandon Allbery
On Mon, Jan 2, 2012 at 21:36, Victor Miller wrote: > : 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 > Default available ver

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 wrote: > 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 > implement State for you.

Re: [Haskell-cafe] Installing glib

2012-01-01 Thread Brandon Allbery
On Sun, Jan 1, 2012 at 21:49, Victor Miller 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 somewhere under ~/Librar

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 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 one can make

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 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 advantage of th

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 wrote: > 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). > Some of it is already support

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 wrote: > On Wed, Dec 21, 2011 at 1:09 AM, Gregory Crosswhite > wrote: > >> That would certainly be a lovely idea *if* we were programming in Agda, >> but I was under the assumption that this conversation was about Haskell. >> :-) >> > > I don't have

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 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 allber...@gmail.com

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 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 Debian/Ubuntu,

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

2011-12-14 Thread Brandon Allbery
On Thu, Dec 15, 2011 at 02:23, Gregory Crosswhite wrote: > 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 causing my pa

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

2011-12-14 Thread Brandon Allbery
On Wed, Dec 14, 2011 at 23:49, Antoine Latter 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 s allbery

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 wrote: > 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 > consistent with

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 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 > This is an ind

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 wrote: > On Mon, Dec 12, 2011 at 9:42 AM, Carl Howells wrote: > >> >> 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 different class." It sounded lik

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 wrote: > 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 > consumed or not

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

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

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

2011-12-10 Thread Brandon Allbery
On Sat, Dec 10, 2011 at 18:25, Peter Simons 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: GenParse

Re: [Haskell-cafe] Generating Code

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 17:27, Antoine Latter wrote: > On Fri, Dec 9, 2011 at 2:17 PM, Erik Hesselink > 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 haskell for this? > > For my case

Re: [Haskell-cafe] Cabal issue

2011-12-09 Thread Brandon Allbery
On Fri, Dec 9, 2011 at 06:20, Kevin Jardine 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 > broken? > http://

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 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. -- brandon s allbery

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 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 the indentation beh

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 wrote: > On Wed, Dec 7, 2011 at 11:46 PM, Brandon Allbery wrote: > >> > case () of >> > () | s == reverse s -> putStrLn "palindrome" >> > _ -> putStrLn "nope" >> >

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 wrote: > case s of >(s == reverse s)-> putStrLn (s ++ " is a > palindrome") >otherwise -> putStrLn (s ++ " is not a > palindrome") > case does pattern matching, not Boolean expression

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

2011-12-07 Thread Brandon Allbery
On Wed, Dec 7, 2011 at 20:35, Jason Dagit 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 > > painful. >

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 wrote: > On Wed, Dec 7, 2011 at 1:19 PM, Brandon Allbery > 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 d

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 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 100ms. Unfortunat

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 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 the program nam

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

2011-11-30 Thread Brandon Allbery
On Wed, Nov 30, 2011 at 23:55, Richard O'Keefe 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 what you're look

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 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 allber...@gmail.com

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

2011-11-21 Thread Brandon Allbery
On Mon, Nov 21, 2011 at 12:28, David Fox wrote: > On Sun, Nov 20, 2011 at 2:20 PM, Ivan Lazar Miljenovic > wrote: > > On 21 November 2011 03:19, David Fox wrote: > >> I'm not sure the pandoc license (GPL) is compatible with the GHC > license. > > Do you mean because GHC ships with a Haddock bin

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

2011-11-20 Thread Brandon Allbery
On Sun, Nov 20, 2011 at 20:36, Ben Gamari wrote: > expandUser :: FilePath -> IO FilePath > expandUser p = if "~/" `isPrefixOf` p > then do u <- getLoginName > return $ u ++ drop 2 p > else return p > expandUser "~" = fmap homeDir

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 wrote: > * Johan Tibell [2011-11-18 08:06:29-0800] > > On Fri, Nov 18, 2011 at 12:09 AM, Roman Cheplyaka > wrote: > > > Is it mentioned anywhere that Map is spine-strict? > > It's not and we should probably mention it. > > looks pretty (spine-)stri

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 does

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] Problems with installing the correct version of "process". Help?

2011-11-15 Thread Brandon Allbery
On Tue, Nov 15, 2011 at 14:56, Blaine 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 install of "pro

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" (no

Re: [Haskell-cafe] Time zones and IO

2011-11-06 Thread Brandon Allbery
On Sun, Nov 6, 2011 at 17:25, Heller Time 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 > running the program

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 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, it's safe to memo

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 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 mistake, since th

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 wrote: > Max Bolingbroke 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 about it when it fails to comp

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 only

<    1   2   3   4   >