Hi,
I usually just copy those .a files (that should be linked statically)
into `ghc --print-libdir`.
HTH Christian
Am 19.09.2012 13:06, schrieb Jason Dusek:
2011/12/1 Irene Knapp ireney.kn...@gmail.com:
The typical trick to force GHC to statically link a C library
is to give the full path
The error message can be improved in your examples by using count 5
instead of many1.
C.
Am 08.08.2012 21:24, schrieb silly:
I am trying to create a parsec parser that parses an integer and then
checks if that integer has the right size. If not, it generates an
error.
I tried the
Am 22.07.2012 17:21, schrieb C K Kashyap:
I've updated the parser here -
https://github.com/ckkashyap/LearningPrograms/blob/master/Haskell/Parsing/xml_3.hs
The whole thing is less than 100 lines and it can handle comments as well.
This code is still not nice: Duplicate code in openTag and
Am 20.07.2012 15:24, schrieb jwaldmann:
Dear all,
how would I quickly select an element of a Set (as in Data.Set)
uniformly at random?
If you use a Map a () (or Map a a) you can use Map.elemAt.
The initial conversion is still linear, though.
-- | convert a set into an identity map
setToMap
Am 19.07.2012 14:53, schrieb C K Kashyap:
Dear gentle Haskellers,
I was trying to whet my Haskell by trying out Parsec today to try and
parse out XML. Here's the code I cam up with -
I wanted some help with the gettext parser that I've written. I had to
do a dummy char ' ') in there just to
Am 19.07.2012 14:53, schrieb C K Kashyap:
innerXML = do
x - (try xml | gettext)
return x
Omit try (and return).
xml always starts with whereas gettext never does.
C.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Am 19.07.2012 15:14, schrieb Christian Maeder:
Am 19.07.2012 14:53, schrieb C K Kashyap:
innerXML = do
x - (try xml | gettext)
return x
Omit try (and return).
xml always starts with whereas gettext never does.
I was wrong, you do not want to swallow an endTag as openTag
Am 19.07.2012 15:26, schrieb Christian Maeder:
Am 19.07.2012 15:14, schrieb Christian Maeder:
Am 19.07.2012 14:53, schrieb C K Kashyap:
innerXML = do
x - (try xml | gettext)
return x
Omit try (and return).
xml always starts with whereas gettext never does.
I was wrong
by:
openTag = try (char '' * many1 (noneOf /)) * char ''
C.
endTag :: String - Parser String
endTag str = string / * string str * char ''
Well yes, modified to what Christian Maeder just suggested.
Cheers,
Simon
___
Haskell-Cafe mailing list
Am 08.03.2012 17:16, schrieb Troels Henriksen:
Christian Maederchristian.mae...@dfki.de writes:
The simplest solution is to parse the prefixes yourself and do not put
it into the table.
(Doing the infixes and | by hand is no big deal, too, and
possibly easier then figuring out the
The simplest solution is to parse the prefixes yourself and do not put
it into the table.
(Doing the infixes and | by hand is no big deal, too, and possibly
easier then figuring out the capabilities of buildExpressionParser)
Cheers C.
Am 07.03.2012 13:08, schrieb Troels Henriksen:
Am 05.01.2012 11:57, schrieb Steve Horne:
[...]
groupCut :: (x - x - Bool) - [x] - [[x]]
[...]
How about a break function that respects an escape character (1. arg)
(and drops the delimiter - 2. arg) and use this function for unfolding?
import Data.List
break' :: (a - Bool) - (a - Bool) -
Am 05.01.2012 13:04, schrieb Steve Horne:
[...]
I was going to accuse you of cheating - who says there's a spare value
to use? - but you seem to be using Maybe, so well played.
You're also using unfoldr, which I really must play with a bit - I don't
really have a feel for how unfolding works
Am 04.01.2012 17:47, schrieb Steve Horne:
On 02/01/2012 11:12, Jon Fairbairn wrote:
maxm...@mtw.ru writes:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How
Am 02.01.2012 10:44, schrieb max:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
replace the sequence by something unique first, i.e. a
Am 26.10.2011 01:49, schrieb Tom Hawkins:
Can someone provide guidance on how handle operator precedence and
associativity with Polyparse?
Do you mean parsing something like 1 + 2 * 3 ? I don't think
there's any real difference in using Polyparse vs Parsec for this,
except for doing p
Am 20.10.2011 21:43, schrieb Michael Snoyman:
On Wed, Oct 19, 2011 at 9:29 PM, Ketil Maldeke...@malde.org wrote:
Michael Snoymanmich...@snoyman.com writes:
sense to try and pursue something like what you're suggesting, but I
think the default Show (Vector Word8) should be the one most
Am 12.10.2011 16:02, schrieb Bas van Dijk:
API DOCS
http://hackage.haskell.org/package/vector-bytestring-0.0.0.0
you could re-export VS.empty, VS.singleton, etc. directly.
Cheers Christian
-- | /O(1)/ The empty 'ByteString'
empty :: ByteString
empty = VS.empty
{-# INLINE empty #-}
-- |
I think the cleanest solution (just from a theoretical point of view) is
to use a newtype for your byte strings.
- it should have the same performance
- allows to make ByteString really abstract when hiding the newtype
constructor
- is portable and supplies control over all other instances
Am 17.10.2011 11:10, schrieb Ertugrul Soeylemez:
So please, please, please, if you decide to use a newtype, do /not/ hide
the constructor.
The better alternative to not hiding the constructor is to supply
conversion functions that may or may not do more than the constructor
and selector and
Am 17.10.2011 12:14, schrieb Bas van Dijk:
On 17 October 2011 10:18, Christian Maederchristian.mae...@dfki.de wrote:
I think the cleanest solution (just from a theoretical point of view) is to
use a newtype for your byte strings.
- it should have the same performance
- allows to make
Am 17.10.2011 12:19, schrieb Michael Snoyman:
[...]
Also, aren't there a few documented cases where newtypes prevent
certain GHC rewrite rules from firing?
This would be possible to find out with a wrapper module.
Cheers Christian
I don't see any strong argument to avoid what appears to be
Am 17.10.2011 17:26, schrieb Bas van Dijk:
On 17 October 2011 13:12, Christian Maederchristian.mae...@dfki.de wrote:
So your package basically supports an unfortunate mix of bytestring and
vector functions?
No, vector-bytestring exports the same API as bytestring (except for
the Show and
Am 12.10.2011 16:02, schrieb Bas van Dijk:
All your ByteString are belong to us...
Hello,
I'm pleased to announce the beta release of vector-bytestring. This
library provides the type ByteString which is defined as a type
synonym for a storable Vector of Word8s (from the vector package):
Am 08.10.2011 16:04, schrieb Captain Freako:
Hi all,
In this definition from the Parsec library:
parse :: (Stream s Identity t)
= Parsec s () a - SourceName - s - Either ParseError a
parse p = runP p ()
what's the significance of `Identity t'?
(`t' isn't used
Hi,
1. your lookAhead is unnecessary, because your items (atomNames) never
start with %.
2. your try fails in (line 12, column 1), because the last item (aka
atomName) starts consuming \n, before your eol parser is called.
So rather than calling spaces before every real atom, I would call
I had similar problems under Solaris with ghc binaries compiled using
gcc-4.3.3
http://hackage.haskell.org/trac/ghc/ticket/5013
C.
Am 05.09.2011 19:06, schrieb Tristan Ravitch:
I have the Haskell Platform (and my home directory with my
cabal-installed packages) installed on an AFS (a
Am 11.08.2011 16:45, schrieb Charles-Pierre Astolfi:
Hi -cafe,
I'm using readProcess and I don't know how to handle this issue:
readProcess cmd [opt1,opt2] seems to execute the following:
are you sure that your argument strings do not contain the quotes,
possibly by calling show on
Am 01.08.2011 17:51, schrieb Alex Clemmer:
Hi Haskell people,
I've been snooping through various mailing lists and the current Haskell
implementation of regular expressions and I was wondering if there has
been a discussion about implementing regex parsing with derivatives. If
so, I haven't
Generally allowing trailing (or leading or repeated) commas would clash
with tuple sections. Also the pair constructor (,) is a special case.
http://www.haskell.org/ghc/docs/7.0.4/html/users_guide/syntax-extns.html#tuple-sections
Cheers Christian
Am 11.07.2011 12:09, schrieb Joachim Breitner:
Am 14.04.2011 12:29, schrieb Dmitri O.Kondratiev:
3n+1 is the first, warm-up problem at Programming Chalenges site:
http://www.programming-challenges.com/pg.php?page=downloadproblemprobid=110101format=html
http://www.programming-challenges.com/pg.php?page=downloadproblemprobid=110101format=html
Am 31.03.2011 05:59, schrieb Felipe Almeida Lessa:
On Wed, Mar 30, 2011 at 2:39 PM, Gilberto Garciagiba@gmail.com wrote:
fkSum :: Int - [Int] - Int
fkSum a [] = 0
fkSum a (b) = foldl (+) 0 (filter (\x - isMultiple x b) [1..a])
Daniel Fischer and Yves Parès gave you good suggestions
Am 14.03.2011 06:26, schrieb C K Kashyap:
Looks like a job for Data.Binary.
I'd like to use it with just the libraries that are part of the
platform
I forgot to mention, Data.Binary does not seem to be in the platform.
Right, it is not in the platform, but I would recommend
What are the arguments for updating?
Are you using ghc-7.0.2? Wait for Haskell Platform 2011.2.0.0 that will
be based on cabal-install-0.10.2!
Cheers Christian
Am 10.03.2011 11:27, schrieb Hauschild, Klaus (EXT):
Hallo,
I'm using Haskell Platform 2010.2.0.0 on a Windows XP machine. This
Am 08.03.2011 13:50, schrieb Christian Maeder:
Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
(http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer/src/Gml/Parse.hs)
works well for the test file
Am 09.03.2011 14:44, schrieb Christian Maeder:
Am 08.03.2011 13:50, schrieb Christian Maeder:
Am 08.03.2011 13:35, schrieb Hauschild, Klaus (EXT):
Hi Christian,
Thank you for your help. Now the current version of Parse.hs
(http://code.google.com/p/hgmltracer/source/browse/trunk/hGmlTracer
What does ghc-pkg list and ghc-pkg check say?
Cabal-1.10.1.0, directory-1.1.0.0 and process-1.0.1.5 should be there
after installation of GHC 7.0.2. (I've actually installed
cabal-install-0.10.0 using an older cabal, but that does not work on
macs and may not be the recommended way.)
I think
lexeme.)
C.
The redefinition of space is not necessary, it was copied from another
tutorial code. How I write a version of parseGml that get gml token separated
by any white space (space, tab, newline)?
Thanks
-Ursprüngliche Nachricht-
Von: Christian Maeder [mailto:christian.mae
token separated
by any white space (space, tab, newline)?
Thanks
-Ursprüngliche Nachricht-
Von: Christian Maeder [mailto:christian.mae...@dfki.de]
Gesendet: Montag, 7. März 2011 14:18
An: Hauschild, Klaus (EXT)
Cc: haskell-cafe@haskell.org
Betreff: Re: Overlaping Parsec rules
-
Von: Christian Maeder [mailto:christian.mae...@dfki.de]
Gesendet: Montag, 7. März 2011 14:18
An: Hauschild, Klaus (EXT)
Cc: haskell-cafe@haskell.org
Betreff: Re: Overlaping Parsec rules
Am 07.03.2011 13:48, schrieb Hauschild, Klaus (EXT):
Thanks Christian,
I adapted the keyword parser
from another
tutorial code. How I write a version of parseGml that get gml token
separated by any white space (space, tab, newline)?
Thanks
-Ursprüngliche Nachricht-
Von: Christian Maeder [mailto:christian.mae...@dfki.de]
Gesendet: Montag, 7. März 2011 14:18
An: Hauschild, Klaus
You should parse keywords using:
keyword s = try (string s) notFollowedBy (letter | digit)
C.
Am 07.03.2011 11:34, schrieb Hauschild, Klaus (EXT):
Hi,
to solve this ICFP task _http://www.cs.cornell.edu/icfp/task.htm_ I'm
currnetly working on the parser. With the hint from Thu (reading
)
manyTill anyChar newline
or just: many (noneOf \n)
(a trailing newline will be skipped by spaces)
Any ideas?
-Ursprüngliche Nachricht-
Von: Christian Maeder [mailto:christian.mae...@dfki.de]
Gesendet: Montag, 7. März 2011 12:23
An: Hauschild, Klaus (EXT)
Cc: haskell-cafe
Am 07.03.2011 14:20, schrieb Stephen Tetley:
Hi Klaus
Unless you have very specific white-space considerations, you really
want to be using Parsec's Token and LanguageDef modules.
Well, I would want to use Parsec's Token and LanguageDef modules just to
get the white spaces (and comments to
Am 11.02.2011 13:48, schrieb Daniel Fischer:
[...] +1
Testing can only prove code incorrect, it can never prove code correct
(except for extremely simple cases where testing all possible inputs can be
done; but guaranteeing that QuickCheck generates all possible inputs is
generally harder
Am 10.02.2011 13:15, schrieb Dušan Kolář:
Well, that was probably the main problem :-(
Unfortunately, even if, after performing all the stuff once again, I
made platform configured, make ended in compilation of happy with old
story:
Configuring happy-1.18.5...
./Setup build
On 02/10/2011 04:38 PM, Christian Maeder wrote:
Am 10.02.2011 13:15, schrieb Dušan Kolář:
Well, that was probably the main problem :-(
Unfortunately, even if, after performing all the stuff once again, I
made platform configured, make ended in compilation of happy with old
story:
Configuring
Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test
[1 of 1] Compiling Main ( test.hs, test.o )
ghc: could not execute: /usr/bin/gcc
Even if I can easily compile gcc testc.c -o testc and run testc.
Your ghc script (under /usr/local/bin or elsewhere type -all
+$@}
while:
which gcc
/usr/local/bin/gcc
Dusan
On 02/08/2011 12:42 PM, Christian Maeder wrote:
Am 08.02.2011 11:39, schrieb Dušan Kolář:
ghc -O2 --make test.hs -o test
[1 of 1] Compiling Main ( test.hs, test.o )
ghc: could not execute: /usr/bin/gcc
Even if I can easily
Does adding -v reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
C.
Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded
binary of
/ghc29474_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc29474_0
ghc: could not execute: /usr/bin/gcc
Otherwise gcc not mentioned, no error mentioned.
Dusan
On 02/08/2011 01:04 PM, Christian Maeder wrote:
Does adding -v reveal when /usr/bin/gcc is used?
ghc -v -O2 --make test.hs -o test
There seems to be confusion about 32bit and 64bit assembly.
Can you compile and link without optimization?
C.
Am 08.02.2011 13:33, schrieb Dušan Kolář:
Well, it helped, but not getting output anyway:
/tmp/ghc32376_0/ghc32376_0.s: Assembler messages:
/tmp/ghc32376_0/ghc32376_0.s:35:0:
What does gcc -v say?
Maybe you have to install the 32Bit ghc-6.12.3 that can work together
with your gcc.
Christian
Am 08.02.2011 15:05, schrieb Kolar Dusan:
No :-(
D.
There seems to be confusion about 32bit and 64bit assembly.
Can you compile and link without optimization?
C.
Am
Am 08.02.2011 11:39, schrieb Dušan Kolář:
Hello all,
I'm trying to build platform on Linux 2.6.32.22 #1 SMP Tue Sep 21
09:44:04 CEST 2010 x86_64 x86_64 x86_64 GNU/Linux. I've downloaded
binary of ghc6.12.3 for the purpose, but ghc doesn't work. ghci does
work, gcc does work, but for ghc I
)
I was not taking care of partial updates, I've taken care of it now.
Btw, what vncviewer are you using?
After pulling in your changes and recompilation, your application runs
as expected. Thanks a lot!
Christian
maeder@leibniz:~ uname -a
Linux [...] 2.6.34.7-0.7-desktop #1 SMP PREEMPT
Am 03.02.2011 12:15, schrieb C K Kashyap:
Hi,
I've been working on a Haskell based platform independent graphics rendering
using VNC. I'd like it very much if you could take a look at it and give me
feedback. Using it is straight forward -
git clone g...@github.com:ckkashyap/Chitra.git
Am 03.02.2011 17:20, schrieb C K Kashyap:
Oops, you can use git://github.com/ckkashyap/Chitra.git
http://github.com/ckkashyap/Chitra.git - sorry about that.
You can also visit https://github.com/ckkashyap/Chitra
Thanks, I cannot get it to run with my vncviewer (TightVNC Viewer
version 1.3.9)
, a window seems to pop up very shortly before it fails for me as
shown below:
Cheers Christian
maeder@leibniz:~ vncviewer localhost
Connected to RFB server, using protocol version 3.3
No authentication needed
Desktop name Haskell Framebuffer
VNC server default format:
32 bits per pixel.
Most
FrameBufferUpdateRequest x=0, y=0 width =1, height=1
FrameBufferUpdateRequest x=1, y=0 width =99, height=1
FrameBufferUpdateRequest x=0, y=1 width =100, height=99
Main: socket: 7: hPutBuf: resource vanished (Connection reset by peer)
Am 03.02.2011 18:43, schrieb Christian Maeder:
Am 03.02.2011 18:05, schrieb C K
Let's notify the maintainer to use an ordinary minus sign:
http://hackage.haskell.org/package/ranges-0.2.3
my scan program (http://hackage.haskell.org/package/scan) reports:
Ranges.hs:12:9: undesirable character '\t'
Ranges.hs:12:51: undesirable character '\226'
Ranges.hs:12:52: undesirable
Am 27.12.2010 08:44, schrieb Henning Thielemann:
On Mon, 27 Dec 2010, Jonathan Geddes wrote:
#1 Parse a string at compile-time so that a custom syntax for
representing data can be used. At the extreme, this data might even
be an EDSL.
I think it would be enough, if the compiler could be
Am 04.01.2011 15:48, schrieb Henning Thielemann:
Christian Maeder schrieb:
Am 27.12.2010 08:44, schrieb Henning Thielemann:
On Mon, 27 Dec 2010, Jonathan Geddes wrote:
#2 Provide instances automatically.
http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/generic-classes.html
I see
Am 15.12.2010 08:36, schrieb Roman Cheplyaka:
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700]
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
foo = fromMaybe 0 $ do
--do something in the
Am 09.12.2010 08:01, schrieb Tony Morris:
I teach haskell quite a lot. I recommend using .ghci files in projects.
Today I received complaints about the fact that ghci will reject .ghci
if it is group-writeable. I didn't offer an opinion on the matter. I am
wondering if these complaints have
I've noticed that ghc-6.10.4 did not work well with cabal-install
version 0.8.2. (cabal install gtk did not work.)
Everything was fine after I switched back to:
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library
and removing the Cabal 1.8... library package.
Cheers
Am 22.11.2010 23:16, schrieb Permjacov Evgeniy:
current cabal-install (0.8.2) cannot be compiled with ghc-7.0.1 set of
boot libraries. It requires cabal 1.8.* wich fails to compile. Does
anyone worked this out ?
You can re-use your old cabal binary (if you still have it) that was
compiled with
for this behaviour?
(2) Is there another combinator that behaves as I would like?
(3) Otherwise, how do I write one myself?
ask derek.a.elk...@gmail.com (CCed)
Cheers Christian
I just saw that Christian Maeder answered a similar question recently. I
tried his suggestion of using manyTill
Am 29.09.2010 05:35, schrieb Peter Schmitz:
[...]
Error parsing file: ...\sampleTaggedContent.txt (line 4, column 1):
unexpected end of input
expecting
The input was:
[...]
-- Parsers:
taggedContent = do
optionalWhiteSpace
aTag
many tagOrContent
aTag
many tagOrContent
Am 29.09.2010 09:54, schrieb Christian Maeder:
Am 29.09.2010 05:35, schrieb Peter Schmitz:
[...]
Error parsing file: ...\sampleTaggedContent.txt (line 4, column 1):
unexpected end of input
expecting
The input was:
[...]
-- Parsers:
taggedContent = do
optionalWhiteSpace
aTag
Am 29.09.2010 11:55, schrieb Christian Maeder:
Am 29.09.2010 09:54, schrieb Christian Maeder:
Am 29.09.2010 05:35, schrieb Peter Schmitz:
[...]
Error parsing file: ...\sampleTaggedContent.txt (line 4, column 1):
unexpected end of input
expecting
The input was:
[...]
-- Parsers
Dear Haskell friends,
I like to announce a new version of the style scanner for Haskell source
files at
http://hackage.haskell.org/package/scan
documented under http://projects.haskell.org/style-scanner/
cabal update
cabal install scan
A short description is also here:
Andy Stewart schrieb:
Hi all,
We plan to release bug fix version : gtk2hs-0.11.1
Please report any bug of gtk2hs-0.11.0, we will fix it before release
gtk2hs-0.11.1
I'm looking forward for this bug-fix release (since gtk2hs-0.11.0 did
not work for me).
Because I've almost missed this
Ketil Malde schrieb:
[...]
I don't think there would be any doubt what 'deleteBy (= 5) [1..10]'
would do.
Well, if you don't know about filter, you could think it deletes all
elements satisfying the predicate, but apart from that, it's clear.
I'd probably call it 'filter1', but that's just
Simon Thompson schrieb:
Has anyone successfully compiled Pugs with GHC 6.12? The Pugs page suggests
that it compiles, but it falls to link (and therefore build) when I try it.
Your error message would help.
I was able to compile and link pugs (Version: 6.2.13.15)
using ghc-6.12.2.20100521 by:
Günther Schmidt schrieb:
Hello Christin,
http://www.haskell.org/ghc/download_ghc_6_10_4.html#x86solaris
is supposed to work under open solaris, too.
it does actually, quite nicely too, in the *global* zone.
It's just when I try to install it into a separate zone the install fails.
How
Günther Schmidt schrieb:
Hello,
has anyone yet managed to install ghc (6.10.4) into an OpenSolaris zone?
http://www.haskell.org/ghc/download_ghc_6_10_4.html#x86solaris
is supposed to work under open solaris, too.
Cheers Christian
___
Haskell-Cafe
Ivan Lazar Miljenovic schrieb:
- Having a separate parameter (using associated types?) for the node
type rather than just using Int.
Just Int for nodes was disappointing. It should have been at least a
newtype. I would vote against these experimental features like
associated types or
Ivan Lazar Miljenovic schrieb:
I would vote against these experimental features like associated types
or MPTC and FD. I prefer plain type parameters for data types, but
that does not fit well together with type classes.
Why don't you like extensions? I used to feel the same way, but then
I think, I've addressed the points made by Henning and Sebastian.
(Don't forget to cabal update.)
Cheers Christian
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
documented under http://projects.haskell.org/style-scanner/
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
documented under http://projects.haskell.org/style-scanner/
It's best used in conjunction with hlint
http://community.haskell.org/~ndm/hlint/
and gives many suggestions regarding the
Sebastian Fischer schrieb:
Hello Christian,
On Apr 19, 2010, at 4:48 PM, Christian Maeder wrote:
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
Feedback is welcome.
I get lots of multiple blanks which I'd rather not correct.
I often use
Henning Thielemann schrieb:
On Mon, 19 Apr 2010, Christian Maeder wrote:
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
At first I thought it is a scanner (for whatever purpose) implemented in
Haskell style. No it checks
I think you need to install the 32bit ghc first, because you'll need all
the 32bit haskell libs. At least I was able to use the 32bit ghc
(version 6.8.2) on a 64 bit linux by changing the script in the bin
directory from
exec $GHCBIN $TOPDIROPT ${1+$@}
to
exec $GHCBIN -optc-m32 -opta-m32
Documentation should be:
http://hackage.haskell.org/packages/archive/haskelldb/0.12/doc/html/Database-HaskellDB-DBSpec.html
http://hackage.haskell.org/packages/archive/haskelldb/0.12/doc/html/Database-HaskellDB-DBSpec-PPHelpers.html
assuming you have the haskelldb-0.12 package installed.
HTH
Andy Gimblett schrieb:
Hi Christian,
[...]
It may make sense to use something like readMaybe (which is missing in
the Prelude) instead of read to allow the parser to fail more nicely.
It seems to be kicking up reasonable errors as it is, e.g.:
*Main parse aFloat 2e-h
Left (line 1,
Andy Gimblett schrieb:
For the record, here's the final improved version:
Hi Andy,
I hope you don't mind if I make some style comments to your final version.
1. break the line after do
(to avoid a layout change when change name or arguments of float' or
rename the variable e)
2. The t ::
Ben Millwood schrieb:
On Wed, Feb 24, 2010 at 1:24 PM, Christian Maeder
christian.mae...@dfki.de wrote:
1. break the line after do
(to avoid a layout change when change name or arguments of float' or
rename the variable e)
You can also break it immediately before do, which I think
Andy Gimblett schrieb:
Hi all,
Short version: How can I pretty print and parse values of type Double
such that those operations are each other's inverse?
Maybe you have more luck with show and read (without Parsec.Token).
Your example:
x = 9.91165677454629
fails because the computation
Dušan Kolář schrieb:
Dear all,
Running cabal install --global wx stops very soon with the following
error.
Building wxcore-0.12.1.2...
[...]
dist/build/Graphics/UI/WXCore/WxcClassesAL.o )
ghc: out of memory (requested 1048576 bytes)
cabal: Error: some packages failed to install:
It
Oleg Lobachev schrieb:
Hello all,
I suspect that it's me and not the cabal, but everything looks fine and still
fails. Would someone mind to tell me, what am I doing wrong?
$ cabal -V
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library
This version of cabal cannot
Maciej Podgurski schrieb:
Hi,
after updating to cabal-install-0.8.0/Cabal-1.8.0.2 with GHC 6.10.4, I
always get an error when updating the package list:
cabal update
Downloading the latest package list from hackage.haskell.org
cabal: Codec.Compression.Zlib: premature end of
Christian Maeder:
Maciej Podgurski schrieb:
Hi,
after updating to cabal-install-0.8.0/Cabal-1.8.0.2 with GHC 6.10.4, I
always get an error when updating the package list:
cabal update
Downloading the latest package list from hackage.haskell.org
cabal: Codec.Compression.Zlib
It seems that the case of identical postfix and infix operators was not
considered. So I recommend to write something from scratch.
Cheers Christian
Xinyu Jiang schrieb:
I'm writing a parser for a Haskell-style language, and when I need to
use the same symbol for infix, prefix and postfix
Parse a sequence of primitive expressions first and then do
fixity resolution independent from Parsec.
C.
Christian Maeder schrieb:
It seems that the case of identical postfix and infix operators was not
considered. So I recommend to write something from scratch.
Cheers Christian
Xinyu
try:
type DictMyEq a = a - a - Bool
-- From the definition of type class MyOrd
type DictOrd a = (DictMyEq a, a - a - Bool)
data Nat = Z | S Nat
-- From the instance MyEq Nat
eqNat :: Nat - Nat - Bool
eqNat Z Z = True
eqNat Z (S x) = False
eqNat (S x) Z = False
eqNat (S x) (S y)
Lyndon Maydwell schrieb:
For example, when I cabal install -v storable-complex I get the following:
/usr/bin/ghc -package-name storable-complex-0.2.1 --make
-hide-all-packages -i -idist/build -i. -idist/build/autogen
-Idist/build/autogen -Idist/build -I -optP-include
Will Ness schrieb:
Christian Maeder Christian.Maeder at dfki.de writes:
Will Ness schrieb:
I meant strictly increasing ordered lists, without multiples, for which the
two
operations, 'merge' and 'minus', would also have to produce like lists, i.e
strictly increasing, without multiples
Will Ness schrieb:
I meant strictly increasing ordered lists, without multiples, for which the
two
operations, 'merge' and 'minus', would also have to produce like lists, i.e
strictly increasing, without multiples.
Why don't you use directly Data.Set?
I guess the first variety is more
There's already a ticket for this proposal
http://hackage.haskell.org/trac/ghc/ticket/3399
Christian
Dan Rosén schrieb:
Hello,
I realized today that the type for deleteBy in Data.List is too
restrictive. The code is:
deleteBy:: (a - a - Bool) - a - [a] - [a]
deleteBy _
You could cast your parser result a to Dynamic using
Data.Dynamic.toDyn (and derive Typeable instances for all involved types).
http://www.haskell.org/ghc/docs/latest/html/libraries/base-4.2.0.0/Data-Dynamic.html
Using an existential types may be another alternative.
Cheers Christian
1 - 100 of 264 matches
Mail list logo