Re: Why no `instance (Monoid a, Applicative f)=> Monoid (f a)` for IO?

2014-07-15 Thread Brandon Simmons
ctions proposals like this > usually see, not to flat out reject the idea of the particular case of this > instance for IO. > > I will say the global 'instance (Applicative f, Monoid m) => Monoid (f m)' > won't fly for overlap reasons though. > > -Edward

Re: Why no `instance (Monoid a, Applicative f)=> Monoid (f a)` for IO?

2014-07-14 Thread Edward Kmett
bjections proposals like this usually see, not to flat out reject the idea of the particular case of this instance for IO. I will say the global 'instance (Applicative f, Monoid m) => Monoid (f m)' won't fly for overlap reasons though. -Edward On Mon, Jul 14, 2014 at 6:55 PM,

Why no `instance (Monoid a, Applicative f)=> Monoid (f a)` for IO?

2014-07-14 Thread Brandon Simmons
It seems to me that this should be true for all `f a` like: instance (Monoid a, Applicative f)=> Monoid (f a) where mappend = liftA2 mappend mempty = pure mempty But I can't seem to find the particular `instance (Monoid a)=> Monoid (IO a)` anywhere. Would that instance b

Re: How to force recompilation of preprocessed files (-F -pgmF ..)

2012-05-17 Thread Simon Hengel
Hi Etienne, thanks for your reply. > You can use Template Haskell's addDependentFile to register a > dependency on external files. > > http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile That's interesting. But from wh

Re: How to force recompilation of preprocessed files (-F -pgmF ..)

2012-05-17 Thread Etienne Laurin
Hello Simon, You can use Template Haskell's addDependentFile to register a dependency on external files. http://hackage.haskell.org/packages/archive/template-haskell/2.7.0.0/doc/html/Language-Haskell-TH-Syntax.html#v:addDependentFile You can also put -fforce-recomp in an OPTIONS_GHC pragma to as

How to force recompilation of preprocessed files (-F -pgmF ..)

2012-05-17 Thread Simon Hengel
Hi, I'm experimenting with a preprocessor to automatically generate test drivers[1]. The result depends on the existence of other files on the disk. When files are added or removed, the test driver has to be regenerated. Ideally ghc would just always recompile that single file (akin to make's .P

Re: Unrecognized -F flag

2008-01-04 Thread Christian Maeder
t; Preprocessing library zlib-0.4.0.1... > ghc-6.8.2: unrecognised flags: -F/Users/asmyczek/Library/Frameworks > Usage: For basic information, try the `--help' option. > compiling dist/build/Codec/Compression/Zlib/Stream_hsc_make.c failed > command was: /opt/local/bin/ghc -c -packa

Re: foldr f (head xs) xs is not the same as foldr1 f xs

2005-05-08 Thread David Sabel
Sun, May 08, 2005 at 08:14:30PM +0200, David Sabel wrote: Hi! Subject: foldr f (head xs) xs is not the same as foldr1 f xs I think you forgot about tail: foldr f (head xs) (tail xs) Best regards Tomasz ___ Glasgow-haskell-users mailing list G

Re: foldr f (head xs) xs is not the same as foldr1 f xs

2005-05-08 Thread Remi Turk
* Exception: Prelude.undefined > > Perhaps it would be better to change the implementation of foldr1? Why? *wonders what he's missing* It sounds like a rather silly claim to me. When changed to foldr f (head xs) (tail xs) is not the same as foldr1 f xs ^ I

Re: foldr f (head xs) xs is not the same as foldr1 f xs

2005-05-08 Thread Tomasz Zielonka
On Sun, May 08, 2005 at 08:14:30PM +0200, David Sabel wrote: > Hi! > > Subject: foldr f (head xs) xs is not the same as foldr1 f xs I think you forgot about tail: foldr f (head xs) (tail xs) Best regards Tomasz ___ Glasgow-haskell-users mai

foldr f (head xs) xs is not the same as foldr1 f xs

2005-05-08 Thread David Sabel
Hi! A small example for the claim mentioned in the subject: Prelude> let x = 1:undefined in foldr (curry fst) (head x) x 1 Prelude> let x = 1:undefined in foldr1 (curry fst) x *** Exception: Prelude.undefined Perhaps it would be better to change the implementation of foldr1? Cheers, David __

Re: F#

2004-06-21 Thread MR K P SCHUPKE
>Not? How about Erm, actually I was trying to be diplomatic... What with MS supporting GHC's development. I completely agree with the statement about the CLR straight jacket. Secondly... I agree with you about multi-parameter type classes and fundeps enabling you to do this - but thats not Haske

Re: F#

2004-06-21 Thread Manuel M T Chakravarty
On Tue, 2004-06-01 at 21:20, MR K P SCHUPKE wrote: > The other area (again MS specific) that F# has better interoperability, > is .NET . F# (notice similarity to C#) is a funtional language within > the .NET framework - hence supports the 'COM' style interface within > t

Re: F#

2004-06-03 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > Generally, phrases such as "XYZ is excellent within certain niches" > sounds like cheap propaganda to me. If you replace Haskell by Linux, I > am sure you'll find similar statements on other Microsoft web pages ;

Re: F#

2004-06-01 Thread Manuel M T Chakravarty
gt; I agree. It's been changed now, however: > > "Purely functional languages like Haskell are excellent > within certain niches, but non-trivial problems exist > with language interoperability between lazy and strict > languages." > > Given yo

Re: F#

2004-06-01 Thread MR K P SCHUPKE
f marshalling is pretty complex compared to usual Visual-Basic fare... The other area (again MS specific) that F# has better interoperability, is .NET . F# (notice similarity to C#) is a funtional language within the .NET framework - hence supports the 'COM' style interface within the languag

Re: F#

2004-06-01 Thread Ashley Yakeley
trivial problems exist with language interoperability between lazy and strict languages." Given your work on FFI, would you care to comment? I wonder if F# really is as obviously preferable to a "Haskell#" as they claim? -- Ashley Yakeley, Seattle WA ___

Re: F#

2004-05-26 Thread Manuel M T Chakravarty
On Fri, 2004-05-21 at 10:07, John Sharley wrote: > I note this remark on the Microsoft Research site > (http://research.microsoft.com/projects/ilx/fsharp.aspx) > > Purely functional languages like Haskell are excellent within certain > niches, but unfortunately some simple programming exercises ca

Re: F#

2004-05-21 Thread Alastair Reid
> > Purely functional languages like Haskell are excellent > > within certain niches, but non-trivial problems exist with language > > interoperability between lazy and strict languages. > > > > I believe that is uncontroversial. Actually, I think Haskell has one of the better language interopera

RE: F#

2004-05-21 Thread Simon Marlow
; wrapper for Win32 is fairly simple in C#, pretty hard in F#, and > really quite researchy in Haskell - but others obviously don't agree. > > Replaced with > > Purely functional languages like Haskell are excellent > within certain niches, but non-trivial problems exist w

RE: F#

2004-05-21 Thread Simon Marlow
On 21 May 2004 01:07, John Sharley wrote: > I note this remark on the Microsoft Research site > (http://research.microsoft.com/projects/ilx/fsharp.aspx) > > Purely functional languages like Haskell are excellent within certain > niches, but unfortunately some simple programming exercises can > qu

Re: F#

2004-05-21 Thread MR K P SCHUPKE
> but unfortunately some simple programming exercises can quickly turn > into problems that require a PhD. to solve. Of course you could say that the excersise is not actaully as simple as you believe, and other languages will let you get away with stuff you really shouldn't be doing. A good exam

F#

2004-05-21 Thread John Sharley
I note this remark on the Microsoft Research site (http://research.microsoft.com/projects/ilx/fsharp.aspx) Purely functional languages like Haskell are excellent within certain niches, but unfortunately some simple programming exercises can quickly turn into problems that require a PhD. to solve.

RE: GHC 6.2.1 compilation fails when compiling FFI code with -pro f or -O2

2004-04-21 Thread Bayley, Alistair
Sorry for the stupidity... just found the -I option... Although it is a bit frustrating when an FFI program that used to compile stops when you add supposedly "harmless" options such as -O or -prof. Might be worth adding a section to the FFI section of the manual about using the -I flag when compi