type fine until you try to use it
In a project I'm working on, one data type I've defined is this: data FilterIS = FilterIS { source :: (InputStream s) => s, filter :: Filter } which, to me, just means it holds any instance of the InputStream class and a Filter value. Sure, says ghci, fine by me. However, if I try to do anything with that datatype, even something as simple as newFilterIS = FilterIS I get the following error, or something very like it: Stream.hs:96: Inferred type is less polymorphic than expected Quantified type variable `s' escapes Expected type: s -> t Inferred type: (forall s1. (InputStream s1) => s1) -> (forall fs. (InputStream fs) => fs -> IO Word8) -> FilterIS In the definition of `newFilterIS': FilterIS I've gotten used to having to spend a while figuring out what error messages mean, but it bugs me that there seems to be some problem with the type that's "brought out" by just making a synonym for the constructor. I know there's nothing wrong with the line where I define a synonym; there's practically nothing there to *be* wrong, so the problem has to be in the type... and yet the compiler didn't catch it until I added that synonym line. What's up? Abe ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
First APPSEM-II Workshop
+-+ FIRST ANNOUNCEMENT AND CALL FOR PARTICIPATION First APPSEM-II Workshop 26th - 28th March 2003 Nottingham, United Kingdom The first annual workshop of the IST working group APPSEM-II (Applied Semantics II) will be held at the University of Nottingham from 26-28 March 2003. All members of the working group are invited to attend, but participation of non-members from both academia and industry with interests in application-oriented programming language semantics is actively encouraged. The purpose of the workshop is to present new results and plan future work in each of the nine themes of the group: A - Program structuring: OO programming, modules (Didier Remy); B - Proof assistants, functional programming, and dependent types (Thierry Coquand); C - Program analysis, generation, and configuration (Neil Jones); D - Specification and verification methods (Uday Reddy); E - Types and type inference in programming (Fritz Henglein); F - Games, sequentiality, and abstract machines (Pierre-Louis Curien); G - Semantic methods for distributed computing (Glynn Winskel); H - Resource models and web data (Peter O'Hearn, Philippa Gardner); I - Continuous phenomena in Computer Science (Achim Jung). For each theme there will be a session of presentations, organised by the theme leader (in parentheses above). There will also be a number of invited presentations, an industrial panel session, a brainstorming session, and a business meeting. Following on from the workshop an informal proceedings will be published on the web. Further details regarding registration, accommodation, travel, etc will be available shortly. In the meantime, if you would like to attend the workshop, please email [EMAIL PROTECTED] by FRIDAY 31ST JANUARY. If you would like to give a talk, please also include a title, short abstract (and paper if available), and a list of the themes to which it is relevant in order from most to least. Note that the fun of programming symposium in honour of Richard Bird's 60th birthday will be held in Oxford during the two days before the workshop, so participants may like to attend both events. Useful links: APPSEM-II working group: http://www.tcs.informatik.uni-muenchen.de/~mhofmann/appsem2/ First APPSEM-II workshop: http://www.cs.nott.ac.uk/~gmh/appsem03.html Fun of programming symposium: http://web.comlab.ox.ac.uk/oucl/research/areas/ap/fop/ Graham Hutton Workshop Organiser +-+ | Dr Graham Hutton Email : [EMAIL PROTECTED] | | School of Computer Science and ITWeb : www.cs.nott.ac.uk/~gmh | | University of Nottingham| | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB Phone : +44 (0)115 951 4220| | United Kingdom Fax : +44 (0)115 951 4254| +-+ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: Evaluation Question
> For each call, I believe. An exception might be if the call to nco is > inlined into the calling function, but this is unlikely as nco is > recursive. > > So, you're probably better off with: > > > nco wn = nco' > > where wn' = cis wn > > nco' = 1 : map (wn'*) nco' > > In which case it will only be evaluated once. The original version should also evaluate the expression 'cis wn' only once: > nco:: RealFloat a => a -> [ Complex a ] > nco wn = 1 : map ((*) (cis wn)) (nco wn) You can verify this using an appropriate semantics for lazy evaluation. However, another way to think about it is to consider the expression (*) (cis wn) as (let x = cis wn in (*) x) which when first evaluated will create a suspension for x in the heap, and return \y -> (*) y x as its value. So x only gets allocated/evaluated once. Cheers, Simon ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
WRS 2003 - First Call for Papers
** *** first call for papers and participation *** ** Third International Workshop on Reduction Strategies in Rewriting and Programming (WRS 2003) http://www.dsic.upv.es/~rdp03/wrs part of the Federated Conference on Rewriting, Deduction and Programming (RDP 2003) Valencia, Spain, June 8, 2003 -- BACKGROUND AND AIMS Reduction strategies in rewriting and programming have attracted an increasing attention within the last years. New types of reduction strategies have been invented and investigated, and new results on rewriting / computation under particular strategies have been obtained. Research in this field ranges from primarily theoretical questions about reduction strategies to very practical application and implementation issues. The need for a deeper understanding of reduction strategies in rewriting and programming, both in theory and practice, is obvious, since they bridge the gap between unrestricted general rewriting (computation) and (more deterministic) rewriting with particular strategies (programming). Moreover, reduction strategies provide a natural way to go from operational principles (e.g., graph and term rewriting, narrowing, lambda-calculus) and semantics (e.g., normalization, computation of values, infinitary normalization, head-normalization) to implementations of programming languages. Therefore any progress in this area is likely to be of interest not only to the rewriting community, but also to neighbouring fields like functional programming, functional-logic programming, and termination proofs of algorithms. The workshop wants to provide a forum for the presentation and discussion of new ideas and results, recent developments, new research directions, as well as of surveys on existing knowledge in this area. Furthermore we aim at fostering interaction and exchange between researchers and students actively working on such topics. The workshop is part of the Federated Conference on Rewriting, Deduction and Programming (RDP 2003) to be held in Valencia (Spain) on June 8, 2003. The workshop is (co-)organized by TU Valencia and TU Wien. TOPICS OF INTEREST Topics of interest include, but are not restricted to: - theoretical foundations for the definition and semantic description of reduction strategies - strategies in different frameworks (term rewriting, graph rewriting, infinitary rewriting, lambda calculi, higher order rewriting and explicit substitutions, conditional rewriting, rewriting with built-ins, narrowing, constraint solving, etc.) and their application in (equational, functional, functional-logic) programming (languages) - properties of reduction strategies / computations under strategies (e.g., completeness, computability, decidability, complexity, optimality, (hyper-)normalization, cofinality, fairness, perpetuality, context-freeness, neededness, laziness, eagerness, strictness) - interrelations, combinations and applications of reduction under different strategies (e.g., equivalence conditions for fundamental properties like termination and confluence, applications in modularity analysis, connections between strategies of different frameworks, etc.) - program analysis and other semantics-based optimization techniques dealing with reduction strategies - rewrite systems / tools / implementations with flexible / programmable strategies as essential concept / ingredient - specification of reduction strategies in (real) languages - data structures and implementation techniques for reduction strategies. SUBMISSIONS We solicit papers on all aspects of reduction strategies in rewriting and programming. Submissions should describe unpublished work, except for survey papers which are explicitly welcome, too. Submissions should not exceed 10 pages (however, survey papers may be longer) and be sent in postscript format to the PC co-chairs at [EMAIL PROTECTED] before March 23, 2003. Submissions should include the title, authors' names, affiliations, addresses, and e-mail. Selection of papers by the PC will be based on originality, significance, and correctness. Final versions will be due by May 11, 2003. PUBLICATION Accepted papers will be included in the preliminary workshop proceedings that will be available at the workshop. The final workshop proceedings will be published in the Electronic Notes in Theoretical Computer Science (ENTCS) series of Elsevier. PROGRAM COMMITTEE Sergio Antoy Portland (USA) Zena M. Ariola Oregon (USA) Roberto Di Cosmo Paris VII (France) Juergen GieslAachen (Germany) Bernhard Gramlich (co-chair) Wien (Austria) Salvador Lucas (co-cha
First APPSEM-II Workshop
+-+ FIRST ANNOUNCEMENT AND CALL FOR PARTICIPATION First APPSEM-II Workshop 26th - 28th March 2003 Nottingham, United Kingdom The first annual workshop of the IST working group APPSEM-II (Applied Semantics II) will be held at the University of Nottingham from 26-28 March 2003. All members of the working group are invited to attend, but participation of non-members from both academia and industry with interests in application-oriented programming language semantics is actively encouraged. The purpose of the workshop is to present new results and plan future work in each of the nine themes of the group: A - Program structuring: OO programming, modules (Didier Remy); B - Proof assistants, functional programming, and dependent types (Thierry Coquand); C - Program analysis, generation, and configuration (Neil Jones); D - Specification and verification methods (Uday Reddy); E - Types and type inference in programming (Fritz Henglein); F - Games, sequentiality, and abstract machines (Pierre-Louis Curien); G - Semantic methods for distributed computing (Glynn Winskel); H - Resource models and web data (Peter O'Hearn, Philippa Gardner); I - Continuous phenomena in Computer Science (Achim Jung). For each theme there will be a session of presentations, organised by the theme leader (in parentheses above). There will also be a number of invited presentations, an industrial panel session, a brainstorming session, and a business meeting. Following on from the workshop an informal proceedings will be published on the web. Further details regarding registration, accommodation, travel, etc will be available shortly. In the meantime, if you would like to attend the workshop, please email [EMAIL PROTECTED] by FRIDAY 31ST JANUARY. If you would like to give a talk, please also include a title, short abstract (and paper if available), and a list of the themes to which it is relevant in order from most to least. Note that the fun of programming symposium in honour of Richard Bird's 60th birthday will be held in Oxford during the two days before the workshop, so participants may like to attend both events. Useful links: APPSEM-II working group: http://www.tcs.informatik.uni-muenchen.de/~mhofmann/appsem2/ First APPSEM-II workshop: http://www.cs.nott.ac.uk/~gmh/appsem03.html Fun of programming symposium: http://web.comlab.ox.ac.uk/oucl/research/areas/ap/fop/ Graham Hutton Workshop Organiser +-+ | Dr Graham Hutton Email : [EMAIL PROTECTED] | | School of Computer Science and ITWeb : www.cs.nott.ac.uk/~gmh | | University of Nottingham| | Jubilee Campus, Wollaton Road | | Nottingham NG8 1BB Phone : +44 (0)115 951 4220| | United Kingdom Fax : +44 (0)115 951 4254| +-+ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
WRS 2003 - First Call for Papers
** *** first call for papers and participation *** ** Third International Workshop on Reduction Strategies in Rewriting and Programming (WRS 2003) http://www.dsic.upv.es/~rdp03/wrs part of the Federated Conference on Rewriting, Deduction and Programming (RDP 2003) Valencia, Spain, June 8, 2003 -- BACKGROUND AND AIMS Reduction strategies in rewriting and programming have attracted an increasing attention within the last years. New types of reduction strategies have been invented and investigated, and new results on rewriting / computation under particular strategies have been obtained. Research in this field ranges from primarily theoretical questions about reduction strategies to very practical application and implementation issues. The need for a deeper understanding of reduction strategies in rewriting and programming, both in theory and practice, is obvious, since they bridge the gap between unrestricted general rewriting (computation) and (more deterministic) rewriting with particular strategies (programming). Moreover, reduction strategies provide a natural way to go from operational principles (e.g., graph and term rewriting, narrowing, lambda-calculus) and semantics (e.g., normalization, computation of values, infinitary normalization, head-normalization) to implementations of programming languages. Therefore any progress in this area is likely to be of interest not only to the rewriting community, but also to neighbouring fields like functional programming, functional-logic programming, and termination proofs of algorithms. The workshop wants to provide a forum for the presentation and discussion of new ideas and results, recent developments, new research directions, as well as of surveys on existing knowledge in this area. Furthermore we aim at fostering interaction and exchange between researchers and students actively working on such topics. The workshop is part of the Federated Conference on Rewriting, Deduction and Programming (RDP 2003) to be held in Valencia (Spain) on June 8, 2003. The workshop is (co-)organized by TU Valencia and TU Wien. TOPICS OF INTEREST Topics of interest include, but are not restricted to: - theoretical foundations for the definition and semantic description of reduction strategies - strategies in different frameworks (term rewriting, graph rewriting, infinitary rewriting, lambda calculi, higher order rewriting and explicit substitutions, conditional rewriting, rewriting with built-ins, narrowing, constraint solving, etc.) and their application in (equational, functional, functional-logic) programming (languages) - properties of reduction strategies / computations under strategies (e.g., completeness, computability, decidability, complexity, optimality, (hyper-)normalization, cofinality, fairness, perpetuality, context-freeness, neededness, laziness, eagerness, strictness) - interrelations, combinations and applications of reduction under different strategies (e.g., equivalence conditions for fundamental properties like termination and confluence, applications in modularity analysis, connections between strategies of different frameworks, etc.) - program analysis and other semantics-based optimization techniques dealing with reduction strategies - rewrite systems / tools / implementations with flexible / programmable strategies as essential concept / ingredient - specification of reduction strategies in (real) languages - data structures and implementation techniques for reduction strategies. SUBMISSIONS We solicit papers on all aspects of reduction strategies in rewriting and programming. Submissions should describe unpublished work, except for survey papers which are explicitly welcome, too. Submissions should not exceed 10 pages (however, survey papers may be longer) and be sent in postscript format to the PC co-chairs at [EMAIL PROTECTED] before March 23, 2003. Submissions should include the title, authors' names, affiliations, addresses, and e-mail. Selection of papers by the PC will be based on originality, significance, and correctness. Final versions will be due by May 11, 2003. PUBLICATION Accepted papers will be included in the preliminary workshop proceedings that will be available at the workshop. The final workshop proceedings will be published in the Electronic Notes in Theoretical Computer Science (ENTCS) series of Elsevier. PROGRAM COMMITTEE Sergio Antoy Portland (USA) Zena M. Ariola Oregon (USA) Roberto Di Cosmo Paris VII (France) Juergen GieslAachen (Germany) Bernhard Gramlich (co-chair) Wien (Austria) Salvador Lucas (co-cha