RE: auto cost centres for where decls

2003-11-21 Thread Simon Marlow
 
 I have a large function with a lot of local definitions I would like
 indepdent cost centres for, however, since the local definitions arn't
 top-level auto-all doesn't catch them. is there some short cut to
 declare a whole list of decls should have cost centres? 
 
 I was thinking something like
 
 foo = ... where {-# SCC foo #-}
 baz = ...
 bar = ...
  
 would cause baz and bar to have cost centres named foo.baz and
 foo.bar 

That's a good idea, but we probably won't get around to it until we do
the next profiling overhaul.  So that we don't lose suggestions like
this, it's a good idea to add them to the feature request tracker, here:

  http://sourceforge.net/tracker/?group_id=8032atid=358032

(this is the Request a Feature link on GHC's homepage).

Cheers,
Simon
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


List - Mutable List

2003-11-21 Thread Tom Pledger
Rafael Martinez Torres writes:
 | Hi:
 | 
 | Given the classes IArray,Marray
 | 
 | instance IArray Array.Array
 | instance Marray IOArray e IO
 | 
 | I'm searching for some think like
 | 
 | MLists ( Stands for  Mutable-Lists )
 | 
 | Is there some thing so ?
 | 
 | 
 | I need it to implement a MQueue ... (Mutable Queue )

Here's one that someone prepared earlier.

http://www.haskell.org/ghc/docs/latest/html/base/Control.Concurrent.Chan.html#Chan

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


ghc, FFI and autotools

2003-11-21 Thread Lloyd Allison

We are trying to build and call some Haskell code
in and from from the open-src spreadsheet gn'meric.
It seems that it could be a good basis for experiments in FP + SSs.

We have worked through the simple FFI examples and
can create small C+Haskell stand-alone programs.

However, gnu'eric is quite a large program
and  autoconf|automake|...|libtools  are used to build it.
Consequently one does not have an entirely free hand
to just compile and link the pieces in any old way.
It has to fit in with the general build scheme.

There is a general pattern to 'eric's plugins:
add a directory, e.g.

  ./plugins/haskell/Makefile.am---Mafilefile.in---Makefile
   /functions.c-- the plugin's code
   /

and we can make C-only plugins.

The next step, or impasse to give it the technical name, is to add

   /functionsH.hs  -- Haskell called from functions.c


 ? Please has anybody used ghc in this type of environment before, and
 ? have advice on the exercise in general or on
 ? creating a *shared library* from C + Haskell code in particular ?


We[*] have tried a few things, so far with less than complete success,
and often featuring undefined labels,-( e.g.
  E Unable to open module file 
/home/lloyd/gnumeric/install//lib/gnumeric/1.2.1-bonobo/plugins/haskell/plugin.la.
  E /home/lloyd/gnumeric/install//lib/gnumeric/1.2.1-bonobo/plugins/haskell/plugin.so: 
undefined symbol: GHCziInt_I8zh_con_info


Lloyd
--
Lloyd ALLISON,  CSSE, Monash University, Victoria, Australia 3800.
web: http://www.csse.monash.edu.au/~lloyd/tel: +61 3 9905 5205
use: http://www.linux.org/  OpenOffice: http://www.openoffice.org/
PS. [*] Not a royal we.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


RE: Haddock and DocBook

2003-11-21 Thread Simon Marlow
 the Haddock documentation says:
 -S, --docbook
 Reserved for future use (output documentation in SGML 
 DocBook format).
 I would appreciate very much if the output wouldn't be just 
 in SGML DocBook 
 but in XML DocBook format. Would it be possible to implement 
 it this way?

XML DocBook is very similar to SGML DocBook, so almost certainly.

Cheers,
Simon
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: Haddock and Template Haskell

2003-11-21 Thread Wolfgang Jeltsch
Am Freitag, 21. November 2003, 13:42 schrieb Simon Marlow:
 [...]

Hello again,

thanks for your response.

 There are two issues:

  Q. Will Haddock parse a file containing Template Haskell code?
  A. No, the parser doesn't currently understand the TH extensions.

Is it planned to let it understand the extensions in the near future?

  Q. Can you generate Haddock documentation for code *generated* by a TH
  splice?
  A. It only really makes sense for top-level splices, and you would have to
  arrange to dump the generated code from GHC and feed it into Haddock (this
  sounds like quite a lot of work to get GHC to dump parseable Haskell code).
  Or merge GHC with Haddock :-)

I thought there was an option letting GHC output the code which results from 
processing the Template Haskell stuff. Am I in error here?

What is the best way of using TH while still using Haddock. Is there a way at 
all?

 Cheers,
   Simon

Wolfgang

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


WS-FM 2004 Second Call For Papers

2003-11-21 Thread Mario Bravetti

==
 1st International Workshop on
Web Services and Formal Methods
 (WS-FM 2004)

 February 23, 2004, Pisa, Italy
   Workshop affiliated to COORDINATION 2004, February 24 - 27, 2004
   Homepage: http://www.cs.unibo.it/~lucchi/ws-fm04/
==

SCOPE

 Web Services technology aims at providing standard mechanisms for
 describing the interface and the services available on the web, as well
 as protocols for locating such services and invoking them (e.g. WSDL,
 UDDI, SOAP). Innovations are moving towards two main directions:
 The first one tends to the definition of new standards
 that support the specification of complex services out of
 simpler ones (the so called Web Service choreography).
 Several proposals have been already set up: BPML, XLANG and
 BizTalk, WSFL, BPEL4WS, etc...
 The second approach consists of the design of new (meta-)Web Services to
 be exploited at run-time by other Web Services: e.g. managing
 the cooperation of Web Services or acting as dynamic registry services.

 Formal methods, which provide formal machinery for representing and
 analysing the behavior of communicating concurrent/distributed systems,
 may potentially play a fundamental role in the development of such
 innovations. First of all they may help in understanding the basic
 mechanisms (in terms of semantics) which characterize different
 choreography languages and to focus on the essence of new features that
 are needed. Secondly they may provide a formal basis for reasoning about
 Web Service semantics (behaviour and equivalence): e.g. for
 realizing registry services where retrieval is based on the meaning of a
 service and not just a Web Service name. Thirdly also studies on
 formal coordination paradigms can be exploited for developing mechanisms
 for complex run-time Web Service coordination. Finally, given the
 importance of critical application areas for Web Services like
 E-commerce, the development of the Web Service technology can certainly
 take advantage from formal analisys of security properties and
 performance in concurrency theory.

 The aim of the workshop is to bring together researchers working
 on Web Services and Formal Methods in order to activate a fruitful
 collaboration in this direction of research. This, potentially, could
 also have a great impact on the current standardization phase of Web
 Service technologies.

LIST OF TOPICS
 
 The topics of interest include, but are not limited to:
 
   - Protocols and standards for WS (SOAP, WSDL, UDDI, etc... )
   - Languages and descripion methodologies for 
 Coreography/Orchestration/Workflow  
 (BPML, XLANG and BizTalk, WSFL, BPEL4WS, etc... )
   - Coordination techniques for WS
 (transactions, agreement, coordination services, etc...)
   - Semantics-based dynamic WS discovery services 
 (based on Semantic Web/Ontology techniques or other semantic theories)
   - Security, Performance Evaluation and Quality of Service of WS
   - Semi-structured data and XML related technologies
   - Comparisons with different related technologies/approaches

SUBMISSIONS

 Submissions may be of two forms:
   - Original papers (neither published nor submitted to other
 conferences/workshops)
   - Contribution papers (possibly published or currently submitted)
 In both cases the paper should be up to 12 pages 12 pt.

 Accepted original papers will be published in the workshop proceedings:
 contacts with Electronic Notes in Theoretical Computer Science (Elsevier)
 have been established to publish them as an ENTCS volume.
 
 A time-slot will be reseved for the presentation at the workshop of a
 limited number of accepted contribution papers.

 Moreover, full versions of papers selected among both original
 and contribution papers will be likely invited for publication
 in a special issue of Theoretical Computer Science (Elsevier).

 Papers should be submitted following the instructions at the workshop 
 homepage: http://www.cs.unibo.it/~lucchi/ws-fm04/

IMPORTANT DATES

 December 15, 2003: Submission deadline
 January  26, 2004: Notification of acceptance
 February  9, 2004: Pre-Final version
 February 23, 2004: Workshop date

PROGRAM CO-CHAIRS

 Mario Bravetti and Gianluigi Zavattaro 

PROGRAM COMMITTEE

 Roberto Bruni  (University of Pisa)
 Michael Butler (University of Southampton)
 Rocco De Nicola(University of Florence)
 Schahram Dustdar   (Wien University of Technology)
 Gianluigi Ferrari  (University of Pisa)
 Peter Furniss  (Choreology Ltd UK) 
 Andy Gordon(Microsoft Reasearch Cambridge)
 Roberto Gorrieri   (University of Bologna)
 Stefania Gnesi (CNR Pisa)
 Nickolas Kavantzas (Oracle Co. US) 
 Frank Leymann  (IBM Research Germany) 
 Fabio Martinelli   (CNR Pisa)
 Shin Nakajima  (Hosei 

Re: ghc, FFI and autotools

2003-11-21 Thread Remi Turk
On Fri, Nov 21, 2003 at 10:49:43PM +1100, Lloyd Allison wrote:
 We are trying to build and call some Haskell code
 in and from from the open-src spreadsheet gn'meric.
 It seems that it could be a good basis for experiments in FP + SSs.

Hi,

I'm afraid I don't have anything helpful to say, as even my last
attempt to install gnumeric failed (due to lots of too-old
libraries. I'm planning to retry some day) but it sounds great :)
So I'd say, good luck and I'd be interested to hear more about
it.

Happy hacking,
Remi

-- 
Nobody can be exactly like me. Even I have trouble doing it.


pgp0.pgp
Description: PGP signature
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: lifting functions to tuples?

2003-11-21 Thread Tim Sweeney
In case this is of interest, there is another novel way that a language
might support liftTup in full generality.  Example code:

 LiftTup(f:function)(a:f.dom,b:f.dom)={f(a),f(b)}
 f(x:int)=x+1

 LiftTup(f)(3,7)
{4,8}

 LiftTup(caps)(Hello,Goodbye)
{HELLO,GOODBYE}

Here, the type system supports full set-theory-style subtyping, with
functions subtyping such that a-b : c-d iff b:d and c:a; an empty type
false containing no elements, and the function type the type of
functions with empty domain and thus a supertype of every function type.
Thus LiftTup above takes a parameter f which may be a function of any
domain and range.

The f.dom notation extracts the (dependent) domain type of the function f,
which depends on the actual function being passed.  Thus the code above is
statically typecheckable, and the program, i.e. LiftTup(caps)(3,7) would
fail, because caps is a function from strings (arrays/tuples of
characters) to strings.

Though, in my language, tuples are merely dependent-typed arrays of known
size, which themselves are a subtype of the type of dependent-typed arrays
of unknown (i.e. existentially quantified) size, which are expressed
syntacticall as, i.e. []:int.  So the above can be rewritten more generally:

 Map(f:function)(a[]:dom.f)=array(i:nata.len)f(a)
 Map(f)(3,7,9,12)
{4,8,10,13}

Where the array notation is an array lambda expression, and a.len extracts
the length of an unknown-sized array.

This language allows quite a bit more generality and type precision in
function and data type definitions, though code tends to lack the
conciseness made possible by Haskell type deduction.

-Tim

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 8:25 PM
Subject: Re: lifting functions to tuples?


 The problem:

 liftTup f (a, b) = (f a, f b)

 of the signature
 liftTup:: ?? - (a,b) - (c,d)

 Again, it is possible to write this in Haskell with common extensions

  {-# OPTIONS -fglasgow-exts #-}

  import Data.Dynamic
  import Data.Maybe

  liftp f (a,b) = ((fromJust . fromDynamic . f . toDyn) a,
   (fromJust . fromDynamic . f . toDyn) b)

 *Main :t liftp
 forall a2 a a3 a1.
 (Typeable a, Typeable a1, Typeable a2, Typeable a3) =
 (Dynamic - Dynamic) - (a1, a3) - (a, a2)


  f1 x | isJust (fromDynamic x::(Maybe Int))
  = let y = fromJust $ fromDynamic x in toDyn $ (toEnum (y + 1)::Char)
  f1 x | isJust (fromDynamic x::(Maybe Float))
  = let y::Float = fromJust $ fromDynamic x in toDyn $ (round(y +
1)::Int)
  f1 x = x

 *Main liftp f1 (65::Int,1.0::Float) :: (Char,Int)
 ('B',2)

  f2 x | isJust (fromDynamic x::(Maybe Bool))
  = let y = fromJust $ fromDynamic x
in toDyn $ ((toEnum (if y then 42 else 65))::Char)
  f2 x | isJust (fromDynamic x::(Maybe ()))
  = let () = fromJust $ fromDynamic x in toDyn $ (2.5::Float)
  f2 x = x

 *Main liftp f2 (True,()) :: (Char,Float)
 ('*',2.5)
 *Main liftp f2 (False,()) :: (Char,Float)
 ('A',2.5)
 *Main liftp f2 (False,1::Int) :: (Char,Int)
 ('A',1)

 As has been discussed on this list on many occasions, Dynamic (and the
 accompanied safe coerce) can be implemented in Haskell98 plus
 existentials and multi-parameter classes with functional dependencies.

 As a matter of fact, translating (a,b) into (c,d) doesn' seem to be
 much different than the generic mapping. I think Strafunsky can
 express such a transformation trivially. Right?

 ___
 Haskell mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/haskell

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: collection library in Haskell

2003-11-21 Thread Graham Klyne
I've not yet used it myself, so I'm not sure if it fully meets your 
requirements, but Daan Leijen has a library at:

  http://www.cs.uu.nl/~daan/ddata.html

#g
--
At 17:18 20/11/03 -0500, Alexandru D. Salcianu wrote:

Hello!

Can somebody recommend me a good collection library in Haskell?

I'm interested in more than one Set implementation, one FiniteMap
implementation etc. (we already have this in the standard Haskell'98
library).
What I'm searching for is a library where I have the Set, FiniteMap
etc. specifications (i.e., typeclasses), and several implementations
(i.e., instances) for them.  E.g., we can have a list-based
implementation of Set (for small sets), but also a tree-based
implementation (for larger sets).
So, I would like a library with something like this

   -- sa is a type corresponding to sets of a's
   -- requires multi-parameter typeclasses
   class (Eq a) = Set a sa where
 addSetElem :: sa - a - sa-- add an element to a set
 searchElem :: sa - a - Bool  -- search an element in a set
 ...
   -- list based Set implementation
   instance (Eq a) = Set a [a] where
 ...
   -- ordered-tree Set implementation
   instance (Ord a) = Set a (OrdTree a) where
 ...
and so on.

Furthermore, I'm interested in a library that can be compiled /
interpreted by a mainstream tool, e.g., ghc, hugs etc.  I've already
started writting such a library (mainly for didactic purposes), but I
would like to know if an enstablished collection library already
exists.
Thanks,

Alex

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Graham Klyne
For email:
http://www.ninebynine.org/#Contact
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe