A case in point.
John Atwood: > You have it right, except you need to > 1) explicitly type test, > test:: Reader [Char] Char José Romildo Malaquias: > > --- > > test = do env <- ask > > if env == "choose a" > > then return 'a' > > else return 'b' > > > > do_test = runReader test "choose a" The very sort of thing I had in mind when I suggested some explicit typings would be more concisely expressed by a type-ap. Slán, Alex.
Re: haskell IDE
> I heard that Visual Haskell is under development. > Do you know when it is released? It will provide Haskell programmer an > environment that is similar to Visual J++, Visual Basic, or...? VisualHaskell is indeed under development. However, due to licensing issues the release date is "somewhere next year". VisualHaskell will provide you with integrated interpreter, editor, project and compiler support; but it will be closer to VisualC++ than for example VisualBasic (ie. not very visual :-) (erik meijer For now, you might want to look at Koen Cleassens integration with the "nedit" editor. This software can be found on haskell.org under libraries and tools. All the best, Daan. > Besides, if you know, would you please tell me where we can > download Uniform Workbench? > (I found the paper about Uniform Workbench only) > > Thank you very much ! > Phan Dung. > > >
Re: type of deleteBy
Mon Dec 06 1999, Keith Wansbrough -> > Sergey: > > I propose for Haskell-2 to add to the library > > > > delBy :: (a -> Bool) -> [a] -> [a] > > delBy _ [] = [] > > delBy p (a:as) = if p a then as else a:(delBy p as) > > So what do you propose as the definition for > > del :: (Eq a) => [a] -> [a] > > ? > > Section 7.6 of the Library Report: > > "By convention, overloaded functions have a non-overloaded counterpart > whose name is suffixed with ``By''." I have two suggestions: del1 = const [] del2 = id but since these are so easy to write anyway, they don't belong in the prelude. Martin -- [ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN: 4439498 ] Opinions expressed above are mine, and not those of my future employees. Skingra er! Det finns ingenting att förstå! PGP signature
Re: deleteBy type
No. A filter runs through the whole list, and delete(By) stops after first occurence. But there is another point. Some people say that such functions as delete(By) are not only for the list constructor. Therefore any suggestion has to take it in account other constructor case too. I hardly can sensibly respond to this now. (if i understand the idea). So, i give up. --- Sergey Mechveliani [EMAIL PROTECTED]
RE: Graph reduction and lambda lifting
For a detailed description, try the book that David Lester and I wrote: Implementing Functional Languages: a tutorial The full text is at http://research.microsoft.com/~simonpj/Papers/papers.html | -Original Message- | From: Matthias Kilian [mailto:[EMAIL PROTECTED]] | Sent: 07 December 1999 12:41 | To: haskell | Subject: Graph reduction and lambda lifting | | | Hi! | | Where can I find papers on the topics "graph reduction", "lambda | lifting", "g-machine", "TIM", etc. in the web? The only paper | I could find | at home was the paper on STG and something about Turner's combinator | reduction. | | Kili | | -- | de: Signaturen erzeugen Krebs. en: Signatures cause cancer. | es: Signaturas provocan cáncer. latin: Cancerem | signatura faciunt. | se: Signaturer förorsaka cancer.fr: Les signatures | provoquent le cancer. | ro: Signaturile produc cancer.ru: Podpis'ki | razvivaút rak. | | |
Re: Graph reduction and lambda lifting
Matthias Kilian writes: > Where can I find papers on the topics "graph reduction", "lambda > lifting", "g-machine", "TIM", etc. in the web? My old papers on the G-machine and lambda lifting is available at www.cs.chalmers.se/~johnsson . --Thomas
Graph reduction and lambda lifting
Hi! Where can I find papers on the topics "graph reduction", "lambda lifting", "g-machine", "TIM", etc. in the web? The only paper I could find at home was the paper on STG and something about Turner's combinator reduction. Kili -- de: Signaturen erzeugen Krebs. en: Signatures cause cancer. es: Signaturas provocan cáncer. latin: Cancerem signatura faciunt. se: Signaturer förorsaka cancer.fr: Les signatures provoquent le cancer. ro: Signaturile produc cancer. ru: Podpis'ki razvivaút rak.
Re: deleteBy
Can we stop polluting the namespace with list based function definitions? Most of these functions: delBy, filter, map, concat, length, take, takeWhile, etc. are well specified for data structures other than lists. Regardless of whether Haskell includes generic programming extensions, it would be nice to be able to use these function names for the same operation in other datastructures (even if they are implemented manually). -Alex- On Tue, 7 Dec 1999, S.D.Mechveliani wrote: > To my proposal to add to Haskell-2 library > delBy :: (a -> Bool) -> [a] -> [a] > > Keith Wansbrough <[EMAIL PROTECTED]> > writes on 06 Dec 1999 > > > So what do you propose as the definition for > > > > del :: (Eq a) => [a] -> [a] > > > > ? > > > > Section 7.6 of the Library Report: > > > > "By convention, overloaded functions have a non-overloaded > > counterpart whose name is suffixed with ``By''." > > > Does this really imply that having delBy, the library has > necessarily to include `del' ? > Anyway, let us try to improve the proposal: > --- > (1) To change in the `List' library the deleteBy definition to > > deleteBy :: (a -> Bool) -> [a] -> [a] > deleteBy _ [] = [] > deleteBy p (a:as) = if p a then as else a:(deleteBy p as) > > deleteBy of Haskell-98 to rename to > delByR2e (delete by binary relation (a->a->Bool) and element a). > > - or better to remove it at all. For its type looks esoteric. > I wonder, who ever uses it. > > (2) To change in the Section 7.6 of the Library Report > " > By convention, overloaded functions have a non-overloaded > counterpart whose name is suffixed with ``By''. > " > to > " > By convention, an overloaded function may have several > non-overloaded counterparts whose names are suffixed with > `By'[ss]. > Examples: By means "by something simplest", > ByPby predicate, > ByR2 by binary relation, > ... > " > - > > > -- > Sergey Mechveliani > [EMAIL PROTECTED] > > > ___ S. Alexander Jacobson Shop.Com 1-212-697-0184 voiceThe Easiest Way To Shop
deleteBy
To my proposal to add to Haskell-2 library delBy :: (a -> Bool) -> [a] -> [a] Keith Wansbrough <[EMAIL PROTECTED]> writes on 06 Dec 1999 > So what do you propose as the definition for > > del :: (Eq a) => [a] -> [a] > > ? > > Section 7.6 of the Library Report: > > "By convention, overloaded functions have a non-overloaded > counterpart whose name is suffixed with ``By''." Does this really imply that having delBy, the library has necessarily to include `del' ? Anyway, let us try to improve the proposal: --- (1) To change in the `List' library the deleteBy definition to deleteBy :: (a -> Bool) -> [a] -> [a] deleteBy _ [] = [] deleteBy p (a:as) = if p a then as else a:(deleteBy p as) deleteBy of Haskell-98 to rename to delByR2e (delete by binary relation (a->a->Bool) and element a). - or better to remove it at all. For its type looks esoteric. I wonder, who ever uses it. (2) To change in the Section 7.6 of the Library Report " By convention, overloaded functions have a non-overloaded counterpart whose name is suffixed with ``By''. " to " By convention, an overloaded function may have several non-overloaded counterparts whose names are suffixed with `By'[ss]. Examples: By means "by something simplest", ByPby predicate, ByR2 by binary relation, ... " - -- Sergey Mechveliani [EMAIL PROTECTED]