Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Martin Sulzmann
Mark P Jones wrote: Martin Sulzmann wrote: We're also looking for (practical) examples of multi-range functional dependencies class C a b c | c - a b Notice that there are multiple (two) parameters in the range of the FD. It's tempting to convert the above to class C a b c | c - a, c - b

Re: [Haskell-cafe] Intro to functional dependencies in Haskell?

2008-04-17 Thread Bulat Ziganshin
Hello Alexis, Thursday, April 17, 2008, 9:21:16 AM, you wrote: i'm having some trouble 'getting' functional dependencies in the Haskell ghc 6.8 manual contains good introduction into FDs -- Best regards, Bulatmailto:[EMAIL PROTECTED]

RE: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Sittampalam, Ganesh
Martin Sulzmann wrote: Mark P Jones wrote: In fact, the two sets of dependencies that you have given here are provably equivalent, so it would be decidedly odd to have a type improvement system that distinguishes between them. Based on the FD-CHR formulation, for the single-range FD

Re: [Haskell-cafe] Intro to functional dependencies in Haskell?

2008-04-17 Thread Marc Weber
On Thu, Apr 17, 2008 at 03:21:16PM +1000, Alexis Hazell wrote: Hi all, i'm having some trouble 'getting' functional dependencies in the Haskell context (although my understanding of them in the context of relational database theory isn't that great either). Could someone please point me to

Re: [Haskell-cafe] Shim: finding modules

2008-04-17 Thread pepe
On 16/04/2008, at 22:15, Graham Fawcett wrote: Hi folks, I'm a newbie, so please forgive any terminological mistakes. I've been using Shim in Emacs with great success, but there's one issue I've encountered, and I don't know if it's configuration problem or something fundamental. Consider a

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Tom Schrijvers
hackageDB has a substantial sample of code these days, which is handy for questions like this. Thanks, Ross. These examples are perfect! Cheers, Tom -- Tom Schrijvers Department of Computer Science K.U. Leuven Celestijnenlaan 200A B-3001 Heverlee Belgium tel: +32 16 327544 e-mail: [EMAIL

Re: [Haskell-cafe] Intro to functional dependencies in Haskell?

2008-04-17 Thread Alfonso Acosta
Not so long ago, I had difficulties to understand functional dependecies. Due to the (sometimes well-grounded) prejudgement of considering research papers as an unfriendly and obscure source of information, I stupidly ruled out reading Mark P Jones original paper. Then I learned I was totally

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Martin Sulzmann
Sittampalam, Ganesh wrote: Martin Sulzmann wrote: Mark P Jones wrote: In fact, the two sets of dependencies that you have given here are provably equivalent, so it would be decidedly odd to have a type improvement system that distinguishes between them. Based on the

[Haskell-cafe] Hackage Haddock fails where local succeeds

2008-04-17 Thread John Goerzen
Hi folks, Over at http://hackage.haskell.org/packages/archive/MissingH/1.0.1.2/logs/failure/ghc-6.8 the build has failed in the Hackage step with this output: src/Data/BinPacking.hs:78:32: parse error on input `-- ^ The sizes of bins' haddock: Failed to check module: Data.BinPacking That

Re: [Haskell-cafe] Hackage Haddock fails where local succeeds

2008-04-17 Thread Ross Paterson
On Thu, Apr 17, 2008 at 06:45:40AM -0500, John Goerzen wrote: My local haddock, 0.8, parses this file fine. Is Hackage running and older version? Could it be upgraded? Or is there something else going on here? No, it's running haddock 2.1.0, which understands all the GHC extensions, but is

[Haskell-cafe] Help with associated types

2008-04-17 Thread Emil Axelsson
Hello! I'm trying to rewrite some FD classes to use associated types instead. The Port class is for type structures whose leaves have the same type: class Port p where type Leaf p type Struct p toList :: p - [Leaf p] fromList :: [Leaf p] - p (Leaf p) gives

RE: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Sittampalam, Ganesh
Why not instead transform single-range FDs into multi-range ones where possible? That's a perfectly reasonable assumption and would establish the logical property that a - b /\ a - c iff a - b /\ c for FDs (by definition). But what about programmers who'd like that C [x] y z

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Martin Sulzmann
Sittampalam, Ganesh wrote: Why not instead transform single-range FDs into multi-range ones where possible? That's a perfectly reasonable assumption and would establish the logical property that a - b /\ a - c iff a - b /\ c for FDs (by definition).

Re: [Haskell-cafe] Shim: finding modules

2008-04-17 Thread Graham Fawcett
On Thu, Apr 17, 2008 at 4:26 AM, pepe [EMAIL PROTECTED] wrote: On 16/04/2008, at 22:15, Graham Fawcett wrote: I'd like to be able to tell Shim that 'App' is the root of my project, and to locate modules from that root. Is this possible? Shim already does this. All it requires is that

Re: [Haskell-cafe] Hackage Haddock fails where local succeeds

2008-04-17 Thread John Goerzen
On Thu April 17 2008 7:01:18 am Ross Paterson wrote: On Thu, Apr 17, 2008 at 06:45:40AM -0500, John Goerzen wrote: My local haddock, 0.8, parses this file fine. Is Hackage running and older version? Could it be upgraded? Or is there something else going on here? No, it's running

Re: [Haskell-cafe] looking for examples of non-fullFunctional Dependencies

2008-04-17 Thread Claus Reinke
class C a b c | a - b, a - c instance C a b b = C [a] [b] [b] Suppose we encounter the constraint C [x] y z interesting example. splitting improvement into two rules seems to lose the (b1=b2) constraint that spans both: [O] C [x] y z = y=[b1]. C [x] y z = z=[b2]. my first thought was

Re: [Haskell-cafe] export question (GHC.Handle)

2008-04-17 Thread Bertram Felgenhauer
Graham Fawcett wrote: I notice in the source for GHC.Handle that certain functions (e.g. fdToHandle_stat) are in the export list, but are not actually exported (at least, it seems you cannot import them). What mechanism causes these functions to be hidden, and are they still accessible in some

Re: [Haskell-cafe] Shim: finding modules

2008-04-17 Thread Marc Weber
I'd like to be able to tell Shim that 'App' is the root of my project, and to locate modules from that root. Is this possible? If adding the cabal file does'nt work contact me and we'll try to reslove this issue. Are you willing to test new versions/ extensions? Are you already using ghc-6.8 ?

Re: [Haskell-cafe] export question (GHC.Handle)

2008-04-17 Thread Bertram Felgenhauer
Fraser Wilson wrote: Good question. I often need to export a name to other modules within the hierarchy, but without making them visible outside it. I've solved this problem by giving them funky names and adding a comment, but is there a more structured way to do this? A quick google hasn't

Re: [Haskell-cafe] export question (GHC.Handle)

2008-04-17 Thread Graham Fawcett
On Thu, Apr 17, 2008 at 10:38 AM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: Graham Fawcett wrote: I notice in the source for GHC.Handle that certain functions (e.g. fdToHandle_stat) are in the export list, but are not actually exported (at least, it seems you cannot import them).

Re: [Haskell-cafe] Shim: finding modules

2008-04-17 Thread Graham Fawcett
On Thu, Apr 17, 2008 at 10:41 AM, Marc Weber [EMAIL PROTECTED] wrote: I'd like to be able to tell Shim that 'App' is the root of my project, and to locate modules from that root. Is this possible? If adding the cabal file does'nt work contact me and we'll try to reslove this issue. It

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Denis Bueno
On Wed, Apr 16, 2008 at 2:33 PM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: No. Data.Graph.Inductive.Query.Dominators is just buggy. [...] Here's a quick fix: Thanks! This fixes my problem. Have you submitted a bug and your patch to the appropriate tracker? If not, would someone point me

Re: [Haskell-cafe] looking for examples ofnon-fullFunctional Dependencies

2008-04-17 Thread Claus Reinke
a little more experimentation leaves me confused. consider [4] class C a b c | a - b -- , a - c instance C a b b = C [a] [b] [b] Hugs: :t undefined :: C [x] y z = (x,y,z) undefined :: C [a] [b] c = (a,[b],c) GHCi: :t undefined :: C [x] y z = (x,y,z) undefined :: C [x]

Re: [Haskell-cafe] C++ interface with Haskell

2008-04-17 Thread Miguel Lordelo
Well Isaac...I became now a little bit smarter then yesterday!!! I show you the example that I found and on which I´m working with. File: foo.hs module Foo where foreign export ccall foo :: Int - IO Int foo :: Int - IO Int foo n = return (length (f n)) f :: Int - [Int] f 0 = [] f n = n:(f

Re: [Haskell-cafe] Re: Embedding newlines into a string?

2008-04-17 Thread Ariel J. Birnbaum
Common Misunderstandings - HaskellWiki http://www.haskell.org/haskellwiki/Common_Misunderstandings I didn't find this one... maybe it should be in a more prominent place? Things to avoid - HaskellWiki http://www.haskell.org/haskellwiki/Things_to_avoid I thought of this but it has more

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Iavor Diatchki
Hello, On Wed, Apr 16, 2008 at 11:06 PM, Martin Sulzmann [EMAIL PROTECTED] wrote: 3) Multi-range FDs Consider class C a b c | a - b c instance C a b b = C [a] [b] [b] This time it's straightforward. C [x] y z yields the improvement y = [b] and z = [b] which then allows us to

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Martin Sulzmann
Iavor Diatchki wrote: Hello, On Wed, Apr 16, 2008 at 11:06 PM, Martin Sulzmann [EMAIL PROTECTED] wrote: 3) Multi-range FDs Consider class C a b c | a - b c instance C a b b = C [a] [b] [b] This time it's straightforward. C [x] y z yields the improvement y = [b] and z = [b] which

Fwd: [Haskell-cafe] Hackage Haddock fails where local succeeds

2008-04-17 Thread David Waern
2008/4/17, John Goerzen [EMAIL PROTECTED]: On Thu April 17 2008 7:01:18 am Ross Paterson wrote: On Thu, Apr 17, 2008 at 06:45:40AM -0500, John Goerzen wrote: My local haddock, 0.8, parses this file fine. Is Hackage running and older version? Could it be upgraded? Or is there

[Haskell-cafe] Announcing DarcsWatch

2008-04-17 Thread Joachim Breitner
Hi, (Hi again to those on haskell-cafe, but things have changed since the other announcement) A lot of haskell-related projects use the darcs version control system. Darcs has the nice feature that you can easily submit a patch by e-mail, usually sent to the project maintainer or a mailing list.

Re: [Haskell-cafe] export question (GHC.Handle)

2008-04-17 Thread Fraser Wilson
On Thu, Apr 17, 2008 at 4:46 PM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: Assuming you're writing a cabal package, you could separate the interface from the actual implementation: [..] HTH, Magic. Thanks a lot! cheers, Fraser. ___

[Haskell-cafe] Ann: Emping 0.5 in Hackage

2008-04-17 Thread Hans van Thiel
Emping is a utility which derives the shortest rules from a table of rules. For example, in a list of 8000 different mushrooms, it finds 21 single predicates that determine the mushroom is poisonous, and 23 that it is edible. But it also finds all combinations of two, three and more predicates

Re: [Haskell-cafe] looking for examples ofnon-fullFunctional Dependencies

2008-04-17 Thread Tom Schrijvers
a little more experimentation leaves me confused. consider [4] class C a b c | a - b -- , a - c instance C a b b = C [a] [b] [b] Hugs: :t undefined :: C [x] y z = (x,y,z) undefined :: C [a] [b] c = (a,[b],c) GHCi: :t undefined :: C [x] y z = (x,y,z) undefined :: C [x] y z =

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Iavor Diatchki
Hello, On Thu, Apr 17, 2008 at 10:26 AM, Martin Sulzmann [EMAIL PROTECTED] wrote: leads to an instance improvement/instance improvement conflict, like in the single-range FD case class D a b | a - b instance D a a = D [a] [a] instance D [Int] Char Sorry to be picky but there is no

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Martin Sulzmann
Iavor Diatchki wrote: Hello, On Thu, Apr 17, 2008 at 10:26 AM, Martin Sulzmann [EMAIL PROTECTED] wrote: leads to an instance improvement/instance improvement conflict, like in the single-range FD case class D a b | a - b instance D a a = D [a] [a] instance D [Int] Char Sorry

[Haskell-cafe] Re: Shim: finding modules

2008-04-17 Thread Gour
Graham == Graham Fawcett [EMAIL PROTECTED] writes: Graham Equally glad that it's being supported! Thank you. Where one can found it? Few days ago I was told on #haskell that shim is dead :-/ Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Denis Bueno
On Thu, Apr 17, 2008 at 11:32 AM, Denis Bueno [EMAIL PROTECTED] wrote: On Wed, Apr 16, 2008 at 2:33 PM, Bertram Felgenhauer [EMAIL PROTECTED] wrote: No. Data.Graph.Inductive.Query.Dominators is just buggy. I have one more problem. For the attached graph, the dominators of the -20 node are

[Haskell-cafe] announce: Glome.hs-0.3 (Haskell raytracer)

2008-04-17 Thread Jim Snow
A new version of my raytracer is out. It now supports cones, cylinders, disks, boxes, and planes as base primitives (previously it only supported triangles and spheres), as well as transformations of arbitrary objects (rotate, scale, translate) and the CSG operations difference and

Re: [Haskell-cafe] looking for examples of non-full Functional Dependencies

2008-04-17 Thread Lennart Augustsson
To reuse a favorite word, I think that any implementation that distinguishes 'a - b, a - c' from 'a - b c' is broken. :) It does not implement FD, but something else. Maybe this something else is useful, but if one of the forms is strictly more powerful than the other then I don't see why you

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Dan Weston
Your reasoning differs from the usual understanding of a null product (1 or True), as compared to a null sum (0 or False): the list of nodes for which *any path* from source to x must touch, i.e., the list of dominators of x. Here, any path means all paths, a logical conjunction: and

Re: [Haskell-cafe] Re: Shim: finding modules

2008-04-17 Thread Graham Fawcett
2008/4/17 Gour [EMAIL PROTECTED]: Graham == Graham Fawcett [EMAIL PROTECTED] writes: Graham Equally glad that it's being supported! Thank you. Where one can found it? Few days ago I was told on #haskell that shim is dead :-/ The original, I believe: http://mapcar.org/haskell/shim/

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Denis Bueno
On Thu, Apr 17, 2008 at 5:52 PM, Dan Weston [EMAIL PROTECTED] wrote: Your reasoning differs from the usual understanding of a null product (1 or True), as compared to a null sum (0 or False): the list of nodes for which *any path* from source to x must touch, i.e., the list of dominators

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Dan Weston
I'm not sure I agree this is the common definition of dominators Is one undefeated if one has never fought? I should only ask for the dominators of nodes which I know are reachable from the source node, right? Yes. Denis Bueno wrote: On Thu, Apr 17, 2008 at 5:52 PM, Dan Weston [EMAIL

Re: [Haskell-cafe] looking for examples of non-full FunctionalDependencies

2008-04-17 Thread Claus Reinke
Sorry to be picky but there is no violation of the FD here. Note that the class D has only a single ground instance and to violate an FD you need at least two. perhaps you are thinking of functional dependencies as being defined extensionally, over the extent of the type relations specified

Re: [Haskell-cafe] compressed pointers?

2008-04-17 Thread John Meacham
jhc packs data into pointers when possible. so for instance data Foo = Foo !Word16 !Word32 gets encoded as --- | 16 bits | 32 bits | ... | 10| --- This particularly helps strings, where the character can often be encoded in

Re: [Haskell-cafe] Re: Embedding newlines into a string?

2008-04-17 Thread Benjamin L. Russell
Ariel, --- Ariel J. Birnbaum [EMAIL PROTECTED] wrote: Common Misunderstandings - HaskellWiki http://www.haskell.org/haskellwiki/Common_Misunderstandings I didn't find this one... maybe it should be in a more prominent place? Things to avoid - HaskellWiki

[Haskell-cafe] incompatibility issues in installing wxHaskell 0.10.3 with GHCi 6.8.2 on Windows XP Pro

2008-04-17 Thread Benjamin L. Russell
Perhaps this is not the best mailing list for this issue, but since this problem involves a library for Haskell and is not a bug of GHC proper, I thought this would be a better place than the Glasgow-haskell-bugs mailing list I tried installing wxHaskell 0.10.3 with GHCi 6.8.2 already

Re: [Haskell-cafe] incompatibility issues in installing wxHaskell 0.10.3 with GHCi 6.8.2 on Windows XP Pro

2008-04-17 Thread Benjamin L. Russell
I just solved the problem by myself: It was a problem with paths including spaces. Originally, I had installed wxhaskell-register.bat in the following directory: C:\Documents and Settings\Benjamin\My Documents\Haskell\Libraries\wxHaskell\wxhaskell-0.10.3\bin However, the directory Documents

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Kim-Ee Yeoh
Dan Weston wrote: Here, any path means all paths, a logical conjunction: and [True, True] = True and [True ] = True and [ ] = True Hate to nitpick, but what appears to be some kind of a limit in the opposite direction is a curious way of arguing that: and [] = True.

Re: [Haskell-cafe] Wrong Answer Computing Graph Dominators

2008-04-17 Thread Matthew Brecknell
Dan Weston wrote: Here, any path means all paths, a logical conjunction: and [True, True] = True and [True ] = True and [ ] = True Kim-Ee Yeoh wrote: Hate to nitpick, but what appears to be some kind of a limit in the opposite direction is a curious way of arguing that: