RE: How to build a Makefile that interacts with Core?

2000-07-31 Thread Simon Marlow


 [kgolder @ zante testParse]$ make all
 make: *** Warning: File `Makefile' has modification time in the future
 (964897481  964897312)
 ghc-4.08 -lHSlang -lThinAir -lHSrts -lGHC -L.
  ^^

that looks a bit suspicious.  If this is the ThinAir.o from GHC, why is it
in a separate library?

Cheers,
Simon






Compiler error: AClass

2000-07-31 Thread Kirsten R. Chevalier

Hi,
I'm trying to compile a program using GHC 4.08 on a Linux system, and I'm
getting an error simply consisting of "AClass", with no output files from
the compiler. When I compile with -v, I get the following output:

The Glorious Glasgow Haskell Compilation System, version 4.08

Effective command line: -v

Ineffective C pre-processor:
echo '{-# LINE 1 "MonadTransformer.hs" -}'  /tmp/ghc32363.cpp  cat 
MonadTransformer.hs  /tmp/ghc32363.cpp

real0m0.027s
user0m0.000s
sys 0m0.010s
ghc:recompile:Input file MonadTransformer.hs newer than MonadTransformer.o

Haskell compiler:
/usr/users/deforest/ghc-4.08/fptools-binaries/lib/i386-unknown-linux/hsc 
/tmp/ghc32363.cpp  -fignore-interface-\
pragmas -fomit-interface-pragmas -fsimplify [ -fmax-simplifier-iterations4 ]   
-fwarn-overlapping-patterns -fwarn-missi\
ng-methods -fwarn-missing-fields -fwarn-deprecations -fwarn-duplicate-exports 
-fhi-version=408 -static "-himap=.%.hi:/u\
sr/users/deforest/ghc-4.08/fptools-binaries/lib/i386-unknown-linux/imports/std%.hi" 
"-himap-sep=:"-v -hifile=/tmp/g\
hc32363.hi -olang=asm -ofile=/tmp/ghc32363.s -F=/tmp/ghc32363_stb.c 
-FH=/tmp/ghc32363_stb.h +RTS -H600 -K100
Glasgow Haskell Compiler, version 4.08, for Haskell 98, compiled by GHC version 4.08

AClass

real0m0.867s
user0m0.440s
sys 0m0.050s
deleting... /tmp/ghc32363.cpp /tmp/ghc32363.hi /tmp/ghc32363.s /tmp/ghc32363_stb.c 
/tmp/ghc32363_stb.h

rm -f /tmp/ghc32363*

The code that seems to be causing the problem is this:

class MonadT t where
   lift :: Monad m = m a - t m a
   liftInside :: (Monad m, MonadT t2) = t m a - t (t2 m) a

Any advice? Thanks in advance,
kirsten




Re: Compiler error: AClass

2000-07-31 Thread Michael Weber

On Mon, Jul 31, 2000 at 12:23:19 -0400, Kirsten R. Chevalier wrote:
 Hi,
 I'm trying to compile a program using GHC 4.08 on a Linux system, and I'm
 getting an error simply consisting of "AClass", with no output files from
 the compiler. When I compile with -v, I get the following output:
 
 The Glorious Glasgow Haskell Compilation System, version 4.08

[compiler yada yada]

 The code that seems to be causing the problem is this:
 
 class MonadT t where
lift :: Monad m = m a - t m a
liftInside :: (Monad m, MonadT t2) = t m a - t (t2 m) a
 
 Any advice? Thanks in advance,
 kirsten

This has been reported before. It's a bug, that's fixed in CVS and the
upcoming 4.08.1. See the ghc-bugs archives ("What is
`AClass'?"-thread) for more...


Cheers,
Michael
-- 
 /~\ ASCII ribbon | "The sendmail configuration file is one of those files
 \ / campaign |  that looks like someone beat their head on the keyboard.
  X  against  |  After working with it... I can see why!"
 / \ HTML mail|  -- Harry Skelton




Re: Haskell threads

2000-07-31 Thread Hannah Schroeter

Hello!

On Mon, Jul 31, 2000 at 12:27:52AM +, Bill Halchin wrote:
 Hello Haskell Community,


 Is there a tutorial or simple sample Haskell scripts that
 demonstrate the use of Haskell Thread??. I know that Haskell
 threads are monad.

import Concurrent

main = forkIO a  b
 where
  a = putStrLn "a"  threadDelay 100  a
  b = putStrLn "b"  threadDelay 110  b

Compile with e.g. ghc -syslib concurrent -o main Main.hs

Regards, Hannah.




Re: SocketPrim.hs

2000-07-31 Thread Hannah Schroeter

Hello!

On Mon, Jul 31, 2000 at 12:40:07AM +, Bill Halchin wrote:
 Hello Haskell Community

 Where can I find the source for the Socket wrapper code,
 SocketPrim.hs??

If you're using GHC, in fptools/hslibs/net/. If you just want to use
it, import it and compile/link with -syslib net.

Regards,

Hannah.




Showing functions

2000-07-31 Thread Tony Davie

Hello all,

Section 6.1.6 of the report says that "Functions are an instance of the
Show class but not
Read." How are functions meant to be shown? The standard prelude
'specification' doesn't say anything about it.

--
Tony Davie, Computer Science, St.Andrews University, North Haugh,
St.Andrews
Scotland, KY16 9SS,  Tel: +44 1334 463257,  Fax: +44 1334
463278
mailto:[EMAIL PROTECTED]  Home:
http://www.dcs.st-and.ac.uk/~ad/Home.html
Handel Index and Chronology:
http://bruichladdich.dcs.st-and.ac.uk/HandelWWW/HandelCat.html






Re: Showing functions

2000-07-31 Thread Ralf Hinze

| Section 6.1.6 of the report says that "Functions are an instance of the
| Show class but not
| Read." How are functions meant to be shown? The standard prelude
| 'specification' doesn't say anything about it.

That's a typo. Section 6.3.3 says

``All Prelude types, except function types and IO types, are instances of Show and 
Read''

Before Haskell 98 there was an instance

instance Show (a - b) where
  showsPrec p f = showString "function"

Cheers, Ralf




PLI 2000: Second call for participation

2000-07-31 Thread Konstantin Läufer

[This may actually be the first call for participation on some of the
lists.]

The deadline for early conference registration and hotel reservations is
August 25th (please see below for details).


CALL FOR PARTICIPATION


   PLI 2000

   Principles, Logics, and Implementations
 of high-level programming languages

 Montréal, Canada
September 17-22, 2000

 http://www.cs.yorku.ca/pli00


The colloquium on Principles, Logics, and Implementations of high-level
programming languages is a collection of conferences and workshops aimed at
the advancement of high-level programming languages.

PLI 2000 comprises the following conferences and workshops:

ICFPInternational Conference on Functional Programming
PPDPPrinciples and Practice of Declarative Programming

Haskell Workshop on Haskell
HLCLHigh-Level Concurrent Languages
HOOTS   Higher Order Operational Techniques in Semantics
RULERule-Based Programming
Scheme  Workshop on Scheme and Functional Programming
SAIGSemantics, Applications and Implementation of Program Generation
TIC Types in Compilation

   

A detailed presentation of the colloquium including a preliminary program,
registration and accommodation information and forms are all available on
the WEB.  The rest of this message is a summary of the PLI 2000 home page.


SCHEDULE OF EVENTS

  --
 | Sep 17  | Sep 18  | Sep 19  | Sep 20| Sep 21   | Sep 22  |
 | Sunday  | Monday  | Tuesday | Wednesday | Thursday | Friday  |
 |==|
 | | |  |
 | | I C F P | P P D P  |
 | | |  |
 |==|
 | Haskell | |  RULE   |   HLCL|   TIC|  HOOTS  |
 |-+---+---+|
 | Scheme  |   |   SAIG||
  --


REGISTRATION

The registration fees and the registration procedure are described on the
WEB.  To benefit from the early bird rate, your registration and payment
must be received by August 25.


VENUE

PLI 2000 will be held in Montréal, at

   Holiday Inn Select
   Jardin Sinomonde
   99 avenue Viger Ouest
   Montréal (Québec)
   Canada H2Z 1E9

   Reservation:+1 888 878 9888
   http://www.hiselect-yul.com/html/reserv2_A.html

   URL:http://www.hiselect-yul.com
   Email:  [EMAIL PROTECTED]
   Telephone:  +1 514 878 9888
   Fax:+1 514 878 6341


ACCOMMODATION

The Holiday Inn offers rooms at the reduced conference rate of
CAD $ 130 + 15% tax for both single and double rooms.  (1 CAN $ equals
approximately 0.68 US $.)  Indicate that you are attending the PLI 2000
colloquium of the ACM when you make the reservation.  Hotel reservations
need to be done before August 25 to secure the reduced rate.
Reservations received after this date will be accepted on a space
available basis at the reduced conference rate.  Additional information
is provided on the WEB.

 ---
September is usually very busy in Montréal, so you should arrange
 for your accommodation as soon as possible.
 ---


GRANTS FOR YOUNG RESEARCHERS

Students who will present a paper at one of the conferences or workshops
associated with PLI 2000 may apply for travel fellowships from the PAC fund
(see http://www.acm.org/sigplan/PAC).


CONFERENCE SECRETARIAT

For any information, please contact the conference secretariat

 PLI 2000
 c/o Yvette Dubuis
 DI - LAMP
 EPFL - Ecole Polytechnique Federale de Lausanne
 IN (Ecublens)
 CH 1015 Lausanne
 Switzerland

 Email:   [EMAIL PROTECTED]
 Telephone:   +41 21 693 5202
 Fax: +41 21 693 6660


SPONSORS

PLI 2000 is organized by ACM SIGPLAN with the support of Microsoft Research.
ICFP 2000 is also supported by Cambridge University Press, Compaq, EAPLS,
Université de Montréal, and Sun Microsystems.  PPDP 2000 is also
supported by the Canadian Space Agency, York University, EAPLS, the
Association for Logic Programming, and COMPULOG Americas.





Re: Classes

2000-07-31 Thread Carl R. Witty

"Claus Reinke" [EMAIL PROTECTED] writes:

 Fergus (and others): how about compiling a summary of the 
 relationships (a kind of dictionary of terminologies) ? In 
 particular, what is the state of the art in logic programming 
 wrt determinism and termination analysis? Can you 
 recommend any recent surveys, or can anyone offhand
 propose "nicer" constraints to ensure termination and 
 determinism (of executions, not results), compared to 
 those currently used for type classes?

My former thesis adviser, David McAllester, did some work on efficient
(and hence terminating) execution of logic programs that may be
relevant here.  You might be interested in
http://www.research.att.com/~dmac/kr92.ps
(and several of his other papers).

There are also simpler methods for determining termination.  One
simple constraint which proves termination is that every proper
subterm of an "antecedent" must also be a proper subterm of the
"conclusion".  An instance declaration like

(P (F [a]) (G [(a, b)]) (H a [b]), Q b a) = (R (H (F [a]) [(G [(a, b)])]) (H a 
[b]) c)

would thus be acceptable.

Of course, this does not prove determinism.  I think that is probably
the harder of the two problems.

Carl Witty




Re: Classes

2000-07-31 Thread Marcin 'Qrczak' Kowalczyk

31 Jul 2000 12:33:31 -0700, Carl R. Witty [EMAIL PROTECTED] pisze:

 One simple constraint which proves termination is that every proper
 subterm of an "antecedent" must also be a proper subterm of the
 "conclusion".  An instance declaration like
 
 (P (F [a]) (G [(a, b)]) (H a [b]), Q b a) = (R (H (F [a]) [(G [(a, b)])]) (H a 
[b]) c)
 
 would thus be acceptable.

Ah! I just needed
   instance ForeignRes (Ptr a) b = ForeignRes (ThrowNull (Ptr a)) b
but for GHC it's undecidable. I had to use
   instance ForeignRes (ThrowNull (Ptr a)) (Ptr a)
which is theoretically less general, although in practice it suffices.

It's annoying that an analogous variant works:
   instance (Num a, ForeignRes a b) = ForeignRes (Throw_1 a) b
only because the type is not concrete.

As I understand it, this rule would allow it. Please, can GHC be
changed to support that?

-- 
 __("  Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/
  ^^  SYGNATURA ZASTPCZA
QRCZAK





ANNOUNCE: July 2000 Release of the Haskell Object Ovservation Debugger

2000-07-31 Thread Andy Gill

We are pleased to announce the first release of the 

Haskell Object Observation Debugger (HOOD)

http://www.haskell.org/hood/

HOOD is a small post-mortem debugger for the lazy functional language
Haskell. It is based on the concept of observation of intermediate
data structures, rather than the more traditional stepping and
variable examination paradigm used by imperative language debuggers.

HOOD offers the following features.
* Observation of base types (Int, Bool, Float, etc)
* Observation of both finite and infinite structures
  (Lists, trees, arrays, etc).
* Observation of usage patterns for functions.
* Observation of monadic actions, including IO actions.
* Hooks to add observational capabilities for new base
  type and used defined types.
* Programmable browsing capabilities - structure browsers
  can by coded and plugged in.
* Includes a basic structure rendering package that uses
  a Haskell like syntax.
* Thread-safe observations are are supported.
* Some versions support observations on exceptions.

Most of HOOD is written in Haskell98, but it uses some commonly
implemented extensions (unsafePerformIO, IORef's) to provide hooks for
observing structures. It has been ported to the following systems.

* GHC - The Glasgow Haskell Compiler (tested with 4.08)
* Hugs 98 (Also called Classic Hugs)
* STG Hugs
* NHC98

It should be straightforward to port to other Haskell compilers.

This is the first public release of HOOD. Future release will include
other rendering engines (with evaluation order viewing), and perhaps a
polymorphic version of the observe combinator for some systems.

The Hood homepage lives at:

http://www.haskell.org/hood/

Please send any bug reports and comments to [EMAIL PROTECTED]

Enjoy!

Andy Gill
--
Principal Project Scientist, Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science  Technology
phone +1 503 748 7451   http://www.cse.ogi.edu/~andy