[cduce-users] splitting the atom

Alain Frisch Alain.Frisch at inria.fr
Fri May 27 18:16:54 CEST 2005

Matthias Radestock wrote:

>Is there any way to split an atom into its namespace and name? E.g. I
>want to be able to do something like this:
> namespace foo = "foo" in split_atom `foo:bar;;
>(* => ("foo",`bar) *)
>Similarly, is there a way to construct atoms given a namespace and name?
>E.g. I want to be able to do something like this:
> let ns = "foo" in
> let name = `bar in
> make_atom ns name;;
>(* => `some_prefix_for_foo:bar *)

I added split_atom and make_atom to the CVS. The name for the local name
is String, not Atom (and it is not checked whether this is a legal name 
w.r.t. XML).

>If this isn't currently possible, then perhaps we could introduce some
>value & pattern syntax for this, e.g.
> `(ns):(n)
This is much more difficult.

-- Alain

More information about the Cduce-users mailing list