Main.main naming convention

2002-09-09 Thread Martin Norbäck
I have a question about the Main.main naming convention. Would it be a good idea to lift the restriction and allow any module which exports a function main :: IO () to be compiled into a separate binary? You'd need to specify which module should be the top-level module when compiling, of course.

Final CFP: TLDI'03 (Deadline: 5PM EDT, Sept 27, 2002)

2002-09-09 Thread Zhong Shao
FINAL CALL FOR PAPERS TLDI'03 The ACM SIGPLAN Workshop on Types in Language Design and Implementation (Formerly called TIC, The International Workshop on Types in Compilation)

Main.main naming convention

2002-09-09 Thread Martin Norbäck
I have a question about the Main.main naming convention. Would it be a good idea to lift the restriction and allow any module which exports a function main :: IO () to be compiled into a separate binary? You'd need to specify which module should be the top-level module when compiling, of course.

RE: H98 Report: input functions

2002-09-09 Thread Simon Peyton-Jones
| In 7.1, the Report says of getChar, getContents and friends: | | "By default, these input functions echo to standard output." | | This would mean that the example given: | | main = interact (filter isAscii) | | would print the input with all ASCII characters duplicated. | | Sur

Haskell report publication

2002-09-09 Thread Simon Peyton-Jones
Folks As you know, the Haskell Report (both language and libraries) is going to be published by CUP, both as a special issue of the Journal of Functional Programming (13.1) and as a book. I have to deliver the final copy by the end of the month. So the gate really is closing. In a few days I'l

RE: H98 Report: input functions

2002-09-09 Thread Glynn Clements
Simon Peyton-Jones wrote: > | In 7.1, the Report says of getChar, getContents and friends: > | > | "By default, these input functions echo to standard output." > | > | This would mean that the example given: > | > | main = interact (filter isAscii) > | > | would print the input with

RE: H98 Report: input functions

2002-09-09 Thread Simon Peyton-Jones
| No. A terminal device may echo or it may not. Even if the run-time | explicitly enables echoing, there is no guarantee that it won't | subsequently be disabled. | | Certainly, the existing statement is wrong, though. Well, the question is what the report should say. The minimal change is to d

typeclass relations

2002-09-09 Thread Abraham Egnor
I have two typeclasses, Foo and Bar, with some instances, defined as such: module Test where class Foo a where foo :: a -> String class Bar a where bar :: a -> String instance Foo Int where foo = show instance Bar Int where bar a = (show a) ++ " bar!" instance Foo Char where foo =

Re: typeclass relations

2002-09-09 Thread Hal Daume III
Hi, > thing. However, the warnings (and the names of the flags - "undecidable > instances" doesn't sound good) make me nervous, and confused. Why is > there a problem with saying "every instance of Foo is also an instance of > Bar, and here's how"? >From what I understand, this is basically on

Re: typeclass relations

2002-09-09 Thread S.M.Kahrs
[snip] > instance Foo Int where > foo = show > > instance Bar Int where > bar a = (show a) ++ " bar!" > > instance Foo Char where > foo = show > > instance Foo a => Bar a where > bar = foo Notice: this last instance derives another instance of Bar Int, etc. > If I try to compile this

Hugs help

2002-09-09 Thread Arthur Fleck
I downloaded and installed (apparently successfully) the binaries for Mac OS X under 10.1.5. When I try to execute from a terminal window (what's the difference between 'hugs' and 'runhugs"?), I get the error message "can't open library: /usr/lib/libncurses.5.dylib". Indeed, there is no such libra

Re: Hugs help

2002-09-09 Thread Wolfgang Lux
Arthur Fleck wrote: > I downloaded and installed (apparently successfully) the binaries for > Mac OS > X under 10.1.5. When I try to execute from a terminal window (what's > the > difference between 'hugs' and 'runhugs"?), I get the error message > "can't > open library: /usr/lib/libncurses.5.

Re: Main.main naming convention

2002-09-09 Thread Manuel M T Chakravarty
Martin Norbäck <[EMAIL PROTECTED]> wrote, > I have a question about the Main.main naming convention. Would it be a > good idea to lift the restriction and allow any module which exports a > function main :: IO () to be compiled into a separate binary? > > You'd need to specify which module shoul

Re: Main.main naming convention

2002-09-09 Thread Hal Daume III
I know I wasn't the intended recipient of this question, but I also lament this, so I'll answer for myself. > So? That just means that the file name of Program1.hs, > Program2.hs, etc will be different from the name of the > module that they contain. The problem is that often you'll have a li

Using the Parsec library

2002-09-09 Thread Jose Romildo Malaquias
Hello. Can anyone help me writing a parser for parsing a simplified list of ABC fields (http://www.gre.ac.uk/~c.walshaw/abc/). The grammar I want to test with is the following -- file ::= *field field ::= fieldA | fieldB fieldA ::= "A:" text endOfLine fieldB ::= "B:" text end

Labelled types question

2002-09-09 Thread Andre W B Furtado
Suppose I have a labelled type 'A' defined like the following one: module Test ( A (b) ) where data A = A { b :: Int, c :: Int } I am exporting only 'A(b)', so why the following code "can see" 'c' ? module Main where import Test main :: IO () main = print (c (A {c=3,b=2})) PROMPT> 3