[Prev][Next][Index][Thread]

*From*: Marko Schuetz <marko@ki.informatik.uni-frankfurt.de>*Subject*: Wishlist: MixFix syntax*Date*: 27 Sep 1999 11:03:10 +0200*To*: haskell@haskell.org

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 marko@cs.uni-frankfurt.de http://www.ki.informatik.uni-frankfurt.de/~marko/

**Follow-Ups**:**Re: Wishlist: MixFix syntax***From:*Keith Wansbrough <Keith.Wansbrough@cl.cam.ac.uk>

- Prev:
**Qualified identifiers (was: RE: What *I* thinks Haskell Needs.)** - Next:
**Haskell Wishlist** - Index(es):