2008/5/22 Marc Weber [EMAIL PROTECTED]:
I'd like to illustrate two different ideas using a small example:
(A)
data CD = CD { title :: String, tracks :: [ Track ] }
data Track = Track { track :: String, cd :: CD }
data PDB = PDB { cds :: Set CD, tracks :: Set Track }
On Thu, May 22, 2008 at 08:16:54AM +0200, Salvatore Insalaco wrote:
2008/5/22 Marc Weber [EMAIL PROTECTED]:
I'd like to illustrate two different ideas using a small example:
(A)
data CD = CD { title :: String, tracks :: [ Track ] }
data Track = Track { track :: String, cd ::
On Wed, May 21, 2008 at 06:07:15PM -0700, Dan Weston wrote:
Consider SQLite [1], which is a software library that implements a
[..]
It has a C API which you can wrap as needed with the FFI, and you wouldn't
need more than a dozen or so functions to start with (it understands SQL
too).
Salvatore Insalaco [EMAIL PROTECTED] writes:
This doesn't look like a relational structure at all in Haskell.
I believe you are abusing terminology here. 'Relation' refers to a
table (since it represents a subset of AxBxC.., i.e. a relation), not
to references between tables.
Mutability and
On Thu, May 22, 2008 at 10:56:03AM +0200, Ketil Malde wrote:
Salvatore Insalaco [EMAIL PROTECTED] writes:
This doesn't look like a relational structure at all in Haskell.
I believe you are abusing terminology here. 'Relation' refers to a
Yes. Sorry. I thought the relational in relational
On Wed, 2008-05-21 at 17:32 -0500, Galchin, Vasili wrote:
Hello,
https://bugs.launchpad.net/ubuntu/+source/gtk2hs/+bug/229489 this
is almost identical to my problem. I am just trying to help others on
this list who are using Ubuntu Linux to avoid my predicament!
I had that problem
Consider
let x = Cd ...
forkIO $ ( do something with x } -- (1)
print x -- (2)
How can ghc know when running line (2) that (1) hasen't changed the
record? I see two solutions:
a) give the forked process a copy (Then my design will collapse)
but this is expensive to copy data without
Hi Salvatore
On Thu, May 22, 2008 at 11:01:01AM +0200, Salvatore Insalaco wrote:
Consider
let x = Cd ...
forkIO $ ( do something with x } -- (1)
print x -- (2)
How can ghc know when running line (2) that (1) hasen't changed the
record? I see two solutions:
a) give the forked
https://bugs.launchpad.net/ubuntu/+source/gtk2hs/+bug/229489 this
is almost identical to my problem. I am just trying to help others on
this list who are using Ubuntu Linux to avoid my predicament!
I had that problem upgrading too.
I posted a workaround:
2008/5/22 Marc Weber [EMAIL PROTECTED]:
So in haskell it would look like this:
let updatedCd = 0x22 CD (0x6 My song) (0x20 ( 0x23 : ...)
updatedTrack = 0x23 Track ( 0x21 updated track title ) 0x22
in (0x27) DB (0x24 (updatedCd:otherCds)) (0x25
On Thu, May 22, 2008 at 12:48:42PM +0200, Salvatore Insalaco wrote:
2008/5/22 Marc Weber [EMAIL PROTECTED]:
So in haskell it would look like this:
let updatedCd = 0x22 CD (0x6 My song) (0x20 ( 0x23 : ...)
updatedTrack = 0x23 Track ( 0x21 updated track title ) 0x22
Hi,
I'm trying to implement a CGI, but I have encountered some problems
with handling program errors properly. I think it boils down to this:
The first program from the documentation at
http://hackage.haskell.org/packages/archive/cgi/3001.1.5.2/doc/html/Network-CGI.html
import Network.CGI
Friends
I know for a fact that many of you are using Haskell successfully for real
applications. Yet none of you have sent me an offer of a presentation at the
Commercial Users of Functional Programming workshop, which happens in late
Sept. I'm the program co-chair, and I confidently
On Wed, May 21, 2008 at 6:19 PM, Dmitri O.Kondratiev [EMAIL PROTECTED]
wrote:
-- Then we can use this State object (returned by getAny) in a function
generating random values such as:
makeRnd :: StdGen - (Int, StdGen)
makeRnd = runState (do
y - getAny
So, are there any other simple motivating examples that show what
state is really good for?
Here's an example from some code that I'm (trying to) write; I am
writing a DSL for the Povray Scene Description Language. This part of
my program creates a `String' which holds a piece of Povray SDL
On Thu, May 22, 2008 at 03:34:36PM +0200, Marc Weber wrote:
On Thu, May 22, 2008 at 09:11:28AM -0400, Isaac Dupree wrote:
to whoever in this thread hasn't realized it:
Map String (Map Int Foo) == Map (String,Int) Foo
(at least to an approximation)
There is another difference if you want
Marc Weber wrote:
On Thu, May 22, 2008 at 03:34:36PM +0200, Marc Weber wrote:
On Thu, May 22, 2008 at 09:11:28AM -0400, Isaac Dupree wrote:
to whoever in this thread hasn't realized it:
Map String (Map Int Foo) == Map (String,Int) Foo
(at least to an approximation)
There is another
Hello Guys,
We have Data.Tree in the standard libraries for a long time but for
some reason we still don't have standard implementation for Zipper. I
wrote recently one implementation for Yi but there are many other
versions hanging around. At least I know for some. I propose to add
one in the
Since Björn Bringert suggested (on IRC) the problem could be due to
laziness, and that I should force the result string before giving it
to output, I've been playing around a bit. (The program is somewhat
more involved than the short test I provided earlier, but available on
request).
Without
Hi Krasimir,
I had a long exchange with chessguy about this interface, suggesting a
significant change in style, simplifying the type. (Incidentally, the
change removed the State and hence mtl dependence.)
The conversation is on http://tunes.org/~nef/logs/haskell/08.05.17, starting
with
| I'm confused. GHC of course unboxes strict fields of primitive data types.
|
| {-# OPTIONS -O2 -fvia-C -optc-O2 -funbox-strict-fields #-}
|
| ... but only when you give -funbox-strict-fields, as there, or UNPACK.
| The point is that it never loses sharing to unbox a strict Int field
|
I'm experimenting creating a Cabal script on Windows that installs a
module that refers to some DLLs (freetype, png, ...) via C wrappers
When configuring, building, and installing using cabal, a test program
that uses this installed module runs fine when compiled with GHC --make,
but fails
2008/5/22 Olivier Boudry [EMAIL PROTECTED]:
On Wed, May 21, 2008 at 6:19 PM, Dmitri O.Kondratiev [EMAIL PROTECTED]
wrote:
-- Then we can use this State object (returned by getAny) in a function
generating random values such as:
makeRnd :: StdGen - (Int, StdGen)
makeRnd = runState (do
Ketil Malde [EMAIL PROTECTED] writes:
Since Björn Bringert suggested (on IRC) the problem could be due to
laziness [..] Does anybody else have it working?
I found that other person, and he is us. I played around some more,
and thought -- just to not leave any stone unturned -- that I should
* Every definition of tp
I meant of type, forgetting that my emacs abbrevs don't expand in gmail.
On Thu, May 22, 2008 at 2:13 PM, Conal Elliott [EMAIL PROTECTED] wrote:
Hi Krasimir,
I had a long exchange with chessguy about this interface, suggesting a
significant change in style,
Simon Peyton-Jones wrote:
| [1] I'm not sure if this is true... if it has to rebox the Int, you get
| another copy floating around, not the original, right?
Correct. If you have
data T = MkT {-# UNPACK #-} !Int
then given
case x of { MkT y - h y }
then GHC must re-box the 'y'
wxHaskell - Building - MacOS X
(http://wxhaskell.sourceforge.net/building-macosx.html):
Due to complicated MacOS X restrictions, graphical wxHaskell applications do
not work
directly when used from GHCi. Fortunately, Wolfgang Thaller has kindly
provided an
ingenious Haskell module that
27 matches
Mail list logo