#line 275 "/home/travis/build/felix-lang/felix/src/packages/core_type_constructors.fdoc"
  
  // -----------------------------------------------------------------------------
  typedef void = 0;
  
  instance Str[void] {
    fun str (x:void) => "void";
  }
  open Show[void];
  
  typedef unit = 1;
  
  instance Str[unit] {
    fun str (x:unit) => "()";
  }
  open Show[unit];
  
  instance Eq[unit] {
    fun == (x:unit, y:unit) => true;
  }
  open Eq[unit];
  
  // -----------------------------------------------------------------------------
  
  typedef unitsums = typesetof (3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  
  instance[T in unitsums] Eq[T] {
    fun == (x:T,y:T) => caseno x == caseno y;
  }
  
  instance[T in unitsums] FloatAddgrp[T] {
    fun zero () => 0 :>> T;
    fun - (x:T) => (sub (memcount[T].int , caseno x)) :>> T;
    fun + (x:T, y:T) : T => (add ((caseno x , caseno y)) % memcount[T].int) :>> T;
    fun - (x:T, y:T) : T => (add (memcount[T].int, sub(caseno x , caseno y)) % memcount[T].int) :>> T;
  }
  
  instance[T in unitsums] Str[T] {
    fun str(x:T)=> str (caseno x)+ ":"+str(memcount[T].int);
  }
  
  // This doesn't work dues to a design fault in the
  // numerical class libraries using "-" as a function
  // name for both prefix (negation) and infix (subtraction).
  // But in a class we cannot distinguish the uses since
  // negation could apply to a tuple.
  //
  // open[T in unitsums] Addgrp[T];
  
  // so we have to open them all individually
  
  // Note: we don't put type 2 here, that's a bool and should
  // be handled elsewhere more specially..
  
  open Addgrp[3];
  open Addgrp[4];
  open Addgrp[5];
  open Addgrp[6];
  open Addgrp[7];
  open Addgrp[8];
  open Addgrp[9];
  open Addgrp[10];
  open Addgrp[11];
  open Addgrp[12];
  open Addgrp[13];
  open Addgrp[14];
  open Addgrp[15];
  open Addgrp[16];
  
  open Str[3];
  open Str[4];
  open Str[5];
  open Str[6];
  open Str[7];
  open Str[8];
  open Str[9];
  open Str[10];
  open Str[11];
  open Str[12];
  open Str[13];
  open Str[14];
  open Str[15];
  open Str[16];