Even more succinctly:
sequence_ . map is mapM_, and putStrLn . show is print, so you get:
mapM_ print films
Dan
On Sun, May 10, 2009 at 9:59 PM, Alex MDC alex@gmail.com wrote:
2009/5/11 applebiz89 applebi...@hotmail.com
I know to use show and putStrLn but I just don't know how to put
I added some partial bindings for libguestfs[1] here:
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=haskell/Guestfs.hs;hb=HEAD
Some very simple example programs which use these bindings:
http://git.et.redhat.com/?p=libguestfs.git;a=tree;f=haskell;hb=HEAD
Any comments welcome. My Haskell
Sven Panne wrote:
Regarding Functor/Applicative: The obvious instances for e.g. a 2-dimensional
vertex are:
data Vertex2 a = Vertex2 a a
instance Functor Vertex2 where
fmap f (Vertex2 x y) = Vertex2 (f x) (f y)
instance Applicative Vertex2 where
pure a = Vertex2 a a
2009/05/10 Belka lambda-be...@yandex.ru:
Some real code using wished feature:
This code has multiple issues:
. It is nearly unreadable as formatted.
. There are actual errors that would prevent it from compiling
(pattern match on `Left` and `Just` in the same `case`
expression!).
Sven,
Am Montag, 4. Mai 2009 13:33:33 schrieb David Duke:
Decoupling basic primitives for geometric modelling from OpenGL would be
useful. [...]
Even just data constructors and instances of these within Functor and
Applicative are a useful starting point. [...]
This leads me to the
Hello Peter,
Monday, May 11, 2009, 5:40:20 PM, you wrote:
GHC 6.10.1 is now supported.
6.10.2/6.10.3?
Yes, those versions are supported as well. GHC 6.10.1 changed the way
finalizers are handled, and as a result, Gtk2HS programs were
crashing. I don't think anything that affects Gtk2HS
Hi everyone.
The docs in the web on http://www.haskell.org/ghc/docs
define Data.Map.lookup as follows:
http://www.haskell.org/ghc/docs
lookup :: Ord k = k - Map k a - Maybe a
but my version of ghci does i like that:
Data.Map.lookup :: (Ord k, Monad m) = k - Data.Map.Map k a - m a
but i need the
Peter Gavin pga...@gmail.com writes:
Hi everyone,
I'd like to announce the release of Gtk2HS 0.10.1! This release
includes mostly bug fixes and other small improvements. Most notably,
GHC 6.10.1 is now supported.
The source tarball may be downloaded from:
I've noticed that a large majority of fundeps I see in other people's
libraries are written:
class C a b | b - a
Where the dependent parameter appears first in the MPTC. Is there a
reason for this?
AFAIK, there isn't any semantic significance to the order of parameters in
an MPTC. Why
I vaguely remember there being some finalizer behavior that changed in
6.10.2 that might affect this package. Not sure though.
On Sun, May 10, 2009 at 12:10 PM, Andy Stewart
lazycat.mana...@gmail.com wrote:
Bulat Ziganshin bulat.zigans...@gmail.com writes:
Hello Peter,
Sunday, May 10, 2009,
Oh sorry.
It was probalby changed in one of the latest versions
I downloaded the latest and now i'm finde.
2009/5/11 Nico Rolle nro...@web.de:
Hi everyone.
The docs in the web on http://www.haskell.org/ghc/docs
define Data.Map.lookup as follows:
http://www.haskell.org/ghc/docs
lookup :: Ord
On Mon, May 11, 2009 at 10:25 AM, Neil Mitchell ndmitch...@gmail.comwrote:
Hi Peter,
I would like to use the Hoogle text format in C#.
Out of curiosity, why? I'm just interested to know what work you're doing.
Sure. We're building with a graphical representation of a Haskellish
language
Hi
Sure. We're building with a graphical representation of a Haskellish
language (a tiny subset of Haskell actually). The target audience is
graphical artists and designers. For testing, I would like to populate the
library with primitives taken from the Haskell base libraries. I tried
Hello,
I have forgotten whether I sent this posting out. Sorry if I did (I
didn't see on Haskell cafe archive).
I am building Swish and getting an error. I want to follow the
progress of swish build ... I don't see an additional parameter like
verbose mode that will tell which swish
GHC amused me today with this error (context omitted):
Couldn't match kind `(* - *) - * - *' against `?? - ? - *'
When matching the kinds of `t :: (* - *) - * - *' and
`(-) :: ?? - ? - *'
It was a silly mistake: I had used 'lift' where I intended to use
Does any programmer on this mailing list have experience with developing 3 dimensional interactive environments/functional objects within them, au Second Life? Is Haskell useful for such an endeavor? With best wishes, Paul
___
Haskell-Cafe mailing list
Tillmann Rendel wrote:
wren ng thornton wrote:
Indeed. The proliferation of compound words is noteworthy, but it's
not generally considered an agglutinative language. From what (very
little) German I know compounds tend to be restricted to nouns, as
opposed to languages like Turkish,
Hi everyone,
With stream-fusion, we can write functions which construct and
destruct lists, such as (this is the main example from the Stream
Fusion paper[1])
f :: Int - Int
f n = sum [k * m | k - [1..n], m - [1..k]]
and the rewrite rules in stream-fusion replace these operations on
lists
In the code below, is the type returned by the return functions inferred from
the result type in the function type signature, i.e., just change the result
type to Maybe Int and the code will return a Maybe monad, (Just 4), instead of
a List monad?
Michael
=
import Monad
fn :: [Int] -
Hello all,
I'm sorry for the OT post, is the conference dead? I've got no mail
since yeasterday afternoon. And that is quite unusual.
Best regards,
Dusan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello!
The problem is that it's impossible to infer the SomeClass instance from the
type SomeRole. If you do print role, which instance should it use?
I can think of two ways around it:
-- 1. (dummy parameter)
--
data SomeRole a = Role1 | Role2 | Role3 deriving Show
On Sun, May 10, 2009 at 11:52 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Peter,
Sunday, May 10, 2009, 7:43:38 PM, you wrote:
I'd like to announce the release of Gtk2HS 0.10.1! This release
includes mostly bug fixes and other small improvements. Most notably,
GHC 6.10.1 is
AAIP Workshop on ICFP Deadline Extension
Please note that the submission deadline for the 3rd Workshop on
Approaches and Applications of Inductive Programming has been extended
to May 25.
The workshop takes place for the first time at the
14th ACM SIGPLAN International Conference on Functional
On 12/05/2009 08:04, Dušan Kolář wrote:
I'm sorry for the OT post, is the conference dead? I've got no mail
since yeasterday afternoon. And that is quite unusual.
We had a full disk on haskell.org over the weekend. We freed up some
space yesterday, but it seems the lists were still stuck.
Hi Anton,
AFAIK the only place this is documented is in GHC source code. Please
see the section called Main data types representing Kinds at
http://hackage.haskell.org/packages/archive/ghc/6.10.2/doc/html/Type.html.
Basically, they are all members of GHC's internal subkind hierarchy,
which is
Am Freitag, 8. Mai 2009 18:43 schrieb Jason Dagit:
If you wanted to work on this, I would encourage you to read more
about patch theory[1,2,3,4] and also try out libdarcs[5].
Is libdarcs the same as the darcs library package on Hackage (which exports
the darcs API)?
Best wishes,
Wolfgang
wren ng thornton w...@freegeek.org wrote:
That is, the distinction between agglutinative vs
fusional is typological rather than theoretical.
Though yes, the distinction is most clearly observed by looking at
verbal inflections. And now we're really far off topic :)
No, we aren't. A couple
michael rice nowg...@yahoo.com wrote:
In the code below, is the type returned by the return functions
inferred from the result type in the function type signature, i.e.,
just change the result type to Maybe Int and the code will return a
Maybe monad, (Just 4), instead of a List monad?
Yes.
Belka wrote:
Hello, communion people!
I seek for your advice in a matter, where it's really hard for me to
determine a good programming style.
Here's the problem. I'm generalizing multiple authorization procedures to
one, using class definition. (if of any interest, the code is in the end.)
On 12/05/2009, at 14:45, Reiner Pope wrote:
The Stream datatype seems to be much better suited to representing
loops than the list datatype is. So, instead of programming with the
lists, why don't we just use the Stream datatype directly?
I think the main reason is that streams don't store
Am Freitag, 8. Mai 2009 14:31 schrieb Daniel Fischer:
Though I had no contact with algebraists in the 1980s,
I also hadn’t. However, nowadays I have contact with someone who was an
algebraist in the 1980s. It’s my boss (professor), by the way. :-)
I think, also category theorists often
On Mon, May 11, 2009 at 10:59:01PM -0700, michael rice wrote:
In the code below, is the type returned by the return functions inferred from
the result type in the function type signature, i.e., just change the result
type to Maybe Int and the code will return a Maybe monad, (Just 4), instead
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090512
Issue 117 - May 12, 2009
---
Welcome to issue 117 of HWN, a newsletter covering
Excerpts from Vasili I. Galchin's message of Tue May 12 00:27:26 +0200 2009:
Hello,
I have forgotten whether I sent this posting out. Sorry if I did (I
didn't see on Haskell cafe archive).
I am building Swish and getting an error. I want to follow the
progress of swish build
Am Montag 11 Mai 2009 18:36:54 schrieb Christopher Lane Hinson:
I've noticed that a large majority of fundeps I see in other people's
libraries are written:
class C a b | b - a
Where the dependent parameter appears first in the MPTC. Is there a
reason for this?
Yes. Generalised newtype
Am Dienstag 12 Mai 2009 07:59:01 schrieb michael rice:
In the code below, is the type returned by the return functions inferred
from the result type in the function type signature, i.e., just change the
result type to Maybe Int and the code will return a Maybe monad, (Just 4),
instead of a
Am Dienstag 12 Mai 2009 09:04:46 schrieb Dušan Kolář:
Hello all,
I'm sorry for the OT post, is the conference dead? I've got no mail
since yeasterday afternoon. And that is quite unusual.
I didn't get anything yesterday afternoon either. On Saturday, posts reached my
mailbox
typically one
On Mon, 2009-05-11 at 20:43 -0400, Anton van Straaten wrote:
Serious question: what is the significance of the question mark and
double question marks in those signatures, or better yet, where can I
read about it?
I've forgotten where to find the details (try the GHC manual if you
haven't
Hi,
When we want to list which declarations are exported by a module
we do:
module Mod ( list of exports ) where ...
Are there propositions to alternatives to that (I could not
find one)? Like, say, add a do export or do not export
tag to declarations we want to (not) export?
(I think
Hi,
I'm struggling with text-0.1 and text-icu-0.1, as announced at
http://www.serpentine.com/blog/2009/02/27/finally-fast-unicode-support-for-haskell/
The code in
http://pastebin.com/m7d8d9f91
is intended to read in a UTF-8 file a1.txt, reverse it twice, and
write it out to another UTF-8 file
Christopher Lane Hinson wrote:
I've noticed that a large majority of fundeps I see in other people's
libraries are written:
class C a b | b - a
Where the dependent parameter appears first in the MPTC. Is there a
reason for this?
AFAIK, there isn't any semantic significance to the order of
rjones:
I added some partial bindings for libguestfs[1] here:
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=haskell/Guestfs.hs;hb=HEAD
Some very simple example programs which use these bindings:
http://git.et.redhat.com/?p=libguestfs.git;a=tree;f=haskell;hb=HEAD
Any comments
International Summer School on Advances in Programming Languages
25th-28th August, 2009
Heriot-Watt University, Edinburgh, Scotland
http://www.macs.hw.ac.uk/~greg/ISS-AiPL
Overview
This four-day residential International Summer
paulfrancis:
Does any programmer on this mailing list have experience with developing 3
dimensional interactive environments/functional objects within them, au Second
Life? Is Haskell useful for such an endeavor?
Mm..
Anygma
http://www.anygma.com/JobOfferA.html
gamr7
On Tue, May 12, 2009 at 08:18:08AM -0700, Don Stewart wrote:
rjones:
I added some partial bindings for libguestfs[1] here:
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=haskell/Guestfs.hs;hb=HEAD
Some very simple example programs which use these bindings:
rjones:
On Tue, May 12, 2009 at 08:18:08AM -0700, Don Stewart wrote:
rjones:
I added some partial bindings for libguestfs[1] here:
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=haskell/Guestfs.hs;hb=HEAD
Some very simple example programs which use these bindings:
Wolfgang Jeltsch wrote:
Am Freitag, 8. Mai 2009 18:43 schrieb Jason Dagit:
If you wanted to work on this, I would encourage you to read more
about patch theory[1,2,3,4] and also try out libdarcs[5].
Is libdarcs the same as the darcs library package on Hackage (which
exports the darcs API)?
Hi,
Does anyone know if there's a compiler from Data-Parallel Haskell to GPU
code? I saw a paper on it a while back, but Google hasn't turned up any
code.
Cheers,
- Dan
begin:vcard
fn:Daniel K. Cook
n:Cook;Daniel K.
email;internet:danielkc...@gmail.com
tel;cell:+44 (0) 7949 125 491
So I've been reading a lot about a (relatively) new language called Clojure.
One of its goals is to make concurrency easier via a built-in home-grown
STM. Anyway, one of the ways it tries to do this is to have completely
immutable data structures. Every time I read a tutorial about this in
I have compiled each function independently and they have compiled the only
problem is the main function..
I keep getting the error 'films not defined' and I am not sure why
[code]
type Title = String
type Director = String
type Year = Int
type Fan = String
data Film = Film Title Director
rl:
On 12/05/2009, at 14:45, Reiner Pope wrote:
The Stream datatype seems to be much better suited to representing
loops than the list datatype is. So, instead of programming with the
lists, why don't we just use the Stream datatype directly?
I think the main reason is that streams don't
On Tue, May 12, 2009 at 1:39 PM, Roman Leshchinskiy r...@cse.unsw.edu.au
wrote:
let xs = map f ys in (sum xs, product xs)
the elements of xs will be computed once if it is a list but twice if it is
a stream.
If you're using lists for loops rather than data, that's what you want
(what you
On Tue, May 12, 2009 at 1:41 PM, Wolfgang Jeltsch
g9ks1...@acme.softbase.org wrote:
At least, I cannot
remember seeing the other notation (first morphism on the left) in category
theory literature so far. It’s just that my above-mentioned professor told me
that category theorists would use the
I was looking at some code and couldn't figure out how it was returning a list
since there were no list constructors present.
Thanks!
Michael
--- On Tue, 5/12/09, Brent Yorgey byor...@seas.upenn.edu wrote:
From: Brent Yorgey byor...@seas.upenn.edu
Subject: Re: [Haskell-cafe] Inferred typing?
Roman Leshchinskiy wrote:
On 12/05/2009, at 14:45, Reiner Pope wrote:
The Stream datatype seems to be much better suited to representing
loops than the list datatype is. So, instead of programming with the
lists, why don't we just use the Stream datatype directly?
This is more or less the
Richard,
I added some partial bindings for libguestfs[1] here:
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=haskell/Guestfs.hs;hb=HEAD
Terrific! Partial bindings are great. Thanks for releasing it. I haven't
taken the time to look at your code, but...
BTW, I found the documentation
I think that it's not nice to export 200 declarations from a single
module.
On 12 May 2009, at 18:05, Maurício wrote:
Hi,
When we want to list which declarations are exported by a module
we do:
module Mod ( list of exports ) where ...
Are there propositions to alternatives to that (I
On Tue, May 12, 2009 at 10:05 AM, Maurício briqueabra...@yahoo.com wrote:
snip
(I think something like that could be nice when we have modules
with 200 declarations and just a few are (not) going to be
exported.)
Thanks,
Maurício
Uh, show me such a module, and I'll show you a module
Maybe is an instance of Monad; the second signature is just more
general than the first.
class Monad m where
return :: a - m a
(=) :: m a - (a - m b) - m b
fail :: String - m a
Map lookup only uses return and fail; for Maybe these are defined
as follows:
return x = Just x
fail
Sure, but this definition leaks space, which I think is one of the
points that Reiner made.
-- ryan
On Tue, May 12, 2009 at 5:39 AM, Roman Leshchinskiy r...@cse.unsw.edu.au
wrote:
On 12/05/2009, at 14:45, Reiner Pope wrote:
The Stream datatype seems to be much better suited to representing
Hi,
I can't really describe it in the subject. So let me try to
do it here.
I have two functions
f :: a - b
g :: (a - b) - c - d
and I use them as
gf :: c - d
gf = g f
Now I want to handle exceptions in f and redefine f as in f'
f' :: a - IO (Either e b)
So my question is how to
Lee, Chakravarty et al
Data Parallelism in Haskell : ICFP PC Portland 2009
http://bit.ly/17EQcl
The other thing to look for is Obsidian, from Chalmers
danielkcook:
Hi,
Does anyone know if there's a compiler from Data-Parallel Haskell to GPU
code? I saw a paper on it a while back,
Hi Nicolas,
I am starting a caml build. I want line by line which module is
being built so when I get an error I have a context to reason about to fix
the problem. Got it?
Regards,
Vasili
On Tue, May 12, 2009 at 7:23 AM, Nicolas Pouillard
nicolas.pouill...@gmail.com wrote:
Excerpts
wagner.andrew:
So I've been reading a lot about a (relatively) new language called Clojure.
One of its goals is to make concurrency easier via a built-in home-grown STM.
Anyway, one of the ways it tries to do this is to have completely immutable
data structures. Every time I read a tutorial
Try reaching Manuel Chakravarty, http://justtesting.org/
and his colleague Sean Lee at Galois.
Slides from his talk on GPU.gen :
Just gave my talk on Data Parallelism in Haskell at PSU; here the
slides: http://bit.ly/17EQcl
and slides from an earlier Galois talk:
applebiz89 wrote:
main :: IO ()
main = do
doFilmsInGivenYear films
main
You pass as argument to 'doFilmsInGivenYear' the value 'films', which is
not defined. Instead, I think you meant 'testDatabase'.
All the best,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
On Tue, May 12, 2009 at 7:16 AM, David Carter david.m.car...@gmail.comwrote:
Specifically, a1.txt contains bytes 97 and 10, while a2.txt contains
bytes 224 160 139 237 144 164.
Have I misconstrued things, or is this a bug?
It's probably a bug, and it has (I hope) already been found and
Sean and Manuel are both at Univ. New South Wales
http://www.cse.unsw.edu.au/~seanl/
http://www.cse.unsw.edu.au/~chak/
On May 12, 2009, at 2:36 PM, Scott A. Waterman wrote:
Try reaching Manuel Chakravarty, http://justtesting.org/
and his colleague Sean Lee at Galois.
Slides from his talk
Doesn't look like there's code out there - will try e-mailing the
authors of the various papers/presentations.
This e-mail also counts as an open plea to those compiler wizards
working on this stuff: feel free to put beta buggy versions of your code
online :)
Thanks,
- Dan
Scott A.
Purity allows our data structures to have a lot of sharing.
This is separate to laziness.
Ah, so haskell does do it. Interesting that it so rarely comes up, whereas
it's frequently mentioned in clojure.
Laziness lets us build up interesting structures that have unusual
sharing.
wagner.andrew:
Purity allows our data structures to have a lot of sharing.
This is separate to laziness.
Ah, so haskell does do it. Interesting that it so rarely comes up, whereas
it's
frequently mentioned in clojure.
I think it is just assumed, since that's been the case for 20
What would you expect the program to output? You probably mean
'testDatabase' instead of 'films'.
/jve
On Tue, May 12, 2009 at 12:59 PM, applebiz89 applebi...@hotmail.com wrote:
I have compiled each function independently and they have compiled the only
problem is the main function..
I
On Tue, May 12, 2009 at 9:59 AM, applebiz89 applebi...@hotmail.com wrote:
I have compiled each function independently and they have compiled the only
problem is the main function..
I keep getting the error 'films not defined' and I am not sure why
[code]
type Title = String
type Director
Am Dienstag 12 Mai 2009 18:59:47 schrieb applebiz89:
I have compiled each function independently and they have compiled the only
problem is the main function..
I keep getting the error 'films not defined' and I am not sure why
[code]
type Title = String
type Director = String
type Year =
You might want to contact the author of RogueStar GL
http://roguestar.downstairspeople.org/
On Tue, May 12, 2009 at 5:21 PM, Don Stewart d...@galois.com wrote:
paulfrancis:
Does any programmer on this mailing list have experience with
developing 3
dimensional interactive
I wanted to pass this idea around the cafe to get some thoughts before
submitting a trac on this topic.
I'd like to see the mtl removed from the Haskell Platform.
The mtl was a tremendous step forward when it was developed. However, we
have learned a few things about monad transformers since
I would like to see this too. Maybe just a private keyword that would
make everything after it invisible to the outside (or until a public
keyword appeared)?
On Tue, May 12, 2009 at 10:05 AM, Maurício briqueabra...@yahoo.com wrote:
Hi,
When we want to list which declarations are exported by a
Hi,
Andrew Wagner wrote:
So I'm just curious, does GHC use
structural sharing or something similar?
Structural sharing is not a feature of implementations, but of
libraries. Consider this example:
-- a function to change the head of a list
replaceHead y xs = y : tail xs
-- a big
applebiz89 wrote:
I have compiled each function independently and they have compiled the only
problem is the main function..
I keep getting the error 'films not defined' and I am not sure why
Well, because it is not defined :)
type Title = String
type Director = String
type Year = Int
type
On Tue, May 12, 2009 at 04:59:36PM -0400, Xiao-Yong Jin wrote:
f :: a - b
g :: (a - b) - c - d
gf :: c - d
gf = g f
Now I want to handle exceptions in f and redefine f as in f'
f' :: a - IO (Either e b)
So my question is how to define gf' now to use f' instead of
f?
gf' ::
Wolfgang Jeltsch g9ks1...@acme.softbase.org writes:
Am Freitag, 8. Mai 2009 18:43 schrieb Jason Dagit:
If you wanted to work on this, I would encourage you to read more
about patch theory[1,2,3,4] and also try out libdarcs[5].
Is libdarcs the same as the darcs library package on Hackage
On Tue, 2009-05-12 at 14:09 +0100, Philippa Cowderoy wrote:
On Mon, 2009-05-11 at 20:43 -0400, Anton van Straaten wrote:
Serious question: what is the significance of the question mark and
double question marks in those signatures, or better yet, where can I
read about it?
I've
What is the difference between forall as in:
runSThttp://www.haskell.org/ghc/docs/6.10-latest/html/libraries/base/Control-Monad-ST.html#v%3ArunST::
(
forall s.
SThttp://www.haskell.org/ghc/docs/6.10-latest/html/libraries/base/Control-Monad-ST.html#t%3ASTs
a) - a
and the = as in
83 matches
Mail list logo