Accompanying material for

"Functional Pearl: Explaining binomial heaps", by Ralf Hinze, Journal of Functional Programming 9(1), pp. 93-104, January 1999.

Here is source code of the priority queue implementations described in the paper. Note that the code conforms to Haskell 98 with one small exception: deriving Show for MinView does not work since the instance declaration requires a context of the form Show (q a). This is, however, not legal Haskell 98. Fortunately, both Hugs 98 (use -98) and GHC 4.0x (use -fglasgow-exts) provide the necessary extension to the class system. [Alternatively, delete deriving (Show) and use Hugs' -u option to activate the built-in printing mechanism of Hugs.]


Journal of Functional Programming