public string ToSource(SourceLanguage language)
 {
     language = language.Inner();
     if (this.body == null)
     {
         return(this.head.ToSource(language) + ".");
     }
     else
     {
         return(this.head.ToSource(language) + " :- " + this.body.ToSource(language) + ".");
     }
 }
            public override string ToSource(SourceLanguage language)
            {
                language = language.Inner();
                string result = "";

                if (IsListName(this.fname) && Arity == 2)
                {
                    Part x = this;
                    {
                        result += "[";
                        var com = false;
                        while (IsList(x))
                        {
                            if (com)
                            {
                                result += ", ";
                            }
                            result += x.ArgList[0].ToSource(language); // May need to case var/atom/term
                            com     = true;
                            x       = x.ArgList[1];
                        }
                        if (x.ToSource(SourceLanguage.Prolog) != "[]")
                        {
                            result += " | ";
                            result += x.ToSource(language);
                        }
                        result += "]";
                        return(result);
                    }
                }
                if (Arity == 0)
                {
                    if (fname == "cut")
                    {
                        return("!");
                    }
                    return(ReadableName);
                }
                PartListImpl argList = this.ArgList;

                if (argList == null)
                {
                    return(result + "()");
                }
                result += "" + ReadableName + "(";
                result += argList.ToSource(language);
                result += ")";
                return(result);
            }