From conal at conal.net Sat Jun 2 01:23:48 2007 From: conal at conal.net (Conal Elliott) Date: Sat Jun 2 01:19:27 2007 Subject: [Haskell] Paper draft: "Applicative Data-Driven Computation" Message-ID: I would love to get comments on a short (4.5 page) paper draft called "Applicative Data-Driven Computation", which describes a very simple approach to data-driven (push-based) computation and its application to GUI programming. Please see http://www.haskell.org/haskellwiki/Applicative_Data-Driven_Programming. There's a "Talk Page" link for comments, or if you prefer you could email me instead. I'm also very interested in suggestions and (better yet) collaboration on other applications of data-driven computation beyond GUIs, say push-based internet apps. Thanks, - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070601/09184409/attachment-0001.htm From wiiat at kis-lab.com Sat Jun 2 11:42:45 2007 From: wiiat at kis-lab.com (Jia Hu) Date: Sat Jun 2 11:38:26 2007 Subject: [Haskell] [IAT 2007] Deadline Extended: June 16, 2007! Message-ID: <20070602153824.8FF3832446E@www.haskell.org> [Apologies if you receive this more than once] Dear Colleague, In response to many requests for an extension, we are pleased to extend the paper submission deadline for IAT 2007 to ** June 16, 2007 **. Submission can be done online at: http://www.cs.sjsu.edu/wi07/iat/ We look forward to receiving your submissions soon. With best regards, Tsau Young (T.Y.) Lin PC chair of WI-IAT'07 ##################################################################### IEEE/WIC/ACM Intelligent Agent Technology 2007 CALL FOR PAPERS ##################################################################### 2007 IEEE/WIC/ACM International Conference on Intelligent Agent Technology (IAT'07) Silicon Valley, USA, November 2-5, 2007 Official: http://www.cs.sjsu.edu/wi07/iat/ Mirror: http://www.maebashi-it.org/wi07/iat/ (to be collocated with WI'07, BIBM'07 and GrC'07) Sponsored By IEEE Computer Society Web Intelligence Consortium (WIC) Association for Computing Machinery (ACM) ##################################################################### # Conference Chair # Andrei Broder, VP, Yahoo Fellow, Yahoo! Research # # Program Chair and Co-Chairs # T.Y. Lin, San Jose State University/UC Berkeley, USA # Jeffrey M. Bradshaw, UWF/Institute for Human and Machine Cognition, USA # Matthias Klusch, German Research Center for AI, Germany # Chengqi Zhang, University of Technology, Sydney, Australia # # Organizing Chair # Howard Ho, Manager, IBM Almaden Research Center # # IAT-WI Joint Keynote Speakers (Tentative) # # Vinton G. Cerf, Turing Award Winner, # VP and Chief Internet Evangelist, Google # Richard M. Karp, Turing Award Winner, # University of California Berkeley # Anant Jhingran, VP and CTO, IBM Silicon Valley Laboratory # # (More IAT Invited Speakers will be announced) # # (Papers Due: ** June 1 **, 2007) # Accepted papers will be published in the conference proceedings # by the IEEE Computer Society Press, which are indexed by EI. ###################################################################### The 2007 IEEE/WIC/ACM International Conference on Intelligent Agent Technology (IAT'07) will be jointly held with the 2007 IEEE/WIC/ACM International Conference on Web Intelligence (WI'07), the 2007 IEEE International Conference on Bioinformatics and Biomedicine (BIBM'07), and the 2007 IEEE International Conference on Granular Computing (GrC'07) for providing synergism among the four research areas. It will provide opportunities for technical collaboration beyond that of previous conferences. The four conferences will have a joint opening, keynote, reception, and banquet. Attendees only need to register for one conference and can attend workshops, sessions and tutorials across the four conferences. We are also planning a joint panel and joint paper sessions that discuss common problems in the four areas. IAT 2007 provides a leading international forum to bring together researchers and practitioners from diverse fields, such as computer science, information technology, business, education, human factors, systems engineering, and robotics, to (1) examine the design principles and performance characteristics of various approaches in intelligent agent technology, and (2) increase the cross-fertilization of ideas on the development of autonomous agents and multi-agent systems among different domains. By encouraging idea-sharing and discussions on the underlying logical, cognitive, physical, and sociological foundations as well as the enabling technologies of intelligent agents, IAT 2007 will foster the development of novel paradigms and advanced solutions in agent-based computing. +++++++++++ Highlights +++++++++++ The conference will be held in Silicon Valley, California. Many high-tech companies and three distinguished universities (Stanford, UC Berkely and UCSC) are just around the corner. The highlight of the conference is that a unique forum consisting of a half-day demo session and free discussion will be organized to link industries and academics. Leading IT companies like IBM, Google, and Yahoo etc will present at the conference. The area now known as Silicon Valley has been a center of technological development since the 1950's. The name Silicon Valley stems from the early 1970's, when the area had become the center for many semiconductor companies. While still hosting semiconductor and microprocessor companies, the region now hosts the headquarters of high tech companies of every kind, including many of the best known and most prestigious names in personal computers, Web search, Internet auctions, networking, storage, databases, etc. +++++++++++++++++++ Topics of Interest +++++++++++++++++++ The topics and areas include, but not limited to: * Autonomy-Oriented Computing (AOC) - Agent-Based Complex Systems Modeling and Development - Agent-Based Simulation - Autonomy-Oriented Modeling and Computation Methods - Behavioral Self-Organization - Complex Behavior Characterization and Engineering - Emergent Behavior - Hard Computational Problem Solving - Nature-Inspired Paradigms - Self-Organized Criticality - Self-Organized Intelligence - Swarm Intelligence * Autonomous Knowledge and Information Agents - Agent-Based Distributed Data Mining - Agent-Based Knowledge Discovery And Sharing - Autonomous Information Services - Distributed Knowledge Systems - Emergent Natural Law Discovery in Multi-Agent Systems - Evolution of Knowledge Networks - Human-Agent Interaction - Information Filtering Agents - Knowledge Aggregation - Knowledge Discovery - Ontology-Based Information Services * Agent Systems Modeling and Methodology - Agent Interaction Protocols - Cognitive Architectures - Cognitive Modeling of Agents - Emotional Modeling - Fault-Tolerance in Multi-Agent Systems - Formal Framework for Multi-Agent Systems - Information Exchanges in Multi-Agent Systems - Learning and Self-Adaptation in Multi-Agent Systems - Mobile Agent Languages and Protocols - Multi-Agent Autonomic Architectures - Multi-Agent Coordination Techniques - Multi-Agent Planning and Re-Planning - Peer-to-Peer Models for Multi-Agent Systems - Reinforcement Learning - Social Interactions in Multi-Agent Systems - Task-Based Agent Context - Task-Oriented Agents * Distributed Problem Solving - Agent-Based Grid Computing - Agent Networks in Distributed Problem Solving - Collective Group Behavior - Coordination and Cooperation - Distributed Intelligence - Distributed Search - Dynamics of Agent Groups and Populations - Efficiency and Complexity Issues - Market-Based Computing - Problem-Solving in Dynamic Environments * Autonomous Auctions and Negotiation - Agent-Based Marketplaces - Auction Markets - Combinatorial Auctions - Hybrid Negotiation - Integrative Negotiation - Mediating Agents - Pricing Agents - Thin Double Auctions * Applications - Agent-Based Assistants - Agent-Based Virtual Enterprise - Embodied Agents and Agent-Based Systems Applications - Interface Agents - Knowledge and Data Intensive Systems - Perceptive Animated Interfaces - Scalability - Social Simulation - Socially Situated Planning - Software and Pervasive Agents - Tools and Standards - Ubiquitous Systems and E-Technology Agents - Ubiquitous Software Services - Virtual Humans - XML-Based Agent Systems ++++++++++++++++++++++++++++++++++++ On-Line Submissions and Publication ++++++++++++++++++++++++++++++++++++ High-quality papers in all IAT related areas are solicited. Paper submissions should be limited to a maximum of 7 pages in the IEEE 2-column format, the same as the camera-ready format (see the Author Guidelines of last year at http://www.computer.org/portal/pages/cscps/cps/final/iat06.xml). All submitted papers will be reviewed by the Program Committee on the basis of technical quality, relevance, significance, and clarity. Note that IAT'07 will accept ONLY on-line submissions, containing PDF versions. Please use the Submission Form on the IAT'07 website to submit your paper. Accepted papers will be published in the conference proceedings by the IEEE Computer Society Press that are indexed by EI. Submissions accepted as regular papers will be allocated 7 pages in the proceedings and accorded oral presentation times in the main conference. Submissions accepted as short papers will be allocated 4 pages in the proceedings and will have a shorter presentation time at the conference than regular papers. All co-authors will be notified at all time, for the submission, notification, and confirmation on the attendance. Submitting a paper to the conference and workshops means that, if the paper is accepted, at least one author should attend the conference to present the paper. The acceptance list and no-show list will be openly published on-line. For no-show authors, their affiliations will receive a notification. A selected number of IAT'07 accepted papers will be expanded and revised for inclusion in Web Intelligence and Agent Systems: An International Journal (http://wi-consortium.org/journal.html) and in Annual Review of Intelligent Informatics (http://www.wi-consortium.org/annual.html) More detailed instructions and the On-Line Submission Form can be found from the IAT'07 homepage: http://www.cs.sjsu.edu/wi07/iat/. +++++++++++++++++++++++++ IAT'07 Best Paper Awards +++++++++++++++++++++++++ The best paper awards will be conferred at the conference on the authors of (1) the best research paper and (2) the best application paper. Application-oriented submissions will be considered for the best application paper award. The full author list and paper title will be announced on the Web Intelligence Consortium homepage: http://wi-consortium.org/html/wicawards.html ++++++++++++++++++++ Industry/Demo-Track ++++++++++++++++++++ We solicit Industry/Demo-Track papers by the following methods. (1) Industry papers of 4 pages can be submitted on the same schedule as the research track. (2) Separate 2 page demo proposals can submitted at a later schedule. (3) Full regular paper submissions can include a demo option. That is, a full paper submissions will be asked to specify if they would like to give a demonstration; choice of demonstrations (while utilizing information from the regular reviewing process) will be selected based on value as a demonstration. For options (1) and (2), please find more detailed instructions at the homepage: http://www.cs.sjsu.edu/wi07/wi/ We are planning to arrange the Industry/Demo track in the afternoon of November 3 (before and during the conference reception), jointly with the IAT'07 Demo sessions. Leading IT companies in Silicon Valley will be invited to attend this track. ++++++++++ Workshops ++++++++++ As an important part of the conference, the workshop program will focus on new research challenges and initiatives. All papers accepted for workshops will be included in the Workshop Proceedings published by the IEEE Computer Society Press that are indexed by EI, and will be available at the workshops. Detailed information is available at the conference homepage. Note: we will not have a separate workshop registration fee (i.e., only one conference registration covers everything). ---------------------- WI-IAT 2007 Workshops: ---------------------- Title: Educating the Web-Generation (Edu4WebGen 2007) Organisers: Elisabeth Heinemann Email: elisabeth.heinemann@googlemail.com Web page: http://www.effactory.com/Edu4WebGen/ Title: Collective Intelligence on Semantic Web (CISW 2007) Organisers: Geun Sik Jo; Jason J. Jung; Ngoc Thanh Nguyen Email: gsjo@inha.ac.kr; j2jung@intelligent.pe.kr; thanh@pwr.wroc.pl Web page: http://intelligent.pe.kr/CISW07/ Title: New Computing Paradigms for Web Intelligence and Brain Informatics (WImBI 2007) Organisers: Dr. Yuefeng Li; Dr. Yulin Qin, Prof. Dieter Fensel Email: y2.li@qut.edu.au; dieter.fensel@deri.org Web page: http://www.maebashi-it.org/wimbi07/WImBI2007.htm Title: Web Personalization and Recommender Systems (WPRS 2007) Organisers: Yue Xu Email: yue.xu@qut.edu.au Web page: http://www.wprs07.fit.qut.edu.au/ Title: Service Composition & SWS Challenge (SerComp & SWS Challenge 2007) Organisers: M. Brian Blake; Dumitru Roman; Charles Petrie Email: blakeb@cs.georgetown.edu; dumitru.roman@deri.org Web page: http://events.deri.at/sercomp2007/ Title: Biomedicine Applications of Web technologies (BMWT 2007) Organisers: Chun-Nan Hsu; Vincent Shin-Mu Tseng; Wen-Hsiang Lu Email: chunnan@iis.sinica.edu.tw; tsengsm@mail.ncku.edu.tw; whlu@mail.ncku.edu.tw Web page: http://chunnan.iis.sinica.edu.tw/BMWT2007.html Title: Intelligent Web Interaction (IWI 2007) 1st Organiser: Prof. Seiji YAMADA Email: seiji@nii.ac.jp Web site: http://ymd.ex.nii.ac.jp/ws/iwi/07/ Title: Cyberinfrastucture for e-Science (CyIneS 2007) Organisers: Prof. Vasant Honavar; A/prof. Kei Cheung Email: honavar@cs.iastate.edu; kei.cheung@yale.edu Web page: http://www.cild.iastate.edu/events/CyIneS2007/ Title: Social Media Analysis (SMA 2007) Organisers: Chun-hung Li, William K. Cheung, Quoping Qiu Email: sma@comp.hkbu.edu.hk Web page: http://www.comp.hkbu.edu.hk/~sma/ Title: Web Security, Integrity, Privacy and Trust (WSIPT 2007) Organisers: Dr. Yiuming Cheung, Prof. Michael Chau, and Prof. Yong Zhang Email: ymc@Comp.HKBU.Edu.HK; mchau@business.hku.hk; zhangyong076@gmail.com Web page: http://isec.hitsz.edu.cn/wsipt07/ Title: Communication between Human and Artificial Agents (CHAA 2007) Organisers: Christel Kemke Email: ckemke@cs.umanitoba.ca Web page: http://www.cs.umanitoba.ca/~ckemke/CHAA-07/ Title: Rational, Robust, and Secure Negotiations in Multi-Agent Systems (RRS 2007) Organisers: Takayuki Ito Email: ito.takayuki@nitech.ac.jp Web page: http://www-itolab.mta.nitech.ac.jp/RRS2007/ Title: P2P Computing and Autonomous Agents (P2PAA 2007) Organisers: Tarek Helmy, Khaled Ragab Email: helmy@ccse.kfupm.edu.sa; helmy@kfupm.edu.sa Web Page: http://www.ccse.kfupm.edu.sa/~helmy/P2PAA2007_WI.html Title: (Multi-)Agent Systems in E-Business: Concepts, Technologies and Applications (MASeB 2007) Organisers: Costin Badica; Maria Ganzha; Marcin Paprzycki Email: badica_costin@software.ucv.ro; ganzha@euh-e.edu.pl; marcin.parzycki@swps.edu.pl Web page: http://software.ucv.ro/~badica_costin/maseb2007/ Title: Agent & Data Mining Interaction (ADMI 2007) Organisers: Pericles A. Mitkas, Longbing Cao, Vladimir Gorodetsky, Justin Zhan Email: mitkas@eng.auth.gr; lbcao@it.uts.edu.au Web page: http://issel.ee.auth.gr/ADMI For more information, please visit the conference website at http://www.maebashi-it.org/wi07/iat/?index=workshop. ++++++++++ Tutorials ++++++++++ IAT'07 also welcomes Tutorial proposals. IAT'07 will include tutorials providing in-depth background on subjects that are of broad interest to the intelligent agent community. Both short (2 hours) and long (half day) tutorials will be considered. The tutorials will be part of the main conference technical program. Detailed information is available at the conference homepage. Note: we will not have a separate tutorials registration fee (i.e., only one conference registration covers everything). ++++++++++++++++ Important Dates ++++++++++++++++ Workshop proposal submission: March 20, 2007 Electronic submission of full papers: ** June 1, 2007 ** Tutorial proposal submission: June 15, 2007 Notification of paper acceptance: July 22, 2007 Camera-ready copies of accepted papers: August 17, 2007 Conference: November 2-5, 2007 ++++++++++++++++++++++++ Conference Organization ++++++++++++++++++++++++ Conference Chair: * Andrei Broder, Yahoo! Research, USA Program Chair: * Tsau Young (T.Y.) Lin, San Jose State University/UC Berkeley, USA IAT Program Co-Chairs: * Jeffrey M. Bradshaw, UWF/Institute for Human and Machine Cognition, USA * Matthias Klusch, German Research Center for AI, Germany * Chengqi Zhang, University of Technology, Sydney, Australia IAT Program Vice Co-chairs * Longbing cao University of Technology Sydney Australia * Joseph A. Giampapa Carnegie Mellon University USA * Maria Gini University of Minnesota USA * Vladimir Gorodetsky St. Petersburg Institute for Informatics and Automation Russia * Alessio Lomuscio Imperial College London UK * Zbigniew Ras University of North Carolina USA * Marius C. Silaghi Florida Institute of Technology USA * Makoto Yokoo Kyushu University Japan WI Program Co-Chairs: * Laura Haas, IBM Almaden Research Center, USA * Janusz Kacprzyk, Polish Academy of Science, Poland * Rajeev Motwani, Stanford University, USA WI Program Vice Co-chairs * Ajith Abraham Yonsei University South Korea * Peter Brusilovsky University of Pittsburgh USA * Ashish Goel Stanford University USA * Ramanathan V. Guha Google USA * Jane Yung-jen Hsu National Taiwan University Taiwan * Ravi Kumar Yahoo! Research USA * Jie Lu University of Technology Sydney Australia * Tsuyoshi Murata Tokyo Institute of Technology Japan * York Sure Institute AIFB, University of Karlsruhe Germany * Pang-Ning Tan Michigan State University USA * Bhavani Thuraisingham University of Texas at Dallas USA * Mohammed Zaki Rensselaer Polytechnic Institute USA Organizing Chair: * Howard Ho, IBM Almaden Research Center, USA Workshop Co-Chairs: * Vijay Raghavan, University of Louisiana, USA * Yuefeng Li, Queensland University of Technology, Australia Tutorial Chair: * Pawan Lingras, Saint Mary's University, Canada Industry/Demo-Track Chair: * Jianchang Mao, Yahoo! Inc., USA Local Accommodations Co-Chairs: * David Scot Taylor, San Jose State University, USA * Tom Qi Zhang, Google, USA Publicity Chair: * James Wang, Clemson University, USA (chair) Publicity Co-Chairs: * Martine De Cock, Ghent University, Belgium * Jia Hu, International WIC Institute, China * Debajyoti Mukhopadhyay, West Bengal University of Technology, India IEEE-CS-TCII Chair: * Ning Zhong, Maebashi Institute of Technology, Japan ACM-SIGART Chair * Maria Gini, University of Minnesota, USA WIC Co-Chairs/Directors: * Ning Zhong, Maebashi Institute of Technology, Japan * Jiming Liu, University of Windsor, Canada WIC Advisory Board: * Edward A. Feigenbaum, Stanford University, USA * Setsuo Ohsuga, Waseda University, Japan * Benjamin Wah, University of Illinois, Urbana-Champaign, USA * Philip Yu, IBM Thomas J. Watson Research Center, USA * L.A. Zadeh, University of California Berkeley, USA WIC Tech. Committee & WI/IAT Steering Committee: * Jeffrey Bradshaw, UWF/Institute for Human and Machine Cognition, USA * Nick Cercone, York University, Canada * Dieter Fensel, University of Innsbruck/Digital Enterprise Research Institute, Austria * Georg Gottlob, Oxford University, UK * Lakhmi Jain, University of South Australia, Australia * Jianchang Mao, Yahoo! Inc., USA * Pierre Morizet-Mahoudeaux, Compiegne University of Technology, France * Hiroshi Motoda, Osaka University, Japan * Toyoaki Nishida, Kyoto University, Japan * Andrzej Skowron, Warsaw University, Poland * Jinglong Wu, Kagawa University, Japan * Xindong Wu, University of Vermont, USA * Yiyu Yao, University of Regina, Canada Webmaster: * Albert Sutojo, San Jose State University, USA Abbreviation: IAT 2007, IAT2007, IAT'2007, IAT'07, IAT07, IAT 07, IAT-07, IAT-2007 *** Contact Information *** Jia Hu International WIC Institute, China E-mail: hujia@kis-lab.com From waldmann at imn.htwk-leipzig.de Mon Jun 4 06:33:33 2007 From: waldmann at imn.htwk-leipzig.de (Johannes Waldmann) Date: Mon Jun 4 06:28:52 2007 Subject: [Haskell] Haskell on Beowulf? Message-ID: <4663EA7D.2060904@imn.htwk-leipzig.de> What tool/compiler support is there for compiling Haskell code to run on a Beowulf cluster? Any pointers appreciated. -- Johannes Waldmann, Leipzig, Germany. From bfotsing at gmail.com Mon Jun 4 15:53:41 2007 From: bfotsing at gmail.com (bft) Date: Mon Jun 4 15:49:10 2007 Subject: [Haskell] Building extra-libs Message-ID: <232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com> Hello I want to build and install some extralibs using Cabal. I have the Cabal-1.1.6.2 version installed. When I run the command $ runghc Setup.hs configure --ghc --user --prefix=$HOME it fails with the message Setup.hs:17:30: Couldn't match expected type `UserHooks' against inferred type `Maybe UserHooks' Expected type: Hook a Inferred type: PackageDescription -> LocalBuildInfo -> Maybe UserHooks -> BuildFlags -> IO () In the second argument of `($)', namely `buildHook defaultUserHooks' In the `buildHook' field of a record How can I fixe this bug ? Thanks B. Fotsing Talla -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070604/08e55b2a/attachment.htm From agl at imperialviolet.org Mon Jun 4 21:15:55 2007 From: agl at imperialviolet.org (Adam Langley) Date: Mon Jun 4 21:11:29 2007 Subject: [Haskell] Building extra-libs In-Reply-To: <232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com> References: <232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com> Message-ID: <396556a20706041815r33b13bd3rf3449674ec1251c1@mail.gmail.com> On 6/4/07, bft wrote: > I want to build and install some extralibs using Cabal. I have the > Cabal-1.1.6.2 version installed. > When I run the command Could you provide a link to the package which you are trying to install? AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org 650-283-9641 From bbbfp at mail.bg Tue Jun 5 02:14:42 2007 From: bbbfp at mail.bg (Boyko Bantchev) Date: Tue Jun 5 02:10:10 2007 Subject: [Haskell] (no subject) Message-ID: <1181024082.a9958d3efa482@mail.bg> Hi all! The List module provides isPrefixOf, isSuffixOf, and -- since recently -- isInfixOf, to check whether a list is a prefix, a suffix, or an infix to another list. Similarly, we have inits and tails to obtain the prefixes and the suffixes of a list, but there is no standard function that would return a list of infixes. For reasons of symmetry, perhaps it is worth having a function in List returning, say, a list of infixes of fixed length, such as e.g., infixes n as = map (take n) $ take (length as - n + 1) (tails as) Or, instead, there might be included a function that lists all infixes lexicographically (map (tail . inits) . tails) or perhaps otherwise, e.g. in the order of increasing/decreasing lengths. (In the latter case, the result might be a list of lists of same-length infixes each.) What do you think? Regards, Boyko From oleg at pobox.com Tue Jun 5 03:09:02 2007 From: oleg at pobox.com (oleg@pobox.com) Date: Tue Jun 5 03:06:42 2007 Subject: [Haskell] Smash along your boilerplate; how to traverse a non-existent term Message-ID: <20070605070902.1DFDEAD43@Adric.metnet.fnmoc.navy.mil> We describe a generalization of the Smash-your-boilerplate generic programming approach to extensible traversal strategies. To the pre-defined gmap, reduction, and two-terms-in-lockstep strategies, the programmer may at any time add a new class of traversals. The present message shows one such extension, lazy gmap, and its application to mapping of terms that do not exist. This lets us implement gminimum and gmaximum -- which traverse `undefined' and produce the fully-defined smallest (resp. largest) term of a desired type: gminimum () :: (Maybe Int,Either Bool (Maybe Char)) ==> (Nothing,Left False) gmaximum () :: (Maybe Int,Either Bool (Maybe Char)) ==> (Just 2147483647,Right (Just '\1114111')) The result of traversing (undefined::(Maybe Int,Either Bool (Maybe Char))) is (Nothing,Left False). This meaningful traversal of non-existing terms is another benefit of Haskell's non-strictness. The complete code is available at http://darcs.haskell.org/generics/comparison/SmashA/ The code includes sample applications and examples, within the generic programming comparison framework by Alexey Rodriguez Yakushev, Alex Gerdes, and Johan Jeuring. The code is tested with GHC 6.4.1 and 6.6. The Smash approach is based on the typecase-like function stapply defined at the beginning of Syb4A.hs -- which expresses (or, reifies) the typeclass selection in Haskell itself: stapply :: spec -> a -> d -> w Given a heterogeneous list |spec| of functions |ai->wi| (where |ai| and |wi| vary from one function to another in the list) and a datum of the type |a|, we check to see if there is a function in that list whose argument type |ai| is equal to |a|. If so, we apply that function to the datum and return its result of the type |wi|. If no such function is found, we return the supplied default value, of the type |d|. Thus the result type |w| of stapply is a (type-level) function of the types |spec|, |a|, and |d|. The function stapply is dual to typeclasses: for example, the following typeclass method > class C a where fn :: a -> Int > instance C Bool where fn x = if x then 10 else 20 > instance C Char where fn x = fromEnum x is dually > testtyc_fn x = > stapply ((\ (x::Bool) -> if x then 10 else 20) :+: > (\ (x::Char) -> fromEnum x) :+: > HNil) > ((error "no match")::Int) x (One may say that testtyc_fn corresponds to a closed typeclass. That is true in the above definition. However, HLists may be open too). Our most general generic function is |gapp|, which applies a generic function to a term. A generic function is (quite literally) made of two parts. First, there is a term traversal strategy, identified by a _label_ |tlab|. One strategy may be to `reduce' a term using a supplied reducing function (cf. fold over a tree). Another strategy may rebuild a term. The second component of a generic function is |spec|, the list of `exceptions'. Each component of |spec| is a function that tells how to transform a term of a specific type. Exceptions override the generic traversal. The function |gapp| is defined generically. The code below says: first, check to see if any of the exceptions apply. If not, do the generic traversal. > class (STApply spec a df w, LDat tlab spec a df) > => GAPP tlab spec a df w | tlab spec a -> df w where > gapp :: tlab -> spec -> a -> w > > instance (STApply spec a df w, LDat tlab spec a df) > => GAPP tlab spec a df w where > gapp tlab spec x = stapply spec x (gin tlab spec x) The function |gin| does a generic traversal. It (may) invoke |gapp| on the children of the term, if any (and if the traversal strategy calls for traversing the children). This class is similar to the class Data of SYB: > class LDat tlab spec x w | tlab spec x -> w where > gin :: tlab -> spec -> x -> w However, different traversal strategies of Data are methods of that class: gfold, gunfold, gmapT, etc. Here, different strategies are identified by the label |tlab| and so the set of strategies is _extensible_. In SYB, for each new data type we need to define an instance of Data with several methods. Here, for each new data type we need to define several instances of LDat with one method each. The extensible strategies were discovered when generalizing the classes Dat and TDat in the original Smash approach. The file Syb4A.hs defines the following popular strategies - Reconstruct the term: used in generic mapping > data TL_recon = TL_recon - Reduce the term: used in folding over a term > newtype TL_red w = TL_red ([w]->w) - The same as above but the reducer accepts the name of the term's constructor, a string. This is used for generic show > newtype TL_red_ctr w = TL_red_ctr (String -> [w]->w) - Traverse and reduce two terms in lock-step: we traverse the term (Couple x y) where x and y have the same type, and reduce the result using the supplied function 'f'. This is used for generic equality > data Couple a = Couple a a > data TL_red_lockstep w = TL_red_lockstep w ([w] -> w) The TL_recon strategy is the generalization of fmap. Here are a few instances, for a primitive type and products and recursive sums (list). The analogy with fmap should be obvious. It should also be obvious that the instances below can be automatically generated from the definition of a datatype. That is, LDat instances could be automatically derived. > instance LDat TL_recon spec Int Int where > gin _ spec x = x > instance (GAPP TL_recon spec a dfa wa, GAPP TL_recon spec b dfb wb) > => LDat TL_recon spec (a,b) (wa,wb) where > gin tlab spec (x,y) = (gapp tlab spec x, gapp tlab spec y) > instance (GAPP TL_recon spec [a] [w] [w], GAPP TL_recon spec a dfa w) > => LDat TL_recon spec [a] [w] where > gin tlab spec [] = [] > gin tlab spec (x:xs) = (gapp tlab spec x):(gapp tlab spec xs) We can define the generic gmap in one line: > gmap f = gapp TL_recon (f :+: HNil) It takes a function |f::a->b| and a term and returns a term with all values of the type |a| replaced with the corresponding values of the type |b|. The type of the result is computed. When the input term is a list, gmap is the ordinary map. Given a term > termc = (["ab"],(Just 'c', Just 'd')) we can replace all Chars with their Int equivalents > testc1 = gmap ord termc where ord (c::Char) = fromEnum c *SmashA.Syb4A> testc1 ([[97,98]],(Just 99,Just 100)) Alternatively, we can replace only those Chars that occur in Maybe Char > testc2 = gmap maybeord termc > where maybeord (Just (c::Char)) = Right (fromEnum c) > maybeord Nothing = Left 0 *SmashA.Syb4A> testc2 (["ab"],(Right 99,Right 100)) Unlike the regular fmap, we can fuse two traversals > testc3 = gapp TL_recon (ord :+: maybeord :+: HNil) termc > where maybeord (Just (c::Char)) = Right (fromEnum c) > maybeord Nothing = Left 0 > ord (c::Char) = fromEnum c We can even traverse and replace under functions: > testt3 = gmap (\x -> if x then 'a' else 'b') > ([not], (True,('2',[(&&),(||)]))) whose inferred type is *SmashA.Syb4A> :t testt3 testt3 :: ([Bool -> Char], (Char, (Char, [Bool -> Bool -> Char]))) The source code shows equality on nested data types and various reductions (summing all Ints in a term; finding the size of the term; printing the term, treating Strings differently from other lists, etc). The programmer may introduce a new traversal strategy. For illustration, let us define a lazy version of the strategy TL_con. The motivation is determining the smallest or the largest term of a given type. The first stab at such a generic minimum may be gmin x = gmap (\ (x::Bool) -> False) x which replaces all Bools with the smallest Bool in a sample term x. For example, |gmin (True,False)| should give (False,False). The mapping function is clearly non-strict in its argument, so the same result can be achieved by applying gmin to the sample term (undefined::Bool,undefined::Bool). The sample term merely gives the structure of the desired type -- the structure to traverse. One may observe that we don't even need that! We can apply gmin to the sample term that is just (undefined::(Bool,Bool)) -- hence we don't need to supply any real sample term. The key is that (fst (undefined::(Bool,Bool))) is a correct expression, which evaluates to (undefined::Bool). Hence, "undefined" is deconstructible and traversable, standing for a term of any structure we may want. It can be traversed and mapped with real results -- providing the mapping and traversal functions are not strict. The TL_recon strategy above is strict, however, which is apparent from the instance of LDat for pairs: > gin tlab spec (x,y) = (gapp tlab spec x, gapp tlab spec y) That is easy to fix: just replace (x,y) with an irrefutable match ~(x,y). Alas, the problem is more complex in the case of sums (cf the instance LDat for lists above): > gin tlab spec [] = [] > gin tlab spec (x:xs) = (gapp tlab spec x):(gapp tlab spec xs) If we replace patterns with irrefutable match ~[] and ~(x:xs), then the first alternative will always match, and so the second clause will never be effective. We should recognize that sums give us a choice. We should propagate this choice back to the users: we should report the available alternatives, and let the users make the choice. We arrive thus at the following design, implemented in Syb4ABuild.hs in the DARCS repository above. We define a new traversal label > newtype TL_recon_lazy = TL_recon_lazy (forall a. [a] -> a) where the argument of TL_recon_lazy is a user-supplied choice function. The instance for pairs is simple as we don't have any choice here: > instance (GAPP TL_recon_lazy spec a dfa wa, > GAPP TL_recon_lazy spec b dfb wb) > => LDat TL_recon_lazy spec (a,b) (wa,wb) where > gin tlab@(TL_recon_lazy f) spec ~(x,y) = > f [(gapp tlab spec x, gapp tlab spec y)] We do have the choice for sums, e.g., lists: > instance (GAPP TL_recon_lazy spec [a] [w] [w], > GAPP TL_recon_lazy spec a dfa w) > => LDat TL_recon_lazy spec [a] [w] where > gin tlab@(TL_recon_lazy f) spec x = > f [[], > (gapp tlab spec (head x)):(gapp tlab spec (tail x))] The term to traverse may be either an empty list, or non-empty list. In the latter case, we speculatively map its head and tail. We let the user make the choice. Due to non-strictness, we don't actually traverse anything unless it is required. This lets us define generic minimum simply as > __ = error "nonexistent" > gminimum () = r > where r = gapp (TL_recon_lazy head) lst (__ `asTypeOf` r) > lst = (mb (__::Int)) :+: (mb (__::Bool)) :+: (mb (__::Char)) > :+: HNil > mb :: Bounded t => t -> t -> t > mb _ _ = minBound The definition for gmaximum is similar, modulo replacing minBound with maxBound and head with last. We thus obtain the results mentioned at the beginning. Other examples: > test_gmin3 = gminimum () :: (Maybe Int,[Bool]) *SmashA.Syb4ABuild> test_gmin3 (Nothing,[]) > test_gmax1 = take 5 $ gmaximum () :: [Bool] *SmashA.Syb4ABuild> test_gmax1 [True,True,True,True,True] The presence of "take 5" is telling. The largest term of the type [Bool] is the infinite list of True -- which gmaximum faithfully computes. The function gminimum is akin to the de-typechecker since both convert `undefined' to `defined'. De-typechecker produces only polymorphic functions, whereas gminimum yields data (including monomorphic functions). From simonmarhaskell at gmail.com Tue Jun 5 04:19:52 2007 From: simonmarhaskell at gmail.com (Simon Marlow) Date: Tue Jun 5 04:15:25 2007 Subject: [Haskell] 20th European Summer School in Logic, Language and Information Message-ID: <46651CA8.2050004@gmail.com> [ posting on behalf of Rineke Verbrugge ] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 20th European Summer School in Logic, Language and Information ESSLLI 2008 Monday, 4 August - Friday, 15 August 2008 Hamburg, Germany %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CALL FOR COURSE and WORKSHOP PROPOSALS -------------------------------------- The European Summer School in Logic, Language and Information (ESSLLI) is organized every year by the Association for Logic, Language and Information (FoLLI, http://www.folli.org) in different sites around Europe. The main focus of ESSLLI is on the interface between linguistics, logic and computation. ESSLLI offers foundational, introductory and advanced courses, as well as workshops, covering a wide variety of topics within the three areas of interest: Language and Computation, Language and Logic, and Logic and Computation. Previous summer schools have been highly successful, attracting up to 500 students from Europe and elsewhere. The school has developed into an important meeting place and forum for discussion for students and researchers interested in the interdisciplinary study of Logic, Language and Information. The ESSLLI 2008 Program Committee invites proposals for foundational, introductory, and advanced courses, and for workshops for the 20th annual Summer School on a wide range of timely topics that have demonstrated their relevance in the following fields: - Logic and Language - Logic and Computation - Language and Computation PROPOSAL SUBMISSION: Proposals should be submitted through a web form available at http://www.folli.org/submission.php All proposals should be submitted no later than ******* Monday July 2, 2007. ******* Authors of proposals will be notified of the committee's decision no later than Monday September 10, 2007. Proposers should follow the guidelines below while preparing their submissions; proposals that deviate can not be considered. GUIDELINES FOR SUBMISSION: Anyone interested in lecturing or organizing a workshop during ESSLLI-2006, please read the following information carefully. ALL COURSES: Courses are taught by 1 or max. 2 lecturers. They consists of five sessions (a one-week course), each session lasting 90 minutes. Lecturers who want to offer a long, two-week course should submit two independent one-week courses (for example an introductory course in the first week of ESSLLI, and a more advanced course during the second). The ESSLLI program committee has the right to select only one of the two proposed courses. Timetable for Course Proposal Submissions: July 2, 2007: Proposal Submission Deadline Sep 10, 2007: Notification June 2, 2008: Deadline for receipt of camera-ready course material (by ESSLLI Local Organizers) FOUNDATIONAL COURSES: These are strictly elementary courses not assuming any background knowledge. They are intended for people to get acquainted with the problems and techniques of areas new to them. Ideally, they should allow researchers from other fields to acquire the key competences of neighboring disciplines, thus encouraging the development of a truly interdisciplinary research community. Foundational courses may presuppose some experience with scientific methods in general, so as to be able to concentrate on the issues that are germane to the area of the course. INTRODUCTORY COURSES: Introductory courses are central to the activities of the Summer School. They are intended to equip students and young researchers with a good understanding of a field's basic methods and techniques. Introductory courses in, for instance, Language and Computation, can build on some knowledge of the component fields; e.g., an introductory course in computational linguistics should address an audience which is familiar with the basics of linguistics and computation. Proposals for introductory courses should indicate the level of the course as compared to standard texts in the area (if available). ADVANCED COURSES: Advanced courses should be pitched at an audience of advanced Masters or PhD students. Proposals for advanced courses should specify the prerequisites in detail. WORKSHOPS: The aim of the workshops is to provide a forum for advanced Ph.D. students and other researchers to present and discuss their work. Workshops should have a well defined theme, and workshop organizers should be specialists in the theme of the workshop. It is a strict requirement that organizers give a general introduction to the them during the first session of the workshop. They are also responsible for the organization and program of the workshop including inviting the submission of papers, reviewing, expenses of invited speakers, etc. In particular, each workshop organizer will be responsible for producing a Call for Papers for the workshop by November 11, 2007. The call must make it clear that the workshop is open to all members of the LLI community. It should also note that all workshop contributors must register for the Summer School. Timetable for Workshop Proposal Submissions: July 2, 2007: Proposal Submission Deadline Sep 10, 2007: Notification Nov 11, 2007: Deadline for receipt of Call for Papers (by ESSLLI PC chair) Nov 18, 2007: Workshop organizers send out (First) Call for Papers Mar 17, 2008: Deadline for Papers (suggested) Apr 28, 2008: Notification of Workshop Contributors (suggested) June 2, 2008: Deadline for receipt of camera-ready copy of Workshop Proceedings (by ESSLLI Local Organizers) Notice that workshop speakers will be required to register for the Summer School; however, they will be able to register at a reduced rate to be determined by the Local Organizers. FORMAT FOR PROPOSALS: The web-based form for submitting course and workshop proposals is accessible at http://www.folli.org/submission.php. You will be required to submit the following information: * Name (name(s) of proposed lecturer(s)/organizer) * Address (contact addresses of proposed lecturer(s)/organizer; where possible, please include phone and fax numbers) * Title (title of proposed course/workshop) * Type (is this a workshop, a foundational course, an introductory course, or an advanced course?) * Section (does your proposal fit in Language & Computation, Language & Logic or Logic & Computation? name only one) * Description (in at most 150 words, describe the proposed contents and substantiate timeliness and relevance to ESSLLI) * External funding (will you be able to find external funding to help fund your travel and accommodation expenses? if so, how?) * Further particulars (any further information that is required by the above guidelines should be included here; in particular, indicate here your teaching experience in an interdisciplinary field as the one addressed by ESSLLI.) FINANCIAL ASPECTS: Prospective lecturers and workshop organizers should be aware that all teaching and organizing at the summer schools is done on a voluntary basis in order to keep the participants fees as low as possible. Lecturers and organizers are not paid for their contribution, but are reimbursed for travel and accommodation (up to a fixed, maximum amount that will be notified to lecturers when courses are accepted). It should be stressed that while proposals from all over the world are welcomed, the Summer School cannot guarantee full reimbursement of travel costs, specially from destinations outside Europe. Please note the following: In case a course is to be taught by two lecturers, a lump sum is reimbursed to cover travel and accommodation expenses for one lecturer. The splitting of the sum is up to the lecturers. The local organizers highly appreciate it if, whenever possible, lecturers and workshop organizers find alternative funding to cover travel and accommodation expenses, and such issues might be taken into account when selecting courses. PROGRAM COMMITTEE: Chair: Rineke Verbrugge Institute of Artificial Intelligence University of Groningen Grote Kruisstraat 2/1 9712 TS Groningen The Netherlands phone +31 (0)50 571 81 41 e-mail : rineke (at) ai.rug.nl www : http://www.ai.rug.nl/~rineke Local co-chair: Benedikt L?we Area Specialists: Petra Hendriks and Philippe Schlenker (Logic and Language) Michael Kaminski and Enrico Franconi (Logic and Computation) Khalil Sima'an and Massimo Poesio (Language and Computation) ORGANIZING COMMITTEE: Walter von Hahn and Cristina Vertan FURTHER INFORMATION: The website for ESSLLI 2008 will become operational in the second half of 2007. For this year's summer school, please see the web site at http://www.cs.tcd.ie/esslli2007/ . With best regards, Rineke Verbrugge From bfotsing at gmail.com Tue Jun 5 09:36:44 2007 From: bfotsing at gmail.com (FOTSING TALLA Bernard) Date: Tue Jun 5 08:32:22 2007 Subject: [Haskell] Building extra-libs In-Reply-To: 232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com Message-ID: <1181050604.8090.0.camel@bft.workstation> They are available in the 'extra libraries' distribution on http://haskell.org/ghc/download_ghc_661.html * ghc-6.6.1-src-extralibs.tar.bz2 (1.8 MB). I tried the arrows package and it failed with that message. Thanks Bernard Fotsing Talla From simonmarhaskell at gmail.com Tue Jun 5 09:08:08 2007 From: simonmarhaskell at gmail.com (Simon Marlow) Date: Tue Jun 5 09:03:48 2007 Subject: [Haskell] Building extra-libs In-Reply-To: <1181050604.8090.0.camel@bft.workstation> References: <1181050604.8090.0.camel@bft.workstation> Message-ID: <46656038.80000@gmail.com> FOTSING TALLA Bernard wrote: > They are available in the 'extra libraries' distribution > on http://haskell.org/ghc/download_ghc_661.html > * ghc-6.6.1-src-extralibs.tar.bz2 (1.8 MB). > I tried the arrows package and it failed with that message. The version of Cabal shipped with 6.6.1 unfortunately isn't compatible with some of those packages, so you have to either (a) get binary versions of the libraries, presumably from the same place you got GHC, or (b) upgrade Cabal. You can also get the sources for arrows from its darcs repository, http://darcs.haskell.org/packages/arrows. The current sources are compatible again with the Cabal library in GHC 6.6.1. Cheers, Simon From morazanm at gmail.com Tue Jun 5 12:54:08 2007 From: morazanm at gmail.com (Marco Morazan) Date: Tue Jun 5 12:49:36 2007 Subject: [Haskell] TFP 2007: Draft Proceedings Available On-line Message-ID: <9b1fff280706050954h27951080x1ed6fc2f9b941d54@mail.gmail.com> Dear Colleagues, The draft proceedings of TFP 2007 are now available on the symposium's website. You may access the draft proceedings directly at: http://cs.shu.edu/tfp2007/draftProcDocument.pdf . This volume represents the articles associated with the work presented at TFP 2007. As in previous versions of TFP it is called the draft proceedings to distinguish it from the formal peer-reviewed post-symposium proceedings. The work presented at TFP 2007 was selected by its international program committee through the screening of extended abstracts. Cheers, Marco From g9ks157k at acme.softbase.org Wed Jun 6 18:51:18 2007 From: g9ks157k at acme.softbase.org (Wolfgang Jeltsch) Date: Wed Jun 6 18:46:48 2007 Subject: [Haskell] arrow syntax with LaTeX Message-ID: <200706070051.18987.g9ks157k@acme.softbase.org> Hello, I want to typeset Haskell code using arrow syntax with LaTeX in math mode (using lhs2TeX and polycode.fmt). However I don?t know how to produce a nice LaTeX math mode equivalent for -<. Does anybody have an idea what to do at this point? Best wishes, Wolfgang From antony.courtney at gmail.com Wed Jun 6 21:13:32 2007 From: antony.courtney at gmail.com (Antony Courtney) Date: Wed Jun 6 21:08:55 2007 Subject: [Haskell] arrow syntax with LaTeX In-Reply-To: <200706070051.18987.g9ks157k@acme.softbase.org> References: <200706070051.18987.g9ks157k@acme.softbase.org> Message-ID: <3be64c030706061813p23bdec17j32fde4ad4763f304@mail.gmail.com> It's not pretty, but I used: \newcommand\atl{-\!\!\!\prec} Hope that helps. Regards, -Antony On 6/6/07, Wolfgang Jeltsch wrote: > > Hello, > > I want to typeset Haskell code using arrow syntax with LaTeX in math mode > (using lhs2TeX and polycode.fmt). However I don't know how to produce a > nice > LaTeX math mode equivalent for -<. Does anybody have an idea what to do > at > this point? > > Best wishes, > Wolfgang > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070606/424c354b/attachment.htm From byorgey at gmail.com Wed Jun 6 21:36:07 2007 From: byorgey at gmail.com (Brent Yorgey) Date: Wed Jun 6 21:31:29 2007 Subject: [Haskell] arrow syntax with LaTeX In-Reply-To: <200706070051.18987.g9ks157k@acme.softbase.org> References: <200706070051.18987.g9ks157k@acme.softbase.org> Message-ID: <22fcbd520706061836j1ce0dea3g36567b9b8a916a7b@mail.gmail.com> You could also try using \Yleft from the stmaryrd package. cheers, Brent On 6/6/07, Wolfgang Jeltsch wrote: > > Hello, > > I want to typeset Haskell code using arrow syntax with LaTeX in math mode > (using lhs2TeX and polycode.fmt). However I don't know how to produce a > nice > LaTeX math mode equivalent for -<. Does anybody have an idea what to do > at > this point? > > Best wishes, > Wolfgang > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070606/b8f2c602/attachment.htm From g9ks157k at acme.softbase.org Wed Jun 6 21:49:04 2007 From: g9ks157k at acme.softbase.org (Wolfgang Jeltsch) Date: Wed Jun 6 21:44:28 2007 Subject: [Haskell] arrow syntax with LaTeX In-Reply-To: <20070606230837.GA25990@soi.city.ac.uk> References: <200706070051.18987.g9ks157k@acme.softbase.org> <20070606230837.GA25990@soi.city.ac.uk> Message-ID: <200706070349.04460.g9ks157k@acme.softbase.org> Am Donnerstag, 7. Juni 2007 01:08 schrieben Sie: > On Thu, Jun 07, 2007 at 12:51:18AM +0200, Wolfgang Jeltsch wrote: > > I want to typeset Haskell code using arrow syntax with LaTeX in math > > mode (using lhs2TeX and polycode.fmt). However I don???t know how to > > produce a nice LaTeX math mode equivalent for -<. Does anybody have > > an idea what to do at this point? > > I used this rather crude definition: > > %format -< = "\Aapply " > \newcommand{\Aapply}{\mathrel{-\!\!\!\!\prec}} Thank you for this info. However, this doesn?t look to nice since the right part of -< is really big. Meanwhile I came across \mapsfromchar from the stmaryrd package and switched to the following definition: %format -< = "\mathrel{\relbar\mapsfromchar}" This is not really the -< symbol but at least it comes close. Maybe someone should create \lefttailchar so that \mathrel{\relbar\lefttailchar} can be used. Best wishes, Wolfgang From g9ks157k at acme.softbase.org Wed Jun 6 21:50:48 2007 From: g9ks157k at acme.softbase.org (Wolfgang Jeltsch) Date: Wed Jun 6 21:46:11 2007 Subject: [Haskell] new keywords in lhs2TeX Message-ID: <200706070350.48559.g9ks157k@acme.softbase.org> Hello, is there a way to declare certain non-standard Haskell keywords as keywords in lhs2TeX so that they get formatted like keywords? This would be helpful for rendering arrow syntax expressions with lhs2TeX since they use proc and sometimes rec. Best wishes, Wolfgang From g9ks157k at acme.softbase.org Wed Jun 6 21:52:35 2007 From: g9ks157k at acme.softbase.org (Wolfgang Jeltsch) Date: Wed Jun 6 21:47:59 2007 Subject: [Haskell] arrow syntax with LaTeX In-Reply-To: <22fcbd520706061836j1ce0dea3g36567b9b8a916a7b@mail.gmail.com> References: <200706070051.18987.g9ks157k@acme.softbase.org> <22fcbd520706061836j1ce0dea3g36567b9b8a916a7b@mail.gmail.com> Message-ID: <200706070352.36175.g9ks157k@acme.softbase.org> Am Donnerstag, 7. Juni 2007 03:36 schrieben Sie: > You could also try using \Yleft from the stmaryrd package. > > cheers, > Brent Hello Brent, yes, I thought about this too but \Yleft looks rather different compared with an ordinary arrow (different line thickness, for example). Best wishes, Wolfgang From wss at cs.nott.ac.uk Thu Jun 7 04:53:15 2007 From: wss at cs.nott.ac.uk (Wouter Swierstra) Date: Thu Jun 7 04:48:41 2007 Subject: [Haskell] new keywords in lhs2TeX In-Reply-To: <200706070350.48559.g9ks157k@acme.softbase.org> References: <200706070350.48559.g9ks157k@acme.softbase.org> Message-ID: <3340278F-C3A5-4D70-86DB-5B485DC159D8@cs.nott.ac.uk> On 7 Jun 2007, at 02:50, Wolfgang Jeltsch wrote: > is there a way to declare certain non-standard Haskell keywords as > keywords in > lhs2TeX so that they get formatted like keywords? You may want to check pages 29-30 of the lhs2TeX manual. It does coves something similar for UUAG and Generic Haskell. Basically, I'd define: %format proc = "\mathbf{proc}" %format rec = "\mathbf{rec}" Provided you use lhs2TeX with the --poly flag, this should work. Wouter From morazanm at gmail.com Thu Jun 7 18:40:57 2007 From: morazanm at gmail.com (Marco Morazan) Date: Thu Jun 7 18:36:16 2007 Subject: [Haskell] TFP 2007: Draft Proceedings Articles Message-ID: <9b1fff280706071540l12b025c8hb0d918873d5f55c0@mail.gmail.com> Dear Colleagues, Thank you for the interest expressed in the draft proceedings of TFP 2007. To make accessing individual articles easier for those who do not wish to download the entire proceedings, we have added links to individual articles. You may download the complete draft proceedings at: http://cs.shu.edu/tfp2007/draftProcDocument.pdf You may download individual articles in the draft proceedings at: http://cs.shu.edu/tfp2007/schedule.html Cheers, Marco From grelck at isp.uni-luebeck.de Fri Jun 8 07:21:11 2007 From: grelck at isp.uni-luebeck.de (Clemens Grelck) Date: Fri Jun 8 07:16:33 2007 Subject: [Haskell] Einladung zum Kolloquium Programmiersprachen (KPS'07) Message-ID: <46693BA7.5080300@isp.uni-luebeck.de> Our sincere apologies to all non German speaking readers of this mailing list for this workshop invitation in German. ====================================================================== Einladung zur Teilnahme KPS'07 Kolloquium Programmiersprachen und Grundlagen der Programmierung Timmendorfer Strand 10.-12. Oktober 2007 Anmeldeschluss: 1. August 2007 http://www.isp.uni-luebeck.de/kps07 Liebe Kollegen, das 14. Kolloquium Programmiersprachen und Grundlagen der Programmierung setzt eine traditionelle Reihe von Arbeitstagungen fort, die 1980 von den Forschungsgruppen der Professoren Friedrich L. Bauer (TU M?nchen), Klaus Indermark (RWTH Aachen) und Hans Langmaack (CAU Kiel) ins Leben gerufen wurde. Heute pr?sentiert sich die Veranstaltung allen interessierten deutschsprachigen Wissenschaftlern als ein offenes Forum zum zwanglosen Austausch neuer Ideen und Ergebnisse aus den Forschungsbereichen Programmiersprachen sowie Grundlagen des Programmierens. Wir w?rden uns freuen, Sie als Teilnehmer des 14. Kolloquiums Programmiersprachen und Grundlagen der Programmierung vom 10. bis zum 12. Oktober 2007 im Hotel Atlantis in Timmendorfer Strand an der Ostsee begr??en zu k?nnen. Mit besten W?nschen Dr. Annette St?mpel und Dr. Clemens Grelck Institut f?r Softwaretechnik und Programmiersprachen Universit?t zu L?beck http://www.isp.uni-luebeck.de From ndmitchell at gmail.com Fri Jun 8 09:01:48 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Fri Jun 8 08:57:05 2007 Subject: [Haskell] ANN: Catch (first ever release) Message-ID: <404396ef0706080601k261eaffdpa394fd78cf2b0981@mail.gmail.com> Hi, Do you sometimes encounter the dreaded "pattern match failure: head []" message? Do you have incomplete patterns which sometimes fail? Do you have incomplete patterns which you know don't fail, but still get compiler warnings about them? Would you like to statically ensure the absence of all calls to error? For the last few years I've been working on a pattern-match checker for Haskell, named Catch. I'm now happy to make a release: Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/catch-0.1 Homepage: http://www-users.cs.york.ac.uk/~ndm/catch/ User manual: http://www.cs.york.ac.uk/fp/darcs/catch/catch.htm While a darcs version is available, I strongly recommend the use of the tarball on hackage. Features: * Detects all incomplete patterns and calls to error * Full support for Haskell, through the use of Yhc as a front end * Automatic - no annotations are required * Fast - checking times of under 5 seconds (excluding Yhc compilation) are typical Drawbacks: * Requires Yhc to be installed, which doesn't accept most Haskell extensions. This will be fixed once GHC.Core is available as a standalone library. The underlying tool is not limited to Haskell 98 in any way. Success stories: * The darcs version of HsColour has been proven free of pattern match errors, and Catch was able to find three previously unknown crashes which could be triggered by a malformed document. * System.FilePath has been checked, and is free of pattern-match errors * XMonad's central StackSet.hs module has been checked repeatedly, as it has evolved. Unfortunately currently this module goes beyond Haskell 98, but this should be fixed shortly. If you have any experiences with Catch, I'd be very interested to hear them. Thanks Neil From haskell at list.mightyreason.com Fri Jun 8 10:20:47 2007 From: haskell at list.mightyreason.com (haskell@list.mightyreason.com) Date: Fri Jun 8 10:16:05 2007 Subject: [Haskell] ANN: Catch (first ever release) In-Reply-To: <404396ef0706080601k261eaffdpa394fd78cf2b0981@mail.gmail.com> References: <404396ef0706080601k261eaffdpa394fd78cf2b0981@mail.gmail.com> Message-ID: <466965BF.2020706@list.mightyreason.com> Neil Mitchell wrote: > Hi, > > Do you sometimes encounter the dreaded "pattern match failure: head > []" message? Do you have incomplete patterns which sometimes fail? Do > you have incomplete patterns which you know don't fail, but still get > compiler warnings about them? Would you like to statically ensure the > absence of all calls to error? > > For the last few years I've been working on a pattern-match checker > for Haskell, named Catch. I'm now happy to make a release: > > Hackage: > http://hackage.haskell.org/cgi-bin/hackage-scripts/package/catch-0.1 > Homepage: http://www-users.cs.york.ac.uk/~ndm/catch/ > User manual: http://www.cs.york.ac.uk/fp/darcs/catch/catch.htm > > While a darcs version is available, I strongly recommend the use of > the tarball on hackage. > > Features: > > * Detects all incomplete patterns and calls to error > * Full support for Haskell, through the use of Yhc as a front end > * Automatic - no annotations are required > * Fast - checking times of under 5 seconds (excluding Yhc compilation) > are typical > > Drawbacks: > > * Requires Yhc to be installed, which doesn't accept most Haskell > extensions. This will be fixed once GHC.Core is available as a > standalone library. The underlying tool is not limited to Haskell 98 > in any way. > > Success stories: > > * The darcs version of HsColour has been proven free of pattern match > errors, and Catch was able to find three previously unknown crashes > which could be triggered by a malformed document. > * System.FilePath has been checked, and is free of pattern-match errors > * XMonad's central StackSet.hs module has been checked repeatedly, as > it has evolved. Unfortunately currently this module goes beyond > Haskell 98, but this should be fixed shortly. > > If you have any experiences with Catch, I'd be very interested to hear > them. > > Thanks > > Neil I would love to use this with regex-tdfa (and the other regex-* modules). At the moment regex-tdfa is uses a few extensions such as recursive "mdo" notation and parts hook up to the MPTC + fundeps used in regex-base. The MPTC+fundeps are not part of the workhorse modules, they are just "type class syntactic sugar" that makes it easier for the library consumer. But "mdo" _is_ used in two of the important internal functions. -- Chris From igloo at earth.li Fri Jun 8 14:04:01 2007 From: igloo at earth.li (Ian Lynagh) Date: Fri Jun 8 13:59:17 2007 Subject: [Haskell] Building extra-libs In-Reply-To: <232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com> References: <232143290706041253g3da51d2l8c77af09ee2cc6dc@mail.gmail.com> Message-ID: <20070608180401.GA15118@matrix.chaos.earth.li> On Mon, Jun 04, 2007 at 08:53:41PM +0100, bft wrote: > > I want to build and install some extralibs using Cabal. I have the > Cabal-1.1.6.2 version installed. > When I run the command > $ runghc Setup.hs configure --ghc --user --prefix=$HOME > it fails with the message > Setup.hs:17:30: > Couldn't match expected type `UserHooks' > against inferred type `Maybe UserHooks' > Expected type: Hook a > Inferred type: PackageDescription > -> LocalBuildInfo > -> Maybe UserHooks > -> BuildFlags > -> IO () > In the second argument of `($)', namely > `buildHook defaultUserHooks' > In the `buildHook' field of a record > > How can I fixe this bug ? Commenting out the type signature for add_ghc_options in Setup.hs should fix it. Thanks Ian From goncalves.v.andre at gmail.com Sat Jun 9 15:22:02 2007 From: goncalves.v.andre at gmail.com (AVG) Date: Sat Jun 9 15:43:50 2007 Subject: [Haskell] Please help!!! Message-ID: <11042870.post@talk.nabble.com> What's wrong?? greatest common divisor code: mdc :: Int-> Int -> Int mdc _ 1 = 1 mdc 1 _ = 1 mdc x y |x > y = mdc (x-y) y |y > x = mdc (y-x) x |x==y = x mdcl :: [Int]-> [Int] mdcl []=[] mdcl l = mdcl ([mdc (tira(take 1 l)) (tira(take 1 (drop 1 l)))]++ drop 2 l) gcdl :: [Int] -> Int gcdl l = tira l tira :: [Int] -> Int tira []=0 tira [x]=x -- View this message in context: http://www.nabble.com/Please-help%21%21%21-tf3895195.html#a11042870 Sent from the Haskell - Haskell mailing list archive at Nabble.com. From stefanor at cox.net Sat Jun 9 15:52:19 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Sat Jun 9 15:47:33 2007 Subject: [Haskell] Please help!!! In-Reply-To: <11042870.post@talk.nabble.com> References: <11042870.post@talk.nabble.com> Message-ID: <20070609195219.GA5377@localhost.localdomain> On Sat, Jun 09, 2007 at 12:22:02PM -0700, AVG wrote: > > What's wrong?? > > greatest common divisor > > code: > > > > mdc :: Int-> Int -> Int > mdc _ 1 = 1 > mdc 1 _ = 1 > mdc x y > |x > y = mdc (x-y) y > |y > x = mdc (y-x) x > |x==y = x > > mdcl :: [Int]-> [Int] > mdcl []=[] > mdcl l = mdcl ([mdc (tira(take 1 l)) (tira(take 1 (drop 1 l)))]++ drop 2 l) > > gcdl :: [Int] -> Int > gcdl l = tira l > > tira :: [Int] -> Int > tira []=0 > tira [x]=x http://haskell.org/haskellwiki/Homework_help 99% of people who ask with such urgency are looking for homework answers. Hint re your actual code: whitespace matters. Stefan From goncalves.v.andre at gmail.com Sat Jun 9 16:08:10 2007 From: goncalves.v.andre at gmail.com (AVG) Date: Sat Jun 9 16:03:21 2007 Subject: [Haskell] Please help!!! In-Reply-To: <20070609195219.GA5377@localhost.localdomain> References: <11042870.post@talk.nabble.com> <20070609195219.GA5377@localhost.localdomain> Message-ID: <11043217.post@talk.nabble.com> But i tried and i don't know waht is wrong. -- View this message in context: http://www.nabble.com/Please-help%21%21%21-tf3895195.html#a11043217 Sent from the Haskell - Haskell mailing list archive at Nabble.com. From stefanor at cox.net Sat Jun 9 16:12:08 2007 From: stefanor at cox.net (Stefan O'Rear) Date: Sat Jun 9 16:07:21 2007 Subject: [Haskell] Please help!!! In-Reply-To: <11042870.post@talk.nabble.com> References: <11042870.post@talk.nabble.com> Message-ID: <20070609201208.GA5675@localhost.localdomain> On Sat, Jun 09, 2007 at 12:22:02PM -0700, AVG wrote: > > What's wrong?? > > greatest common divisor > > code: > > > > mdc :: Int-> Int -> Int > mdc _ 1 = 1 > mdc 1 _ = 1 > mdc x y > |x > y = mdc (x-y) y > |y > x = mdc (y-x) x > |x==y = x Since the three lines starting with | are a continuation of the preceding line, they must be indented more. > mdcl :: [Int]-> [Int] > mdcl []=[] > mdcl l = mdcl ([mdc (tira(take 1 l)) (tira(take 1 (drop 1 l)))]++ drop 2 l) > > gcdl :: [Int] -> Int > gcdl l = tira l > > tira :: [Int] -> Int > tira []=0 > tira [x]=x Spelling out names like 'mdcl' and 'tira' will make it easier for us to help you. gcd isn't a problem because it is well established mathematical notation, but the others are opaque to me. Stefan From tomahawkins at gmail.com Sun Jun 10 21:16:22 2007 From: tomahawkins at gmail.com (Tom Hawkins) Date: Sun Jun 10 21:11:31 2007 Subject: [Haskell] ANNOUNCE: Atom 2007.06 Message-ID: <594c1e830706101816y3d67d55dgbdc303cdc2aa93bd@mail.gmail.com> Atom is a high-level hardware description language embedded in Haskell that compiles conditional term rewriting systems into conventional HDL. New in this release: - User guided rule scheduling to help the compiler build the optimal scheduler. - Rule schedule visualization with Graphviz. gray edges: sequential composable rules red edges: feedback arcs (bad) blue edges: user defined scheduling constraints - Bug fix affecting "alwayActiveWhenEnabled" performance constraint. Enjoy! http://www.funhdl.org/ -Tom From uwe at fh-wedel.de Mon Jun 11 05:49:49 2007 From: uwe at fh-wedel.de (Uwe Schmidt) Date: Mon Jun 11 05:44:55 2007 Subject: [Haskell] Bug in the HXT: Data.Char.UTF8.decodeOne Message-ID: <200706111149.50047.uwe@fh-wedel.de> I've got a bug report concerning the UTF decoding in HXT. I've copied the source containing the bug from the Haskell Internationalisation Working Group. I guess this source is also used in other projects, e.g. darcs. My question: Is this really a bug or is it a feature. My knowlege so far was, the intervall from E000 to FFFF is not legal in unicode. ---------- Forwarded Message ---------- Subject: Bug in the HXT: Data.Char.UTF8.decodeOne Date: Sunday 10 June 2007 07:40 From: PHO To: hxmltoolbox@fh-wedel.de Hello, I've found a bug in Data.Char.UTF8.decodeOne that it fails to decode UTF-8 letters from U+E000 to U+FFFF. Here is the patch: { hunk ./src/Data/Char/UTF8.hs 248 - | b1 < 0xEE = decodeOne_threebyte bs + | b1 < 0xF0 = decodeOne_threebyte bs } -------------------------------------------------------------- here is the source http://darcs.fh-wedel.de/hxt/src/Data/Char/UTF8.hs Any suggestions? Uwe Schmidt From vi_larsen at yahoo.no Mon Jun 11 07:18:12 2007 From: vi_larsen at yahoo.no (Vidar Larsen) Date: Mon Jun 11 07:13:18 2007 Subject: [Haskell] Bug in the HXT: Data.Char.UTF8.decodeOne In-Reply-To: <200706111149.50047.uwe@fh-wedel.de> References: <200706111149.50047.uwe@fh-wedel.de> Message-ID: The range from U+E000 to U+F8FF is Private Use, and, thus, in use. There are also usable ranges from U+F900 up to U+FFFF, and beyond. The only big invalid range in UTF-8 encoding, is for the codepoints in the surrogates area: U+D800 to U+DFFF. These are used by UTF-16 to encode codepoints outside the base plane. See also http://www.ietf.org/rfc/rfc3629.txt /vidar Den 11. jun. 2007 kl. 11:49 skrev Uwe Schmidt: > > I've got a bug report concerning the UTF decoding > in HXT. I've copied the source containing the bug from the > Haskell Internationalisation Working Group. > I guess this source is also used in other > projects, e.g. darcs. > > My question: Is this really a bug or is it a feature. > My knowlege so far was, the intervall from > E000 to FFFF is not legal in unicode. > > ---------- Forwarded Message ---------- > > Subject: Bug in the HXT: Data.Char.UTF8.decodeOne > Date: Sunday 10 June 2007 07:40 > From: PHO > To: hxmltoolbox@fh-wedel.de > > Hello, > > I've found a bug in Data.Char.UTF8.decodeOne that it fails to decode > UTF-8 letters from U+E000 to U+FFFF. Here is the patch: > > { > hunk ./src/Data/Char/UTF8.hs 248 > - | b1 < 0xEE = decodeOne_threebyte bs > + | b1 < 0xF0 = decodeOne_threebyte bs > } > -------------------------------------------------------------- > > here is the source > http://darcs.fh-wedel.de/hxt/src/Data/Char/UTF8.hs > > Any suggestions? > > Uwe Schmidt > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell From hz at inf.elte.hu Mon Jun 11 15:27:58 2007 From: hz at inf.elte.hu (HORVATH Zoltan) Date: Mon Jun 11 15:23:18 2007 Subject: [Haskell] Last CFP: Functional Programming School + PhD workshop, with LNCS post.conf. proc. : June 23-30, 2007 In-Reply-To: References: Message-ID: 2nd Central-European Functional Programming School CEFP 2007 Cluj-Napoca, June 23-30, 2007 http://cs.ubbcluj.ro/cefp2007/ Call for PhD student presentation - Last call for participation PhD students are invited to submit the abstract of their presentations to be included in the workshop session of the summer school. The selected and reviewed workshop papers and the revised lectures will be published in the post-conference LNCS Volume of the Summer School. The deadline for registration and submissions is 1 June 2007. Aims and Scopes: The Central-European Functional Programming School (CEFP) is an intensive summer school series in the field of functional programming. The main goal is to bring together computer scientists, researchers, graduate and especially PhD students. The school would like to promote the research and the education of the functional programming languages, software technologies and programming methodologies. The second CEFP school will be organized by the Babe?-Bolyai University (Cluj-Napoca / Kolozsv?r / Klausenburg) between 23-30 June, 2007. The previous school was held in Budapest, Hungary, July, 2005 (LNCS 4164). The invited lecturers are prominent researchers in the field, and they will present state-of-the-art functional programming techniques. Beside the lectures practical courses will be held. The school includes a workshop for PhD students to present their work and get feed-back from the lecturers. Invited Lecturers: Rinus Plasmeijer (Radboud University Nijmegen, The Netherlands): iTasks: Defining Interactive Workflows for the Web Werner Kluge (Christian-Albrechts-Universit?t zu Kiel, Germany): Abstract Lambda Calculus Machines Marko van Eekelen (Radboud University Nijmegen, The Netherlands): Proving Properties of Lazy Functional Programs Tim Sheard (Portland State University, USA): The Omega Programming Language Ralf Hinze (Universit?t Bonn, Germany): Generic Programming, Now! Three additional short courses will be given: Zolt?n Horv?th (E?tv?s Lor?nd University, Budapest, Hungary): Refactoring Erlang Programs Zolt?n Cs?rnyei (E?tv?s Lor?nd University, Budapest, Hungary): Lambda-Calculus Horia F. Pop (Babe?-Bolyai University, Cluj-Napoca, Romania): A Tutorial on Object Orientedness in Functional Programming Submissions for the workshop session: Each presentation can be of max. 25 minutes. The full paper version can be submitted after the summer school for post-conference reviewing. Venue: Cluj-Napoca / Kolozsv?r / Klausenburg, formerly the capital of Transylvania, is one of the most beautiful medieval cities with a huge multicultural and historical inheritance. Surrounded by marvelous hills and mountains, the city provides fascinating environment for experiencing the unique ambience of a diversified culture, society and nature. Registration and costs: The registration fee (260 Euro) includes the course materials distributed during the school, the post-school volume, lunches, the excursion and the summer school banquet. For further information, accommodation possibilities and registration please visit the web-page of the event: http://www.cs.ubbcluj.ro/cefp2007. From knomenet at gmail.com Mon Jun 11 16:09:22 2007 From: knomenet at gmail.com (Michael Speer) Date: Mon Jun 11 16:04:32 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> Message-ID: <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> The code I reference is located at : http://michaelspeer.blogspot.com/2007/06/impossible-is-only-possible-sometimes.html In the code I am building a parser for regular expressions. I know it is possible with ghc to have a function that accepts its own output as its input so long as it does not utilize that piece of output in generating itself. E.g. test x y = ( "World" , x , x ++ " " ++ y ) main = let ( a , b , c ) = test "Hello" a in do print $ ( a , b , c ) -- emits ("World","Hello","Hello World") This contrived example works properly. A more complex example can be found in the linked-to function `aexn' ( and-extracted-nodes ). It seems though, if you try this same trick with two different functions that rely on each others input and output, that the compiler will generate code, but the generated program causes the stack to overflow as each function tries to force the other one to evaluate first and neither bows out releasing an output of promises so that the two functions can resolve. They seem to encounter a lack of laziness. Well, more a duplication of effort. I specifically refer to the linked function `oexn' ( or-extracted-function-nodes ) that performs this feat. Or would if the program worked after being compiled. If the compiler were forced to only make the function call once and mark all variables generated by it immediately with either proper values or promises than the second functions call would receive the promises in place of the empty variables it feels the need to call the original function to fill. Are the promises added to the stack before or after the call? If after, then putting them on before may resolve this. It would likely make the implementation slower to do so however. Is this a known problem that will one day be resolved, or is it considered beyond the scope of the language? As I only use ghc, I am unfamiliar if one of the other implementations could handle this. I have seen nothing referring to it though out my searches regarding the matter. - michael speer From ryani.spam at gmail.com Mon Jun 11 17:54:35 2007 From: ryani.spam at gmail.com (Ryan Ingram) Date: Mon Jun 11 17:49:42 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> Message-ID: <2f9b2d30706111454s41d3a505p530214d29d3c27ba@mail.gmail.com> I doubt this is a problem with the compiler as you state; It's not immediately obvious by looking at your code what the problem is; the code is really dense and it's not immediately obvious what you are trying to accomplish. I suspect that either you have a bug, or you are pattern-matching against something you are depending on, which will force it to evaluate to weak-head normal form so that it can be matched against. Take a look at the section titled "Lazy Patterns" for an example of how to solve that problem: http://www.cs.auckland.ac.nz/references/haskell/haskell-intro-html/patterns.html I don't understand what you are saying about "promises pushed onto the stack". A boxed value can either be a thunk (unevaluated promise) or the evaluated result of that thunk. Calls to functions just push pointers to the boxes onto the stack. When the result is needed the thunk gets evaluated; if it somehow ends up depending on itself the thunk will get called recursively which will eventually end up in a stack overflow. -- ryan On 6/11/07, Michael Speer wrote: > The code I reference is located at : > > > http://michaelspeer.blogspot.com/2007/06/impossible-is-only-possible-sometimes.html > > In the code I am building a parser for regular expressions. I know it > is possible with ghc to have a function that accepts its own output as > its input so long as it does not utilize that piece of output in > generating itself. > > E.g. > test x y = ( "World" , x , x ++ " " ++ y ) > main = let ( a , b , c ) = test "Hello" a > in do > print $ ( a , b , c ) > > -- emits ("World","Hello","Hello World") > > This contrived example works properly. A more complex example can be > found in the linked-to function `aexn' ( and-extracted-nodes ). > > It seems though, if you try this same trick with two different > functions that rely on each others input and output, that the compiler > will generate code, but the generated program causes the stack to > overflow as each function tries to force the other one to evaluate > first and neither bows out releasing an output of promises so that the > two functions can resolve. They seem to encounter a lack of laziness. > Well, more a duplication of effort. I specifically refer to the > linked function `oexn' ( or-extracted-function-nodes ) that performs > this feat. Or would if the program worked after being compiled. > > If the compiler were forced to only make the function call once and > mark all variables generated by it immediately with either proper > values or promises than the second functions call would receive the > promises in place of the empty variables it feels the need to call the > original function to fill. > > Are the promises added to the stack before or after the call? If > after, then putting them on before may resolve this. It would likely > make the implementation slower to do so however. > > Is this a known problem that will one day be resolved, or is it > considered beyond the scope of the language? > > As I only use ghc, I am unfamiliar if one of the other implementations > could handle this. I have seen nothing referring to it though out my > searches regarding the matter. > > - michael speer > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070611/28897e92/attachment.htm From rendel at rbg.informatik.tu-darmstadt.de Mon Jun 11 18:06:59 2007 From: rendel at rbg.informatik.tu-darmstadt.de (Tillmann Rendel) Date: Mon Jun 11 18:02:08 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> Message-ID: <466DC783.9030605@rbg.informatik.tu-darmstadt.de> Hi Michael, Michael Speer schrieb: > I know it is possible with ghc to have a function that accepts its > own output as its input so long as it does not utilize that piece of > output in generating itself. [...] > > It seems though, if you try this same trick with two different > functions that rely on each others input and output, that [...] the > generated program causes the stack to overflow as each function tries > to force the other one to evaluate first and neither bows out > releasing an output of promises so that the two functions can > resolve. [...] I specifically refer to the linked function `oexn' ( > or-extracted-function-nodes ) that performs this feat. Or would if > the program worked after being compiled. This has nothing to do with how many functions you have working with some input. The evaluation order of haskell expressions is induced by the data dependencies between haskell expressions. This work's fine as long as the data dependencies aren't circular. For example numbers = 1 : map (1 +) numbers works fine because the value of the i'th element of numbers depends only on the value of the (i-1)'th element of numbers, but not on it's own value: the first element is given as 1. the second element is the first element + 1, so it is 2. the third element is the second element + 1, so it is 3. and so on... But infinity = 1 + infinity doesn't work at all, because the value of infinity depends on it's own value. > The code I reference is located at : > > http://michaelspeer.blogspot.com/2007/06/impossible-is-only-possible-sometimes.html Your code contains the following definitions (among others): > exn (c:_) n l = ( [ [ ( Just c , (n+1) ) ] ] , (n+1) ) > aexn (b:[]) n l = exn b n l > oexn (g:[]) n l = let ( ns , x ) = ( aexn g x l ) > in ( [] , ns , x ) The definition of exn says that the second component of exn's result depends on it's second argument. The definition of oexn feeds the second component of exn's result back as it's second argument. This creates a data dependency loop and the value of the third component of oexn is not defined. Your code is actually similiar to my infinity example above. Your code looks complicated, partly because you normalize some string representations instead of creating a domain specific algebraic data type. Wich aproach of the website you link to do you follow? Have you considered using a parser combinator library? Tillmann From haskell at list.mightyreason.com Mon Jun 11 18:37:12 2007 From: haskell at list.mightyreason.com (haskell@list.mightyreason.com) Date: Mon Jun 11 18:32:23 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> Message-ID: <466DCE98.2060102@list.mightyreason.com> You may also want to read the discussions on and linked to from: http://www.haskell.org/haskellwiki/Regular_expressions You may also want to consult my regular expression library regex-tdfa which has a Parsec parser for extended regular expressions at: http://darcs.haskell.org/packages/regex-unstable/regex-tdfa/Text/Regex/TDFA/ReadRegex.hs which makes a Pattern data type as the result of parsing which is defined in: http://darcs.haskell.org/packages/regex-unstable/regex-tdfa/Text/Regex/TDFA/Pattern.hs The laziness works for multiple functions but it must be correct. In "c" it is easy to make "goto" based code into an infinite loop, or to dereference a null pointer. In Haskell it is easy to define "x=y ; y=x" and enter an infinite loop. -- Chris Kuklewicz From magr at cs.tu-berlin.de Tue Jun 12 04:52:31 2007 From: magr at cs.tu-berlin.de (Martin Grabmueller) Date: Tue Jun 12 04:47:57 2007 Subject: [Haskell] ANNOUNCE: Harpy -- run-time code generation library In-Reply-To: <87irao7gsl.fsf@mid.deneb.enyo.de> References: <464423A8.40605@cs.tu-berlin.de> <464D61E5.6020306@cs.tu-berlin.de> <87irao7gsl.fsf@mid.deneb.enyo.de> Message-ID: <466E5ECF.7000304@cs.tu-berlin.de> Florian Weimer schrieb: > * Martin Grabmueller: > >> For the future, we'd like to be able to support more architectures, >> but it's not very high on our priority list. Maybe interest >> of others could change that... > > LLVM as a target could be interesting as well, and would avoid the > need to write tons of optimizers. [Sorry for the delay.] LLVM is indeed interesting, but has several drawbacks: - written in C++ (we don't have experience in interfacing Haskell and C++) - has been used with imperative languages yet, no experience available on using it for FP. - rather large system - and finally, I have to admit: a bit of Not Invented Here One of our goals was indeed to have a Haskell-only code generator, which has the advantage that it is easier to install, use and distribute. Regards, Martin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature Url : http://www.haskell.org/pipermail/haskell/attachments/20070612/14fa9362/signature.bin From dmhouse at gmail.com Tue Jun 12 05:51:40 2007 From: dmhouse at gmail.com (David House) Date: Tue Jun 12 05:46:48 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <466DC783.9030605@rbg.informatik.tu-darmstadt.de> (message from Tillmann Rendel on Tue, 12 Jun 2007 00:06:59 +0200) References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> <466DC783.9030605@rbg.informatik.tu-darmstadt.de> Message-ID: <87abv5lcur.fsf@gmail.com> For example numbers = 1 : map (1 +) numbers works fine [snip] But infinity = 1 + infinity doesn't work at all, because the value of infinity depends on it's own value. Another nice way to think about this is in terms of fixed points. Remember that an equation like: numbers = 1 : map (1 +) numbers Is equivalent to a version using fix: numbers = fix (\ns -> 1 : map (1 +) ns) So numbers gets assigned the fixpoint of the function \ns -> 1 : map (1 +) ns. We can easily see that the list of positive integers [1, 2, 3...] is a fixpoint of that function, because adding 1 to every element and sticking a 1 on the front results in the positive integers again. On the other hand, the equation for infinity: infinity = fix (1 +) Results in infinity = _|_, because there is no fixpoint of the function (1 +) (there is no number that, when you add one to it, results in that same number.) Interestingly, though, if you define Peano natural numbers: data Nat = Z | S Nat -- For example: zero = Z one = S Z two = S (S Z) infinity = S infinity Then infinity is _not_ _|_, but is in fact S (S (S ...)). This may not seem very useful, but say we were to write an Ord instance for Nat: instance Ord Nat where Z `compare` Z = EQ S _ `compare` Z = GT Z `compare` S _ = LT S n `compare` S m = n `compare` m (I.e. compare works by unwrapping S constructors from its two arguments and seeing which one runs out first.) Then infinity serves as a value which is GT than all other values. -David House, dmhouse@gmail.com From dgoldsmith at mac.com Tue Jun 12 10:40:56 2007 From: dgoldsmith at mac.com (Deborah Goldsmith) Date: Tue Jun 12 10:36:57 2007 Subject: [Haskell] ANNOUNCE: Harpy -- run-time code generation library In-Reply-To: <466E5ECF.7000304@cs.tu-berlin.de> References: <464423A8.40605@cs.tu-berlin.de> <464D61E5.6020306@cs.tu-berlin.de> <87irao7gsl.fsf@mid.deneb.enyo.de> <466E5ECF.7000304@cs.tu-berlin.de> Message-ID: On Jun 12, 2007, at 1:52 AM, Martin Grabmueller wrote: > LLVM is indeed interesting, but has several drawbacks: > > - written in C++ (we don't have experience in interfacing Haskell > and C++) You'd have to write a C wrapper, or generate the LLVM intermediate language directly from Haskell. > > - has been used with imperative languages yet, no experience available > on using it for FP. Very true. On the other hand, the LLVM team would probably value the feedback. Having LLVM work with FP languages would be a benefit to the FP community, too. > > - rather large system Well, so is Haskell. :-) Why is this a drawback? > > - and finally, I have to admit: a bit of Not Invented Here > > One of our goals was indeed to have a Haskell-only code generator, > which > has the advantage that it is easier to install, use and distribute. Targeting LLVM would make porting Haskell to a new platform much easier. Maybe it would make sense to "port" ghc to emit code that way, in addition to C--? Deborah From g9ks157k at acme.softbase.org Tue Jun 12 11:19:37 2007 From: g9ks157k at acme.softbase.org (Wolfgang Jeltsch) Date: Tue Jun 12 11:14:42 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <87abv5lcur.fsf@gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <466DC783.9030605@rbg.informatik.tu-darmstadt.de> <87abv5lcur.fsf@gmail.com> Message-ID: <200706121719.37340.g9ks157k@acme.softbase.org> Am Dienstag, 12. Juni 2007 11:51 schrieb David House: > [?] > Another nice way to think about this is in terms of fixed points. Remember > that an equation like: > > numbers = 1 : map (1 +) numbers > > Is equivalent to a version using fix: > > numbers = fix (\ns -> 1 : map (1 +) ns) > > So numbers gets assigned the fixpoint of the function \ns -> 1 : map (1 +) > ns. It is always the *least* fixpoint. For example, (0 *) has the fixpoint _|_ (because 0 * _|_ = _|_) but every integer is also a fixpoint of it. However, _|_ is less than all those integers in the sense of ?less defined?, and so the result of fix (0 *) is _|_. > [?] Best wishes, Wolfgang From dmahler at gmail.com Tue Jun 12 11:54:34 2007 From: dmahler at gmail.com (Daniel Mahler) Date: Tue Jun 12 11:49:37 2007 Subject: [Haskell] ANNOUNCE: Harpy -- run-time code generation library In-Reply-To: <466E5ECF.7000304@cs.tu-berlin.de> References: <464423A8.40605@cs.tu-berlin.de> <464D61E5.6020306@cs.tu-berlin.de> <87irao7gsl.fsf@mid.deneb.enyo.de> <466E5ECF.7000304@cs.tu-berlin.de> Message-ID: Given your reservation regarding LLVM, you may be interested in vmgen, developed and used as a part of gforth. It is also claimed that a JVM built with vmgen had performance comparable to state of the art JITs. If I remember the author of both gforth (including vmgen) and the experimantal JVM, is Anton Ertl. Personally I have never used it, and do not know how good it is, so I am not trying to push it. However, what little I do know about it seems to address your concerns with LLVM: > LLVM is indeed interesting, but has several drawbacks: > > - written in C++ (we don't have experience in interfacing Haskell and C++) vmgen is C AFAIK > - has been used with imperative languages yet, no experience available > on using it for FP. Forth is not a functional language by a long shot, but forth code does tend to have a functional flavour. (if you squint hard enough :) ) > - rather large system The whole of gforth is not that big, and vmgen is just a part of that. > - and finally, I have to admit: a bit of Not Invented Here > > One of our goals was indeed to have a Haskell-only code generator, which > has the advantage that it is easier to install, use and distribute. Yes, there is that. Anyway as I said, I do not know how much mileage you could get out of it, but it seemed to be worth mentioning, given what you said about LLVM. cheers Daniel > Regards, > Martin > > > > > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://www.haskell.org/mailman/listinfo/haskell > > > From dmhouse at gmail.com Tue Jun 12 12:55:46 2007 From: dmhouse at gmail.com (David House) Date: Tue Jun 12 12:50:54 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <200706121719.37340.g9ks157k@acme.softbase.org> (message from Wolfgang Jeltsch on Tue, 12 Jun 2007 17:19:37 +0200) References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <466DC783.9030605@rbg.informatik.tu-darmstadt.de> <87abv5lcur.fsf@gmail.com> <200706121719.37340.g9ks157k@acme.softbase.org> Message-ID: <87r6oh5cz1.fsf@gmail.com> From: Wolfgang Jeltsch It is always the *least* fixpoint. For example, (0 *) has the fixpoint _|_ (because 0 * _|_ = _|_) but every integer is also a fixpoint of it. However, _|_ is less than all those integers in the sense of ???less defined???, and so the result of fix (0 *) is _|_. True, that's worth mentioning. By the way, the Haskell Wikibook chapter on Denotational Semantics [1] will make for interesting reading for anyone following along with this discussion. [1]: http://en.wikibooks.org/wiki/Haskell/Denotational_semantics -David House, dmhouse@gmail.com From tomasz.zielonka at gmail.com Tue Jun 12 13:34:55 2007 From: tomasz.zielonka at gmail.com (Tomasz Zielonka) Date: Tue Jun 12 13:30:01 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <200706121719.37340.g9ks157k@acme.softbase.org> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <466DC783.9030605@rbg.informatik.tu-darmstadt.de> <87abv5lcur.fsf@gmail.com> <200706121719.37340.g9ks157k@acme.softbase.org> Message-ID: <20070612173454.GA5303@lambda> On Tue, Jun 12, 2007 at 05:19:37PM +0200, Wolfgang Jeltsch wrote: > It is always the *least* fixpoint. For example, (0 *) has the fixpoint _|_ > (because 0 * _|_ = _|_) but every integer is also a fixpoint of it. 0 * 5 = 5 ? You probably meant (1 *) or (0 +). Best regards Tomek From u.stenzel at web.de Tue Jun 12 19:18:57 2007 From: u.stenzel at web.de (Udo Stenzel) Date: Tue Jun 12 20:26:21 2007 Subject: [Haskell] Fwd: Mutually dependent functions In-Reply-To: <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> References: <314e9ce40706111308p7872aa26g79812035f4e93059@mail.gmail.com> <314e9ce40706111309m31554a1cna2c016938094c628@mail.gmail.com> Message-ID: <20070612231856.GA26013@web.de> Michael Speer wrote: > test x y = ( "World" , x , x ++ " " ++ y ) > main = let ( a , b , c ) = test "Hello" a > in do > print $ ( a , b , c ) This works, but in your code you actually wrote let ( ( a, b, c ), ( d, e, f ), ( g, h, i ) ) = ( foo, bar, baz ) with the right side involving the stuff on the left. This won't work; for Haskell to bind values to a, b, and so on, it has to examine the value being matched to check whether it is really a tuple (and not _|_). You can defer the check, and that's called a lazy or irrefutable pattern binding: let ( ~( a, b, c ), ~( d, e, f ), ~( g, h, i ) ) = ( foo, bar, baz ) This would work. The reason you didn't run into this earlier (and why I apprently forgot a tilde) is that let-bindings are always lazy, as if you had put a tilde there, but this doesn't hold for nested patterns. This means that not tupling your three functions and instead using a group of bindings would work, too, and look prettier anyway: let ( a, b, c ) = foo ( d, e, f ) = bar ( g, h, i ) = baz Yes, let groups allow mutually recursive bindings, the same is true for where clauses and mdo blocks. > Is this a known problem that will one day be resolved, or is it > considered beyond the scope of the language? Neither, it's supposed to be this way. Btw, you might consider posting a _minimal_ code example when illustrating your next problem. I didn't even try to run your big chunk of code, so the above is only guesswork. -Udo -- Always call a spade a spade, except in classes that both dig holes and play bridge. -- a guideline for Eiffel programmers -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://www.haskell.org/pipermail/haskell/attachments/20070613/b5deb7f8/attachment.bin From keller at cse.unsw.edu.au Tue Jun 12 21:03:03 2007 From: keller at cse.unsw.edu.au (Gabriele Keller) Date: Tue Jun 12 20:58:03 2007 Subject: [Haskell] Haskell Workshop Deadline is approaching Message-ID: <466F4247.9080208@cse.unsw.edu.au> Just a reminder that the deadline for the Haskell Workshop is this Friday, 15th of June! More info: http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Cheers, Gabriele From johanj at cs.uu.nl Wed Jun 13 03:01:27 2007 From: johanj at cs.uu.nl (Johan Jeuring) Date: Wed Jun 13 02:51:02 2007 Subject: [Haskell] PhD student on Real-life datatype-generic programming Message-ID: <9C760CE5-39E1-4D91-B0CD-1C1283598635@cs.uu.nl> =================================================== Vacancy PhD student on Real-life datatype-generic programming Software Technology, Utrecht University, The Netherlands. =================================================== Within the Software Technology group of the Information and Computing Sciences department of Utrecht University there is a vacancy for a PhD student to work on Real-life datatype-generic programming. The position is funded by NWO, the Netherlands Organisation for Scientific Research. ------------------------------------------------------------------------ ----------------- Project summary: Datatype-generic programming has been around for more than 10 years now. We think a lot of progress has been made in the last decade. As an example, there are more than 10 proposals for generic-programming libraries or language extensions just for the lazy functional- programming language Haskell. Although generic programming has been applied in several applications, it lacks users for real-life projects. This is understandable. Developing a large application takes a couple of years, and choosing a particular approach to generic programming for such a project involves a risk. Few approaches that have been developed over the last decade are still supported, and there is a high risk that the chosen approach will not be supported anymore, or that it will change in a backwards-incompatible way in a couple of years time. We propose to create an environment that supports developing real- life applications using generic-programming techniques. We will focus on developing: - a library or a mixture of a library with a language extension for which we will guarantee continuing support. - an example of a real-life application fundamentally using generic- programming techniques. This application will serve as a showcase for generic-programming support for software development and evolution. - generic-programming design patterns. The usage of the generic- programming techniques in real-life projects will exhibit recurrent patterns, and will give valuable advice for and help with developing other applications using generic-programming techniques. Thus we will show how generic programming can be used to develop powerful tools in little time, and that the resulting tools are easy to maintain, adapt, and reuse. ------------------------------------------------------------------------ ----------------- Requirements: Master degree in Computer Science, or equivalent. Good knowledge of functional programming, and several advanced computer science techniques. Knowledge of Haskell, parsing, rewriting, strategies, generic programming, etc. will be useful. Terms of employment: the PhD student should start as soon as possible, but no later than January 1, 2008. The position is for four years (after one year there will be an evaluation), full-time. Gross salary starts with ? 1956,-- per month in the first year and increases to ? 2502,-- in the fourth year of employment. The salary is supplemented with a holiday bonus of 8% and an end-of-year bonus of 3%. In addition we offer: a pension scheme, partially paid parental leave, facilities for child care, flexible employment conditions in which you may trade salary for vacation days or vice versa. Conditions are based on the Collective Employment Agreement of the Dutch Universities. More information about the project can be found on http:// www.cs.uu.nl/~johanj/publications/nwo-ew2006.pdf More information about the Software Technology group on http:// www.cs.uu.nl/wiki/Center More information about the Information and Computing Sciences department on http://www.cs.uu.nl/ More information about this vacancy can be obtained from Johan Jeuring (johanj@cs.uu.nl, http://www.cs.uu.nl/~johanj/, +31 6 40010053). Send your application in pdf (or another non-proprietary format) to SciencePenO@uu.nl with a cc to johanj@cs.uu.nl. on or before July 31, 2007. We expect to arrange interviews in September. Mention vacancy nr 62712. From Malcolm.Wallace at cs.york.ac.uk Wed Jun 13 05:55:43 2007 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Jun 13 05:53:22 2007 Subject: [Haskell] Who pays for *.haskell.org machines? Message-ID: <20070613105543.5a76822d.Malcolm.Wallace@cs.york.ac.uk> The haskell.org Summer-of-Code mentors are pleased to announce that money earned from the 2006 Google SoC (by the organisation, separately from student earnings) is now being spent for the community's benefit in maintaining the www.haskell.org web server. Previously, the server was kindly supported by Paul Hudak's academic grants at Yale. The server continues to be hosted at Yale, but is now being paid for directly by us, the Haskell language community. In addition, we are in the process of setting up a separate server called code.haskell.org which will offer project hosting to the Haskell world at large, along similar lines to darcs.haskell.org except open to anyone, and again funded by our Summer-of-Code activity. The details are still being finalised, so watch out for a fuller announcement. We are again participating in the 2007 GSoC, which will generate more income, which will eventually of course also go to furthering the Haskell community's aims. Many thanks to Galois for handling the SoC financial arrangements, not to mention that they also host darcs.haskell.org out of their own pocket. Regards, Malcolm From ashley at semantic.org Wed Jun 13 22:46:51 2007 From: ashley at semantic.org (Ashley Yakeley) Date: Wed Jun 13 22:42:08 2007 Subject: [Haskell] Re: Who pays for *.haskell.org machines? In-Reply-To: <20070613105543.5a76822d.Malcolm.Wallace@cs.york.ac.uk> References: <20070613105543.5a76822d.Malcolm.Wallace@cs.york.ac.uk> Message-ID: Malcolm Wallace wrote: > In addition, we are in the process of setting up a separate server called > code.haskell.org > which will offer project hosting to the Haskell world at large, along > similar lines to darcs.haskell.org except open to anyone, and again > funded by our Summer-of-Code activity. This is excellent news. I had considered moving the JVM-Bridge darcs repo to darcs.haskell.org, but I wasn't sure if it was appropriate (unlike the standard time library, which definitely belongs there). -- Ashley Yakeley From hpacheco at gmail.com Thu Jun 14 17:43:01 2007 From: hpacheco at gmail.com (Hugo Pacheco) Date: Thu Jun 14 17:37:57 2007 Subject: [Haskell] class variable dynamic inference Message-ID: <7b92c2840706141443u47f8cff2ja7db7302878c34da@mail.gmail.com> Hi, I have defined some functors (with respective Functor instances) and a class that derives the equivalent non-functor representation class (Functor f) => Rep f a b | f a -> b My problem is that I need to define another class class (Functor f,Rep f d c) => FunctorOf f d | d -> f where in'' :: c -> d out'' :: d -> c where the variable c would be implicit and dynamically derived from the (f d) context. Of course this is not allowed as long as the variable c is not in the class context. Is there any way I can hack this around? defining the class functions like in'' :: Rep f d c => c -> d doesn't solve my problem as well. Thanks in advance, hugo From conal at conal.net Thu Jun 14 21:48:57 2007 From: conal at conal.net (Conal Elliott) Date: Thu Jun 14 21:43:53 2007 Subject: [Haskell] Wanted: tricks for conflicting instances Message-ID: In playing with compositions involving functors & cofunctors, I've run into a conflict in the instances I want to provide. I imagine this sort of problem is well-known, and I'd like to hear what kinds of strategies people apply. Here's a definition of type composition: newtype O g f a = O { unO :: g (f a) } and a cofunctor class: class Cofunctor cof where cofmap :: (a -> b) -> (cof b -> cof a) We can compose functors to get a functor, cofunctors to get a functor, and functor & cofunctor in either order to get a cofunctor. instance (Functor g, Functor f) => Functor (O g f) where fmap h (O gf) = O (fmap (fmap h) gf) instance (Cofunctor g, Functor f) => Cofunctor (O g f) where cofmap h (O gf) = O (cofmap (fmap h) gf) instance (Functor g, Cofunctor f) => Cofunctor (O g f) where cofmap h (O gf) = O (fmap (cofmap h) gf) instance (Cofunctor g, Cofunctor f) => Functor (O g f) where fmap h (O gf) = O (cofmap (cofmap h) gf) I've wanted all four of those instances. The problem is that instance selection (in GHC at least) ignores the contexts. Without context, the first and fourth instances conflict, as do the second and third. Thus I statically choose two of the four rules and comment out the other two. Depending on my application, sometimes I like my choices, and sometimes I don't. Are there work-arounds to get the flexibility I want out of GHC? Is it plausible to improve instance selection to use contexts? I imagine doing so would require some kind of backtracking search. Thanks, - Conal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070614/abd635da/attachment.htm From mutjida at gmail.com Thu Jun 14 22:53:08 2007 From: mutjida at gmail.com (jeff p) Date: Thu Jun 14 22:48:04 2007 Subject: [Haskell] Wanted: tricks for conflicting instances In-Reply-To: References: Message-ID: Hello, > Is it plausible to improve instance selection to use contexts? I imagine > doing so would require some kind of backtracking search. > Sometimes you can explicitly program instance selection by using type level bools. Oleg has written several examples of this; here is one which implements Prolog style proof-search: http://okmij.org/ftp/Haskell/types.html#de-typechecker If you can implement IsFunctor and IsCofunctor as type level functions (which might be very tedious or even impossible), then you could re-implement Functor and Cofunctor with the desired functionality. hth, Jeff From mechvel at botik.ru Fri Jun 15 03:12:16 2007 From: mechvel at botik.ru (Serge D. Mechveliani) Date: Fri Jun 15 03:07:36 2007 Subject: [Haskell] DoCon soft announcement Message-ID: <20070615071216.GA1344@scico.botik.ru> Software Announcement --------------------- The Algebraic Domain Constructor DoCon, Version 2.09, written in Haskell, is available, together with its source program, on Internet at the following addresses: http://www.botik.ru/~mechvel/ click at docon-2.09 (Russian site), ftp.botik.ru/pub/local/Mechveliani/docon/ (same site), http://www.haskell.org/docon/distrib/ (USA site) The difference to previous (2.08) release is small: * it is ported to the latest (on 2007) Glasgow Haskell version of 6.6.1, * it has a simpler installation code, due to that it relies on the commands `configure', `build', `install' of the Cabal support for `making', * several bugs are fixed, * the implementation for decomposing to elementary symmetrics is improved. ----------------- Serge Mechveliani mechvel@botik.ru From icfp.publicity at googlemail.com Fri Jun 15 10:52:54 2007 From: icfp.publicity at googlemail.com (Matthew Fluet (ICFP Publicity Chair)) Date: Fri Jun 15 10:47:54 2007 Subject: [Haskell] ICFP07 Accepted Papers Message-ID: <53ff55480706150752s2508f224g6f6ef9b8ccc8d3b4@mail.gmail.com> Accepted Papers ICFP 2007: International Conference on Functional Programming http://www.informatik.uni-bonn.de/~ralf/icfp07.html Freiburg, Germany, 1-3 October 2007 The ICFP 2007 Program Chair and Committee are pleased to announce that the following papers have been accepted for the conference. Additional information regarding the final program, invited speakers, and registration will be forthcoming. However, the Local Arrangements Chair offers the following advice regarding hotel reservations: * As September and October is Freiburg's main tourist season, it is important that participants book hotel rooms early. The blocks of hotel rooms reserved for ICFP participants will be held until August 1. It is expected that many downtown hotels will be fully booked at the time of the conference. [However, there should be little to no penalty for cancelling a hotel room reservation after August 1.] More details regarding accommodation and travel may be obtained from the ICFP 2007 Local Information webpage: http://proglang.informatik.uni-freiburg.de/ICFP2007/ Accepted papers ~~~~~~~~~~~~~~~ A Generic Usage Analysis with Subeffect Qualifiers by Jurriaan Hage, Stefan Holdermans, Arie Middelkoop Experience Report: A Haskell interpreter for CellML by Jonathan Cooper, Steve McKeever A type directed translation of MLF to System-F by Daan Leijen A Type System for Recursive Modules by Derek Dreyer Adding Delimited and Composable Control to a Production Programming Environment by Matthew Flatt, Gang Yu, Robert Bruce Findler, Matthias Felleisen Bidirectionalization Transformation based on Automatic Derivation of View Complement Functions by Kazutaka Matsuda, Zhenjiang Hu, Keisuke Nakano, Makoto Hamana, Masato Takeichi Experience Report: Building an Eclipse-based IDE for Haskell by Leif Frenzel Compiling with Continuations, Continued by Andrew J. Kennedy Constructor specialisation for Haskell programs by Simon Peyton Jones Evaluating High-Level Distributed Language Constructs by Jan Nystrom, Phil Trinder, David King Extensible Pattern Matching via a Lightweight Language Extension by Don Syme, Gregory Neverov, James Margetson Faster laziness using dynamic pointer tagging by Simon Marlow, Alexey Rodriguez, Simon Peyton Jones Feedback Directed Implicit Parallelism by Tim Harris, Satnam Singh Finger Trees in Russell by Matthieu Sozeau Functional Pearl: The Great Escape by David Herman Experience Report: Functional Programming in C-Rules by Jeremy Wazny Inductive Reasoning about Effectful Data Types by Andrzej Filinski, Kristian Stoevring iTasks: Executable Specifications of Interactive Work Flow Systems for the Web by Rinus Plasmeijer, Peter Achten, Pieter Koopman Lazy Call-By-Value Evaluation by Frank Huch, Bernd Brassel, Sebastian Fischer, Michael Hanus, German Vidal McErlang: A Model Checker for a Distributed Functional Programming Language by Lars-?ke Fredlund, Hans Svensson On Barron and Strachey's Cartesian Product Function by Michael Spivey, Olivier Danvy Ott: Effective Tool Support for the Working Semanticist by Peter Sewell, Francesco Zappa Nardelli, Scott Owens, Gilles Peskine, Thomas Ridge, Susmit Sarkar, Rok Strnisa Relating Complexity and Precision in Control Flow Analysis by David Van Horn, Harry Mairson Experience Report: Scheme in Commercial Web Application Development by Noel Welsh, David Gurnell Stream Fusion: From Lists to Streams to Nothing at All by Duncan Coutts, Roman Leshchinskiy, Don Stewart Tangible Functional Programming by Conal Elliott Termination Analysis and Call Graph Construction for Higher-Order Functional Programs by Damien Sereni The Portable R6RS Syntax System by Abdulaziz Ghuloum, R. Kent Dybvig Experience Report: The Reactis Validation Tool by Steve Sims, Daniel C. DuVarney Type-safe Higher-order Channels in ML-like Languages by Sungwoo Park User-Friendly Functional Programming for Web Mashups by Rob Ennals, David Gay Experience Report: Using Functional Programming to Manage a Linux Distribution by Clifford Beshers, David Fox, Jeremy Shaw -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070615/95c37d00/attachment-0001.htm From ndmitchell at gmail.com Fri Jun 15 12:12:59 2007 From: ndmitchell at gmail.com (Neil Mitchell) Date: Fri Jun 15 12:07:52 2007 Subject: [Haskell] ANN: Uniplate 1.0 Message-ID: <404396ef0706150912hfd5b7a8lfa4ec6dcc23bc84e@mail.gmail.com> Hi, I am pleased to announce Uniplate (formerly known as Play), a library for boilerplate removal requiring only Haskell 98 (for normal use) and optionally multi-parameter type classes (for more advanced features). This library has been tested with Yhc, Hugs and GHC. The Uniplate library can do some of the same things as Scrap Your Boilerplate (SYB), and has functions that can be used in a similar manner to everywhere and everything. LINKS Project home page: http://www-users.cs.york.ac.uk/~ndm/uniplate/ Hackage release: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/uniplate-1.0 Haddock docs: http://www.cs.york.ac.uk/fp/haddock/uniplate/ Short Manual: http://www.cs.york.ac.uk/fp/darcs/uniplate/uniplate.htm Draft Paper: http://www-users.cs.york.ac.uk/~ndm/downloads/draft-uniplate-15_jun_2007.pdf The manual contains a basic overview of some bits of the library, the paper goes into more detail, but is intended to still be a readable introduction to the library. A SHORT EXAMPLE Given an Int expression data type: data Expr = Add Expr Expr | Val Int | Sub Expr Expr | Var String | Mul Expr Expr | Neg Expr | Div Expr Expr We can extract all the variables using the function: variables :: Expr -> [String] variables (Var x ) = [x] variables (Val x ) = [] variables (Neg x ) = variables x variables (Add x y) = variables x ++ variables y variables (Sub x y) = variables x ++ variables y variables (Mul x y) = variables x ++ variables y variables (Div x y) = variables x ++ variables y Or we can use the Uniplate library: variables :: Expr -> [String] variables x = [y | Var y <- universe x] THANKS TO: Colin Runciman, Bjorn Bringert, Jules Bean, Eric Mertens, Tom Shackell and Stefan O'Rear for various help and feedback. The Uniplate library has been used in Yhc, Catch, Hoogle and other projects. Please direct any follow-up discussion to haskell-cafe. Thanks Neil From oleg at pobox.com Sat Jun 16 03:26:15 2007 From: oleg at pobox.com (oleg@pobox.com) Date: Sat Jun 16 03:32:10 2007 Subject: [Haskell] Re: Wanted: tricks for conflicting instances Message-ID: <20070616072615.5CFE8AD43@Adric.metnet.fnmoc.navy.mil> Conal Elliott wrote: > The problem is that instance selection (in GHC at least) ignores the > contexts... Is it plausible to improve instance selection to use > contexts? I imagine doing so would require some kind of backtracking > search. Indeed the instance selection depends only on the types but not on their constraints. That is a feature of Haskell, and it is a useful feature (as shown in the HList paper). Still, as Jeff said, instance selection based on contexts and backtracking compile-time search are possible. For example, the article http://okmij.org/ftp/Haskell/poly2.txt says: We also show how to write typeclass instances with back-tracking: if one instance does not apply, the typechecker will chose the `next' instance -- in the precise meaning of `next'. The following article about controlling instance selection and resolving ambiguous overloading might also be helpful: http://okmij.org/ftp/Haskell/typecast.html#ambiguity-resolution From hpacheco at gmail.com Sat Jun 16 10:48:49 2007 From: hpacheco at gmail.com (Hugo Pacheco) Date: Sat Jun 16 10:43:40 2007 Subject: [Haskell] class functional depency inference? Message-ID: <7b92c2840706160748t53e111dbmd70f1bddf20cd432@mail.gmail.com> Hi, I have resumed my problem to the following. In this small example, the type checker always complains, and do need to write something similar that would use the functional dependency to infere the type b. class SomeClass a b | a -> b instance SomeClass Int Bool test :: SomeClass a b => a -> b test 1 = True Cheers, hugo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070616/15b5ca5d/attachment.htm From dmhouse at gmail.com Sat Jun 16 11:22:06 2007 From: dmhouse at gmail.com (David House) Date: Sat Jun 16 11:16:58 2007 Subject: [Haskell] class functional depency inference? In-Reply-To: <7b92c2840706160748t53e111dbmd70f1bddf20cd432@mail.gmail.com> References: <7b92c2840706160748t53e111dbmd70f1bddf20cd432@mail.gmail.com> Message-ID: <18036.30.130521.341353@gargle.gargle.HOWL> Hugo Pacheco writes: > test :: SomeClass a b => a -> b > test 1 = True test, as you've written it, is only a function from Ints to Bools, not from any a to any b where SomeClass a b holds. It is true that SomeClass Int Bool is the only instance at the moment, but type classes are open and someone could come along and add another instance (perhaps even in a different module), like SomeClass () String, and your function promises to be able to deal with them; as you've written it, it can't. -- -David House, dmhouse@gmail.com From hpacheco at gmail.com Sat Jun 16 12:07:23 2007 From: hpacheco at gmail.com (Hugo Pacheco) Date: Sat Jun 16 12:02:13 2007 Subject: [Haskell] class functional depency inference? In-Reply-To: <18036.30.130521.341353@gargle.gargle.HOWL> References: <7b92c2840706160748t53e111dbmd70f1bddf20cd432@mail.gmail.com> <18036.30.130521.341353@gargle.gargle.HOWL> Message-ID: <7b92c2840706160907k12385b33o64625ecf74482913@mail.gmail.com> On 6/16/07, David House wrote: > > Hugo Pacheco writes: > > test :: SomeClass a b => a -> b > > test 1 = True > > >test, as you've written it, is only a function from Ints to Bools, not > from any > >a to any b where SomeClass a b holds. It is true that SomeClass Int Bool > is the > >only instance at the moment, but type classes are open and someone could > come > >along and add another instance (perhaps even in a different module), like > >SomeClass () String, and your function promises to be able to deal with > them; as > >you've written it, it can't. I've just promoted the test function to the class and it works the same, I missed it before. However, haskell functions are partial. It could be generic and fail when some pattern does not exist as usual. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070616/ce0bf7b7/attachment.htm From Oege.de.Moor at comlab.ox.ac.uk Sun Jun 17 13:50:45 2007 From: Oege.de.Moor at comlab.ox.ac.uk (Oege.de.Moor@comlab.ox.ac.uk) Date: Sun Jun 17 13:45:35 2007 Subject: [Haskell] PhD on refactoring at Oxford Message-ID: <200706171750.l5HHojVd029707@mercury.comlab.ox.ac.uk> UNIVERSITY OF OXFORD COMPUTING LABORATORY Programming Tools Group Oxford University Computing Laboratory has a fully funded three year research studentship working in the Programming Tools Group with the abc team: http://progtools.comlab.ox.ac.uk http://aspectbench.org PROJECT SUMMARY Software systems are rarely written from scratch: they evolve over long periods of time. When a change is made, this often affects many different locations in a system, and it is hard to make a change consistently. For that reason, automated tools to help the process of software change are desirable. "Refactoring" refers to the process of restructuring an existing piece of software, often prior to introducing new functionality, or to take advantage of a new technology. Refactoring must preserve the behaviour of existing code, and tools that help in refactoring both assist in the restructuring process and in checking that the behaviour has not changed. Unfortunately today's refactoring tools are very hard to construct, they are still quite limited in functionality, and they often contain bugs. This project aims to construct a framework for better refactoring tools. In particular, the work is driven by refactorings for a new set of language features, called `aspect-oriented programming' that have recently been added to Java. Our framework will be based on developments in three separate areas of computer science: * "strategies" to control the process of rewriting program code, from the term rewriting community * "reference attribute grammars" to specify the conditions that guarantee behaviour is preserved, from the compilers community * "incremental evaluation" of declarative rules, from the functional and logic programming community. The quality of our framework will be assessed by coding selected case studies using alternative methods. In particular, we shall implement several refactorings directly in Eclipse, the leading development environment for writing aspect-oriented programs in industry. SELECTION CRITERIA The PhD student will be concerned with the theoretical foundations of the refactoring framework, for instance proofs of correctness for refactorings, and also for the incremental evaluation mechanism. We are thus looking for someone with good mathematical skills, in particular regarding formal properties of type systems and program analyses. Candidates must have an outstanding undergraduate or master's degree in computer science. More generally, candidates must satisfy the usual requirements: http://web.comlab.ox.ac.uk/oucl/prospective/dphil/dphil-criteria.pdf for doing a doctorate at Oxford. HOW TO APPLY The deadline for applications has been extended to July 17, 2007, but earlier applications will be reviewed immediately, so candidates are encouraged to apply as soon as possible. Previous applicants need not re-apply. To apply you need to download the University's application form from: http://www.admin.ox.ac.uk/postgraduate/apply/forms You will need to submit references and a transcript with your application. It is also required to submit a research proposal: in this proposal, please elaborate on the reasons why you are interested in this project, and the research questions you find most exciting and important to address within the scope of the project. To make a convincing proposal, you may wish to consult some of the suggested reading below. Please submit your application to: Mrs. Julie Sheppard Secretary for Graduate Studies Oxford University Computing Laboratory Wolfson Building Parks Road Oxford OX1 3QD United Kingdom AND NOT TO THE ADDRESS ON THE APPLICATION FORM FURTHER INFORMATION We are happy to discuss any of the above informally with prospective candidates. Just email one or all of the project leaders: Oege de Moor (oege@comlab.ox.ac.uk) Torbjorn Ekman (torbjorn@comlab.ox.ac.uk) Mathieu Verbaere (matv@comlab.ox.ac.uk) SUGGESTED READING Avgustinov et al, Semantics of Static Pointcuts in AspectJ, POPL 2007 http://progtools.comlab.ox.ac.uk/members/oege/publications/documents/pcsemantics.pdf Ekman and Hedin. Rewritable Reference Attributed Grammars, ECOOP 2004. http://www.cs.lth.se/gorel/publications/2004-ReRAGs-LNCS.pdf Verbaere, Ettinger and De Moor. JunGL: a Scripting Language forRefactoring, ICSE 2006 http://progtools.comlab.ox.ac.uk/publications/icse06jungl Visser. Program Transformation with Stratego/XT: Rules, Strategies, Tools and Systems in StrategoXT-0.9. Domain-specific program generation. http://www.cs.uu.nl/research/techreps/UU-CS-2004-011.html From wiiat at kis-lab.com Tue Jun 19 04:34:33 2007 From: wiiat at kis-lab.com (Jia Hu) Date: Tue Jun 19 04:29:17 2007 Subject: [Haskell] Final Call for Tutorial: IEEE/WIC/ACM WI-IAT'07 Message-ID: <20070619082914.BDE733247DB@www.haskell.org> [Apologies if you receive this more than once] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2007 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT 2007) Silicon Valley, USA, November 2-5, 2007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++ Call for Tutorials ++++++++++++++++++ The 2007 IEEE/WIC/ACM International Joint Conference on Web Intelligence (WI'07) and Intelligent Agent Technology (IAT'07) takes place on November 2-5, 2007, in Silicon Valley, the center of high tech and web technology. The IEEE/WIC/ACM 2007 joint conference is organized by San Jose State University, and sponsored by IEEE Computer Society Technical Committee on Intelligent Informatics (TCII), Web Intelligence Consortium (WIC), and ACM-SIGART. Homepage: http://www.cs.sjsu.edu/wi07/wi/?index=tutorial and http://www.cs.sjsu.edu/wi07/iat/?index=tutorial WI 2007 and IAT 2007 will include tutorials providing in-depth background on subjects that are of broad interest to the intelligent agent community. Both short (2 hours) and long (half day) tutorials will be considered. The following is a *non-exclusive* list of preferred topic areas for tutorial proposals: Web Intelligence: - Intelligent/Semantic Web Services - Intelligent Wireless Web and Ubiquitous Computing - Rules and Inference Engines for the Web - Semantic Web Concepts and Techniques for Security and Trust - Service-Oriented Computing - Social Networks and Social Intelligence - e-learning and e-science - Web Intelligence and Education Intelligent Agent Technology: - Agent-Based Modeling and Simulation - Agent Technologies in e-Business Systems - Agent-Mediated Knowledge Management - Peer-to-Peer Models for Multi-Agent Systems - Agent-Based Grid Computing Submission Details: Proposals for tutorials should consist of an outline and background information on the presenter(s). The tutorial outline should be limited to 2 pages and contain the following information: 1. Title and abstract of the tutorial 2. Proposed duration: 2 hours or half-day 3. Intended audience: to whom is the tutorial of interest 4. Prerequisite knowledge: what the attendees should already know 5. Detailed outline The background information on the presenter(s) should be limited to 1-2 pages and contain: 1. Names, affiliations, homepages and contact details 2. Short biographies 3. Information about previous tutorials given by the same presenters (title, location, number of attendees, etc.) Tutorial materials such as handouts and slides should be included if already available, but are not required for submission. Please send your proposal to pawan@cs.smu.ca or Pawan.Lingras@smu.ca Important Dates: July 1, 2007 Tutorial submissions July 10, 2007 Acceptance notices October 1, 2007 Camera-ready copy of tutorial handouts November 2-5, 2007 WI-IAT'07 tutorials Tutorial Chair: Pawan Lingras, Saint Mary's University, Canada Email: pawan@cs.smu.ca or Pawan.Lingras@smu.ca +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ From bfotsing at gmail.com Tue Jun 19 05:05:11 2007 From: bfotsing at gmail.com (bft) Date: Tue Jun 19 04:59:51 2007 Subject: [Haskell] Building extra-libs (packages text, data, util, lang) Message-ID: <232143290706190205s6bc43ed0tc0ff434dc1a844c2@mail.gmail.com> Hello I am trying to install FRUIT (Functional Reactive User Interface Toolkit - http://www.haskell.org/fruit/) I didn't succeed when building Greencard (2.03 or 2.05) because (I suppose) the packages text, data, util, lang were not found with the ghc-6.6.1haskell compiler. A part of the error generated is : "Glasgow Haskell Compiler, Version 6.6.1, for Haskell 98, compiled by GHC version 6.6.1 Using package config file: /home/bfotsing/lib/ghc-6.6.1/package.conf Using package config file: /home/bfotsing/.ghc/i386-linux-6.6.1/package.conf *** Deleting temp files: Deleting: *** Deleting temp dirs: Deleting: ghc-6.6.1: unknown package: text" I don't know where to get those packages or (maybe) how to build them since I didn't find them in the ghc extra-libs ( http://www.haskell.org/ghc/download_ghc_661.html). Thanks for your help BFT -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.haskell.org/pipermail/haskell/attachments/20070619/0a3e6c09/attachment-0001.htm From wss at Cs.N