Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-25 Thread Maciej Piechotka
On Mon, 2011-01-24 at 20:13 -0800, Ryan Ingram wrote: On Fri, Jan 21, 2011 at 7:58 PM, Casey Hawthorne cas...@istar.ca wrote: uj supplied this: About the discussion putStrLn (readLn + (5 :: Int)).. I'll write it as the following line, importing Control.Applicative main = (+)

Re: [Haskell-cafe] Haskell Vim Indentation

2011-01-25 Thread beo wulf
Pasted wrong link; I'm using the vim haskellmode, not the emacs haskellmode. On Tue, Jan 25, 2011 at 1:14 AM, beo wulf beow...@intamp.com wrote: I am using: http://www.vim.org/scripts/script.php?script_id=1968 and http://projects.haskell.org/haskellmode-emacs/ Indenting a single do-block

Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-25 Thread Ketil Malde
Erik Hesselink hessel...@gmail.com writes: importing Control.Applicative main = print = liftM2 (+) readLn (return 3) [...] line noise Why not just: main = print . (+3) = readLn Or using applicative: print = (+3) $ readLn ? (Which separates the printing from the addition.) -k -- If

[Haskell-cafe] IsString instances for attoparsec-text

2011-01-25 Thread Yitzchak Gale
Hi Felipe, Thanks so much for implementing the attoparsec-text package. Could you please add an IsString instance for Parser Text, parallel to the one in attoparsec? You may have missed this because of it being an orphan instance in attoparsec. It should be something like: instance IsString

Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-25 Thread Gábor Lehel
On Tue, Jan 25, 2011 at 10:20 AM, Ketil Malde ke...@malde.org wrote: Erik Hesselink hessel...@gmail.com writes: importing Control.Applicative main = print = liftM2 (+) readLn (return 3) [...] line noise Why not just: main = print . (+3) = readLn Or using applicative:  print = (+3) $

Re: [Haskell-cafe] Tracing applied functions

2011-01-25 Thread steffen
did you try Debug.Trace? http://haskell.org/ghc/docs/latest/html/libraries/base/Debug-Trace.html On Jan 25, 3:39 am, Aaron Gray aaronngray.li...@gmail.com wrote: On 25 January 2011 02:12, Ivan Lazar Miljenovic ivan.miljeno...@gmail.comwrote: On 25 January 2011 12:05, Aaron Gray

Re: [Haskell-cafe] Data.Ranges show error

2011-01-25 Thread Christian Maeder
Let's notify the maintainer to use an ordinary minus sign: http://hackage.haskell.org/package/ranges-0.2.3 my scan program (http://hackage.haskell.org/package/scan) reports: Ranges.hs:12:9: undesirable character '\t' Ranges.hs:12:51: undesirable character '\226' Ranges.hs:12:52: undesirable

[Haskell-cafe] Using IsString with attoparsec

2011-01-25 Thread Yitzchak Gale
Using the IsString instance for Parser in attoparsec is really nice, but unfortunately, you can't use it out of the box for the most common case. One would like to be able to write parsers in this style: ( * stuff * ) But the types of * and * are too general - there is no way for the type

Re: [Haskell-cafe] Data.Ranges show error

2011-01-25 Thread Yitzchak Gale
Christian Maeder wrote: Let's notify the maintainer to use an ordinary minus sign I actually did that two days ago. Other people probably did too. But I haven't seen any response yet. -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] getDirectoryContents and sort order

2011-01-25 Thread Sönke Hahn
John Lask wrote: I have noticed that on my windows box and ghc 6.12.3 I get the return list for System.Direcotry.getDirectoryContents in reverse sorted order. This is a change from previous observed behavior and I would consider it a bug. I would like to verify that it is not just me. I

Re: [Haskell-cafe] Proposal: Applicative = Monad: Call for consensus

2011-01-25 Thread Maciej Piechotka
On Tue, 2011-01-25 at 12:17 +0100, Gábor Lehel wrote: On Tue, Jan 25, 2011 at 10:20 AM, Ketil Malde ke...@malde.org wrote: Erik Hesselink hessel...@gmail.com writes: importing Control.Applicative main = print = liftM2 (+) readLn (return 3) [...] line noise Why not just: main =

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread gutti
Hi, I created some code from scratch - probably ugly beginners style - so I'm keen to get tips how to make it more pretty and faster Cheers Phil import Data.List -- Input Data xi :: [Double] xi = [0 .. 10] yi :: [Double] yi = [2, 3, 5, 6, 7, 8, 9, 10 , 9, 8, 7] x = 11 :: Double --

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread Daniel Fischer
On Tuesday 25 January 2011 22:05:34, gutti wrote: Hi, I created some code from scratch - probably ugly beginners style - so I'm keen to get tips how to make it more pretty and faster Cheers Phil import Data.List -- Input Data xi :: [Double] xi = [0 .. 10] yi :: [Double] yi = [2, 3,

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread Henning Thielemann
On Tue, 25 Jan 2011, gutti wrote: I created some code from scratch - probably ugly beginners style - so I'm keen to get tips how to make it more pretty and faster Can you please add type signatures? This would help me understanding. import Data.List -- Input Data xi :: [Double] xi = [0

[Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread gutti
Hi all, I realised that haskell in the base libraries tries to consistently stick to the permissive BSD license to also give the language traction in the commercial world. The H-Matrix and the prelude numeric packages however, which in my mind cover really important ground work, are issued

Re: [Haskell-cafe] Are constructors strict?

2011-01-25 Thread Daryoush Mehrtash
Sebastian, At high level, I understand the notion that thunks are about values and not nondeterminism computation but I have been missing the isight in the code as how this happens.. After reading it a few times and trying some experiments. This is my layman understanding of the problem... It

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread gutti
Hi Henning, thanks for the code review -- reason that I don't use the type declaration a lot -- It causes trouble , because I don't yet fully understand it. When I declare what I think is right is fails - see Message at bottom -- so what's wrong ? By the way I just used lists so far - no

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 07:32, gutti philipp.guttenb...@gmx.net wrote: The H-Matrix and the prelude numeric packages however, which in my mind cover really important ground work, are issued under the resprictive GPL. I think your description of restrictive is contentious... Is that only because

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Wed, 2011-01-26 at 08:18 +1000, Ivan Lazar Miljenovic wrote: Or else because the developers _wanted_ to license it under the GPL. Some people do, you know. Sure, but I agree it would be nice to know whether the authors chose the GPL, or applied it because of linking with GPLed native

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread gutti
Hi Ivan, thanks for making me aware that this is a potentialy controverse topic. -- I have highest respect of people writing open source and I totally respect their decision. -- View this message in context:

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread Daniel Fischer
On Tuesday 25 January 2011 23:16:49, gutti wrote: Hi Henning, thanks for the code review -- reason that I don't use the type declaration a lot -- It causes trouble , because I don't yet fully understand it. When I declare what I think is right is fails - see Message at bottom -- so what's

Re: [Haskell-cafe] HMatrix Vector/Matrix interpolation ala Matlab interp/interp2 ??

2011-01-25 Thread aditya siram
Hi, I've taken a look at your code and refactored a bit to use Haskell's list functions. The functionality should be identical. One of the advantages of using the list functions is that you don't have to worry about an out-of-bounds exception - which is what your limIndex function corrects for.

[Haskell-cafe] Monomorphic let bindings and darcs

2011-01-25 Thread Brandon Moore
The darcs 2.5 package uses the flat -fglasgow-exts, so it picks up MonoLocalBinds. This causes quite a few errors. The error messages are particularly bad in src/Darcs/Commands/Convert.lhs there is code of the form explicitlyPolyMorphicFun arg $- \local - ... very long body ...

Re: [Haskell-cafe] Monomorphic let bindings and darcs

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 09:50, Brandon Moore brandon_m_mo...@yahoo.com wrote: The darcs 2.5 package uses the flat -fglasgow-exts, so it picks up MonoLocalBinds. This causes quite a few errors. http://thread.gmane.org/gmane.comp.lang.haskell.glasgow.user/19165 -- Ivan Lazar Miljenovic

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Richard O'Keefe
On 26/01/2011, at 11:18 AM, Ivan Lazar Miljenovic wrote: On 26 January 2011 07:32, gutti philipp.guttenb...@gmx.net wrote: The H-Matrix and the prelude numeric packages however, which in my mind cover really important ground work, are issued under the restrictive GPL. I think your

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Wed, 2011-01-26 at 15:16 +1300, Richard O'Keefe wrote: You say restrictive like it's a bad thing. The GPL is *meant* to restrict certain behaviours, some of which some other open source licences do not. There's really no need to start a debate over licensing here. Clearly, the best license

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 12:55, Chris Smith cdsm...@gmail.com wrote: Still, it would be nice to get an answer to the original question. Licensing with the GPL has definite consequences; for example, that the great majority of Haskell libraries, which are BSD3 licensed, may not legitimately declare

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Lask
On 26/01/2011 1:52 PM, Ivan Lazar Miljenovic wrote: In which case, why not ask the author(s) directly rather than blindly asking the mailing list? others, such as I, may be interested in the answer. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 13:37, John Lask jvl...@hotmail.com wrote: On 26/01/2011 1:52 PM, Ivan Lazar Miljenovic wrote: In which case, why not ask the author(s) directly rather than blindly asking the mailing list? others, such as I, may be interested in the answer. Yes, but this way you're

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Vivian McPhail
Hi, On Wed, 2011-01-26 at 08:18 +1000, Ivan Lazar Miljenovic wrote: Or else because the developers _wanted_ to license it under the GPL. Some people do, you know. Sure, but I agree it would be nice to know whether the authors chose the GPL, or applied it because of linking with GPLed

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 18:55, Chris Smith cdsm...@gmail.com wrote: Licensing with the GPL has definite consequences; for example, that the great majority of Haskell libraries, which are BSD3 licensed, may not legitimately declare dependencies on it. What are you talking about? Of course BSD3

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread David Leimbach
On Tue, Jan 25, 2011 at 8:53 PM, John Millikin jmilli...@gmail.com wrote: On Tue, Jan 25, 2011 at 18:55, Chris Smith cdsm...@gmail.com wrote: Licensing with the GPL has definite consequences; for example, that the great majority of Haskell libraries, which are BSD3 licensed, may not

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Tue, 2011-01-25 at 20:53 -0800, John Millikin wrote: What are you talking about? Of course BSD3 libraries/applications can depend on GPL'd code. Not being a lawyer, I'll avoid claiming any definitive answers, and just mention that that's definitely a minority opinion, and at odds with the

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 21:11, David Leimbach leim...@gmail.com wrote: I am not an IP lawyer, but this is my understanding of the GPL and it's transitive relationship with bodies of work that aren't GPL'd. BSD3 doesn't really state anything about what it links with, but the GPL injects itself

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 21:51, Chris Smith cdsm...@gmail.com wrote: On Tue, 2011-01-25 at 21:41 -0800, John Millikin wrote: Licensing is a property of the code, not the package; Cabal's licensing field is only a useful shorthand for most of the code here is covered by That would be a

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 15:48, John Millikin jmilli...@gmail.com wrote: On Tue, Jan 25, 2011 at 21:39, Chris Smith cdsm...@gmail.com wrote: On Tue, 2011-01-25 at 20:53 -0800, John Millikin wrote: What are you talking about? Of course BSD3 libraries/applications can depend on GPL'd code. Not being

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 22:07, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Voila: http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL (Note: in the past they said otherwise.) Important: or a GPL-compatible license BSD3, MIT, PublicDomain, Apache, etc, are all GPL-compatible.

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ivan Lazar Miljenovic
On 26 January 2011 16:10, John Millikin jmilli...@gmail.com wrote: On Tue, Jan 25, 2011 at 22:07, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Voila: http://www.gnu.org/licenses/gpl-faq.html#IfLibraryIsGPL (Note: in the past they said otherwise.) Important: or a GPL-compatible

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 22:14, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: However, my understanding that this property is then transitive: if Foo is GPL, Bar depends on Foo and Baz depends on Bar, then Baz must also be released under a GPL-compatible license. It's not really a

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 22:20, Chris Smith cdsm...@gmail.com wrote: On Tue, 2011-01-25 at 21:48 -0800, John Millikin wrote: Please cite where the FSF claims the GPL applies to unrelated works just because they can compile against GPL'd code. Keep in mind that if your claim is correct, then

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Tue, 2011-01-25 at 22:34 -0800, John Millikin wrote: The specific claim I'm refuting is that if some library or application depends on GPL'd code, that library/application must itself be GPL-licensed. This claim is simply not true. The GPL only applies to derived works, such as binaries or

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread John Millikin
On Tue, Jan 25, 2011 at 22:52, Chris Smith cdsm...@gmail.com wrote: On Tue, 2011-01-25 at 22:34 -0800, John Millikin wrote: The specific claim I'm refuting is that if some library or application depends on GPL'd code, that library/application must itself be GPL-licensed. This claim is simply

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Ketil Malde
David Leimbach leim...@gmail.com writes: BSD3 doesn't really state anything about what it links with, but the GPL injects itself into the tree of stuff it's linked with via the derivative works clause. I'm not an IP lawyer either (thank God), but merely using a published interface does not

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Wed, 2011-01-26 at 08:11 +0100, Ketil Malde wrote: I'm not an IP lawyer either (thank God), but merely using a published interface does not make it a derivative work. So IMO there's no problem with a GPL library making use of a BSD library, nor vice versa - just like I can write a BSD

Re: [Haskell-cafe] GPL License of H-Matrix and prelude numeric

2011-01-25 Thread Chris Smith
On Tue, 2011-01-25 at 23:03 -0800, John Millikin wrote: It's not possible for a .cabal file to specify which license the final binaries will use -- it depends on what libraries are locally installed, what flags the build uses, and what the executables themselves link. It's certainly possible