RE: Re[2]: [Haskell-cafe] how to create new repository ondarcs.haskell.org?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bulat Ziganshin Hello Lemmih, i want to make my library available via darcs repository on darcs.haskell.org. how i can arrange it? if it is required, i already have user account on haskell.org server Just copy your local darcs repository to cvs.haskell.org: scp -r mylibdir cvs.haskell.org:/home/darcs/mylib i don't have scp :) Or: darcs put [EMAIL PROTECTED]:public_html/repo Can you SSH into your account? If so, what do you use to do that, and doesn't it come with scp? If not: You're using Windows, right? You can use the Putty tools for Windows for ssh, scp, sftp, and a ssh keys agent. The Windows binaries for darcs come bundled with the Putty exes: http://darcs.net/DarcsWiki/CategoryBinaries You will find additional information here (including how to configure pageant to serve your SSH key): http://darcs.net/DarcsWiki/WindowsConfiguration Alistair * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. * ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Is Haskell a 5GL?
Hi, Henning Thielemann wrote: ... The notation [f x | x - xs] describes operations on list elements, and looks like the imperative forall x in xs do f x, whereas map f xs is a list transformation. The second one is more abstract, isn't it? for that simple example yes, but what's about list comprehensions like: sequence of parsers: (p + q) r = [ (f (x,y), r2) | (x, r1) - p r, (y, r2) - q r1 ] or triples: [ (x,y,z) | x-[1..n], let x2=x*x, y-[1..x], let y2=y*y, let z=isq (x2,y2), x2+y2==z*z ] or database queries: [ (name,salary) | ((_,name),dateofbirth,((Just salary))) - table, dateofbirth1980 salary10 ] I just typed these examples but did not check them. There are many other examples like n queens, functions on shaped matrices etc. Cheers -- Christoph ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] haskell vim / my coding aids
I've been busy for some days writing this humbled helper scripts for vim: Goto vim - by Marc Weber http://www.haskell.org/haskellwiki/Libraries_and_tools/Program_development#Vim If you find it useful and drop me a line I'll be glad to read your feedback. Marc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Searching all the source code of the world
http://www.google.com/codesearch A great tool (which fulfills a different need than Hoogle) if you are looking for a concrete example of use of such or such function. Unfortunately, lang:haskell is not recognized (as a workaround, file:\.hs is OK). This has already been reported: http://groups.google.com/group/Google-Code-Search/browse_thread/thread/8c9ed4b0883f80bf/1afa42009dc3ac46#1afa42009dc3ac46 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] collection monads
On Thu, Oct 05, 2006 at 10:34:19AM +1300, [EMAIL PROTECTED] wrote: To: haskell-cafe@haskell.org, [EMAIL PROTECTED] From: [EMAIL PROTECTED] Date: Thu, 05 Oct 2006 10:34:19 +1300 Subject: [Haskell-cafe] collection monads Matthias Fischmann wrote: another beginners question about monads: given the type | data (Ix x) = Permutation x = Permutation [x] i wanted to define | instance Monad Permutation where | return xs = Permutation xs but of course nothing about the monad class guarantees xs to be of type list. the monad class seems unsuitable for holding collections, and i am inclined to not instantiate permutations. just to be sure: is there any easy way to do it that i missed? Do you expect the contained type x to change during a sequence of monadic actions? e.g. would you ever use (=) at the type 'Permutation Int - (Int - Permutation Bool) - Permutation Bool'? no, i don't need that. but aside from the fact that data Permutation k v = Permutation [(k, v)] instance (Ix k) = Monad (Permutation k) is redundant (i think of the permutation as a function applicable to arbitrary lists): how would that change anything? my definition of return still doesn't work. or how would you redefine 'return'? you gave me an idea, though: data Permutation a x = Permutation (Array x a - Array x a) instance Monad (Permutation a) where return _ = Permutation id (=) (Permutation f) g = g f but this is dysfunctional for many reasons, too. for a start, (=) wouldn't really by good for anything, even if i could repair its type. composition of permutations seems to be something profoundly different from monadic binding. perhaps permutations just don't have it in them to become monads? matthias signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Having our cake and eating it too
This proposal is somewhat tongue in cheek, but at least it's amusing, and who knows, it might be good for something. The idea is that one could, in theory, allow both prefix unary minus and right sections of subtraction, with the type-checker deciding which is meant based on the context. Has this been noticed before? Consider the following code snippet, which runs in GHC 6.6 (with the new ability to define postfix operators). {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-} module Minus where import TypeCast class Minus a b where (-) :: a - b instance (Num a, TypeCast a b) = Minus a b where (-) = typeCast . negate instance (TypeCast a b, Num b, TypeCast b c) = Minus a (b - c) where (-) x y = typeCast ((typeCast x) - y) (TypeCast is the usual one from HList etc.) Loading this in the interpreter, we now have: *Minus (1 -) :: Int -1 *Minus 3 - 1 :: Int 2 *Minus map (- 1) [2..5] [1,2,3,4] *Minus map (1 -) [2..5] [-1,-2,-3,-4] *Minus map (-) [2..5] :: [Int] [-2,-3,-4,-5] *Minus zipWith (-) [1,3,5] [1,2,3] [0,1,2] In short, the operator - can be used as *either* an infix subtraction operator (which can be sectioned on both sides) or a postfix unary negation operator (which can also be sectioned once). The trick is the same one used for variadic arguments: the type-checker can infer from context whether (1 -) should return a number or a function, and resolves it accordingly. Thus, if we could figure out a way to define prefix operators, analogous to the way we can now define postfix operators, we could in theory allow prefix unary minus and right sections of subtraction to coexist peacefully. But I haven't had much luck coming up with a non-ugly suggestion for how to do this. I'd be interested to hear if anyone else has ideas, although I doubt any such solution would ever make it into any Haskell standard. (-: It's also unfortunate that we need the explicit type signatures in the interpreter above, but otherwise there would be no context for type-inference based on the return value. As usual, though, this problem would probably hardly ever arise in an actual program, where most values have a known type. (Actually, I still don't understand why a type signature is necessary on 3 - 1; anyone care to enlighten me?) Comments? Mike ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Error building Edison 1.2.0.1
Robert Dockins wrote: On Wednesday 04 October 2006 16:16, Lyle Kopnicky wrote: Robert Dockins wrote: Whats the output of ghc-pkg -l ? [EMAIL PROTECTED]:~$ ghc-pkg -l /usr/local/lib/ghc-6.5.20060924/package.conf: Cabal-1.1.4, base-2.0, (ghc-6.5.20060924), haskell98-1.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0 l Hummm. Well, I confess that I'm confused. Cabal 1.1.4 should work, because that's what I have on my machines; I've just tested it here. The only thing I can think of is that the 'runhaskell' command is still bound to your old GHC, or to something else (Hugs maybe?). If that's the case, you can edit the makefile and set the 'RUNHS' variable in the first line to the full path to your 6.5 runghc. Or you can edit the .cabal files as suggested above. I don't have hugs installed, and I've uninstalled ghc 6.4.1, so it can only be running 6.5. I've pasted the error in again here for reference: [EMAIL PROTECTED]:~/devel/edison-1.2.0.1-source$ sudo make system Password: cd edison-api \ runhaskell Setup.hs configure \ runhaskell Setup.hs build \ runhaskell Setup.hs install Configuring EdisonAPI-1.2... configure: Dependency base=1.0: using base-2.0 configure: Dependency haskell98=1.0: using haskell98-1.0 Setup.hs: cannot satisfy dependency mtl=1.0 make: *** [api-system] Error 1 [EMAIL PROTECTED]:~/devel/edison-1.2.0.1-source$ Do you know what mtl is? Maybe there's something broken in this GHC snapshot. I've already noticed Template Haskell seems to be broken in it. - Lyle ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Error building Edison 1.2.0.1
On Thursday 05 October 2006 16:51, Lyle Kopnicky wrote: Robert Dockins wrote: On Wednesday 04 October 2006 16:16, Lyle Kopnicky wrote: Robert Dockins wrote: Whats the output of ghc-pkg -l ? [EMAIL PROTECTED]:~$ ghc-pkg -l /usr/local/lib/ghc-6.5.20060924/package.conf: Cabal-1.1.4, base-2.0, (ghc-6.5.20060924), haskell98-1.0, parsec-2.0, readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0 l Hummm. Well, I confess that I'm confused. Cabal 1.1.4 should work, because that's what I have on my machines; I've just tested it here. The only thing I can think of is that the 'runhaskell' command is still bound to your old GHC, or to something else (Hugs maybe?). If that's the case, you can edit the makefile and set the 'RUNHS' variable in the first line to the full path to your 6.5 runghc. Or you can edit the .cabal files as suggested above. I don't have hugs installed, and I've uninstalled ghc 6.4.1, so it can only be running 6.5. I've pasted the error in again here for reference: [EMAIL PROTECTED]:~/devel/edison-1.2.0.1-source$ sudo make system Password: cd edison-api \ runhaskell Setup.hs configure \ runhaskell Setup.hs build \ runhaskell Setup.hs install Configuring EdisonAPI-1.2... configure: Dependency base=1.0: using base-2.0 configure: Dependency haskell98=1.0: using haskell98-1.0 Setup.hs: cannot satisfy dependency mtl=1.0 make: *** [api-system] Error 1 [EMAIL PROTECTED]:~/devel/edison-1.2.0.1-source$ Do you know what mtl is? mtl is the Monad Transformer Library. It's a part of the standard libraries in 6.4.x. There's been a good deal of chatter recently about reducing the set of libraries the GHC ships with; it may be that mtl is on that list. I haven't really been following, so I'm not sure. Maybe there's something broken in this GHC snapshot. I've already noticed Template Haskell seems to be broken in it. Possible. I also notice that QuickCheck isn't in your list of installed packages. You'll need that to compile edison-core. - Lyle -- Rob Dockins Talk softly and drive a Sherman tank. Laugh hard, it's a long way to the bank. -- TMBG ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell speaking Spanish
Hello Haskell folks! I have recently started editing a page on the Haskell.org wiki site dedicated to our spanish-speaker community.[0] The main idea is to collect spanish information about Haskell. For example, tutorials, news, comments, etc. And that way to spread such a beautiful language and technology among our spanish-speakers. I also expect we could get some of the main Haskell wiki pages translated, at least the most popular pages.[1] After talking with Don Stewart on IRC; we have also decided it would be a nice idea to offer a spanish translation for the HWN (nice!), which i expect to post every week on this web page too. Please, feel free to start cooperating , and let me know if you got any doubt or suggestion about this new initiative. You are also invited to visit our irc channel #haskell.es on irc.freenode.net and say hola to us and idle for a while! Thanks! [0] http://haskell.org/haskellwiki/Haskell.es [1] http://haskell.org/haskellwiki/Special:Popularpages ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe