Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Taylor Hedberg
Joerg Fritsch, Thu 2013-07-18 @ 19:22:46+0200: > Can I easily fix the modifyIORef statement by swapping "something" ? > --Joerg Replace `shiftL` with `flip shiftL` and change the type signature of `sLbitfield` to take an Int instead of an Integer. signature.asc Description: Digital signature ___

Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Joerg Fritsch
Can I easily fix the modifyIORef statement by swapping "something" ? --Joerg On Jul 18, 2013, at 7:19 PM, "Edward Z. Yang" wrote: > shiftL has the wrong type: Bits a => a -> Int -> a > so it is expecting the value in the IORef to be an Int. > > Edward > > Excerpts from Joerg Fritsch's message

Re: [Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Edward Z. Yang
shiftL has the wrong type: Bits a => a -> Int -> a so it is expecting the value in the IORef to be an Int. Edward Excerpts from Joerg Fritsch's message of Thu Jul 18 10:08:22 -0700 2013: > All, what is wrong w the below code? > > I get an type error related to the operation shiftL > > import D

[Haskell-cafe] what is wrong w my IORef Word32 ?

2013-07-18 Thread Joerg Fritsch
All, what is wrong w the below code? I get an type error related to the operation shiftL import Data.Bits import Data.Word import Data.IORef data Word32s = Word32s { x :: IORef Word32 } bitfield :: Word32 bitfield = 0 mkbitfield :: Word32 -> IO Word32s mkbitfield i = do the_bf <- newIORef i

Re: [Haskell-cafe] What is the process for GSOC?

2013-05-01 Thread Alp Mestanogullari
No, if the process is the same this year as the previous one, all potential mentors and haskell.org gsoc admins (I think) get to vote on each submission, giving it a score, and then the best N proposals get chosen. On Wed, May 1, 2013 at 10:34 AM, Dominic Steinitz wrote: > How is it decided whic

[Haskell-cafe] What is the process for GSOC?

2013-05-01 Thread Dominic Steinitz
How is it decided which Haskell projects get chosen? Do we discuss them here and take a collective view? Thanks, Dominic. PS I should point out I have an interest in the proposal to port charts to use diagrams (http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/jbracker/1) i.e

Re: [Haskell-cafe] What is a Haskell way to implement flags?

2013-02-19 Thread Ertugrul Söylemez
Brandon Allbery wrote: > > In C usual way is to set some bit in integer variable by shifting or > > oring, and than check flag integer variable by anding with > > particular flag value. What is Haskell way? > > You can do that, but a somewhat more idiomatic way would be a list > (or, slightly les

Re: [Haskell-cafe] What is a Haskell way to implement flags?

2013-02-19 Thread Brandon Allbery
On Tue, Feb 19, 2013 at 10:11 AM, Branimir Maksimovic wrote: > In C usual way is to set some bit in integer variable by shifting or > oring, > and than check flag integer variable by anding with particular flag value. > What is Haskell way? > You can do that, but a somewhat more idiomatic way wo

Re: [Haskell-cafe] What is a Haskell way to implement flags?

2013-02-19 Thread Donn Cave
Quoth Branimir Maksimovic , > In C usual way is to set some bit in integer variable by shifting or oring, > and than check flag integer variable by anding with particular flag value. > What is Haskell way? Of course you may do the very same thing, if you like. I think if there's only one of thes

Re: [Haskell-cafe] What is a Haskell way to implement flags?

2013-02-19 Thread mukesh tiwari
The same as C way. You can import Data.Bits and can use the functions. Prelude> import Data.Bits Prelude Data.Bits> Data.Bits. Data.Bits..&. Data.Bits.bitDefault Data.Bits.complementBit Data.Bits.rotate Data.Bits.shift Data.Bits.testBitDefault Data.Bits..|.Data.Bits.bitSize

[Haskell-cafe] What is a Haskell way to implement flags?

2013-02-19 Thread Branimir Maksimovic
In C usual way is to set some bit in integer variable by shifting or oring,and than check flag integer variable by anding with particular flag value.What is Haskell way? Thanks. ___ Haskell-Cafe mailing list Ha

[Haskell-cafe] what is the purpose of GHC.Exts.lazy?

2012-12-01 Thread jared simpson
docs say: The call '(lazy e)' means the same as e, but lazy has a magical strictness property: it is lazy in its first argument, even though its semantics is strict. why do i want to use magic during strictn

[Haskell-cafe] What is a functional approach to linear algebra routines? I see REPA warns that one must use fusion or risk slow routines.

2012-10-04 Thread KC
Apparently using STUarrays in an imperative fashion is fraught with peril (and the performance of molasses). Casey -- -- Regards, KC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-17 Thread Magicloud Magiclouds
Thank you. Will do. On Mon, Sep 17, 2012 at 7:14 AM, Antoine Latter wrote: > On Sun, Sep 16, 2012 at 5:04 PM, Richard O'Keefe wrote: >> >> On 15/09/2012, at 5:14 AM, Chris Heller wrote: >> >>> You might want to have a look at the time-recurrence package: >>> http://hackage.haskell.org/package/t

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-16 Thread Heller Time
Antoine has it right, the language is lifted from the RFC. Chris Heller SAS - Advanced Analytics Teragram Research & Development phone: 1-617-576-6800 x54237 mobile: 1-617-460-3643 email: hel...@teragram.com On Sep 16, 2012, at 7:14 PM, Antoine Latter wrote: > On Sun, Sep 16, 2012 at 5:04 PM, R

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-16 Thread Antoine Latter
On Sun, Sep 16, 2012 at 5:04 PM, Richard O'Keefe wrote: > > On 15/09/2012, at 5:14 AM, Chris Heller wrote: > >> You might want to have a look at the time-recurrence package: >> http://hackage.haskell.org/package/time-recurrence >> >> For your simple cases you would do something like: >> >> Each s

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-16 Thread Richard O'Keefe
On 15/09/2012, at 5:14 AM, Chris Heller wrote: > You might want to have a look at the time-recurrence package: > http://hackage.haskell.org/package/time-recurrence > > For your simple cases you would do something like: > > Each second: > > starting (UTCTime ...) $ recur secondly > > Each

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-14 Thread Magicloud Magiclouds
This is nice. Thanks to all. On Fri, Sep 14, 2012 at 4:03 PM, Roman Cheplyaka wrote: > Consider using the time-lens package. > > import Data.Time.Lens > import Data.Lens.Common > > List comprehension style: > > [modL seconds (+ fromIntegral n) t | n <- [0..]] > [modL minutes (+ n) t | n <

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-14 Thread Roman Cheplyaka
Consider using the time-lens package. import Data.Time.Lens import Data.Lens.Common List comprehension style: [modL seconds (+ fromIntegral n) t | n <- [0..]] [modL minutes (+ n) t | n <- [0..]] (you need fromIntegral for seconds, because it is of fractional type in Data.Time). iterate

Re: [Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-13 Thread Karl Voelker
On Thu, Sep 13, 2012 at 10:29 PM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Hi, > Simple usage, I could make an instance of Enum to UTCTime, so > [utcTime..] could work. But that is so stiff. How if sometimes I want > to step by 1 min, sometimes I want to step by 1 sec? >

[Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

2012-09-13 Thread Magicloud Magiclouds
Hi, Simple usage, I could make an instance of Enum to UTCTime, so [utcTime..] could work. But that is so stiff. How if sometimes I want to step by 1 min, sometimes I want to step by 1 sec? So I think some way like [ t | addUTCTime last 60 ] could be nice. But I cannot figure it out Any id

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Yifan Yu
On Wed, Jul 18, 2012 at 7:05 AM, Ertugrul Söylemez wrote: > exception handling should be done on a per-context basis, where the > developer establishes the notion of context. Most of the time this > boils down to releasing resources: > > forkIO (doStuffWith h `finally` hClose h) > Hello Ert

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Yifan Yu
On Wed, Jul 18, 2012 at 4:10 AM, Bardur Arantsson wrote: > The most robust way is probably to use a completely independent > supervisor program, e.g. "upstart", "systemd", "runit", etc. These > usually have facilities for restarting the supervised program, and a > rate limit on exactly how often t

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Ertugrul Söylemez
Hello there Yifan, exception handling should be done on a per-context basis, where the developer establishes the notion of context. Most of the time this boils down to releasing resources: forkIO (doStuffWith h `finally` hClose h) In more complicated scenarios, where you actually need to /h

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Bardur Arantsson
On 07/17/2012 10:17 PM, Christopher Done wrote: > On 17 July 2012 22:10, Bardur Arantsson wrote: >> On 07/17/2012 08:34 AM, Yifan Yu wrote: >>> I can only tell if I browse the source code. So the question is, how can I >>> determine all the exceptions that can be thrown by a given function? >> >>

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Christopher Done
On 17 July 2012 22:10, Bardur Arantsson wrote: > On 07/17/2012 08:34 AM, Yifan Yu wrote: >> I can only tell if I browse the source code. So the question is, how can I >> determine all the exceptions that can be thrown by a given function? > > Look at its source. Not sure that's the most productiv

Re: [Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-17 Thread Bardur Arantsson
On 07/17/2012 08:34 AM, Yifan Yu wrote: > First of all, apologise if the question is too broad. The background goes > like this: I've implemented a server program in Haskell for my company > intended to replace the previous one written in C which crashes a lot (and > btw the technology of the compa

[Haskell-cafe] What is the surefire way to handle all exceptions and make sure the program doesn't fail?

2012-07-16 Thread Yifan Yu
First of all, apologise if the question is too broad. The background goes like this: I've implemented a server program in Haskell for my company intended to replace the previous one written in C which crashes a lot (and btw the technology of the company is exclusively C-based). When I chose Haskel

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Magicloud Magiclouds
Sorry for that. The problem got solved yesterday. On Mon, Jul 16, 2012 at 6:01 PM, Lars Viklund wrote: > On Thu, Jul 12, 2012 at 09:41:43AM +0800, Magicloud Magiclouds wrote: >> Sorry for the attachments. They are wireshark files. > > May I suggest not sending multi-megabyte files of limited inte

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Lars Viklund
On Thu, Jul 12, 2012 at 09:41:43AM +0800, Magicloud Magiclouds wrote: > Sorry for the attachments. They are wireshark files. May I suggest not sending multi-megabyte files of limited interest down a widely subscribed list? Contrary to popular belief, bandwidth, time and spool storage isn't free.

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-16 Thread Magicloud Magiclouds
e big difference here is: the failed one sent unbindRequest before >>>> got bindResponse success. >>>> Just a clue, I have no idea what is going on >>>> >>>> On Fri, Jun 1, 2012 at 5:17 PM, Chris Dornan wrote: >>>>> No problem -- I have at

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-11 Thread Magicloud Magiclouds
gt;>> >>> -Original Message- >>> From: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] >>> Sent: 01 June 2012 02:01 >>> To: Chris Dornan >>> Subject: Re: [Haskell-cafe] What is the difference between runhaskell and >&g

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-07-11 Thread Magicloud Magiclouds
ng on On Fri, Jun 1, 2012 at 5:17 PM, Chris Dornan wrote: > No problem -- I have attached the executable too. > > Chris > > -Original Message- > From: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] > Sent: 01 June 2012 02:01 > To: Chris Dornan > Sub

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Magicloud Magiclouds
A little information. I did not notice the gcc/binutils versions. But in CentOS, the ghc 7.2.2/7.4.1 were all compiled myself with all default configurations. On Tue, May 29, 2012 at 10:54 PM, Chris Dornan wrote: > On 29 May 2012 02:21, Magicloud Magiclouds > wrote: >> Interesting. I have this c

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Chris Dornan
I will send the header and object files off list. Here is the test program I am using: import LDAP main :: IO () main = do putStrLn "domain>" domain <- getLine putStrLn "bindDN>" bindDN <- getLine putStrLn "bindPW>" bindPW <- getLine putStrLn

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-29 Thread Chris Dornan
On 29 May 2012 02:21, Magicloud Magiclouds wrote: > Interesting. I have this code tested in Debian unstable/stable, CentOS > 6.1, all 64 bit, with two different version of libldap2. > At first, Debian-s were installed with 7.4.1, CentOS with 7.2.2. Only > in CentOS the code connected after compile

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Magicloud Magiclouds
Interesting. I have this code tested in Debian unstable/stable, CentOS 6.1, all 64 bit, with two different version of libldap2. At first, Debian-s were installed with 7.4.1, CentOS with 7.2.2. Only in CentOS the code connected after compiled. Then I removed 7.4.1 from Debian stable and installed 7.

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Chris Dornan
> Sorry for the wrong information. I made a mistake when did the test. > After more testing, I think it is a bug of ghc 7.4.1. Until now, I cannot > find a way to make ghc 7.4.1 compiled binary work. I have set up this test on 7.4.1 and I cannot recreate the problem -- compiling and running an e

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-28 Thread Chris Dornan
> Sorry for the wrong information. I made a mistake when did the test. > After more testing, I think it is a bug of ghc 7.4.1. Until now, I cannot > find a way to make ghc 7.4.1 compiled binary work. It sounds like this should be looked at further. Somebody should verify try to repeat what you

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
t;> >> Chris >> >> -Original Message- >> From: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] >> Sent: 27 May 2012 10:12 >> To: Chris Dornan >> Cc: Brandon Allbery; Haskell-Cafe >> Subject: Re: [Haskell-cafe] What is the d

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
om: Magicloud Magiclouds [mailto:magicloud.magiclo...@gmail.com] > Sent: 27 May 2012 10:12 > To: Chris Dornan > Cc: Brandon Allbery; Haskell-Cafe > Subject: Re: [Haskell-cafe] What is the difference between runhaskell and > compile? > > Hi, >  Sorry for the delayed reply. I am

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Ozgun Ataman
about? (I don’t think I have tested this on GHC-7.4.1, and maybe the others >> haven’t either.) >> >> >> >> Chris >> >> >> >> >> >> From: haskell-cafe-boun...@haskell.org >> [mailto:haskell-cafe-boun...@haskell.org]

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Chris Dornan
10:12 To: Chris Dornan Cc: Brandon Allbery; Haskell-Cafe Subject: Re: [Haskell-cafe] What is the difference between runhaskell and compile? Hi, Sorry for the delayed reply. I am using ghc 7.4.1 and LDAP 0.6.6. When you said "configuration of the OpenLDAP client library", may I

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-27 Thread Magicloud Magiclouds
ery > Sent: 25 May 2012 04:21 > To: Magicloud Magiclouds > Cc: Haskell-Cafe > Subject: Re: [Haskell-cafe] What is the difference between runhaskell and > compile? > > > > On Thu, May 24, 2012 at 11:05 PM, Magicloud Magiclouds > wrote: > > Hi there, >  The cod

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-25 Thread Chris Dornan
on GHC-7.4.1, and maybe the others haven’t either.) Chris From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Brandon Allbery Sent: 25 May 2012 04:21 To: Magicloud Magiclouds Cc: Haskell-Cafe Subject: Re: [Haskell-cafe] What is the difference

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Versions: libldap2 2.4.28 LDAP 0.6.6 ghc 7.4.1 Code below: import LDAP main :: IO () main = do let domain = "vancloa.cn" bindDN = "CN=wangshida.admin,OU=admin_accounts,DC=vancloa,DC=cn" bindPW = "" baseDN = Just "DC=vancloa,DC=cn" ldapFilter = Just ("(&(sAMAccou

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Brandon Allbery
On Thu, May 24, 2012 at 11:05 PM, Magicloud Magiclouds < magicloud.magiclo...@gmail.com> wrote: > Hi there, > The code could not be simpler. Just ldapInit, ldapSimpleBind. > I just found that the code works with ghci, too. So to sum up, > ghci/runhaskell works, ghc not. A possibility that occu

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Thomas DuBuisson
If it is simple then please paste it somewhere. Perhaps stackoverflow would be a better medium for this discussion. -Thomas On Thu, May 24, 2012 at 8:05 PM, Magicloud Magiclouds wrote: > Hi there, > The code could not be simpler. Just ldapInit, ldapSimpleBind. > I just found that the code wor

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Hi there, The code could not be simpler. Just ldapInit, ldapSimpleBind. I just found that the code works with ghci, too. So to sum up, ghci/runhaskell works, ghc not. On Thu, May 24, 2012 at 8:15 PM, Vincent Ambo wrote: > Can you paste your code somewhere? I'm using the LDAP package at work (

Re: [Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Vincent Ambo
Can you paste your code somewhere? I'm using the LDAP package at work (for authenticating a Yesod app) and a quick test of the basic LDAP package in GHCi works for me: λ> import LDAP λ> ldap <- ldapInit "10.0.0.12" ldapPort λ> ldapSimpleBind ldap "geva" "**" λ> let desiredAttr = LDAPAtt

[Haskell-cafe] What is the difference between runhaskell and compile?

2012-05-24 Thread Magicloud Magiclouds
Hi, I am writing a small program using LDAP hackage. A weird problem occured. When the code was run by runhaskell, things were fine, worked as expected. But when ghc compiled (no any args), and ran, I got this: LDAP error: ldapSimpleBind: LDAPException LdapServerDown(-1): Can't contact LDAP s

Re: [Haskell-cafe] What is the status of GPU-accelerated Haskell?

2011-10-28 Thread Rafael Gustavo da Cunha Pereira Pinto
Wow! That is cool! I'll take a look... Thanks folks! On Fri, Oct 28, 2011 at 11:39, Ryan Newton wrote: > There are CUDA bindings: > >http://hackage.haskell.org/package/cuda > > And that is what the higher-level GPU-programming package, Accelerate, is > based on: > >http://hackage.has

Re: [Haskell-cafe] What is the status of GPU-accelerated Haskell?

2011-10-28 Thread Ryan Newton
There are CUDA bindings: http://hackage.haskell.org/package/cuda And that is what the higher-level GPU-programming package, Accelerate, is based on: http://hackage.haskell.org/package/accelerate On Thu, Oct 27, 2011 at 4:04 PM, serialhex wrote: > Hi, there is an OpenCL / Haskell threa

Re: [Haskell-cafe] What is the status of GPU-accelerated Haskell?

2011-10-27 Thread serialhex
Hi, there is an OpenCL / Haskell thread floating around the ML, mostly it's a dew ppl talking about merging the 5 (or so) bindings to the OpenCL api and getting spiffy multi-threaded haskell-awesomeness out of that. i think they are discussing the benefits/drawbacks of a pure-ish api conversion or

[Haskell-cafe] What is the status of GPU-accelerated Haskell?

2011-10-27 Thread Rafael Gustavo da Cunha Pereira Pinto
Hi folks, I just bought a NVidia Fermi-based card and remembered reading a few months (years?) ago about some effort to accelerate array processing in Haskell using GPUs. How is this going on? Any progresses? Do we have GPU based DPH already? (the last one is a joke...) I keep thinking on the ad

Re: [Haskell-cafe] What is the etiquette for posting to multiple forums?

2011-10-21 Thread Vo Minh Thu
2011/10/21 Michael Litchard : > I know it's bad form to post the same question to multiple mailing > lists. But what about say, the beginner's mailing list and > stackoverflow.com? Hi, Nothing is carved in stone, use your judgment. It shouldn't be done systematically but from time to time, it is

[Haskell-cafe] What is the etiquette for posting to multiple forums?

2011-10-21 Thread Michael Litchard
I know it's bad form to post the same question to multiple mailing lists. But what about say, the beginner's mailing list and stackoverflow.com? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-28 Thread Simon Marlow
On 26/06/2011 09:31, Paterson, Ross wrote: If this is the case, then multiple sentences in the 2010 report don't make sense, though the way in which they don't make sense sort of depends on what "simple pattern binding" means. Indeed, the Report has two problems: Sections 4.4.3.2 and 4.5.5 hav

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 21:15:06 +0100, Paterson, Ross wrote: > > > True. That ambiguity could be avoided by adding the word "declaration" > > after "type signature". > > On second thoughts, this is unnecessary. The Report consistently uses > "expression type signature" for the expression and "type

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> > Still, the clause > > > > b1 contains a free identifier that has no type signature and > > is bound by b2 > > > > applies the phrase "has no type signature" to the identifier, not to > > the binding. Such phrasing does not exclude expression > > type-signatures. > > True. Tha

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> Still, the clause > > b1 contains a free identifier that has no type signature and > is bound by b2 > > applies the phrase "has no type signature" to the identifier, not to > the binding. Such phrasing does not exclude expression > type-signatures. True. That ambiguity could be

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 09:31:05 +0100, Paterson, Ross wrote: > > Indeed, the Report has two problems: > > Sections 4.4.3.2 and 4.5.5 have different definitions of "simple pattern". > This has been there since section 4.5.5 (Monomorphism Restriction) was > added in Haskell 1.1. But then the only tec

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-26 Thread Paterson, Ross
> If this is the case, then multiple sentences in the 2010 report don't > make sense, though the way in which they don't make sense sort of > depends on what "simple pattern binding" means. Indeed, the Report has two problems: Sections 4.4.3.2 and 4.5.5 have different definitions of "simple patte

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 01:41:01 +0100, Paterson, Ross wrote: > > > I thought "no type signature" meant no type signature inside b1. > > No, it means no type signature for the variable. > > > Otherwise, you are saying nothing could depend on a binding with a > > type signature. By that logic, there

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread Paterson, Ross
> I thought "no type signature" meant no type signature inside b1. No, it means no type signature for the variable. > Otherwise, you are saying nothing could depend on a binding with a > type signature. By that logic, there can be no mutual dependence, > and so every declaration with a type sign

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread dm-list-haskell-cafe
At Sun, 26 Jun 2011 00:17:12 +0100, Paterson, Ross wrote: > > > > > g1 x y z = if x>y then show x ++ show z else g2 y x > > > > > > > > g2 :: (Show a, Ord a) => a -> a -> String > > > > g2 | False = \p q -> g1 q p () > > > >| otherwise = \p q -> g1 q p 'a' > > > >

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread Paterson, Ross
> > > g1 x y z = if x>y then show x ++ show z else g2 y x > > > > > > g2 :: (Show a, Ord a) => a -> a -> String > > > g2 | False = \p q -> g1 q p () > > >| otherwise = \p q -> g1 q p 'a' > > >where x = True > > > > It appears to me that GHC is justified. Accordin

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread dm-list-haskell-cafe
At Sat, 25 Jun 2011 14:20:52 -0400, Scott Turner wrote: > > > g1 x y z = if x>y then show x ++ show z else g2 y x > > > > g2 :: (Show a, Ord a) => a -> a -> String > > g2 | False = \p q -> g1 q p () > >| otherwise = \p q -> g1 q p 'a' > >where x = True > > It a

Re: [Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread Scott Turner
On 2011-06-25 10:52, David Mazieres wrote: > Further confusing things, GHC accepts the following: > > g1 x y z = if x>y then show x ++ show z else g2 y x > > g2 :: (Show a, Ord a) => a -> a -> String > g2 | False = \p q -> g1 q p () > | otherwise = \p q -> g1 q p 'a

[Haskell-cafe] What is a "simple pattern binding"?

2011-06-25 Thread dm-list-haskell-cafe
Section 4.4.3.2 of the 2010 Haskell report says: A simple pattern binding has form p = e. The pattern p is matched “lazily” as an irrefutable pattern, as if there were an implicit ~ in front of it. This makes it sound as though p is a pattern, which I assume means what sec

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-12-29 Thread Michael Steele
> Note, that this will not run on Windows, as it gives command >  /usr/sbin/sendmail It sounds like mime-mail may be getting native support soon, but until then you may try what I've had success with on Windows. Grab a sendmail replacement like the one at http://glob.com.au/sendmail/. It's just

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-12-29 Thread Robert Wills
Sure -- I'll look at doing that. No time today but should be able to look at that on Friday. -Rob On Wed, Dec 29, 2010 at 6:02 AM, Michael Snoyman wrote: > This looks very good, thank you! One comment: do you think it would be > possible to add a function for sending a mime-mail Mail datatype >

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-12-28 Thread Michael Snoyman
This looks very good, thank you! One comment: do you think it would be possible to add a function for sending a mime-mail Mail datatype directly? I see that you provide a wrapper around simpleMail in your sendMimeMail function, but that won't always be sufficient. Michael On Tue, Dec 28, 2010 at

Re: [Haskell-cafe] what is the status of haskell's mail libraries?

2010-12-28 Thread Robert Wills
I've finally gotten around to doing an update to HaskellNet which provides along with some cleanups integration with mime-mail. There is an example of its usage at: example/smtpMimeMail.hs in http://hackage.haskell.org/package/HaskellNet -Rob On Wed, Oct 27, 2010 at 11:05 AM, Michael Snoyman

Re: [Haskell-cafe] What is NoPush module?

2010-12-16 Thread Magicloud Magiclouds
Seems working. Thank you. On Fri, Dec 17, 2010 at 11:36 AM, Jeremy Shaw wrote: > oops. I got distracted when recording a patch and accidently recorded some > extra stuff that was not ready yet. > > I pushed another patch which rolls back the premature changes. Sorry about > that :( > > - jeremy >

Re: [Haskell-cafe] What is NoPush module?

2010-12-16 Thread Jeremy Shaw
oops. I got distracted when recording a patch and accidently recorded some extra stuff that was not ready yet. I pushed another patch which rolls back the premature changes. Sorry about that :( - jeremy On Dec 16, 2010, at 8:02 PM, Magicloud Magiclouds wrote: Hi, When I compiling happs

[Haskell-cafe] What is NoPush module?

2010-12-16 Thread Magicloud Magiclouds
Hi, When I compiling happstack with ghc 7, I got an error: src/Happstack/Server/Internal/Handler.hs:29:8: Could not find module `NoPush': Use -v to see a list of the files searched for. I looked around, there is no clue for the module NoPush, except it has a function call withNoPush.

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-05 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/2/10 03:33 , Permjacov Evgeniy wrote: > Forth is quite easy to implement, but can it be used as extension > language? Wiki describes it as quite low level... It's low level but rather easy to build up more complex stuff. It's never been that po

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-04 Thread Permjacov Evgeniy
ehm. I missed something and ghc api is well documented and stable ? > > There are other ways of adding Haskell as a scripting language - > bundling ghc is not necessary. I still have not found haskell interpreter, that is written in pure haskell and has good quality (i.e. stable, written in stable

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-04 Thread Malcolm Wallace
On 4 Nov 2010, at 17:52, Luke Palmer wrote: On Thu, Nov 4, 2010 at 5:30 AM, Malcolm Wallace > wrote: ehm. I missed something and ghc api is well documented and stable ? There are other ways of adding Haskell as a scripting language - bundling ghc is not necessary. Do tell. Well, our sol

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-04 Thread Yves Parès
> There are other ways of adding Haskell as a scripting language - bundling ghc is not necessary. Even the program which is to run the scripts is compiled with GHC? I am interested to know how you do that. 2010/11/4 Malcolm Wallace > ehm. I missed something and ghc api is well documented and s

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-04 Thread Luke Palmer
On Thu, Nov 4, 2010 at 5:30 AM, Malcolm Wallace wrote: >> ehm. I missed something and ghc api is well documented and stable ? > > There are other ways of adding Haskell as a scripting language - bundling > ghc is not necessary. Do tell. >> It is inacceptable for scripting language, faced to no-p

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-04 Thread Malcolm Wallace
ehm. I missed something and ghc api is well documented and stable ? There are other ways of adding Haskell as a scripting language - bundling ghc is not necessary. It is inacceptable for scripting language, faced to no-programmers. Such languages must be as plain and regular, as possible.

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Bulat Ziganshin
Hello Permjacov, Tuesday, November 2, 2010, 9:04:00 AM, you wrote: > Let us think, that we need some scripting language for our pure haskell > project and configure-compile-run is not a way. In such a case a > reasonably simple, yet standartized and wide known language should be > implemented. Wh

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread John Lask
On 2/11/2010 9:05 PM, Steffen Schuldenzucker wrote: On 11/02/2010 10:40 AM, Yves Parès wrote: Because he would have either to recompile the whole program or to use things like hint, both implying that GHC must be installed on the user side (600Mo+ for GHC 6.12.3) Isn't there a way to use some s

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Sterling Clover
On Tue, Nov 2, 2010 at 11:08 AM, Donn Cave wrote: > The quotes around "scripts" are well chosen, since it sounds like > you might be using the word in a different sense of `small program', > vs. the extension language notion of a programmable UI. > > Haskell's suitability for something like this

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Brandon Moore
> Henning Thielemann, Tue, November 2, 2010 6:11:02 AM > > Yves Parès schrieb: > > Because he would have either to recompile the whole program or to use > > things like hint, both implying that GHC must be installed on the user > > side (600Mo+ for GHC 6.12.3) > > Hugs is great for running sma

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Donn Cave
Quoth Henning Thielemann , > Hugs is great for running small Haskell "scripts". The quotes around "scripts" are well chosen, since it sounds like you might be using the word in a different sense of `small program', vs. the extension language notion of a programmable UI. Haskell's suitability for

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Alexy Khrabrov
Clojure! Sent from my iPad On Nov 2, 2010, at 2:31, Miguel Mitrofanov wrote: > Ehm... Forth? TCL? > > Отправлено с iPhone > > Nov 2, 2010, в 9:04, Permjacov Evgeniy написал(а): > >> Let us think, that we need some scripting language for our pure haskell >> project and configure-compile-run

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Henning Thielemann
On Tue, 2 Nov 2010, Henning Thielemann wrote: Yves Parès schrieb: Because he would have either to recompile the whole program or to use things like hint, both implying that GHC must be installed on the user side (600Mo+ for GHC 6.12.3) Hugs is great for running small Haskell "scripts". I l

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Henning Thielemann
Yves Parès schrieb: > Because he would have either to recompile the whole program or to use > things like hint, both implying that GHC must be installed on the user > side (600Mo+ for GHC 6.12.3) Hugs is great for running small Haskell "scripts". ___ H

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Steffen Schuldenzucker
On 11/02/2010 10:40 AM, Yves Parès wrote: Because he would have either to recompile the whole program or to use things like hint, both implying that GHC must be installed on the user side (600Mo+ for GHC 6.12.3) Isn't there a way to use some stripped-down version of ghc and the base libraries,

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Permjacov Evgeniy
ehm. I missed something and ghc api is well documented and stable ? The problem is that haskell is overkill here and it requires esoteric extensions for some tasks (Rank2Types for reflection, for example). It is inacceptable for scripting language, faced to no-programmers. Such languages must be a

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Yves Parès
Because he would have either to recompile the whole program or to use things like hint, both implying that GHC must be installed on the user side (600Mo+ for GHC 6.12.3) 2010/11/2 Lennart Augustsson > I don't understand. Why don't you use Haskell as the scripting language? > > On Tue, Nov 2, 2

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Lennart Augustsson
I don't understand. Why don't you use Haskell as the scripting language? On Tue, Nov 2, 2010 at 7:04 AM, Permjacov Evgeniy wrote: > Let us think, that we need some scripting language for our pure haskell > project and configure-compile-run is not a way. In such a case a > reasonably simple, yet

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Stephen Tetley
Norman Ramsey has implemented Lua as an extension language for ML, this included actually writing a Lua interpreter not FFI-ing to the standard Lua. He has a series of good papers about the mechanics of exposing the API of an application to the scripting language. The code itself is available as p

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Yves Parès
Or maybe Lua? There is already a Lua binding on Hackage. I've been advised to use it when I was also looking for a scripting language (and disadvised to use Scheme). 2010/11/2 Permjacov Evgeniy > Let us think, that we need some scripting language for our pure haskell > project and configure-com

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Gregory Crosswhite
I haven't ever used it myself, but I've heard good things about Lua, which was designed to be an embedded scripting language for applications: http://www.lua.org/ If you believe the Programming Language Shootout (http://shootout.alioth.debian.org/) it is pretty fast for a dynamic interpre

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-02 Thread Permjacov Evgeniy
Forth is quite easy to implement, but can it be used as extension language? Wiki describes it as quite low level... TCL ... Well, I'll consider it if it have written standart, like RxRS does. On 11/02/2010 09:31 AM, Miguel Mitrofanov wrote: > Ehm... Forth? TCL? > > Отправлено с iPhone > > Nov 2, 20

Re: [Haskell-cafe] What is simplest extension language to implement?

2010-11-01 Thread Miguel Mitrofanov
Ehm... Forth? TCL? Отправлено с iPhone Nov 2, 2010, в 9:04, Permjacov Evgeniy написал(а): > Let us think, that we need some scripting language for our pure haskell > project and configure-compile-run is not a way. In such a case a > reasonably simple, yet standartized and wide known language sh

  1   2   3   4   5   >