X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/e2ef704edc5bd99f32f11c9d3eeeef5b81b7da2a..cf879b4f037242eb535207f0ff3400fe89ab61b1:/src/domain.sml diff --git a/src/domain.sml b/src/domain.sml index 85dcd67..8020ee4 100644 --- a/src/domain.sml +++ b/src/domain.sml @@ -223,8 +223,11 @@ datatype master = ExternalMaster of string | InternalMaster of string -val ip = fn (EApp ((EVar "ip_of_node", _), e), _) => Option.map nodeIp (Env.string e) - | e => Env.string e +val ip = Env.string + +val _ = Env.registerFunction ("ip_of_node", + fn [(EString node, _)] => SOME (EString (nodeIp node), dl) + | _ => NONE) val master = fn (EApp ((EVar "externalMaster", _), e), _) => Option.map ExternalMaster (ip e) | (EApp ((EVar "internalMaster", _), e), _) => Option.map InternalMaster (Env.string e)