infixed implicit parameters
Hal Daume III
hdaume@ISI.EDU
Tue, 23 Jul 2002 10:38:26 -0700 (PDT)
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