title: Prolog type definition in swi-prolog
body: <p>in visual prolog there is "domains" section in a prolog program in which you can define types. Is there any similar thing in swi-prolog? </p>
  
  <p>In visual prolog a type is defined like:</p>
  
  <pre><code>domains
  NewType = thing1; thing2
  </code></pre>