Some time I've announced that I'm working on VXML, a validating xml
library.
The use case which makes trouble is elem+ (one or more)
This example is encoded in this way:
root -> St 1
id :1
endable : True
a -> St 1
b -> St 1
c -> St 12
id :11
endable : True
(a|b|c) -> St
rui yang <[EMAIL PROTECTED]> writes:
> I'm a new comer in functional programming,I have defined some
> functions in Haskell and I want to know how much CPU time each
> function need and compare the efficiency of these functions. The
> question is how should I test the CPU time of my function? it s
Hi,all
I'm a new comer in functional programming,I have defined some functions in
Haskell and I want to know how much CPU time each function need and compare the
efficiency of these functions. The question is how should I test the CPU time
of my function? it seems that those functions to call t
(Let's go to haskell-cafe if we want to continue.)
Hi Dmitry,
Sigh. Indeed, the distributed instance Show TermRep is not fit.
The default TermRep in the Strafunski distribution is not even
willing to disclose constructor names. So there is no way unless
you tweak TermRep (and DrIFT). TermRep shou
Evening, Ralf.
Ralf Laemmel <[EMAIL PROTECTED]> 20:27 24/7/2003 wrote:
RL> a) Add a class constraint for Show to the Term class.
RL>(Would that work? It's a bit invasive anyway.)
Yes, that a bit invasive to say at least. With equal "ease" I can hack
DrIFT to produce instances of Show the
Very good point!
adhoc and friends support TYPE case.
What's needed here is a so-far unsupported type-CLASS case
which is actually at least non-trivial.
I can only offer semi-solutions:
a) Add a class constraint for Show to the Term class.
(Would that work? It's a bit invasive anyway.)
b) Alte
I want to write generic traversal which prints everything on the way:
uglyPrint :: (Term t, Show t) => t -> [(String)]
uglyPrint = (map snd) . runIdentity . applyTU (full_tdTU uglyPrintStep)
uglyPrintStep :: (Show t, Term t) => TU [(t, String)] Identity
uglyPrintStep = constTU [] `adhocTU` (retur
Hi Mike,
> GameState = GameState Int Int Int Int Int
> movePlayers :: GameState -> [GameState]
> movePlayers (GameState p1 p2 p3 p4 p5) =
> [ (GameState p1' p2' p3' p4' p5') |
> p1' <- outlets (p1),
> p2' <- outlets (p2),
> p3' <- outlets (p3),
> p4' <- outlets (p
Hello Everyone,
I am writing a program to model a game. I am trying to move 5 players around
a graph such that no two players may occupy the same vertex. Players move in
a certain order, so to resolve collisions, one must know the order. I'll give
a simple example.
Imagine a numberline with e
On Wed, 24 Jul 2002 10:44:51 +0100 (BST)
"D. Tweed" <[EMAIL PROTECTED]> wrote:
> It wasn't clear to me whether Vincenzo's e-mail was saying that you
> just needed to be in IO to generate the seed or that you need to be in
> IO to do anything that involves generating random numbers __after
> you'v
On 23 Jul 2002, Alastair Reid wrote:
>
> > You shouldn't _need_ to be in the IO monad to get random numbers
> > (although if you choose to that can be a good choice). Clearly
> > there's the need to initialise the generator, but if you want
> > `random' random numbers (as opposed to a known sequ
Hm. No smilies on that answer ;) Well, I didn't want to be polemic :)
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
>
> One possible solution under Linux is to use Haskell's lazy file I/O
> with/dev/urandom (or /dev/random if you're doing cryptography).
Why *lazy* file IO? Couldn't just IO do the thing?
It's probably the solution of newStdGen
Vincenzo
___
Hask
One possible solution under Linux is to use Haskell's lazy file I/O with
/dev/urandom (or /dev/random if you're doing cryptography).
David
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
> You shouldn't _need_ to be in the IO monad to get random numbers
> (although if you choose to that can be a good choice). Clearly
> there's the need to initialise the generator, but if you want
> `random' random numbers (as opposed to a known sequence of random
> numbers for debugging) getting
On Tue, 23 Jul 2002 16:46:37 +0100 (BST)
"D. Tweed" <[EMAIL PROTECTED]> wrote:
> which I believe you can use either to get the seed within the IO monad
> directly or via unsafePerformIO if you don't want the IO monad
> around.
That's true. I just prefer to have the IO monad around, for the pur
On Tue, 23 Jul 2002, Nick Name wrote:
> It's relatively simple.
>
> The random number generator is a pure function, so it cannot be
> nondeterministic. So, you have a way to build this function with a seed,
> since the author wanted you to be able to do so, I could say for
> completeness, or reu
It's relatively simple.
The random number generator is a pure function, so it cannot be
nondeterministic. So, you have a way to build this function with a seed,
since the author wanted you to be able to do so, I could say for
completeness, or reuse sake.
But what you want is nondeterminism. How
Hi there,
I found I can't generate a random float number(between 0 to 1) use the
following method.
*
module Main where
import System(getArgs)
import Random
uni :: Float
uni = head (randoms g)
where
g = mkStdGen 77
main
At 2001-07-14 01:08, Shirley Widyaningsih wrote:
>In the book, it's said "in front of a terminal
>screen, we'll see a displaying prompt sign "?", but in my terminal screen,
>there's no ? prompt sign execpt the PRELUDE> prompt sign.
That's correct. It means the Prelude (standard library sort of
-
WANT A NEW JOB? THEN LET THE JOB FIND YOU
Visit www.ecruit.com.au and register your
profile. Then the headhunters can find you.
-
Get your own free email account at
http://www.freemail.com.au/ now p
Hi, i've got some problem here. I'm a beginner in Haskell and i've already download
haskell 98 , but unfortunetly, i've bought books that used hugs 1.3
version. In the book, it's said "in front of a terminal screen, we'll see a displaying
prompt sign "?", but in my terminal screen, there's no
Thanks to all for pointing out my mistake, which was that I needed to use a
from- function to generalize the signature. I thought I might add that,
although most people suggested using fromInteger, it's necessary to use
fromIntegral in this case (unless your implementation has a fromInt funct
I have a numeric type Number for use in a dynamically typed language where
Exact numbers are considered a subset of Inexact numbers. For this reason, it
makes sense to call functions like truncate, round, etc. on Exact numbers. To
implement this, I made Number an instance of RealFrac, whose m
24 matches
Mail list logo