[Haskell-cafe] cabal probems with binary/containers packages

2009-10-27 Thread brian
It all started with this: Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found) so I tried > cabal upgrade binary Resolving dependencies... Configuring containers-0.2.0.1... Preprocessing library containers-0.2.0

Re: [Haskell-cafe] Re: What *is* a DSL?

2009-10-27 Thread Nils Anders Danielsson
On 2009-10-22 14:44, Robert Atkey wrote: On Sat, 2009-10-10 at 20:12 +0200, Ben Franksen wrote: Since 'some' is defined recursively, this creates an infinite production for numbers that you can neither print nor otherwise analyse in finite time. Yes, sorry, I should have been more careful the

Re: [Haskell-cafe] What *is* a DSL?

2009-10-27 Thread Nils Anders Danielsson
On 2009-10-22 14:56, Robert Atkey wrote: Yes, it might have been that, OTOH I'm sure I saw it in some Haskell code. Maybe I was imagining it. There is some related Haskell code in the Agda repository. Do you know of a characterisation of what languages having a possibly infinite amount of non

[Haskell-cafe] Re: cabal haddock hpc, exposed modules?

2009-10-27 Thread Greg Fitzgerald
The workaround is for a script to traverse the filesystem and generate a list of modules that can then be copied into the .cabal for haddock and Setup.hs for hpc. If anyone else is trying to do the same, here's the code: http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11224#a11224 script copied bel

Re: [Haskell-cafe] simple parsing

2009-10-27 Thread Thomas Danecker
Your pattern in the head of the function "chromoResult (a:b:c:xs)" requires the list to have at least three elements in it. I doubt that all the recursive calls take this into consideration... 2009/10/27 satorisanitarium : > I'm trying to parse a list of numbers plus four diferent signs (+-*/) > i

Re: [Haskell-cafe] simple parsing

2009-10-27 Thread Svein Ove Aas
On Tue, Oct 27, 2009 at 11:38 PM, satorisanitarium wrote: > I'm trying to parse a list of numbers plus four diferent signs (+-*/) > in this way: > *snip* > I suspect my approach is flawed but i have exausted my ideas. > I need  a fresh approach so if anybody would be kind enough and just > give me

[Haskell-cafe] simple parsing

2009-10-27 Thread satorisanitarium
I'm trying to parse a list of numbers plus four diferent signs (+-*/) in this way: Lets say the list is "32+5/46" result would be "2+5/4" I get: "2+5/4*** Exception: geneticSimple.hs:(55,0)-(65,35): Non-exhaustive patterns in function chromoResult If the list is "32+5**6" result would be "2+5*6"

[Haskell-cafe] cabal haddock hpc, exposed modules?

2009-10-27 Thread Greg Fitzgerald
I have a cabal package that defines a few dozen modules, and I'm hoping to generate documentation and code coverage for all modules without listing each module explicitly. currently my .cabal includes: library exposed-modules: Language.Idl.Data, Language.Idl.Merge, Language.Idl.Parser,

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Don Stewart
duncan.coutts: > On Tue, 2009-10-27 at 17:00 +0100, Daniel Fischer wrote: > > > Look at the sources: > > > > hGetLine :: Handle -> IO ByteString > > hGetLine h = wantReadableHandle "Data.ByteString.hGetLine" h $ \ handle_ -> > > do > > case haBufferMode handle_ of > >NoBuffering -> e

Re: [Haskell-cafe] ANN: haskell-mode 2.5

2009-10-27 Thread Svein Ove Aas
On Tue, Oct 27, 2009 at 8:31 PM, Colin Paul Adams wrote: >> "Svein" == Svein Ove Aas writes: > >    Svein> Known bugs: * Occasionally, the haskell-indentation parser >    Svein> will get stuck   on what it considers to be invalid haskell > > Quite often. > >    Svein> code, and refuse to acce

Re: Re[2]: [Haskell-cafe] Is there a null statement that does nothing?

2009-10-27 Thread Svein Ove Aas
On Tue, Oct 27, 2009 at 7:07 PM, Bulat Ziganshin wrote: > Hello Kim-Ee, > > Tuesday, October 27, 2009, 8:08:27 PM, you wrote: > >> Just for completeness' sake, bottom is a value for any expression. >> Wouldn't making the else clause optional by defaulting to "undefined" >> worthy of consideration

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Duncan Coutts
On Tue, 2009-10-27 at 17:00 +0100, Daniel Fischer wrote: > Look at the sources: > > hGetLine :: Handle -> IO ByteString > hGetLine h = wantReadableHandle "Data.ByteString.hGetLine" h $ \ handle_ -> do > case haBufferMode handle_ of >NoBuffering -> error "no buffering" >_other

Re: [Haskell-cafe] ANN: haskell-mode 2.5

2009-10-27 Thread Colin Paul Adams
> "Svein" == Svein Ove Aas writes: Svein> Known bugs: * Occasionally, the haskell-indentation parser Svein> will get stuck   on what it considers to be invalid haskell Quite often. Svein> code, and refuse to accept your commands; this includes, Svein> mainly, haskell-newline

Re[2]: [Haskell-cafe] Is there a null statement that does nothing?

2009-10-27 Thread Bulat Ziganshin
Hello Kim-Ee, Tuesday, October 27, 2009, 8:08:27 PM, you wrote: > Just for completeness' sake, bottom is a value for any expression. > Wouldn't making the else clause optional by defaulting to "undefined" > worthy of consideration for Evil Haskell? in this case you will get an exception when co

Re: [Haskell-cafe] Is there a null statement that does nothing?

2009-10-27 Thread Evan Laforge
On Tue, Oct 27, 2009 at 10:08 AM, Kim-Ee Yeoh wrote: > > Hi Brent, > > Re: '"if" expressions, not statements' is an elegant clarification, one > definitely for the haskellwiki, if not there already. > > Just for completeness' sake, bottom is a value for any expression. > Wouldn't making the else c

[Haskell-cafe] ANN: WFLP2010 2nd CFP: LNCS + invited speaker + abstract due Nov 9

2009-10-27 Thread Pablo Nogueira
Second Call For Papers 19th International Workshop on Functional and (Constraint) Logic Programming Madrid, Spain, January 17, 2010 http://bab

Re: [Haskell-cafe] Is there a null statement that does nothing?

2009-10-27 Thread Kim-Ee Yeoh
Hi Brent, Re: '"if" expressions, not statements' is an elegant clarification, one definitely for the haskellwiki, if not there already. Just for completeness' sake, bottom is a value for any expression. Wouldn't making the else clause optional by defaulting to "undefined" worthy of considerat

Re: [Haskell-cafe] Re: Libraries for Commercial Users

2009-10-27 Thread Iain Barnett
On 25 Oct 2009, at 15:51, Curt Sampson wrote: Funny, I do too. Still, when Luxuria opened for them in Vancouver in the '90s, I started to think about what Howard Devoto was doing Anyone who recognises The Mark E. Smith is worthy of being master of all he surveys. But in others, su

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Iain Barnett
On 27 Oct 2009, at 15:47, Thomas DuBuisson wrote: If you wanted to make sure it didn't have to do with ghci then you should have compiled the original code, not tested different functions. That is a very good point! On 27 Oct 2009, at 16:00, Daniel Fischer wrote: Look at the sources:

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Daniel Fischer
Am Dienstag 27 Oktober 2009 16:47:12 schrieb Thomas DuBuisson: > Iain, > If you wanted to make sure it didn't have to do with ghci then you > should have compiled the original code, not tested different > functions. The code you provided works fine compiled and I too am > curious what is going on

Re: [Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Thomas DuBuisson
Iain, If you wanted to make sure it didn't have to do with ghci then you should have compiled the original code, not tested different functions. The code you provided works fine compiled and I too am curious what is going on when you run it in ghci. Thomas On Tue, Oct 27, 2009 at 8:26 AM, Iain B

[Haskell-cafe] hopefully, a very quick question about ByteString lib

2009-10-27 Thread Iain Barnett
[1 of 1] Compiling Main ( sha1.lhs, interpreted ) import qualified Data.ByteString as B main = B.getLine >>= B.putStrLn Ok, modules loaded: Main. *Main> :main *** Exception: no buffering And just to make sure it's not something to do with GHCi or anything like that main = get

Re: [Haskell-cafe] A 3 line program. Preprocessor?

2009-10-27 Thread Svein Ove Aas
On Tue, Oct 27, 2009 at 3:57 PM, Philippos Apolinarius wrote: > > In a private email to Ketil Malde, I said that Ocaml programmers use the > preprocessor to solve the problem of character encoding: > > ocamlopt -pp myfilter.exe myprogram.ml -o myoutput.exe > > I wonder whether a similar solution

Re: [Haskell-cafe] A 3 line program. Preprocessor?

2009-10-27 Thread Philippos Apolinarius
In a private email to Ketil Malde, I said that Ocaml programmers use the preprocessor to solve the problem of character encoding: ocamlopt -pp myfilter.exe myprogram.ml -o myoutput.exe I wonder whether a similar solution could be used with Haskell. I am new to Haskell, but I suppose that Haskel

Re: [Haskell-cafe] Is there a null statement that does nothing?

2009-10-27 Thread Brent Yorgey
On Wed, Oct 21, 2009 at 07:49:14PM -0500, Tim Wawrzynczak wrote: > Yes, an if statement must have both 'then' and 'else' branches. As an > example, what if you had > > let a = if b == 2 then True else False > > and you were missing an else branch? What would 'a' get assigned to? > > The if sta

Re: [Haskell-cafe] A 3 line program --> Reid, Don, Daniel

2009-10-27 Thread Sergey Zaharchenko
Hello Ketil! Tue, Oct 27, 2009 at 09:06:50AM +0100 you wrote: > > At which point you probably want to make use of iconv, so you might as > > well support all iconv-supported encodings. > > Interestingly, Wikipedia [0] says that "Unicode-aware programs are > required to display, print and manipul

Re: [Haskell-cafe] A 3 line program --> Reid, Don, Daniel

2009-10-27 Thread Ketil Malde
Colin Paul Adams writes: > Brandon> So yes, it's reasonable to "blame" the language (spec). On the other hand, the sooner users can get moving to utf-8, the sooner we can get eliminate these kinds of problems. > Note also that it mentions the Unicode character set, not a particular > Unicod

Re: [Haskell-cafe] Cabal says "no installed version of base"

2009-10-27 Thread Duncan Coutts
On Wed, 2009-10-21 at 16:05 -0700, John Velman wrote: > I'm on OS X Leopard 10.5.8, using ghc 6.10.4 from Haskell Platform. > > I'm trying to get a static .a library, callable from C, that I can use in > an OS X Cocoa program. I've tried a very simple case (the one in Haskell > Wiki Tutorials,"ca