[Haskell-cafe] Re: [Haskell] Re: 20 years ago

2009-07-27 Thread Benjamin L . Russell
On Thu, 16 Jul 2009 13:38:14 +1200, Richard O'Keefe o...@cs.otago.ac.nz wrote: On Jul 15, 2009, at 5:25 PM, Benjamin L.Russell wrote: it interesting that you should use the biological term disease; according to a post [1] entitled Re: Re: Smalltalk Data Structures and Algorithms, by K. K.

Re: [Haskell-cafe] Data.Binary.encode slower than show

2009-07-27 Thread Philip Armstrong
On Sun, Jul 26, 2009 at 10:27:41PM +0200, Grzegorz Chrupała wrote: Hi all, I have a piece of code where I'm serializing a datastructure with the following type [(Int, (Map DType (IntMap Int)))], using Binary.encode The thing is it is very slow: actually quite a bit slower than just using show.

[Haskell-cafe] Is there a sample code for hdbus?

2009-07-27 Thread Magicloud Magiclouds
Hi, Although I have used dbus with ruby a little, but still, I do not understand hdbus's APIs Is there any sample that I could learn? Thanks. -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: A Question of Restriction

2009-07-27 Thread Gleb Alexeyev
Brian Troutwine wrote: Do you have any reason not to do the above? Yes, the subset types that I wish to define are not clean partitions, though my example does suggest this. Let's say that the definition of Foo is now data Foo = One | Two | Three | Four | Five | Six while Odd and Even

Re: [Haskell-cafe] A Question of Restriction

2009-07-27 Thread Wouter Swierstra
Hi Brian, If I understand you correctly, you've run into the Expression Problem. Phil Wadler posed the problem in a widely-cited e-mail, formulating it much more clearly than I ever could: http://homepages.inf.ed.ac.uk/wadler/papers/expression/expression.txt There are lots of ways to

[Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Johannes Waldmann
While browsing Haskell-Prime I found this: http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution This is not some April Fool's day hoax? Because, it might actually turn Haskell into a somewhat usable (and marketable) language ... well, you know what I mean. Is there 'ghc

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Bulat Ziganshin
Hello Johannes, Monday, July 27, 2009, 7:58:11 PM, you wrote: While browsing Haskell-Prime I found this: http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution haskell-prime is future haskell standard now in development and on this wiki anyone can write his proposals

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Johannes Waldmann
this wiki anyone can write his proposals [...] sure, but this anyone is simponpj ... signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Cale Gibbard
2009/7/27 Johannes Waldmann waldm...@imn.htwk-leipzig.de: While browsing Haskell-Prime I found this: http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution This is not some April Fool's day hoax? Because, it might actually turn Haskell into a somewhat usable (and

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Jules Bean
Cale Gibbard wrote: What do people think of this idea? Personally, it really annoys me whenever I'm forced to give explicit module qualifications, and I think this would really help. It would also subsume the DisambiguateRecordFields extension rather handily. A disadvantage - and this is not

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread John A. De Goes
I've spoken in favor of this many times before. But there are many who think, Every function you write should have a unique name. Talk about needless clutter. Regards, John A. De Goes N-Brain, Inc. The Evolution of Collaboration http://www.n-brain.net|877-376-2724 x 101 On Jul

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Cale Gibbard
2009/7/27 Jules Bean ju...@jellybean.co.uk: Cale Gibbard wrote: What do people think of this idea? Personally, it really annoys me whenever I'm forced to give explicit module qualifications, and I think this would really help. It would also subsume the DisambiguateRecordFields extension

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Jason Dagit
On Mon, Jul 27, 2009 at 9:29 AM, Cale Gibbard cgibb...@gmail.com wrote: 2009/7/27 Johannes Waldmann waldm...@imn.htwk-leipzig.de: While browsing Haskell-Prime I found this: http://hackage.haskell.org/trac/haskell-prime/wiki/TypeDirectedNameResolution This is not some April Fool's day

[Haskell-cafe] Retiring forkIO

2009-07-27 Thread Günther Schmidt
Hi, I'd like to retire forkIO and friends by using Delimited Continuations instead. Am I dead wrong here in my understanding of Delimited Continuations or can I pursue in this direction? The most immediate use for this is actully GUI problems where I'd use del-conts in place of forkIO

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Cale Gibbard
2009/7/27 Jason Dagit da...@codersbase.com: On Mon, Jul 27, 2009 at 9:29 AM, Cale Gibbard cgibb...@gmail.com wrote: 2009/7/27 Johannes Waldmann waldm...@imn.htwk-leipzig.de: While browsing Haskell-Prime I found this:

Re: [Haskell-cafe] Retiring forkIO

2009-07-27 Thread Günther Schmidt
Hi Don, no I can't, I have no clue how to do that. :) There is Olegs ZFS and he has written all his code without any use of forkIO, so I know it's possible, I just haven't been able to translate it to my problem. Günther Am 27.07.2009, 19:10 Uhr, schrieb Don Stewart d...@galois.com:

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Johannes Waldmann
about qualified imports and TDNR: for x.f to work (as in the proposal), the name f must be in scope (that is, be imported unqualified)? That would be bad (unqualified imports should be discouraged). In Java, the methods of a type are automatically in scope, e.g., the .bitCount() works

[Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Fails during configuration: bash-3.2$ cabal install lhs2tex Resolving dependencies... [1 of 1] Compiling Main ( /tmp/lhs2tex-1.1423397/lhs2tex-1.14/Setup.hs, /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o ) Linking

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Don Stewart
conal: Fails during configuration: bash-3.2$ cabal install lhs2tex Resolving dependencies... [1 of 1] Compiling Main ( /tmp/lhs2tex-1.1423397/lhs2tex-1.14/ Setup.hs, /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o ) Linking

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Brandon S. Allbery KF8NH
On Jul 27, 2009, at 14:23 , Conal Elliott wrote: Note that the the first module to be compiled is Main. On my linux machine, Main is the *last* of several modules to be compiled. It's compiling the setup program which is presumably used by cabal to do the work a configure script normally

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Via cabal: --constraint='base4' or replace Control.Exception with Control.OldException or add 'base 4' to the depends in the .cabal file. Thanks, Don. Trying your first suggestion, I get the same result for the first and third method, and a ghc panic on cat_evals for the second

Re: [Haskell-cafe] 'cabal install lhs2tex' fails for me on os x -- help please

2009-07-27 Thread Conal Elliott
Yo ho! I just installed ghc-6.10.4 over my 6.10.3. Now 'cabal install lhs2tex' works. Phew! On Mon, Jul 27, 2009 at 11:44 AM, Conal Elliott co...@conal.net wrote: Via cabal: --constraint='base4' or replace Control.Exception with Control.OldException or add 'base 4' to the depends

Re: [Haskell-cafe] lifting restrictions on defining instances

2009-07-27 Thread Tillmann Rendel
wren ng thornton wrote: [1] In System F the capital-lambda binder is used for the term-level abstraction of passing type representations. So for example we have, id :: forall a. a - a id = /\a. \(x::a). x Thus, the forall keyword is serving as the type-level abstraction. Perhaps this

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread John Dorsey
Cale et al, I have a concern about the implementation of the proposed TypeDirectedNameResolution. (I'm not familiar with the internals of any of the compilers, so it could be that my concern isn't well founded.) I'm assuming that name resolution is currently independent of type inference, and

[Haskell-cafe] Testing nested implication properties with QuickCheck?

2009-07-27 Thread Ahn, Ki Yung
How should I you use QuickCheck for testing a property that is a nested implecation such as (A == B) == C ? The problem is (==) in QuickCheck is that its type is Testable prop = Bool - prop - Property rather than Testable prop = prop - prop - Property. So, A == (B == C) would work but (A == B)

[Haskell-cafe] Testing nested implication properties with QuickCheck?

2009-07-27 Thread Ahn, Ki Yung
How should I use QuickCheck for testing a property that is a nested implecation such as (A == B) == C ? The problem is (==) in QuickCheck is that its type is Testable prop = Bool - prop - Property rather than Testable prop = prop - prop - Property. So, A == (B == C) would work but (A == B) == C

Re: [Haskell-cafe] Testing nested implication properties with QuickCheck?

2009-07-27 Thread Luke Palmer
2009/7/27 Ahn, Ki Yung kya...@gmail.com: How should I you use QuickCheck for testing a property that is a nested implecation such as (A == B) == C ? You could use the classical equivalence (A == B) = (~A \/ B). I'm not sure you would get very much out of the implication strategy for the nested

Re: [Haskell-cafe] A Question of Restriction

2009-07-27 Thread Brian Troutwine
Hello Wouter. I've had a go at the paper linked and perused other references found with Google. Unfortunately, such sophisticated use of the type system is pretty far out of my normal problem domain and I can't see how to apply the techniques presented to my motivating example. Would you be so

Re: [Haskell-cafe] Proposal: TypeDirectedNameResolution

2009-07-27 Thread Richard O'Keefe
I would find a third meaning for dot in Haskell just a little bit too many. Especially with hierarchical modules, Haskell encourages writing small modules, or at any rate no larger than they have to be. (SML goes further, of course.) So if we're doing what the software engineering books say

[Haskell-cafe] ghci identifier listing question

2009-07-27 Thread Daniel van den Eijkel
Hi, in GHCi, after pressing the tab-key, all defined identifiers are listed. If an identifier was redefined, all old and shadowed versions are listed, too. Is it possible, to reach the (shadowed) values in any way? Another question: Is it possible to show only those identifiers that are

Re: [Haskell-cafe] Re: [Haskell] Re: 20 years ago

2009-07-27 Thread Richard O'Keefe
On Jul 27, 2009, at 6:30 PM, Benjamin L.Russell wrote: Incidentally, just for the record, in response to my forwarding your claim, Alan Kay, the inventor of Smalltalk, just refuted your refutation [1] (see http://lists.squeakfoundation.org/pipermail/beginners/2009-July/006331.html) ; _viz._:

Re: [Haskell-cafe] Re: [Haskell] Re: 20 years ago

2009-07-27 Thread Peter Gammie
On 28/07/2009, at 11:35 AM, Richard O'Keefe wrote: It's true that the abstract speaks of a more biological scheme of protected universal cells interacting only through messages that could mimic any desired behavior, but that's basically _it_ for biology, if we are to believe Kay, and even then,

Re: [Haskell-cafe] Re: cabal: : openFile: does not exist (No such file or directory)

2009-07-27 Thread Job Vranish
I tried updating to ghc-6.10.4 and have exactly the same error. Also ghc doesn't seem to be able to find any of the haskell platform packages, even though it ghc-pkg finds them just fine. For example (trimmed for brevity): ghc-pkg list /usr/local/lib/ghc-6.10.4/./package.conf: Cabal-1.6.0.3,

Re: [Haskell-cafe] Re: [Haskell] Re: 20 years ago

2009-07-27 Thread Richard O'Keefe
On Jul 28, 2009, at 2:25 PM, Peter Gammie wrote: But Richard (or am I arguing with Kay?) - monads don't interact. You're arguing with Alan Kay here: the reference to Leibniz was his. The key link here is (Wikipedia): Leibniz allows just one type of element in the build of the universe

Re: [Haskell-cafe] Re: [Haskell] Re: 20 years ago

2009-07-27 Thread Peter Gammie
On 28/07/2009, at 12:59 PM, Richard O'Keefe wrote: On Jul 28, 2009, at 2:25 PM, Peter Gammie wrote: But Richard (or am I arguing with Kay?) - monads don't interact. You're arguing with Alan Kay here: the reference to Leibniz was his. The key link here is (Wikipedia): Leibniz allows just

[Haskell-cafe] Importing Control.Arrow changes inferred type of (m = f) x in ghci

2009-07-27 Thread Dan Weston
The following inferred type has a constraint that can be trivially satisfied, but isn't: Control.Monad :t \ (m,f,x) - (m = f) x \ (m,f,x) - (m = f) x :: forall t a b. (Monad ((-) t)) = (t - a, a - t - b, t) - b -- In Control.Monad there is forall t. instance Monad ((-) t), -- so why is the

Re: [Haskell-cafe] Importing Control.Arrow changes inferred type of (m = f) x in ghci

2009-07-27 Thread Luke Palmer
On Mon, Jul 27, 2009 at 7:58 PM, Dan Westonweston...@imageworks.com wrote: The following inferred type has a constraint that can be trivially satisfied, but isn't: Control.Monad :t \ (m,f,x) - (m = f) x \ (m,f,x) - (m = f) x  :: forall t a b. (Monad ((-) t)) = (t - a, a - t - b, t) - b --