instance not found
Hello, I have the following code: class C a where f :: a - Int instance C (a,b) where f = const 2 instance C ((a,b),c) where f = const 3 If I load this code into ghci with switches -fglasgow-exts and -fallow-overlapping-instances and enter f (1,2), I get this message: interactive:1: No instance for (C (t, t1)) arising from use of `f' at interactive:1 In the definition of `it': f (1, 2) I cannot see why f (1,2) shouldn't be acceptable, so I suppose it's a bug. Am I missing something? I'm using GHC 5.04.3. Wolfgang ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
class not used, error not detected
Hello, the following code is accepted by GHC but rejected by Hugs. I think, GHC is in error here. class C a where x :: Int main :: IO () main = return () Is the phenomenon mentioned in http://haskell.org/pipermail/haskell/2003-August/012428.html similar to this problem? Wolfgang ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: ghci failed to load static archive
Loading package base ... linking ... done. Loading package lang ... linking ... done. Loading object (static) /home/pimlott/local/fudgets/lib/GhcFudgets/FudgetsXlib.o ... done Loading object (static) /home/pimlott/local/fudgets/lib/GhcFudgets/Fudgets.o ... done Loading object (dynamic) X11 ... done Loading object (dynamic) Xext ... done final link ... /home/pimlott/local/fudgets/lib/GhcFudgets/Fudgets.o: unknown symbol `__stginit_Maybe_' ghc-6.0.1: linking extra libraries/objects failed It looks like you should force a load of the haskell98 package before loading Fudgets.o. Try adding a -package haskell98 on the command line. The right way to fix this is to make a package from the Fudgets library and add the correct dependencies to the package configuration. Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: Haskell for non-Haskell's sake
Hi Hal, On Saturday 30 August 2003 01:39, Hal Daume III wrote: If you use Haskell for a purpose *other than* one of those listed below, I'd love to hear. I don't need a long report, anything from a simple I do to a paragraph would be fine, and if you want to remain anonymous that's fine, too. Together with Ralf Laemmel I have applied Haskell for processing not only Haskell itself, but also Cobol and Java. See: http://homepages.cwi.nl/~ralf/padl03/ And a quote from the abstract: In a selection of case studies, we demonstrate that typed functional programming in Haskell, augmented with Strafunski's support for generic traversal and external components, is very appropriate for the development of practical language processors. In particular, we discuss using Haskell for Cobol reverse engineering, Java code metrics, and Haskell re-engineering. Then again, we are not using only Haskell, since we resort to external components e.g. for parsing. Regards, Joost -- Dr. ir. Joost Visser | Departamento de Informática phone +351-253-604461 | Universidade do Minho fax+351-253-604471 | mailto:[EMAIL PROTECTED] mobile +351-91-6253618 | http://alfa.di.uminho.pt/~joost.visser ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: Haskell for non-Haskell's sake
On 30-Aug-2003 Hal Daume III wrote: Hi fellow Haskellers, I'm attempting to get a sense of the topology of the Haskell community. Based on the Haskell Communities Activities reports, it seems that the large majority of people use Haskell for Haskell's sake. I have been working on a software-engineering tool that is intended to derive SQL-DDL-Statements, XML-Schema-Documents, and Java classes from a common schema definition which is written in some UML-like language (with a proper semantics of course). The tool will furthermore generate java-code for the conversion of complex objects (that is, instances of certain subgraphs of the eschema) along the paths SQL-Java, SQL-XML, Java-XML. The project will however be cancelled before it reaches a state where the software could actually deployed. Everything except of the frontend that is a graphical editor for schemata, has been written in Haskell. It is surely not Haskell for Haskell but Haskell for the Rest of the World. Elke Kasimir. Software Development EsPresto AG - [EMAIL PROTECTED]Breite Str. 30-31 Tel/Fax: +49-30-90 226-750/-760 10178 Berlin/Germany ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
Since the opening of this thread by Hal Daume 11 (binary), we see a constant flow of interesting contributions/confessions. Plenty of applications, it seems that Haskell is really used in a wider context than we might think. It is a pleasure to read all this. I have just one question thus. Why the application-oriented papers devoted to Haskell at ICFP, including the Haskell workshop are rather rare? People are reluctant to contribute, or the reviewers are not so fascinated? (Well, it happened once to me, but it had *nothing to do with Haskell*, and nothing to do with ICFP, just some other workshop, elsewhere. Simply a BTW remark. One reviewer wrote: this is just an application work, not a scientific paper. Presumably this reviewer has his particular visions what a science is, but I don't believe that such people dominate in the milieu of FPL. I believe that it would be interesting to organize some workshops on practical applications of functional programming...) Jerzy Karczmarczuk Caen, France ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
RE: Haskell for non-Haskell's sake
Jerzy Karczmarczuk wrote: Presumably this reviewer has his particular visions what a science is, but I don't believe that such people dominate in the milieu of FPL. I believe that it would be interesting to organize some workshops on practical applications of functional programming...) Actually, I would be more likely to attend a workshop focusing on real world applications of functional programming than one on more theoretical advances (as interesting as they are). Tim ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
Hi Hal and others, We would like to hear your thoughts on the viability of a conference or workshop dedicated to applications of Haskell for non-Haskell purposes. On Saturday 30 August 2003 01:39, Hal Daume III wrote: I'm attempting to get a sense of the topology of the Haskell community. Based on the Haskell Communities Activities reports, it seems that the large majority of people use Haskell for Haskell's sake. This bias seems to exist not only in the Communities Activities reports, but also in the Haskell mailing lists and in the Haskell-related events, such as the Haskell Workshop. One could easily deduce that Haskell is still very much an academic language, of interest to language _designers_ more than to language _users_. However, the reactions to your inquiry about use of Haskell for non-Haskell purposes suggests that a significant group of language _users_ does actually exist, though their voice is not heard too often. We think (hope) there could be room for a Haskell One event, quite a bit more modest than JavaOne, but similarly intended to bring together Haskell Developers. Submissions would be explicitly judged by how practical and how proven the described technology is. Experience reports would be more than welcome. There could be interactive tool-demo's, hands-on lab sessions, a programming contest, etc. If the focus is on applications only (excluding theory, language-design, and anything that is Haskell-for-Haskell's sake), this HaskellOne event could maybe be a satelite to PLI. We are interested to know your thoughts on such an event, and whether the outcome of your poll suggests it could be viable. Regards, Joost Visser João Saraiva PS: If sufficient interest exists, we are willing to contribute to the origanization. -- Dr. ir. Joost Visser | Departamento de Informática phone +351-253-604461 | Universidade do Minho fax+351-253-604471 | mailto:[EMAIL PROTECTED] mobile +351-91-6253618 | http://alfa.di.uminho.pt/~joost.visser ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
Well, there's PADL (Practical Aspects of Declarative Languages), see http://www.research.avayalabs.com/user/wadler/padl03/. -Paul Tim Docker wrote: Jerzy Karczmarczuk wrote: Presumably this reviewer has his particular visions what a science is, but I don't believe that such people dominate in the milieu of FPL. I believe that it would be interesting to organize some workshops on practical applications of functional programming...) Actually, I would be more likely to attend a workshop focusing on real world applications of functional programming than one on more theoretical advances (as interesting as they are). Tim ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
At 16:15 01/09/03 +0200, Jerzy Karczmarczuk wrote: Since the opening of this thread by Hal Daume 11 (binary), we see a constant flow of interesting contributions/confessions. Plenty of applications, it seems that Haskell is really used in a wider context than we might think. It is a pleasure to read all this. I have just one question thus. Why the application-oriented papers devoted to Haskell at ICFP, including the Haskell workshop are rather rare? There are many conferences more closely related to my application interest that would be more useful for me to attend (if I had the funding...) #g Graham Klyne [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
On Mon, 1 Sep 2003, Joost Visser wrote: Hi Hal and others, We would like to hear your thoughts on the viability of a conference or workshop dedicated to applications of Haskell for non-Haskell purposes. On Saturday 30 August 2003 01:39, Hal Daume III wrote: I'm attempting to get a sense of the topology of the Haskell community. Based on the Haskell Communities Activities reports, it seems that the large majority of people use Haskell for Haskell's sake. This bias seems to exist not only in the Communities Activities reports, but also in the Haskell mailing lists and in the Haskell-related events, such as the Haskell Workshop. One could easily deduce that Haskell is still very much an academic language, of interest to language _designers_ more than to language _users_. However, the reactions to your inquiry about use of Haskell for non-Haskell purposes suggests that a significant group of language _users_ does actually exist, though their voice is not heard too often. Personal viewpoint: I think I see a reasonable number of people asking questions about how to acheive what they need to in Haskell, which whilst it isn't often explicitly stated, often appears to be because they've got a task that they aren't `doing in Haskell for Haskell's sake'. When making your contribution is spending 10 minutes writing an e-mail (such as this one) there's no problem making your voice heard, and it's nice think you're being an active member of a very nice and helpful community. When it's writing a paper for a conference, which requires weeks of concerted effort, requires that you ( the reviewers :-) ) beleive you've done something worth telling other people about, finding funding to attend the conference (which may be funding which could be used to attend a conference in an area where you are a specialist), and when your peers in your `proper subject area' won't be interested in the result of all this work, it seems natural (though not of course desirable) that most `pure users' of Haskell don't have enough desire to do the work to make their voice heard that way. To put it in context, I wouldn't expect virtually anyone on the list who work in some area (e.g., Hal appears to work in Natural Language Processing) to have attended a conference for the language they did a particular piece of software in, when that language was Java, C++, Perl, Python (and I know there are conferences for those languages). This isn't to put anyone off the idea of a Haskell applications conference as such, I just think that before beginning there should be a convincing rebuttal of the points above. There may well be one; it's VERY possible I'm wrong/atypical. ___cheers,_dave_ www.cs.bris.ac.uk/~tweed/ | `It's no good going home to practise email:[EMAIL PROTECTED] | a Special Outdoor Song which Has To Be work tel:(0117) 954-5250 | Sung In The Snow' -- Winnie the Pooh ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: Haskell for non-Haskell's sake
[this seemed to be flowing along nicely, but now that the thread has moved from information to organisation and meta-discussion, I'd like to add a few comments, and an invitation] On Saturday 30 August 2003 01:39, Hal Daume III wrote: I'm attempting to get a sense of the topology of the Haskell community. Based on the Haskell Communities Activities reports, it seems that the large majority of people use Haskell for Haskell's sake. This bias seems to exist not only in the Communities Activities reports, but The bias is entirely in what readers of this mailing list are contributing to these reports. The editor has certainly been more than willing to include other applications of Haskell. I know there are lots of other interesting things going on out there, but have so far not been able to reach these people: - some of them read/attend none of the Haskell list, c.l.f, or Haskell Workshop, so they simply never hear about these report *unless _you_ forward the invitations to participate* - some read the reports and the calls for contributions, but don't think of their work as particularly interesting to a wider community, or as not substantial enough So, I do hope that those who've answered Hal's call (or have been thinking about answering) *will* contribute to the next edition of the Haskell Communities Activities Report! I'll be expecting your email in my mailbox in the last 2 weeks of October :-) also in the Haskell mailing lists and in the Haskell-related events, such as the Haskell Workshop. I'm not sure about this list, but as for the Haskell workshop, this year we had (http://www.cs.uu.nl/~johanj/HaskellWorkshop/cfp03.html): - 4 presentations on applications of Haskell, to gaming, quantum mechanics, quantum computing, web site development - 8 presentations on programming techniques, tools, debugging, and libraries - 3 presentations on language design issues (strict language, records, lack of principal types) How does this relate to the bias you see? However, the reactions to your inquiry about use of Haskell for non-Haskell purposes suggests that a significant group of language _users_ does actually exist, though their voice is not heard too often. Indeed. So, please let yourself be heard!-) Or if you know of someone else who does interesting Haskell stuff, ask them to talk about their work. It is the collection of all these small fragments that makes the HCA Reports useful! When making your contribution is spending 10 minutes writing an e-mail (such as this one) there's no problem making your voice heard, and it's nice think you're being an active member of a very nice and helpful community. Just the way the HCA Reports are intended to work (if the 10 minute email lacks any information, the editor will get back to you). As for Haskell Applications events: IMHO, Haskell has grown beyond that (is an application more interesting for the sake of being implemented in Haskell?). The point of applications is not the language, and some of us have already presented Haskell applications at domain-specific events, which is the way to go. Where there is interaction between the application and the language (tools missing, features inadequate) or where applications are facilitates by language and tool developments, the Haskell workshop and IFL are good places to present and discuss that work. Potential benefits of a Haskell applications event would be for - advertizing: having several application presentations in a single venue - contacts: getting to meet other Haskell applicators The main problem: real Haskell developers are reluctant to talk about their work (and sometimes business interests are in the way). The comparison to JaffaOne is misleading, methinks: are there enough professional Haskell developers who can afford to/have to attend such an event with the goal of keeping up-to-date with their main tool? And would there be enough presenters to make such a visit worthwhile for the professional participants? Perhaps an add-on to the Advanced Functional Programming Summerschools might work? I guess I'd prefer a Haskell quarterly magazine, with editing, but emphasizing use over academic criteria when evaluating submissions. Cheers, Claus -- http://www.haskell.org/communities/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Re: proving the monad laws
hi, just a comment that the you can get more modular (and hence simpler) proofs by using monad transformers. than you can break down your proof in a number of steps: 1. prove that the identity monad is a monad 2. prove that the exception transformer: ErrorT x m a = m (Either x a) gives a monad,if 'm' is a monad. 3. prove that the state transformer: StateT s m a = s - m (a,s) gives a monad,provided that 'm' is a monad then you are done, as TI = StateT Subst (StateT Int (ErrorT String Id)). this involves more proofs, but they are simpler and can be reused for other monads as well. hope this helps iavor Steffen Mazanek wrote: Hello, consider the following monad (which is a slight adaptation of the one used in Typing Haskell in Haskell) as given: data Error a = Error String | Ok a data TI a = TI (Subst - Int - Error (Subst, Int, a)) instance Monad TI where return x = TI (\s n - Ok (s,n,x)) TI f = g = TI (\s n - case f s n of Ok (s',m,x) - let TI gx = g x in gx s' m Error s-Error s) fail s = TI (\_ _-Error s) Now I would like to verify the monad laws. It is really easy to show that return is both a left- and a right-unit. But I got stuck with associativity: m@(TI mf) = (\a-f a = h) = = TI (\s n - case mf s n of Ok (s',m,x) - let TI gx = (\a-f a = h) x in gx s' m Error s-Error s) = ... = ((TI mf) = f) = h Is there someone outside who is willing to tell what fills the gap? A hint may be sufficient already. Or is there a tool, which finds such derivations? I have read the tutorial All about Monads, but there only is mentioned, that there is an obligation for the programmer to prove these laws. It would be helpful as well, to provide an example! I was wondering, if it is possible to simplify: let TI gx = f x =h in But the a may occur in h? Thank you. Steffen ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- == | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.ogi.edu/~diatchki | == ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
Haskell 6.0 install
Hello, I let make run while I was sleeping on my redhat 7.3 system and in the morning it seemed to have worked. I ran make install which also seemed to work. Now when I type ghc --help it tells me about ghc-5.04.2. Does this mean that I am still running ghc 5? What can I do if I am still running ghc 5? Will it cause me any serious problems if I start going through An Introduction To Functional Programming Systems Using Haskell and deal with it later? Thanks. Sincerely, Mark Get your free e-mail address at http://felinemail.zzn.com__http://www.zzn.com ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Haskell 6.0 install
On Mon, Sep 01, 2003 at 06:37:29AM -0500, Mark Espinoza wrote: Hello, I let make run while I was sleeping on my redhat 7.3 system and in the morning it seemed to have worked. I ran make install which also seemed to work. Now when I type ghc --help it tells me about ghc-5.04.2. Does this mean that I am still running ghc 5? What can I do if I am still running ghc 5? Will it cause me any serious problems if I start going through An Introduction To Functional Programming Systems Using Haskell and deal with it later? Thanks. You can try running with ghc6 rather than ghc. ghc 6 and 5 can be installed in parallel without problems, and if you're writing pure haskell 98 with no extensions (as I imagine the book does), you should be able to use either one with no problems. -- David Roundy http://www.abridgegame.org ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: IO StateTransformer with an escape clause
On Tue, 26 Aug 2003 14:33:28 +1000, Thomas L. Bevan [EMAIL PROTECTED] wrote: Hi, I'd like some help building an IO StateTransformer which can be escaped midway through without losing the state accummulated up to that point. I tried constructing a StateT s MaybeIO a monad but the state is lost when the rest of the monad collapses. How is your MaybeIO type constructed? If with a monad transformer, then you could consider putting the MaybeT transformer outside the StateT transformer (I think that should work). Ganesh ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe