Hi!
I'm having a really hard time to write a correct parser for a small
language I've developed. I have been trying to write a parser using
parsec, but always get a lot of error messages like unexpected \n,
expected ..., new-line or... when trying to run the parser. Then I read
about the
Hi all,
I like to announce a new version of the network package,
network-2.2.3. You can install the latest version by running:
cabal update cabal install network
This version marks the end of the network-bytestring package, which
has now been merged into the network package. This means
Ketil Malde wrote:
Most web-based email archives seem to suck - where can we point to a nice
URL to get an overview of a -cafe thread?
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/82667
Tillmann
___
Haskell-Cafe mailing list
I don't know if you've already used it, but Parsec includes some kind of a
lexer through the
Languagehttp://hackage.haskell.org/packages/archive/parsec/3.1.0/doc/html/Text-Parsec-Language.htmland
Tokenhttp://hackage.haskell.org/packages/archive/parsec/3.1.0/doc/html/Text-Parsec-Token.htmlmodules.
2010/10/31 Nils Schweinsberg m...@n-sch.de:
Hi!
I'm having a really hard time to write a correct parser for a small language
I've developed. I have been trying to write a parser using parsec, but
always get a lot of error messages like unexpected \n, expected ...,
new-line or... when trying
If you use the Language and Token modules, Parsec gives you something
close to a lexer / parser separation _but_ you can drop down to
character level parsers if you want to - this is very handy. There are
some caveats though - for instance, the number parsers from the Token
module follow Haskell's
On 31 October 2010 15:55, Stephen Tetley stephen.tet...@gmail.com wrote:
ecessary.
You can also write separate parsers this is covered in the (pdf)
Parsec manual available from Daan Leijen's old home page, however I
usually avoid this as it seems rather cumbersome.
D'oh. I meant separate
Am 31.10.2010 16:50, schrieb Ozgur Akgun:
I don't know if you've already used it, but Parsec includes some kind of
a lexer through the Language
http://hackage.haskell.org/packages/archive/parsec/3.1.0/doc/html/Text-Parsec-Language.html
and Token
Am 31.10.2010 16:53, schrieb Vo Minh Thu:
I can't really tell from your description, but maybe this is because
of the way Parsec works when it deals with alternatives. When you
combine several parsers with e.g. '|' or 'choice', an alternative
that can consume some input but fails will make the
On 31 October 2010 16:15, Nils Schweinsberg m...@n-sch.de wrote:
This is exactly what gives me headaches. It's hard to tell where you need
try/lookAhead and where you don't need them. And I don't really feel
comfortable wrapping everything into try blocks...
I always thought this was an
On 31 October 2010 16:23, Ozgur Akgun ozgurak...@gmail.com wrote:
Am I missing something?
Left factoring! :-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sat, Oct 30, 2010 at 11:55:48AM +0100, Patrick Browne wrote:
Hi,
Below are two questions on commutative operations in Haskell.
infixl 5 `com`
com :: Int - Int - Int
x `com` y = (x + y)
commutative com a b = (a `com` b) == (b`com`a)
Note that the first parameter to commutative shadows
On Friday, October 29, 2010 02:07:55 am Daniel van den Eijkel wrote:
Hi,
thanks to all participants for the funny meeting! I had a lot of fun and
I'm looking forward to see you again.
I had fun, too. There were twice as many people than I anticipated (4 instead
of 2) and we outnumbered the
On 31 Oct 2010, at 16:15, Nils Schweinsberg wrote:
Am 31.10.2010 16:53, schrieb Vo Minh Thu:
So you have to either factorize you parsers or use
the 'try'.
This is exactly what gives me headaches. It's hard to tell where you
need try/lookAhead and where you don't need them. And I don't
On 31 October 2010 16:14, Johan Tibell johan.tib...@gmail.com wrote:
This version marks the end of the network-bytestring package, which
has now been merged into the network package. This means that
efficient and correct networking using ByteStrings is available as
part of the standard network
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/29/10 20:33 , C. McCann wrote:
I suggest U+2621.
Did you mean U+2620 SKULL AND CROSSBONES there?
- --
brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/29/10 22:30 , wren ng thornton wrote:
On 10/29/10 8:33 PM, C. McCann wrote:
I suggest U+2621.
I'm not sure I'd've ever recognized a funny 'z' as caution sign... :)
You'd have to be a TeX / Metafont user to get that one. (The LaTeX book
- Is this a valid approach?
It is possible that your Parsec lexer will need to see the entire
input before it delivers any tokens at all to the Happy parser. This
might cause a space problem, depending on how large your inputs are
likely to be.
- What is your workflow on parsing
(Er, that should be (speed/4), not (speed*4). x4 the block size should
be x4 the delay.)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 31 October 2010 16:53, Nils Schweinsberg m...@n-sch.de wrote:
Am 31.10.2010 17:27, schrieb Stephen Tetley:
Left factoring! :-)
Stupid question: Whats that? :)
Actually a good question...
Its a standard grammar transformation - if you have two alternative
productions that share a common
Café,
SYB-style libraries (and especially Uniplate) make it very easy to run
generic
traversals (queries/transformations) on ADTs.
data Expr = ...
x :: Expr
f :: Expr - Expr
transform :: (Expr - Expr) - Expr - Expr
transform f x :: Expr -- applies f to x (and its children) in a bottom-up
On 30 October 2010 22:44, Uwe Schmidt u...@fh-wedel.de wrote:
Another possible argument: large type classes can look daunting for
both implementors and users, even if only one or two methods need to
be defined for a minimal instantiation (I'm tring to work out what to
do here myself, as I have
On 31 October 2010 04:08, Sterling Clover gersh...@gmail.com wrote:
There's been some grumbling about users migrating from -cafe to Reddit and
Stack Overflow in particular. First, as Don has pointed out, the fact is that
people are moving away, and that's just the trend.
But why are people
Nils Schweinsberg wrote:
This is exactly what gives me headaches. It's hard to tell where you
need try/lookAhead and where you don't need them. And I don't really
feel comfortable wrapping everything into try blocks...
In my experience, try blocks should only be used at the very inner
most
On Sat, Oct 30, 2010 at 2:07 PM, Henning Thielemann
schlepp...@henning-thielemann.de wrote:
wren ng thornton schrieb:
On 10/22/10 8:46 AM, Alexey Khudyakov wrote:
Hello everyone!
It's well known that Num Co type classes are not adequate for vectors
(I don't mean arrays). I have an idea how
On 29/10/2010, at 7:33 PM, Gregory Crosswhite wrote:
Also, this is a complete aside but what the heck. :-)
Has anyone else been driven crazy by the way that Java code and libraries are
documented? It seems like whenever I try to figure out how to use a piece of
Java code, the
On 29 Oct 2010, at 07:33, Gregory Crosswhite wrote:
Also, this is a complete aside but what the heck. :-)
Has anyone else been driven crazy by the way that Java code and
libraries are documented? It seems like whenever I try to figure
out how to use a piece of Java code, the
Talking about documentation in the 3rd year software engineering paper I
teach,
I give JavaDoc as an example of what not to do. I give R as an example of
something that works quite well. It's *examples* that make the difference.
One thing I will say for the JavaMail specification is that
On Wed, Oct 27, 2010 at 2:53 AM, wren ng thornton w...@freegeek.org wrote:
On 10/26/10 8:51 AM, Alexey Khudyakov wrote:
On 24.10.2010 03:38, wren ng thornton wrote:
I don't care much about the name of the class, I'd just like support for
monoids, semirings,... when they lack a group,
On 31 October 2010 04:08, Sterling Clover gersh...@gmail.com wrote:
How can we make Haskell-Cafe scale?
There's been some grumbling about users migrating from -cafe to Reddit and
Stack Overflow in particular. First, as Don has pointed out, the fact is that
people are moving away, and that's
There's a long-known technique in functional languages
where
[x1,...,xn] = \tail - x1:...xn:tail
xs ++ ys= f . g
xs = f []
A correspondent mentioned to me that he couldn't find a reference
to the idea (which I gather he had independently
Richard O'Keefe o...@cs.otago.ac.nz writes:
There's a long-known technique in functional languages
where
[x1,...,xn] = \tail - x1:...xn:tail
xs ++ ys= f . g
xs = f []
A correspondent mentioned to me that he couldn't find a reference
to the idea
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987 The Concatenate Vanishes and
references Richard Bird's 1984 paper Transformational programming and
the paragraph problem
On 1/11/2010, at 12:10 PM, Derek Elkins wrote:
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987 The Concatenate Vanishes and
references Richard Bird's 1984 paper
On 1/11/2010, at 12:05 PM, Gregory Collins wrote:
They're called difference lists:
As a matter of fact the original context was precisely
difference lists in logic programming.
http://hackage.haskell.org/packages/archive/dlist/latest/doc/html/Data-DList.html
Thank you.
On Sun, Oct 31, 2010 at 7:27 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote:
On 1/11/2010, at 12:05 PM, Gregory Collins wrote:
They're called difference lists:
As a matter of fact the original context was precisely
difference lists in logic programming.
Hello,
I need some help with data records. Normally I can use a `read' function to
convert string to some data type e.g. `(read somestring) :: Type'. However,
sometimes I'd like to read a record with some uninitialised fields. I have
also set up a default values for my data record, for example:
Oh sorry, I had some mistakes in my previous mail..
`defrec = {a=0,b=1, ..., z=0}' should be `defrec =
SomeDataConstructor{a=0,b=1, ..., z=0}' .
Siim
On Mon, Nov 1, 2010 at 2:31 AM, Siim Haugas hau...@gmail.com wrote:
Hello,
I need some help with data records. Normally I can use a `read'
Hello,
I'm trying to make a simple monad (built on operational's ProgramT) for
resource loading.
I have classes featuring type families :
{-# LANGUAGE TypeFamilies, FlexibleContexts, GADTs #-}
-- | A ResourceId is something that identifies a resource.
-- It should be unique for one resource,
On 10/31/10 6:36 PM, Alexey Khudyakov wrote:
On Wed, Oct 27, 2010 at 2:53 AM, wren ng thornton wrote:
Is there any good reason for forcing them together? Why not, use the
hierarchy I proposed earlier?
[...]
Main reason is that it complicate creation of instances for types for which
On 10/31/10 7:10 PM, Derek Elkins wrote:
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987 The Concatenate Vanishes and
references Richard Bird's 1984 paper Transformational
On Sun, Oct 31, 2010 at 9:02 PM, wren ng thornton w...@freegeek.org wrote:
On 10/31/10 7:10 PM, Derek Elkins wrote:
Well, you can get A Novel Representation of Lists and Its Application
to the Function 'Reverse' by John Hughes online published in 1986
which is referenced by Wadler's 1987 The
On 1/11/2010, at 2:02 PM, wren ng thornton wrote:
Barring the worse than useless appellation, the technique has been around
in logic programming (and classic Lisp, IIRC) for a few decades longer. I've
always heard it referred to as part of the folklore of logic/functional
programming
I have an object to which I have added one or more finalizers via
addFinalizer from System.Mem.Weak. I would like to have a function
that allows me to make use of the object within a block of IO code,
and guarantee that the finalizer(s) will not be called during the code
block -- sort of
Before uploading a new version of my project on Hackage, I decided to
future-proof it against GHC 7.0. I ran into several compile errors caused by
the changes in let generalization, but these were easy to fix by adding
extra type annotations. But then I ran into another problem that I can't
On Sun, Oct 31, 2010 at 10:14 PM, Matthew Steele mdste...@alum.mit.edu wrote:
I have an object to which I have added one or more finalizers via
addFinalizer from System.Mem.Weak. I would like to have a function that
allows me to make use of the object within a block of IO code, and guarantee
We are looking for an intern that has experience programming in a functional
language, and is familiar with Haskell and web development. Some experience
with Linux/Unix system administration is preferred. Familiarity with Git
would be useful.
The position is in Tokyo in a small English speaking
On 10/31/10 10:26 PM, Richard O'Keefe wrote:
On 1/11/2010, at 2:02 PM, wren ng thornton wrote:
(Though I find it curious that you think the logic version is so different...)
The logic programming version
uses a SINGLE data structure for lists and differences, so that
+ converting from
48 matches
Mail list logo