The grammar-combinators library is a parsing library employing a novel
grammar representation with explicit recursion. The library features
much of the power of a parser generator like Happy or ANTLR, but with
the library approach and most of the benefits of a parser combinator
library. Grammars
Hi,
I've just released version 1.1 of my game-probability library. It's
intended to be an easy way to investigate the probability of various
dice rolls and card draws (the latter is the new addition for the 1.1
release), using a Haskell library/EDSL. It has various examples in the
Some snippets from the Tutorial [1] to give an idea of the
grammar-combinator library's approach, its functional style and its
additional power (e.g. the transformations used):
Defining a simple expresssions grammar:
grammarArith :: ExtendedContextFreeGrammar ArithDomain Char
grammarArith
Hi list again,
if there is anyone who managed to build the glade package on the Windows
platform, could you please tell me the installer package for glade you used,
possibly the version and download source too? Installing gtk2hs now seems
made really simply by the guys providing it and I
Thomas DuBuisson wrote:
Sorry, the example was all messed up, even if it did communicate what
I wanted its just so broken I must fix.
Slightly contrived example:
buildAgreementMessage :: (Monad m, CryptoRandomGen g,
ASymetricCipher k) = g - k - m (B.ByteString, (k,k), g)
On Wednesday 08 September 2010 06:44:32, Bryan O'Sullivan wrote:
I have a Replace.hs benchmark in the main text repo, just to be sure
we're talking about the same thing.
Grabbed the darcs repo, compiled with the darcs version and also with the
installed text package, both exhibit the same
.. grammar-combinator library's approach ..
am I reading this correctly: in the traditional combinator approach,
a grammer (a parser) is a Haskell value,
while in your approach, the grammar is a Haskell (GAD)type?
then you'll get more static guarantees (e.g., context-freeness)
but you need
I have a generic object that I want to wrap in various newtypes to
better facilitate type checking.
For example,
newtype Blog = Blog Obj
newtype Comment = Comment Obj
newtype User = User Obj
Unlike Obj itself, whose internal structure is hidden in a library
module, the newtype wrappings are
I think you might want -XGeneralizedNewtypeDeriving
http://haskell.org/ghc/docs/6.12.2/html/users_guide/deriving.html#id659906
On 08/09/10 22:01, Kevin Jardine wrote:
I have a generic object that I want to wrap in various newtypes to
better facilitate type checking.
For example,
newtype
Hi Tony,
I stared at that specific section for at least half an hour earlier
today but could not figure out how it applied in my specific case. The
only examples I have see are for deriving Num. Do you have any more
detail on how I could use that extension?
Kevin
On Sep 8, 2:05 pm, Tony Morris
On 08/09/10 22:19, Kevin Jardine wrote:
Hi Tony,
I stared at that specific section for at least half an hour earlier
today but could not figure out how it applied in my specific case. The
only examples I have see are for deriving Num. Do you have any more
detail on how I could use that
On Sep 8, 2010, at 7:49 AM, Johannes Waldmann wrote:
then you'll get more static guarantees (e.g., context-freeness)
but you need extra (type-level, or even syntax-level) machinery
to handle grammars. Convince me that it's worth it ...
Those guarantees, along with just the fact that the
On Sep 8, 2010, at 8:19 AM, Kevin Jardine wrote:
Hi Tony,
I stared at that specific section for at least half an hour earlier
today but could not figure out how it applied in my specific case. The
only examples I have see are for deriving Num. Do you have any more
detail on how I could use
Hi Tony and James,
I'm having trouble constructing the ToObj instance.
The obvious code:
toObj (w o) = o
fails with a syntax error.
How do I unwrap the value?
Kevin
On Sep 8, 2:30 pm, James Andrew Cook mo...@deepbondi.net wrote:
On Sep 8, 2010, at 8:19 AM, Kevin Jardine wrote:
Hi
In many cases it would make quite a lot of sense for the developer to be able
to specify default flags as well, preferably without resorting to including a C
file. Generally, the developer will know better than the user whether it makes
sense to include -N, the various thread affinity options,
Ah, I was missing an important piece of the puzzle.
If I write:
class ToObj a where
toObj :: a - Obj
instance ToObj Obj where
toObj a = a
then
newtype Blog = Blog Obj deriving ToObj
works!
Thanks.
On Sep 8, 2:36 pm, Kevin Jardine kevinjard...@gmail.com wrote:
Hi Tony and James,
That compilation process is highly nonlocal
and would never be possible with, e.g., the Parsec approach.
Pipe dream: attach such a grammar object to every Parsec parser,
and include the compiler with the combinators,
and have them run at (Haskell) compile time (in ghc's specializer).
Should
On Wed, 8 Sep 2010 05:51:22 -0700 (PDT), Kevin Jardine
kevinjard...@gmail.com wrote:
Ah, I was missing an important piece of the puzzle.
If I write:
class ToObj a where
toObj :: a - Obj
instance ToObj Obj where
toObj a = a
then
newtype Blog = Blog Obj deriving ToObj
Johannes,
(sorry for the double mail)
I will give some short answers below, but you can find more details in
the paper we are submitting to PADL 2011 [1].
2010/9/8 Johannes Waldmann waldm...@imn.htwk-leipzig.de:
.. grammar-combinator library's approach ..
am I reading this correctly: in the
Thanks Arie,
I'm going to make some of my bare Obj functions accept a ToObj
typeclass constraint and do the conversions inside there to avoid
cluttering up the wrapped object code.
Now that I know how to do this I'm going to see what more
restructuring I can do to make the difference between
Johannes,
2010/9/8 Johannes Waldmann waldm...@imn.htwk-leipzig.de:
That compilation process is highly nonlocal
and would never be possible with, e.g., the Parsec approach.
Pipe dream: attach such a grammar object to every Parsec parser,
and include the compiler with the combinators,
and
Hi folks from the cafe!!
Last weekend, I was wondering on how hard it would be to use Haskell for
mixed-signal processing.
Here is an example of an digital integrator:
summation=zipWith (+)
delay xs=(fromIntegral 0):xs
integrator xs=let ws=summation (integrator xs) xs in delay ws
The
Hello Paulo,
Glad to see some interest!
I just setup a repository over at github: http://github.com/ollef/Grempa
Fork away!
Kind regards,
Olle
On 8 September 2010 05:05, Paulo Tanimoto ptanim...@gmail.com wrote:
Hi Olle,
On Mon, Sep 6, 2010 at 12:45 PM, Olle Fredriksson
On Wednesday 08 September 2010 13:46:13, Daniel Fischer wrote:
My timings are quite different, but that's probably because 6.12.3's
inliner doesn't give the full fusion benefit, so it'll improve
automatically with the next GHC release.
Or maybe not so much. Just built the latest source bundle
I'm bad at expositions so I'll just lead with the code:
{-# LANGUAGE EmptyDataDecls, TypeFamilies #-}
data True :: *
data False :: *
class TypeValue a where
type ValueTypeOf a :: *
value :: ValueTypeOf a
instance TypeValue True where
type ValueTypeOf True = Bool
value = True
On 8 Sep 2010, at 20:01, Gábor Lehel wrote:
I'm bad at expositions so I'll just lead with the code:
{-# LANGUAGE EmptyDataDecls, TypeFamilies #-}
data True :: *
data False :: *
class TypeValue a where
type ValueTypeOf a :: *
value :: ValueTypeOf a
instance TypeValue True
2010/9/8 Miguel Mitrofanov miguelim...@yandex.ru:
On 8 Sep 2010, at 20:01, Gábor Lehel wrote:
I'm bad at expositions so I'll just lead with the code:
{-# LANGUAGE EmptyDataDecls, TypeFamilies #-}
data True :: *
data False :: *
class TypeValue a where
type ValueTypeOf a :: *
2010/9/8 Gábor Lehel illiss...@gmail.com:
Oh. Hmm. That makes sense. So I gather there's absolutely no way to
specify which instance you mean, and hence to use `value` as any
concrete type?
Here's one way to indicate which value you are referring to.
Anthony
{-# LANGUAGE EmptyDataDecls,
2010/9/8 Anthony Cowley acow...@seas.upenn.edu:
2010/9/8 Gábor Lehel illiss...@gmail.com:
Oh. Hmm. That makes sense. So I gather there's absolutely no way to
specify which instance you mean, and hence to use `value` as any
concrete type?
Here's one way to indicate which value you are
Here's a different approach:
If you just want to make the typechecker distinguish between some
values but still have some functions that don't care what subtype
they are, you can use phantom types:
data Obj x = Obj X Y Z
data BlogObj
type Blog = Obj BlogObj
data CommentObj
type Comment = Obj
Hello,
Does anybody knows if there is some work related to BPMN and/or BPEL done in
Haskell? Maybe some research or some papers?
I'm about to begin a mapper from BPMN to BPEL and Haskell is my first option
for doing it, but since my company is somehow married to .NET and nobody
else knows
Gregory Crosswhite schrieb:
For whatever reason, nobody seems to have gotten around to implementing
an Abort monad transformer (outside the monadLib package), so I decided
to write one myself since I wanted the functionality but I use
transformers rather than monadLib.
Is AbortT different
Gregory Crosswhite schrieb:
People want to believe that Haskell is a better language than C, but
how could this possibly be true when Haskell lacks the very basic goto
feature??? If the world is going to take Haskell seriously, then this
serious blight needs to be addressed immediately!
Hi David
On Mon, 2010-09-06 at 13:50 -0700, David Anderson wrote:
- Simple timing attacks: If code path A takes longer than code path B
to execute, an attacker can use that information to reverse engineer
the outcome of branching tests, and from there possibly recover secret
key
On Wed, Sep 8, 2010 at 1:05 PM, Mads Lindstrøm mads.lindstr...@gmail.comwrote:
Hi David
On Mon, 2010-09-06 at 13:50 -0700, David Anderson wrote:
- Simple timing attacks: If code path A takes longer than code path B
to execute, an attacker can use that information to reverse engineer
On 09/08/10 12:54, Henning Thielemann wrote:
Gregory Crosswhite schrieb:
For whatever reason, nobody seems to have gotten around to implementing
an Abort monad transformer (outside the monadLib package), so I decided
to write one myself since I wanted the functionality but I use
On 09/08/10 12:55, Henning Thielemann wrote:
Gregory Crosswhite schrieb:
People want to believe that Haskell is a better language than C, but
how could this possibly be true when Haskell lacks the very basic goto
feature??? If the world is going to take Haskell seriously, then this
serious
On Wed, Sep 8, 2010 at 3:38 PM, Hector Guilarte hector...@gmail.com wrote:
If somebody can point out really good reasons on why I should use Haskell to
do my work, please let me know them, they might help me convincing my
bosses. On the other hand, if you believe Haskell is a bad language for
In my amazon shopping cart I currently have:
*Conceptual Mathematics: A First Introduction to
Categorieshttp://www.amazon.com/gp/product/052171916X/ref=ord_cart_shr?ie=UTF8m=ATVPDKIKX0DER
*- F. William Lawvere
*Categories for the Working Mathematician (Graduate Texts in
On Wed, 8 Sep 2010, Gregory Crosswhite wrote:
ExceptionT is a different matter because it handles fail as an
uncaught error and places no restrictions on the error type, so one
could implement the same functionality as AbortT by using ExceptionalT
and requiring the end result be a monadic
Hi, Dave!
Consider this book:
*Basic Category Theory for Computer Scientists (Foundations of
Computing)http://www.amazon.com/Category-Computer-Scientists-Foundations-Computing/dp/0262660717--
*Benjamin C.Pierce
This is at the moment the only book about category theory I've read, but it
was easy
2010/9/9 Николай Кудасов crazy.fiz...@gmail.com:
Consider this book:
Basic Category Theory for Computer Scientists (Foundations of Computing)
-- Benjamin C.Pierce
Hi David,
Николай Кудасов is quite right—Pierce's book is excellent. Apart from
being a good introduction to category theory,
Kevin Jardine kevinjard...@gmail.com wrote:
I have a generic object that I want to wrap in various newtypes to
better facilitate type checking.
For example,
newtype Blog = Blog Obj
newtype Comment = Comment Obj
newtype User = User Obj
Unlike Obj itself, whose internal structure is
On 9/7/10 12:33 AM, Ivan Lazar Miljenovic wrote:
On 7 September 2010 14:24, wren ng thorntonw...@freegeek.org wrote:
On 9/7/10 12:04 AM, Ivan Lazar Miljenovic wrote:
Not quite sure what you mean by a mis-match
Just that they're not the same thing. For example, ZipList supports pure but
it
Gregory Crosswhite gcr...@phys.washington.edu wrote:
People want to believe that Haskell is a better language than C, but
how could this possibly be true when Haskell lacks the very basic
goto feature??? If the world is going to take Haskell seriously,
then this serious blight needs to be
On 9/7/10 7:26 AM, Neil Brown wrote:
On 07/09/10 05:24, wren ng thornton wrote:
Just that they're not the same thing. For example, ZipList supports
pure but it has no meaningful instance of singleton since every
ZipList is infinite.
I don't believe that every ZipList is infinite (if this
On 9 September 2010 12:10, wren ng thornton w...@freegeek.org wrote:
I think the shape of the classes for singletons, insert, coinsert, and union
still needs some work. For instance, the definitions I've given earlier were
assuming a (multi)set-like or sequence-like container, but we can also
On 09/08/10 19:14, Ertugrul Soeylemez wrote:
Gregory Crosswhite gcr...@phys.washington.edu wrote:
People want to believe that Haskell is a better language than C, but
how could this possibly be true when Haskell lacks the very basic
goto feature??? If the world is going to take Haskell
On 9/7/10 4:21 AM, Daniel Fischer wrote:
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
In fact, I think *every* appropriately-typed function satisfies that
law. Does anyone know of a counter-example?
-- | Multiply the *Hask* category by its number of objects.
data E a
Thank you for this suggestion. I do have this book. I found it to be a
little lacking in some areas in that it felt like I was reading a student's
lecture notes, not the professor's.
At some point, I'm left with questions that there's no one around to answer
:-). This is why I'm trying to go
2010/9/8 Benedict Eastaugh ionf...@gmail.com
2010/9/9 Николай Кудасов crazy.fiz...@gmail.com:
Consider this book:
Basic Category Theory for Computer Scientists (Foundations of Computing)
-- Benjamin C.Pierce
Hi David,
Николай Кудасов is quite right--Pierce's book is excellent. Apart
On Wed, Sep 8, 2010 at 9:43 PM, Gregory Crosswhite
gcr...@phys.washington.edu wrote:
Of course, if someone can prove to me that I am wrong and that GotoT
semantics can be implemented with continuations, then I would welcome
this information. :-)
Here's an implementation of GotoT with
On 9/7/10 3:10 PM, Ben Millwood wrote:
So I wonder what people
think of the use of CPP in Haskell code, what alternatives people can
propose, or what people hope to see in future to make conditional
compilation of Haskell code more elegant and simple?
The only thing I ever use CPP for in
Gregory Crosswhite gcr...@phys.washington.edu wrote:
On 09/08/10 19:14, Ertugrul Soeylemez wrote:
Have you looked at ContT from monadLib? It's not just a goto, but
in fact a setjmp/longjmp, i.e. a goto with value. I haven't used it
for anything yet, but it might come in handy for some
On Wed, Sep 8, 2010 at 11:17 PM, wren ng thornton w...@freegeek.org wrote:
On 9/7/10 4:21 AM, Daniel Fischer wrote:
On Tuesday 07 September 2010 05:22:55, David Menendez wrote:
In fact, I think *every* appropriately-typed function satisfies that
law. Does anyone know of a counter-example?
Henning == Henning Thielemann lemm...@henning-thielemann.de writes:
Henning On Wed, 8 Sep 2010, Gregory Crosswhite wrote:
ExceptionT is a different matter because it handles fail as an
uncaught error and places no restrictions on the error type, so
one could implement the same
Hi Peter,
Yes, from Takusen you can call Oracle stored procedures, functions,
packaged stored procedures or functions, or execute an arbitrary
pl/sql block.
In the Takusen software release there is a directory called
Database\Oracle\Test. There, Enumerator.lhs, among other code has
these
On Wed, Sep 8, 2010 at 11:54 PM, Ertugrul Soeylemez e...@ertes.de wrote:
Gregory Crosswhite gcr...@phys.washington.edu wrote:
On 09/08/10 19:14, Ertugrul Soeylemez wrote:
Have you looked at ContT from monadLib? It's not just a goto, but
in fact a setjmp/longjmp, i.e. a goto with value. I
58 matches
Mail list logo