[Haskell] FP-style vs. OO-style AST structure

2006-05-10 Thread Doug Kirk

Hi,

I'm a Haskell newbie, but not new to programming, and I have a
question regarding style (I think).

I'm writing a parser for OMG's OCL, and have two ways of defining the
AST model of a constraint. Each constraint in OCL has the following 4
characteristics:

1. name :: Maybe String
2. context :: UmlElement
3. expr :: OclExpression
4. type :: OclConstraintType

Now, having come from an O-O background, this looks right; however, in
an FPL, it may not be. OclConstraintType is essentially an enumeration
of the values:

Invariant
  | Precondition
  | Postcondition
  | InitialValue
  | Derivation
  | Body

The question is this: is it better to create a single type as above
with a 'type' attribute, or would it be better to use the types as
separate constructors of a Constraint, each constructor taking the
same attributes?

I'm looking to avoid any pitfalls that could occur with either
decision, and at this point I don't know the benefits of doing it one
way vs. the other.

BTW, I am using UUST Parser Combinator AG for the parser definition,
in case that makes a difference.

Thanks!
--doug
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] 2nd CFP: Workshop on Generic Programming 2006

2006-05-10 Thread Ralf Hinze
[The deadline is approaching: 24 days left.]



SECOND CALL FOR PAPERS

 Workshop on Generic Programming 2006

Portland, Oregon, 16th September 2006

  The Workshop on Generic Programming is sponsored by ACM SIGPLAN
  and forms part of ICFP 2006. Previous Workshops on Generic
  Programming have been held in Marstrand (affiliated with MPC),
  Ponte de Lima (affiliated with MPC), Nottingham (informal
  workshop), Dagstuhl (IFIP WG2.1 Working Conference), Oxford
  (informal workshop), and Utrecht (informal workshop).

  http://www.informatik.uni-bonn.de/~ralf/wgp2006.{html,pdf,ps,txt}



Scope
-

Generic programming is about making programs more adaptable by making
them more general. Generic programs often embody non-traditional kinds
of polymorphism; ordinary programs are obtained from them by suitably
instantiating their parameters. In contrast with normal programs, the
parameters of a generic program are often quite rich in structure; for
example they may be other programs, types or type constructors, class
hierarchies, or even programming paradigms.

Generic programming techniques have always been of interest, both to
practitioners and to theoreticians, but only recently have generic
programming techniques become a specific focus of research in the
functional and object-oriented programming language communities. This
workshop will bring together leading researchers in generic
programming from around the world, and feature papers capturing the
state of the art in this important emerging area.

We welcome contributions on all aspects, theoretical as well as
practical, of
o  adaptive object-oriented programming,
o  aspect-oriented programming,
o  component-based programming,
o  generic programming,
o  meta-programming,
o  polytypic programming, 
o  and so on.

Submission details
--

Deadline for submission:3rd June 2006
Notification of acceptance:24th June 2006
Final submission due:   8th July 2006
Workshop:  16th September 2006

Authors should submit papers, in postscript or PDF format, formatted
for A4 paper, to Ralf Hinze ([EMAIL PROTECTED]) by 3rd June
2006.  The length should be restricted to 12 pages in standard
(two-column, 9pt) ACM.  Accepted papers are published by the ACM and
will additionally appear in the ACM digital library.

Programme committee
---

Roland Backhouse University of Nottingham
Pascal Costanza  Vrije Universiteit Brussel
Peter Dybjer Chalmers University of Technology
Jeremy Gibbons   University of Oxford
Johan JeuringUniversiteit Utrecht
Ralf Hinze (chair)   Universität Bonn
Karl Lieberherr  Northeastern University
David Musser Rensselaer Polytechnic Institute
Rinus Plasmeijer Universiteit Nijmegen
Sibylle Schupp   Chalmers University of Technology
Jeremy Siek  Rice University
Don Syme Microsoft Research



___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell