Hi,
I have written a draft of the tutorial on Haskell programming for
client side of Web applications (related to Yhc/Javascript backend):
http://www.haskell.org/haskellwiki/Haskell_in_web_browser
Any feedback, suggestions, and additions (like your own code examples)
are welcome.
Thanks.
PS Th
Dan Doel:
On Tuesday 11 March 2008, Tom Schrijvers wrote:
I think you've uncovered a bug in the type checker. We made the
design
choice that type functions with a higher-kinded result type must be
injective with respect to the additional paramters. I.e. in your
case:
F x y
> The extra syntax has its advantages (more local information) and
> disadvantages (more clutter). We weren't convinced that we need the
> extra syntax, so left it out for the moment. However, this is
> something that can always be changed if experience shows that programs
> are easier to understa
Claus Reinke wrote,
given that type families are never meant to be partially applied,
perhaps a different notation, avoiding confusion
with type constructor applications in favour of something
resembling products, could make that clearer?
something simple, like braces to group families and ind
Claus Reinke:
one might say that the central point of example two were two
partially applied type synonym families in the same position
(rhs of a type synonym family instance definition).
usually, when reduction meets typing, there is a subject reduction
theorem, stating that types do not change
Simon Peyton-Jones:
| | However, I think I now understand what you are worried about.
It is the
| | interaction of type families and GHC's generalised type synonyms
(i.e.,
| | type synonyms that may be partially applied). I agree that it
does lead
| | to an odd interaction, because the out
Thanks, works like a charm!
-- ryan
On 3/24/08, Duncan Coutts <[EMAIL PROTECTED]> wrote:
> You are in luck however, I did a build with ghc-6.8.2 just the other day but
> hadn't announced it yet:
> http://haskell.org/~duncan/gtk2hs/gtk2hs-0.9.12.1.exe
Many thanks.
-Original Message-
From: Brandon S. Allbery KF8NH [mailto:[EMAIL PROTECTED]
Sent: Tue 25/03/2008 20:29
To: Paul Keir; haskell-cafe@haskell.org Cafe
Subject: Re: [Haskell-cafe] Parsec (Zero or One of)
On Mar 25, 2008, at 16:26 , Paul Keir wrote:
> Thankyou. Yes, I'd also not
Er, not Ctrl, of course... Mod-Shift-C. /me goes to punish his hand
for compusive "send" presses.
On Tue, Mar 25, 2008 at 10:40 PM, Luke Palmer <[EMAIL PROTECTED]> wrote:
> On Tue, Mar 25, 2008 at 7:37 PM, Paul L <[EMAIL PROTECTED]> wrote:
> > Peter is right at saying it's the sample GLFW progr
On Tue, Mar 25, 2008 at 7:37 PM, Paul L <[EMAIL PROTECTED]> wrote:
> Peter is right at saying it's the sample GLFW program that didn't
> handle Window Close event. I didn't double check his modification
> because I run Linux/X11 with xmonad where there is no CLOSE button for
> any window, but I
On Tue, 25 Mar 2008, Ryan Ingram wrote:
I was experimenting with Prompt today and found that you can get a
"restricted monad" style of behavior out of a regular monad using Prompt:
I recently developed a similar trick:
http://hsenag.livejournal.com/11803.html
It uses the regular MonadPlus r
ahey:
> Don Stewart wrote:
> >ahey:
> >>Hello Folks,
> >>
> >>As some of you will be aware, I have been working on various Map
> >>implementations that currently live here..
> >>
> >>http://code.haskell.org/collections/collections-ghc6.8
> >>
> >>The libs in question being Data.Tree.AVL, Data.Trie.
I was experimenting with Prompt today and found that you can get a
"restricted monad" style of behavior out of a regular monad using Prompt:
> {-# LANGUAGE GADTs #-}
> module SetTest where
> import qualified Data.Set as S
Prompt is available from
http://hackage.haskell.org/cgi-bin/hackage-scripts
To avoid this in future, you can use the strict-concurrency
package on hackage, which has some stricter container types, with
their strategies. MVars and Chans are the main examples of where
a stricter strategy is sometimes useful.
kolar:
> Yes, that's is. Thanks. My fault - missing wood seeing tr
On Mar 25, 2008, at 16:26 , Paul Keir wrote:
Thankyou. Yes, I'd also noticed that "only end" could result in the
"end" part being taken as an identifier. The language I'm parsing
actually doesn't have reserved words though; so "end" and "only"
are both possible valid identifiers. I should t
Thankyou. Yes, I'd also noticed that "only end" could result in the "end" part
being taken as an identifier. The language I'm parsing actually doesn't have
reserved words though; so "end" and "only" are both possible valid identifiers.
I should then probably replace my use of say, reserved "only
On Mar 25, 2008, at 12:43 , Paul Keir wrote:
Thanks. I can't find optionMaybe in my version 2.1 of Parsec, but
in any case, defining my only_prod as
only_prod = do { reserved "only"; option [] identifier }
or
only_prod = do { reserved "only"; identifier <|> return [] }
gives the same error
Peter is right at saying it's the sample GLFW program that didn't
handle Window Close event. I didn't double check his modification
because I run Linux/X11 with xmonad where there is no CLOSE button for
any window, but I trust his modification works fine :-)
As for the alternatives, I don't think
Greetings fellow Haskelleers,
I am very pleased to announce a new chapter in the Haskell Server
Pages saga. After a two-year long hiatus, while we in the team have
been busy with Other Stuff, we have resumed work on Project HSP, and
this release marks the first milestone.
=
===
On Mon, Mar 24, 2008 at 12:14 AM, Manuel M T Chakravarty
<[EMAIL PROTECTED]> wrote:
> One difference between type families and (value-level) functions is
> that not all parameters of a type family are treated the same. A type
> family has a fixed number of type indicies. We call the number of
On Tuesday 11 March 2008, Tom Schrijvers wrote:
> I think you've uncovered a bug in the type checker. We made the design
> choice that type functions with a higher-kinded result type must be
> injective with respect to the additional paramters. I.e. in your case:
>
> F x y ~ F u v <=>
Indeed, the sample from the website does not close correctly when the window
is closed; you must press the escape key.
This problem has nothing to do with GLFW or the Haskell wrapper, but with
the demo, which does not check if the window gets closed.
I modified the example code on the wiki so it
Don Stewart wrote:
ahey:
Hello Folks,
As some of you will be aware, I have been working on various Map
implementations that currently live here..
http://code.haskell.org/collections/collections-ghc6.8
The libs in question being Data.Tree.AVL, Data.Trie.General and a few
other bits like Data.C
Thanks. I can't find optionMaybe in my version 2.1 of Parsec, but in any case,
defining my only_prod as
only_prod = do { reserved "only"; option [] identifier }
or
only_prod = do { reserved "only"; identifier <|> return [] }
gives the same error responses as before. I will anyway look closer a
| | However, I think I now understand what you are worried about. It is the
| | interaction of type families and GHC's generalised type synonyms (i.e.,
| | type synonyms that may be partially applied). I agree that it does lead
| | to an odd interaction, because the outcome may depend on the orde
Yes, that's is. Thanks. My fault - missing wood seeing trees. ;-)
Best regards,
Dusan
Roberto Zunino wrote:
Dusan Kolar wrote:
Dear all,
I've thought the following three (dummy) programs would run some of
their parts in parallel (on dual core) if compiled with option
threaded (smp). The t
On Tue, 2008-03-25 at 11:47 -0400, Albert Y. C. Lai wrote:
> Paul Keir wrote:
> > I’m having some difficulty using the Parsec library, perhaps you could
> > help. I’ve reduced my problem as shown below. I would like the
> > ‘only_prod’ parser to require the reserved string “only”, _optionally_
>
I did use that option. :-)
Dusan
Bulat Ziganshin wrote:
Hello Dusan,
Tuesday, March 25, 2008, 3:47:50 PM, you wrote:
(smp). The truth is that only the first one exploits multicore CPU. Why?
+RTS -N2
___
Haskell-Cafe mailing list
Ha
Thomas Engel wrote:
inputvalues :: IO Input -- add a "return (ve,de,...)" to the end
compute :: Input -> Output
How can I combine several function (calculations) in this function?
compute1 :: Input -> Output1
compute2 :: Input -> Output2
combine :: Output1 -> Output2 -> Output
compute in
Cetin Sert wrote:
is there a version of getChar that doesn't buffer keyboard input until
enter is pressed?
Look into hSetBuffering (module System.IO or IO). As a quick start:
hSetBuffering stdin NoBuffering
___
Haskell-Cafe mailing list
Haskell
Paul Keir wrote:
I’m having some difficulty using the Parsec library, perhaps you could
help. I’ve reduced my problem as shown below. I would like the
‘only_prod’ parser to require the reserved string “only”, _optionally_
followed by an identifier. As part of ‘mytest’, this should then be
foll
Hi,
is there a version of getChar that doesn't buffer keyboard input until enter
is pressed?
specialReadln :: IO String
specialReadln = do c ← getChar
if c == '#'
then do return []
else do cs ← specialReadln
Hi,
I'm having some difficulty using the Parsec library, perhaps you could
help. I've reduced my problem as shown below. I would like the
'only_prod' parser to require the reserved string "only", _optionally_
followed by an identifier. As part of 'mytest', this should then be
followed by the re
I am also getting the same output: "0" indicates the number of processed
buffers, and "1" the number of queued buffers. It means that the small
buffer which is queued for playback never gets processed completely.
The first argument of playOpenAL functions is a sampling rate of an audio
playback, s
Dusan Kolar wrote:
Dear all,
I've thought the following three (dummy) programs would run some of
their parts in parallel (on dual core) if compiled with option threaded
(smp). The truth is that only the first one exploits multicore CPU. Why?
h1 <- forkIO $ putMVar v1 $ fibs (n-1)
On Tue, Mar 25, 2008 at 3:29 PM, Alex Sandro Queiroz e Silva
<[EMAIL PROTECTED]> wrote:
> Hallo,
>
>
> Bjorn Bringert wrote:
> >
> > This is SQLite's fault. In SQLite, all types are aliases for STRING.
> > Whatever type you use in the create and insert, you will get strings
> > back.
> >
>
>
Hallo,
Bjorn Bringert wrote:
This is SQLite's fault. In SQLite, all types are aliases for STRING.
Whatever type you use in the create and insert, you will get strings
back.
That's not true. SQLite has integers (64 bits) and reals. But, if
you try to read the field as text it will gladl
2008/3/22 Sebastian Sylvan <[EMAIL PROTECTED]>:
>
> On Sat, Mar 22, 2008 at 1:40 PM, Deng Chao <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > I'm learning sqlite, and as I know haskell has some libraries like
> > HDBC or HSQL can access sqlite DB. Can anybody give me a small example
> > to show how to
was hoping for. in fact, the decomposition rule seems to be
saying that type function results cannot matter, only the
structure of type family applications does:
F x y ~ F u v <=> F x ~ F u /\ y ~ v
or do you have a specific type rule application order in mind
where all type-level reduction
Hello Dusan,
Tuesday, March 25, 2008, 3:47:50 PM, you wrote:
> (smp). The truth is that only the first one exploits multicore CPU. Why?
+RTS -N2
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing li
Dear all,
I've thought the following three (dummy) programs would run some of
their parts in parallel (on dual core) if compiled with option threaded
(smp). The truth is that only the first one exploits multicore CPU. Why?
Moreover, using RTS option -sstderr makes runtime not to evaluate in
On Mar 25, 2008, at 13:03, Thomas Engel wrote:
type Input = (Float, Float, ...)
type Output = (Float, Float, ...)
inputvalues :: IO Input -- add a "return (ve,de,...)" to the end
compute :: Input -> Output
How can I combine several function (calculations) in this function?
compute (ve
Hi Robert
>
> (I think I know enough haskell to answer this, but I may be telling you
> all the wrong things.)
Why? What's wrong?
>
> You'll have to pass the values through, though this can be hidden to
> some extent. Try changing your functions to have types
>
> type Input = (Float, Float, ...
type family F a :: * -> *
F x y ~ F u v <=> F x ~ F u /\ y ~ v
why would F x and F u have to be the same functions?
shouldn't it be sufficient for them to have the same result,
when applied to y and v, respectively?
Oh, yes, that is sufficient and exactly what is meant by F x ~ F
u. It mean
again, i gave a concrete example of how ghc behaves as i would
expect, not as that decomposition rule would suggest.
Maybe you can explain why you think so. I didn't understand why you
think the example is not following the decomposition rule.
Actually, see
http://hackage.haskell.org/tr
Thomas Engel <[EMAIL PROTECTED]> writes:
> My problem is: How can I get the input values into the calculations and back
> the result to the output.
> In an other language I would use global variables for this.
That would be bad style.
> An other point is that I want to separate the input from
On Mar 25, 2008, at 09:13, Thomas Engel wrote:
My problem is: How can I get the input values into the calculations
and back
the result to the output.
In an other language I would use global variables for this. So what
should I
use in haskell?
(I think I know enough haskell to answer this
Hello,
I'm new to haskell and want to write a small program for some winder
calcucations. I want to input 10-15 values and based on this input
doing some calculations. After this calculations I want to print out the
results.
My problem is: How can I get the input values into the calculations an
48 matches
Mail list logo