Re: Re: [Haskell-cafe] Re: StateT and modify

2006-11-09 Thread Peter Steiner
stupid me, that works and is more flexible than cale's solution. thanks! On 11/8/06, Nicolas Frisby [EMAIL PROTECTED] wrote: Applying lift outside of modifyM is not a problem. It can seem a bit tricky with the function types around. Try modifyM $ lift . myAdd 1 instead of modifyM $

Re: [Haskell-cafe] Newbie Q: composeMaybe :: (a - Maybe b) - (b - Maybe c) - (a - Maybe c)

2006-11-09 Thread Dmitri O.Kondratiev
Hey DeeJay, Thanks for detailed answer, it really helps as it shows the way I need to follow! It also helped me to realize that my question why f1 f g x = mapMaybe f (g x) has this type: f1 :: (a - b) - (t - Maybe a) - t - Maybe b and not that (type which I expected): f1 :: (a - b) - (t - Maybe

Re: [Haskell-cafe] Sistema de Ecuaciones NO lineales

2006-11-09 Thread Pepe Iborra
hi Sebastian I think that it would be more appropriate to use english when you post to this particular list. On non linear equations or jacobi, I'm sorry but I cannot help you. But hopefully someone else in this list may be able to. Saludos. Cheers. pepe. On 09/11/2006, at 4:52, Sebastian

Re: [Haskell-cafe] Sistema de Ecuaciones NO lineales

2006-11-09 Thread Alexis
On Thu, 9 Nov 2006 02:52 pm, Sebastian Gaviria wrote: hola como estan Quiero preguntar quien puede resolver el sistemas de ecuaciones NO lineales de Newton y el codigo de Jacobi en Haskell me ayudarian mucho al poder implementar ese codigo por Favor es con urgencia tener estos

[Haskell-cafe] Re: don't: a 'do' for comonads?

2006-11-09 Thread apfelmus
Donald Bruce Stewart wrote: As seen on #haskell, from an idea by Malcolm, 14:42 ?let top'n'tail = (pre++) . (++/pre) 14:42 lambdabot Defined. 14:43 dons L.top'n'tail foo me now 14:43 lambdabot prefoo me now/pre 14:43 mauke that reminds me, haskell needs don't

[Haskell-cafe] Re: aggressiveness of functional dependencies

2006-11-09 Thread apfelmus
Nicolas Frisby wrote: The inferred type for rite_t1 is rite_t1 :: (Iso (Either Char a) (Either f' g')) = () - Either f' g' Why isn't the inferred type of rite_t1 the same as the ascribed type of rite_t1'? rite_t1' :: Iso b b' = () - Either MyChar b' rite_t1' () = rite t1 I

Re: [Haskell-cafe] don't: a 'do' for comonads?

2006-11-09 Thread Marc A. Ziegert
don't :: a don't = error D'oh! - marc Am Donnerstag, 9. November 2006 04:47 schrieb Donald Bruce Stewart: As seen on #haskell, from an idea by Malcolm, 14:42 ?let top'n'tail = (pre++) . (++/pre) 14:42 lambdabot Defined. 14:43 dons L.top'n'tail foo me now 14:43

[Haskell-cafe] Lazy data from pipe using MissingH module

2006-11-09 Thread Dougal Stanton
Newbie here working on a little program for fetching podcasts. I've been using the MissingH.Cmd module in concert with curl to download the RSS feeds like this: fetchFeed :: Subscription - IO (Either Error [Episode]) fetchFeed sub = do (pid, feed) - pipeFrom curl (curlOpts ++

[Haskell-cafe] string to date?

2006-11-09 Thread Magnus Therning
I've been staring my eyes out trying to find a function that converts a string into a ClockTime or CalendarTime. Basically something like C's strptime(3). I can't seem to find anything like it in System.Time, there are function that convert _to_ a string, but nothing that converts _from_ a

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Dougal Stanton
Quoth Magnus Therning, nevermore, I've been staring my eyes out trying to find a function that converts a string into a ClockTime or CalendarTime. Basically something like C's strptime(3). I can't seem to find anything like it in System.Time, there are function that convert _to_ a string,

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-09 Thread Henning Thielemann
On Wed, 8 Nov 2006, Nils Anders Danielsson wrote: On Wed, 08 Nov 2006, Henning Thielemann [EMAIL PROTECTED] wrote: If the Prelude would be splitted into modules, where (==) and (+) are separated, and no module imports the other one, then we need a third module, which states the relation

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Malcolm Wallace
Magnus Therning [EMAIL PROTECTED] wrote: I've been staring my eyes out trying to find a function that converts a string into a ClockTime or CalendarTime. Basically something like C's strptime(3). I can't seem to find anything like it in System.Time, there are function that convert _to_ a

[Haskell-cafe] Re: Re[2]: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
Nicolas Frisby wrote: I don't see how it's too complex. Isn't infixl ?? prec ?? $ (??) = whenOperator exactly what you want to say? Yes. I'd add that the system should (of course) take the transitive closure over all explicitly stated precedence relations. That really cuts down

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
Jón Fairbairn wrote: Syntax 1, based on Phil Wadler's improvement of my old proposal. The precedence relation is a preorder.[...] infix {ops_1; ops_2; ...; ops_n} The alternative syntax is exemplified thus: infix L + - (L * / (R ^)) [...] I think both ways (I like the second one

[Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-09 Thread Justin Bailey
As part of the Ruby Quiz in Haskell solutions appearing on the wiki recently, I just a solution to Ruby Quiz #100 - create a bytecode interpreter for a simple expression language. Like I said, the code below parses simple integer arithmetic expressions and generates byte codes for a hypothetical

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-09 Thread Brandon Moore
Justin Bailey wrote: As part of the Ruby Quiz in Haskell solutions appearing on the wiki recently, I just a solution to Ruby Quiz #100 - create a bytecode interpreter for a simple expression language. Like I said, the code below parses simple integer arithmetic expressions and generates byte

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Björn Bringert
Dougal Stanton wrote: Quoth Magnus Therning, nevermore, I've been staring my eyes out trying to find a function that converts a string into a ClockTime or CalendarTime. Basically something like C's strptime(3). I can't seem to find anything like it in System.Time, there are function that

[Haskell-cafe] non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-09 Thread Benjamin Franksen
Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought about it for a while, I now see this will cause /major/ problems. The precedence relations as declared explicitly by the programmer must form

Re: [Haskell-cafe] Translating Haskell to VHDL. What approach to follow?

2006-11-09 Thread Neil Mitchell
Hi That implies I need a way to infere or directly obtain the types of the functions used in the core representation. That as you said, can probably be done by means of the .hi files or the typerep extension you mentioned. I'll try to have a look at both options. Any good documentation

Re: [Haskell-cafe] non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-09 Thread Carl Witty
On Thu, 2006-11-09 at 22:20 +0100, Benjamin Franksen wrote: Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought about it for a while, I now see this will cause /major/ problems. The

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Magnus Therning
= 0, ctMin = 0, ctSec = 0, ctPicosec = 0, ctWDay = Thursday, ctYDay = 1, ctTZName = UTC, ctTZ = 0, ctIsDST = False}) parseCalendarTime System.Locale.defaultTimeLocale %Y%m%d 20061109 Nothing parseCalendarTime System.Locale.defaultTimeLocale %C%y%m%d 20061109 Just (CalendarTime {ctYear = 2006

Re: [Haskell-cafe] Sistema de Ecuaciones NO lineales

2006-11-09 Thread Donald Bruce Stewart
bonobo: On Thu, 9 Nov 2006 02:52 pm, Sebastian Gaviria wrote: hola como estan Quiero preguntar quien puede resolver el sistemas de ecuaciones NO lineales de Newton y el codigo de Jacobi en Haskell me ayudarian mucho al poder implementar ese codigo por Favor es con urgencia

[Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-09 Thread Benjamin Franksen
Carl Witty wrote: On Thu, 2006-11-09 at 22:20 +0100, Benjamin Franksen wrote: Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought about it for a while, I now see this will cause

Re: [Haskell-cafe] string to date?

2006-11-09 Thread Bjorn Bringert
2006 Just (CalendarTime {ctYear = 2006, ctMonth = January, ctDay = 1, ctHour = 0, ctMin = 0, ctSec = 0, ctPicosec = 0, ctWDay = Thursday, ctYDay = 1, ctTZName = UTC, ctTZ = 0, ctIsDST = False}) parseCalendarTime System.Locale.defaultTimeLocale %Y%m%d 20061109 Nothing parseCalendarTime

[Haskell-cafe] Great language shootout: reloaded

2006-11-09 Thread Donald Bruce Stewart
So back in January we had lots of fun tuning up Haskell code for the Great Language Shootout[1]. We did quite well at the time, at one point ranking overall first[2]. After doing all we could with ghc 6.4.2, the Haskell entries have been left for the last 10 months, while we worked on new

Re: [Haskell-cafe] Re: don't: a 'do' for comonads?

2006-11-09 Thread Donald Bruce Stewart
apfelmus: Donald Bruce Stewart wrote: As seen on #haskell, from an idea by Malcolm, 14:42 ?let top'n'tail = (pre++) . (++/pre) 14:42 lambdabot Defined. 14:43 dons L.top'n'tail foo me now 14:43 lambdabot prefoo me now/pre 14:43 mauke that reminds me,

Re: [Haskell-cafe] don't: a 'do' for comonads?

2006-11-09 Thread Donald Bruce Stewart
hjgtuyl: don't :: whatever - (whatever goes in, nothing comes out) So its: don't :: a - Void ? -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell Quiz Solution - Haskell Newbie Requesting Review

2006-11-09 Thread Brandon Moore
Justin Bailey wrote: As part of the Ruby Quiz in Haskell solutions appearing on the wiki recently, I just a solution to Ruby Quiz #100 - create a bytecode interpreter for a simple expression language. Like I said, the code below parses simple integer arithmetic expressions and generates byte