Re: Wishlist: MixFix syntax
This is a repost of an earlier post from before there was an explicit wishlist so it might make it onto the wishlist. The idea was inspired by OBJs syntax. Something similar is also available in Isabelle. I always liked the possibility to declare infix operators, may we extend this to mixfix? E.g. Please see my note _Macros and Preprocessing in Haskell_, which makes a proposal for just this feature. http://www.cl.cam.ac.uk/users/kw217/research/papers.html Enjoy! --KW 8-) -- : Keith Wansbrough, MSc, BSc(Hons) (Auckland) : : PhD Student, Computer Laboratory, University of Cambridge, England. : : (and recently of the University of Glasgow, Scotland. [] ) : : Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S.: : http://www.cl.cam.ac.uk/users/kw217/ mailto:[EMAIL PROTECTED] : :-:
Wishlist: MixFix syntax
This is a repost of an earlier post from before there was an explicit wishlist so it might make it onto the wishlist. The idea was inspired by OBJs syntax. Something similar is also available in Isabelle. I always liked the possibility to declare infix operators, may we extend this to mixfix? E.g. oper do _ on _ until _ od :: (a - a) - a - (a - Bool) - a where do f on x until p od = until p f x or oper if _ then _ else _ fi :: Bool - a - a - a where if c then t else e fi = case c of True - t False - e while this would (IMHO) already be nice, what I would really love would be the ability to have a more general syntax for operator definitions. Having a type newtype Subst = [Name :-: Term] instance Show Subst where ... and be able to write oper _ _ :: Subst - Term - Term where sigma t = ... or for data Path a = Empty | Path a (Path a) instance MonadPlus (Path a) ... be able to write oper _;_ :: Path - Path - Path where p ; q = p ++ q Marko -- Marko Schütz[EMAIL PROTECTED] http://www.ki.informatik.uni-frankfurt.de/~marko/