Serguey Zefirov writes:
> 2010/10/27 Andy Stewart :
>> Hi all,
>>
>> I want use TH write some function like below:
>>
>> data DataType = StringT
>> | IntT
>> | CharT
>>
>> parse :: [(String,DataType)] -> (TypeA, TypeB, ... TypeN)
>>
>> Example:
>>
>> parse [("stri
2010/10/27 Andy Stewart :
> Hi all,
>
> I want use TH write some function like below:
>
> data DataType = StringT
> | IntT
> | CharT
>
> parse :: [(String,DataType)] -> (TypeA, TypeB, ... TypeN)
>
> Example:
>
> parse [("string", StringT), ("001", IntT), ("c", CharT
Ah, it's too early in the morning...
There is still some room to simplify (e.g. fuse the liftE (map ...)
ops).
Here a simpler Version:
evalObs (Map f obs) = liftE (map (evalObs.f.Konst)) (evalObs obs)
>>=
either (return.Left)
(seq
Hi,
I think you may want to over think your types again.
Especially your Evaluator-Monad, and maybe your Map constructor.
The Problem is, due to your use of Either and the need for evalObs to
finally transform from "Obs [a]" type to "Evaluator [a]" you will end
up in another Monad for Either:
Hi all,
I want use TH write some function like below:
data DataType = StringT
| IntT
| CharT
parse :: [(String,DataType)] -> (TypeA, TypeB, ... TypeN)
Example:
parse [("string", StringT), ("001", IntT), ("c", CharT)]
will return:
("string", 001, 'c')
I'm currently working on a pretty-printer for lazy text [1] values,
basing the API on the wl-pprint [2] package.
[1]: http://hackage.haskell.org/package/text
[2]: http://hackage.haskell.org/package/wl-pprint
In terms of API decisions, there are a few things I'm not sure of and
am wondering what o
I just release mime-mail[1], which can construct multipart messages.
Michael
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mime-mail
2010/10/27 Günther Schmidt :
> Hi all,
>
> I was just looking for mail libraries on hackage. You know libraries where I
> can construct an email,
Does anybody know of any utilities in haskell for reading and writing HDF5
files?
Other number crunchy formats? Thanks.--Tim
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 27/10/2010, at 12:55 PM, Alexander Solla wrote:
>
> Difference equations show up in Knuth's "Concrete Mathematics", his tome on
> discrete mathematics. The theory of difference equations is the discrete
> analogue to the theory of differential equations. Surprisingly, the
> continuous/di
On Oct 26, 2010, at 4:21 PM, Richard O'Keefe wrote:
Number theory would probably be out
except maybe in a 2nd or 3rd year course leading to cryptography.
Number theory is one of those weird cases. They are discrete
structures, but advanced number theory uses a lot of complex analysis
an
On 27/10/2010, at 8:43 AM, Andrew Coppin wrote:
>
> Already I'm feeling slightly lost. (What does the arrow denote? What's are
> "the usual logcal connectives"?)
You mentioned Information Science, so there's a good chance you know something
about Visual Basic, where they are called
AND
You have to figure out here how you can use the function which is the argument
to map.
It seems you want to end up with a function of type a -> Evaluator b, to be
used as an argument to mapM.
One idea is to add a new constructor Var to represent variables, and something
like
evalVar :: Obs b -
Hi all,
I was just looking for mail libraries on hackage. You know libraries
where I can construct an email, or retrieve on from the server.
With retrieving an email I mean something with a bit more structure than
a String, or, God help me, a ByteString.
Where are we on this subject? I real
On 27/10/2010, at 7:29 AM, Andrew Coppin wrote:
> I didn't say "people think Haskell is scary because type theory looks crazy".
> I said "people think Haskell is scary because the typical Haskeller thinks
> that type theory looks *completely normal*". As in, Haskellers seem to think
> that ever
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, ring,... structure.
Then what about following type class hierarchy? I think it suppo
On Tue, Oct 26, 2010 at 11:11 AM, Dupont Corentin
wrote:
> Hello again café,
>
> I have a command line program that takes input from various handles
> (actually network sockets) like this:
>
>> s <- hGetLine h
>> etc.
>
> I'd like to unit test this. How can I do?
> I'd like to inject data on the h
Instead of answering your question directly, I'll give you some code
for a different DSL:
data Exp ref a where
EVar :: ref a -> Exp ref a
ELam :: (ref a -> Exp ref b) -> Exp ref (a -> b)
EAp :: Exp ref (a -> b) -> Exp ref a -> Exp ref b
-- simple data structures
EPair :: Exp
On 26 October 2010 20:43, Andrew Coppin wrote:
>
>> Propositional logic is quite a simple logic, where the building blocks
>> are atomic formulae and the usual logical connectives. An example of a
>> well-formed formula might be "P → Q". It tends to be the first system
>> taught to undergraduates,
On Oct 26, 2010, at 12:43 PM, Andrew Coppin wrote:
Propositional logic is quite a simple logic, where the building
blocks
are atomic formulae and the usual logical connectives. An example
of a
well-formed formula might be "P → Q". It tends to be the first
system
taught to undergraduates,
On 26/10/2010 07:54 PM, Benedict Eastaugh wrote:
On 26 October 2010 19:29, Andrew Coppin wrote:
I don't even know the difference between a proposition and a predicate.
A proposition is an abstraction from sentences, the idea being that
e.g. "Snow is white", "Schnee ist weiß" and "La neige est
Great thanks! All work right now.
2010/10/26 Stephen Tetley
> The lexer was wrong - but it was the lexer function not the lexer spec
> - try the one below.
>
> Note that you have to take 'len' chars from the original input.
> Previously you were taking the whole of the "rest-of--input":
>
> lexe
On 26 October 2010 19:29, Andrew Coppin wrote:
>
> I don't even know the difference between a proposition and a predicate.
A proposition is an abstraction from sentences, the idea being that
e.g. "Snow is white", "Schnee ist weiß" and "La neige est blanche" are
all sentences expressing the same p
Just curious if Haskell can or will generate cross-platform executable code,
e.g., generate code for Linux from a Windows machine.
Thanks,
Hong
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 26/10/2010 11:33 AM, Joachim Breitner wrote:
Hi,
Until this is offered in an official position, this might be helpful if
you ignore the Debian-related columns:
http://people.debian.org/~nomeata/platform.html
That's quite useful. It doesn't list the version numbers for GHC itself
or for Hadd
On Tue, Oct 26, 2010 at 5:11 PM, Dupont Corentin
wrote:
> Hello again café,
>
> I have a command line program that takes input from various handles
> (actually network sockets) like this:
>
>> s <- hGetLine h
>> etc.
>
> I'd like to unit test this. How can I do?
If all you ever do in some part of
On 25/10/2010 11:01 PM, Lauri Alanko wrote:
On Mon, Oct 25, 2010 at 10:10:56PM +0100, Andrew Coppin wrote:
Type theory doesn't actually interest me, I just wandered what the
hell all the notation means.
That sounds like an oxymoron. How could you possibly learn what the
notation "means" without
On 25/10/2010 10:36 PM, Gregory Collins wrote:
Andrew Coppin writes:
Hypothesis: The fact that the average Haskeller thinks that this kind of dense
cryptic material is "pretty garden-variety" notation possibly explains why
normal people think Haskell is scary.
That's ridiculous. You're compari
Hi,
I'm glad to announce csound combinator library.
It features liberation from id-style csound code, haskore-like composition
structures, type-safe composable opcodes and simple instrument interface (no
interface at all, instrument is just a function from some note
representation to signal).
ht
Hey Chris!
Values for PlayerNumber are acquired at evaluation time, from the state of
the system.
I have not included the evaluation of AllPlayers.
Here how it looks:
evalObs AllPlayers = return . pure =<< gets players
But when you build your Obs, you have yet no idea how much players it will
Hello all,
I've recently taken over maintenance of MissingPy, and pushed version
0.10.5 to hackage[1]. This includes two notable improvements:
- fix build errors for python >= 2.5
- allow calling into multi-threaded python code (requires python >= 2.3).
I'm trying to provide support for as man
On 26 October 2010 18:07, Dupont Corentin wrote:
> But how can I write the evaluator for Map?
Where do values for PlayerNumber come from? Unless I'm mistaken, the
only thing that Map can be used with is Obs [PlayerNumber], a list of
values PlayerNumber which we have no means of acquiring in order
Dear all,
The link provided below is incorrect.
The correct link is
https://spreadsheets.google.com/viewform?hl=en&formkey=dFVsNWZPWTdyT3NYOWRnT25GUzdJSFE6MQ#gid=0
Sorry for your inconvenience.
Begin forwarded message:
> From: Jeroen Janssen
> Date: 26 oktober 2010 18:30:58 GMT+02:00
> To: gh
Dear all,
For organizatorial reasons, we would like to ask that everyone interested in
attending the symposium on functional programming in industry (see below)
registers at
https://spreadsheets.google.com/ccc?key=0Ak5F96CGaVoJdFVsNWZPWTdyT3NYOWRnT25GUzdJSFE&hl=en#gid=0
Kind Regards,
The Ghent
Hello Dupont,
If your code follows good style and has kept as much code out of IO as
possible, you should be able to easily unit test the pure portions of your
code. Otherwise, classic integration tests, by setting up the network jigs
yourself, is standard.
> Another little question:
> How can I
Hello again café,
I have a command line program that takes input from various handles
(actually network sockets) like this:
> s <- hGetLine h
> etc.
I'd like to unit test this. How can I do?
I'd like to inject data on the handle so that all the input chain is tested.
How are command line progra
Hello café,
I have a little DSL in my program as follow.
Now I'd like to add a Map constructor in it. Thats where I would need help!
> data Obs a where
> AllPlayers :: Obs [Int]
> Plus :: (Num a) => Obs a -> Obs a -> Obs a
> And:: Obs Bool -> Obs Bool -> Obs Bool
>
The lexer was wrong - but it was the lexer function not the lexer spec
- try the one below.
Note that you have to take 'len' chars from the original input.
Previously you were taking the whole of the "rest-of--input":
lexer :: (TheToken -> P a) -> P a
lexer f input@(_,_,instr) =
case alexScan i
lexer works fine, problem is in happy parser.
2010/10/26 Stephen Tetley
> Hello
>
> I would change you Alex specification to this:
>
> $digit = 0-9-- digits
> $alpha = [a-zA-Z] -- alphabetic characters
> $eol = [\r\n]
> $any = [^$eol]
>
> tokens :-
>
> $eol
Some questions about Haddock usage:
1. Haddock executable and library are a single hackage package,
but GHC seems to include only the former (haddock does not
even appear as a hidden package anymore). Is that intended?
2. Naively, I'd expect Haddock processing to involve three stages:
1
Hi Mulhern,
I would like to teach a small section on polytypism/genericity in the
> "functional programming using Haskell" course I'm teaching. I won't, though,
> unless I can assign an actual programming exercise in polytypic programming,
> however brief. Can anybody recommend a functioning compi
Hi all,
I would like to teach a small section on polytypism/genericity in the
"functional programming using Haskell" course I'm teaching. I won't, though,
unless I can assign an actual programming exercise in polytypic programming,
however brief. Can anybody recommend a functioning compiler that I
On 24.10.2010 03:38, wren ng thornton wrote:
On 10/23/10 4:53 PM, Alexey Khudyakov wrote:
On 23.10.2010 05:11, wren ng thornton wrote:
I'd rather see,
class Additive v where -- or AdditiveMonoid, if preferred
zeroV :: v
(^+^) :: v -> v -> v
class Additive v => AdditiveGroup v where
negateV ::
> Regardless, 7zip (LGPL) can do it. But you have to first inzip, and then
untar as a seperate step.
This is pretty far off topic, but you can actually unpack it in a single
run. If you use the GUI version of 7z (a.k.a. the 7zip File Manager) you can
open the .tar.gz and it will list a single .tar
Hi,
Am Sonntag, den 24.10.2010, 15:56 +0200 schrieb Simon Hengel:
> > >It would be convenient to have a page which would list all the HP packages
> > >with their versions. The release page [2] only has a list of packages
> > >whose versions has changed since the last release, as I understood.
> >
2010/10/25 Gregory Collins
> Andrew Coppin writes:
> > Hypothesis: The fact that the average Haskeller thinks that this kind of
> > dense
> > cryptic material is "pretty garden-variety" notation possibly explains why
> > normal people think Haskell is scary.
> That's ridiculous.
That's not s
Hello
I would change you Alex specification to this:
$digit = 0-9-- digits
$alpha = [a-zA-Z] -- alphabetic characters
$eol = [\r\n]
$any = [^$eol]
tokens :-
$eol { tok $ \_ -> Eol }
$any+ { tok $ \s -> Str s }
The complementatio
46 matches
Mail list logo