Studying the paper *A Simple Implementation for Priority Search Queues*, by
Ralf Hinze, I came across the following syntax that I didn't understand and
I couldn't use in GHCi 7.0.3 for defining a binding data type (page 3):

Bindings are represented by the following data type:
*data k -> p = k -> p*
key :: (k -> p) -> k
key (k -> p) = k
prio :: (k -> p) -> p
prio (k -> p) = p
Note that we use '->' both as a type constructor and value constructor.
[...] data PSQ k p

The following page has these value constructors:

*0 :: PSQ k p*
*{.} :: (k -> p) -> PSQ k p*


The paper says that's Haskell '98 code. I'll appreciate info on what kind of
data declaration those are and any pointers to related documentation. Or
maybe those are deprecated features. I'm stuck in this part.

-armando

www.cs.ox.ac.uk/people/ralf.hinze/talks/ICFP01.pdf
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to