
Reasonable suggestion, and not hard to implement. Definitions are more troublesome. Currently implicit parameter bindings must be of the form ?x = e I.e. no pattern-matching, function defintions etc. Changing this would be quite a bit more work. One could imagine a) status quo b) allow infix application, but keep binding syntactically restricted c) allow arbitrary binding forms (pattern matching etc) I think (b) is defensible; I don't think (c) is worth the work. But I would prefer to do (b) in sync with Hugs. Let's see what they think. Simon | -----Original Message----- | From: Hal Daume III [mailto:hdaume@ISI.EDU] | Sent: 23 July 2002 18:38 | To: GHC Users Mailing List | Subject: infixed implicit parameters | | | in the cannonical sort with implicit params, i we write | something like: | | mySort :: (?cmp :: a -> a -> Ordering) => [a] -> [a] | mySort [] = [] | mySort (x:xs) = insert x (mySort xs) | where insert x [] = [x] | insert x (y:ys) | | ?cmp x y == GT = y : insert x ys | | otherwise = x : y : ys | | but we cannot write for the second-to-last line: | | x `?cmp` y | | or | | x ?`cmp` y | | any chance this will be changed (my preference would be for | the first one. | | - hal | | -- | Hal Daume III | | "Computer science is no more about computers | hdaume@isi.edu | than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-users |

On Monday 29 July 2002 02:56 am, Simon Peyton-Jones wrote:
Reasonable suggestion, and not hard to implement.
Definitions are more troublesome. Currently implicit parameter bindings must be of the form ?x = e I.e. no pattern-matching, function defintions etc. Changing this would be quite a bit more work.
One could imagine
a) status quo b) allow infix application, but keep binding syntactically restricted c) allow arbitrary binding forms (pattern matching etc)
I think (b) is defensible; I don't think (c) is worth the work. But I would prefer to do (b) in sync with Hugs. Let's see what they think.
This falls into the category of things that I can't get too excited about ;-) I'll take b) as Simon's proposal, and will support it. --Jeff
participants (2)
-
Jeffrey R Lewis
-
Simon Peyton-Jones