Newbie questions about Pliant

Newbie questions about Pliant

Dictionary with user-defined type as key

How do you create a Dictionary with a user-defined type as a key?
Message posted by maybe Todd Fleming on 2001/04/20 00:53:51
I tried the following:
====================
module "/pliant/language/unsafe.pli"

type DictKey
  field Int i

function compare a b -> result
  arg DictKey a b
  arg Int result
  result := compare a:i b:i

gvar (Dictionary DictKey Int) dict
==================

Pliant said:
  Failed to compile compare   (DictKey rw  DictKey r)
    compile /pliant/language/type/set/dictionary.pli (internals) 146 17

How can I make my compare function known to Dictionary?