Get party id as Text (without apostrophes or ticks)

The following Daml Script…

alice <- allocateParty "Alice"
let partyText = show alice

…sets partyText to the value 'Alice', including the ticks.

How can I get a text representation of the party without the surrounding ticks?

There is a partyToText : Party -> Text function which does not include the ticks.

alice <- allocateParty "Alice"
debugRaw $ "Using show:        " <> (show alice)
debugRaw $ "Using partyToText: " <> (partyToText alice)
Using show:        'Alice'
Using partyToText: Alice
2 Likes