Repository: gcanti/tcomb
Pull request #114 (2015-07-29 10:00:37)

v2.1.0


Patch:
diff --git a/.npmignore b/.npmignore
index 0addcf2..658081f 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,5 +1,4 @@
 .*
 *.log
-Gruntfile.js
 node_modules
 test
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07ab2b1..52e8898 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,12 @@
 
 **Note**: Gaps between patch versions are faulty/broken releases.
 
+## v2.1.0
+
+- **New Feature**
+  - added aliases for pre-defined irreducible types fix #112
+  - added overridable `stringify` function to handle error messages and improve performances in development (replaces the experimental `options.verbose`)
+
 ## v2.0.1
 
 - **Experimental**
diff --git a/GUIDE.md b/GUIDE.md
index 83818c4..5b9e40d 100644
--- a/GUIDE.md
+++ b/GUIDE.md
@@ -6,6 +6,10 @@ Node
 npm install tcomb
 ```
 
+```js
+import t from 'tcomb';
+```
+
 # The idea
 
 What's a type? In tcomb **a type is represented by a function** `T` such that:
@@ -20,22 +24,22 @@ An *irreducible* type is a type that can't be built with other types. Examples o
 
 **JavaScript native types**
 
-* `Str`: strings
-* `Num`: numbers
-* `Bool`: booleans
-* `Arr`: arrays
-* `Obj`: plain objects
-* `Func`: functions
-* `Err`: errors
-* `Re`: regular expressions
-* `Dat`: dates
+* `t.String`: strings (short alias `t.Str`)
+* `t.Number`: numbers (short alias `t.Num`)
+* `t.Boolean`: booleans (short alias `t.Bool`)
+* `t.Array`: arrays (short alias `t.Arr`)
+* `t.Object`: plain objects (short alias `t.Obj`)
+* `t.Function`: functions (short alias `t.Func`)
+* `t.Error`: errors (short alias `t.Err`)
+* `t.RegExp`: regular expressions (short alias `t.Re`)
+* `t.Date`: dates (short alias `t.Dat`)
 
 There are 2 additional irriducible types defined in tcomb:
 
 **Additional types**
 
-* `Nil`: `null` or `undefined`
-* `Any`: any type
+* `t.Nil`: `null` or `undefined`
+* `t.Any`: any type
 
 ## Type checking with the `is` function
 
@@ -44,11 +48,11 @@ Every type defined with tcomb owns a static predicate `is(x: any) -> boolean` us
 ```js
 const t = require('tcomb');
 
-t.Str.is('a string'); // => true
-t.Str.is(1);          // => false
+t.String.is('a string'); // => true
+t.String.is(1);          // => false
 
-t.Num.is('a string'); // => false
-t.Num.is(1);          // => true
+t.Number.is('a string'); // => false
+t.Number.is(1);          // => true
 
 // and so on...
 ```
@@ -58,8 +62,8 @@ t.Num.is(1);          // => true
 tcomb provides a built-in `t.assert(guard: boolean, message?: string)` function, if an assert fails a `TypeError` is thrown.
 
 ```js
-assert(Str.is('a string')); // => ok
-assert(Str.is(1)); // => throws
+assert(t.String.is('a string')); // => ok
+assert(t.String.is(1)); // => throws
 ```
 
 * `guard` is a boolean condition
@@ -75,8 +79,8 @@ assert(x > min, `${x} should be greater then ${min}`);
 Another way to ensure the correct type is to use types as constructors:
 
 ```js
-const s1 = Str('a string'); // => ok
-const s2 = Str(1); // => throws
+const s1 = t.String('a string'); // => ok
+const s2 = t.String(1); // => throws
 ```
 
 ## Adding safety to legacy code
@@ -95,8 +99,8 @@ const p = new Point(1, 'a'); // silent error
 // Now with asserts inserted:
 
 function Point (x, y) {
-  this.x = Num(x);
-  this.y = Num(y);
+  this.x = t.Number(x);
+  this.y = t.Number(y);
 }
 
 const p = new Point(1, 'a'); // => throws
@@ -122,12 +126,12 @@ Every type owns a `meta` object containing the following properties:
 * `kind`: the type kind, equal to `"irreducible"` for irreducible types
 * `is`: the predicate
 
-Example: the `meta` object of `Str`:
+Example: the `meta` object of `t.String`:
 
 ```js
 {
   kind: 'irreducible',
-  is: function isStr(x) {
+  is: function isString(x) {
     return typeof x === 'string';
   }
 }
@@ -153,7 +157,7 @@ Example:
 
 ```js
 // defines a type representing positive numbers
-const Positive = t.subtype(t.Num, n => return n >= 0, 'Positive');
+const Positive = t.subtype(t.Number, (n) => n >= 0, 'Positive');
 
 Positive.is(1);  // => true
 Positive.is(-1); // => false
@@ -197,8 +201,8 @@ Enums have the following `meta` object:
 
 If you don't care of values you can use `enums.of(keys, name?)` where:
 
-*   `keys: Array<Str|Number> | Str` is the array of enums or a string where the enums are separated by spaces
-*   `name: ?Str` is an optional string useful for debugging purposes
+*   `keys: Array<string|number> | string` is the array of enums or a string where the enums are separated by spaces
+*   `name: ?string` is an optional string useful for debugging purposes
 
 ```js
 // values will mirror the keys
@@ -223,8 +227,8 @@ You can define a struct type using the `struct(props, name?)` combinator where:
 
 ```js
 const Point = t.struct({
-  x: Num,
-  y: Num
+  x: t.Number,
+  y: t.Number
 }, 'Point');
 
 // constructor usage, `p` is immutable, new is optional
@@ -262,7 +266,7 @@ Every struct constructor owns an `extend(mixins, name)` function where:
 *   `name` the name of the new struct
 
 ```js
-const Point3D = Point.extend({z: Num}, 'Point3D');
+const Point3D = Point.extend({z: t.Number}, 'Point3D');
 
 // multiple inheritance
 const A = struct({...});
@@ -275,9 +279,9 @@ const E = A.extend([B, MixinC, MixinD]);
 `extend` supports **prototypal inheritance**:
 
 ```js
-const Rectangle = struct({
-  width: Num,
-  height: Num
+const Rectangle = t.struct({
+  width: t.Number,
+  height: t.Number
 });
 
 Rectangle.prototype.getArea = function () {
@@ -285,7 +289,7 @@ Rectangle.prototype.getArea = function () {
 };
 
 const Cube = Rectangle.extend({
-  thickness: Num
+  thickness: t.Number
 });
 
 // typeof Cube.prototype.getArea === 'function'
@@ -297,7 +301,7 @@ Cube.prototype.getVolume = function () {
 > **Note**. Repeated props are not allowed:
 
 ```js
-const Wrong = Point.extend({x: Num}); // => throws
+const Wrong = Point.extend({x: t.Number}); // => throws
 ```
 
 ## The tuple combinator
@@ -310,7 +314,7 @@ You can define a tuple type using the `tuple(types, name)` combinator where:
 Instances of tuples are plain old JavaScript arrays.
 
 ```js
-const Area = tuple([Num, Num]);
+const Area = t.tuple([t.Number, t.Number]);
 
 // constructor usage, `area` is immutable
 const area = Area([1, 2]);
@@ -335,7 +339,7 @@ You can define a list type using the `list(type, name)` combinator where:
 Instances of lists are plain old JavaScript arrays.
 
 ```js
-const Path = list(Point);
+const Path = t.list(Point);
 
 // costructor usage, `path` is immutable
 const path = Path([
@@ -364,7 +368,7 @@ You can define a dictionary type using the `dict(domain, codomain, name)` combin
 Instances of dicts are plain old JavaScript objects.
 
 ```js
-const Tel = dict(Str, Num);
+const Tel = dict(String, t.Number);
 
 // costructor usage, `tel` is immutable
 const tel = Tel({'jack': 4098, 'sape': 4139});
@@ -388,7 +392,7 @@ You can define a union of types using the `union(types, name)` combinator where:
 * `name` is an optional string useful for debugging purposes
 
 ```js
-const ReactKey = union([Str, Num]);
+const ReactKey = t.union([t.String, t.Number]);
 
 ReactKey.is('a');  // => true
 ReactKey.is(1);    // => true
@@ -416,8 +420,8 @@ An example implementation for the `ReactKey` union:
 
 ```js
 ReactKey.dispatch = function (x) {
-  if (Str.is(x)) return Str;
-  if (Num.is(x)) return Num;
+  if (t.String.is(x)) return t.String;
+  if (t.Number.is(x)) return t.Number;
 };
 
 // now you can do this without a fail
@@ -437,7 +441,7 @@ You can define a maybe type using the `maybe(type, name)` combinator where:
 
 ```js
 // the value of a radio input where null = no selection
-const Radio = maybe(Str);
+const Radio = t.maybe(t.String);
 
 Radio.is('a');     // => true
 Radio.is(null);    // => true
@@ -458,16 +462,16 @@ Maybes have the following `meta` object:
 Typed functions may be defined like this:
 
 ```js
-// add takes two `Num`s and returns a `Num`
-const add = func([Num, Num], Num)
+// add takes two `t.Number`s and returns a `t.Number`
+const add = t.func([t.Number, t.Number], t.Number)
     .of(function (x, y) { return x + y; });
 ```
 
 And used like this:
 
 ```js
-add("Hello", 2); // Raises error: Invalid `Hello` supplied to `Num`
-add("Hello");    // Raises error: Invalid `Hello` supplied to `Num`
+add("Hello", 2); // Raises error: Invalid `Hello` supplied to `t.Number`
+add("Hello");    // Raises error: Invalid `Hello` supplied to `t.Number`
 
 add(1, 2);       // Returns: 3
 add(1)(2);       // Returns: 3
@@ -484,28 +488,28 @@ Returns a function type whose functions have their domain and codomain specified
 `func` can be used to define function types using native types:
 
 ```js
-// An `A` takes a `Str` and returns an `Num`
-const A = func(Str, Num);
+// An `A` takes a `t.String` and returns an `t.Number`
+const A = t.func(t.String, t.Number);
 ```
 
 The domain and codomain can also be specified using types from any combinator including `func`:
 
 ```js
-// A `B` takes a `Func` (which takes a `Str` and returns a `Num`) and returns a `Str`.
-const B = func(func(Str, Num), Str);
+// A `B` takes a `Func` (which takes a `t.String` and returns a `t.Number`) and returns a `t.String`.
+const B = t.func(t.func(t.String, t.Number), t.String);
 
-// An `ExcitedStr` is a `Str` containing an exclamation mark
-const ExcitedStr = subtype(Str, function (s) { return s.indexOf('!') !== -1; }, 'ExcitedStr');
+// An `ExcitedString` is a `t.String` containing an exclamation mark
+const ExcitedString = t.subtype(t.String, function (s) { return s.indexOf('!') !== -1; }, 'ExcitedString');
 
-// An `Exciter` takes a `Str` and returns an `ExcitedStr`
-const Exciter = func(Str, ExcitedStr);
+// An `Exciter` takes a `t.String` and returns an `ExcitedString`
+const Exciter = t.func(t.String, ExcitedString);
 ```
 
 Additionally the domain can be expressed as a list of types:
 
 ```js
-// A `C` takes an `A`, a `B` and a `Str` and returns a `Num`
-const C = func([A, B, Str], Num);
+// A `C` takes an `A`, a `B` and a `t.String` and returns a `t.Number`
+const C = t.func([A, B, t.String], t.Number);
 ```
 
 Functions have the following `meta` object:
@@ -533,10 +537,10 @@ const simpleQuestionator = Exciter.of(function (s) { return s + '?'; });
 const simpleExciter      = Exciter.of(function (s) { return s + '!'; });
 
 // Raises error:
-// Invalid `Hello?` supplied to `ExcitedStr`, insert a valid value for the subtype
+// Invalid `Hello?` supplied to `ExcitedString`, insert a valid value for the subtype
 simpleQuestionator('Hello');
 
-// Raises error: Invalid `1` supplied to `Str`
+// Raises error: Invalid `1` supplied to `String`
 simpleExciter(1);
 
 // Returns: 'Hello!'
@@ -547,11 +551,11 @@ The returned function may also be partially applied passing a `curried` addition
 
 ```js
 // We can reasonably suggest that add has the following type signature
-// add : Num -> Num -> Num
-const add = func([Num, Num], Num)
+// add : t.Number -> t.Number -> t.Number
+const add = t.func([t.Number, t.Number], t.Number)
     .of(function (x, y) { return x + y }, true);
 
-const addHello = add("Hello"); // As this raises: "Error: Invalid `Hello` supplied to `Num`"
+const addHello = add("Hello"); // As this raises: "Error: Invalid `Hello` supplied to `t.Number`"
 
 const add2 = add(2);
 add2(1); // And this returns: 3
@@ -571,8 +575,8 @@ Exciter.is(simpleQuestionator); // Returns: true
 
 const id = function (x) { return x; };
 
-func([Num, Num], Num).is(func([Num, Num], Num).of(id)); // Returns: true
-func([Num, Num], Num).is(func(Num, Num).of(id));        // Returns: false
+t.func([t.Number, t.Number], t.Number).is(func([t.Number, t.Number], t.Number).of(id)); // Returns: true
+t.func([t.Number, t.Number], t.Number).is(func(t.Number, t.Number).of(id));        // Returns: false
 ```
 
 ### Rules
@@ -583,20 +587,20 @@ func([Num, Num], Num).is(func(Num, Num).of(id));        // Returns: false
 
 ## Updating immutable instances
 
-You can update an immutable instance with the `update` static function
+You can update an immutable instance with the provided `update` function:
 
 ```js
-Type.update(instance, spec)
+MyType.update(instance, spec)
 ```
 
 The following commands are compatible with the [Facebook Immutability Helpers](http://facebook.github.io/react/docs/update.html):
 
-* $push
-* $unshift
-* $splice
-* $set
-* $apply
-* $merge
+* `$push`
+* `$unshift`
+* `$splice`
+* `$set`
+* `$apply`
+* `$merge`
 
 Example:
 
@@ -609,17 +613,17 @@ p = Point.update(p, {x: {'$set': 3}}); // => {x: 3, y: 2}
 ### Removing a value form a dict
 
 ```js
-const Type = dict(Str, Num);
-const instance = Type({a: 1, b: 2});
-const updated = Type.update(instance, {$remove: ['a']}); // => {b: 2}
+const MyType = dict(t.String, t.Number);
+const instance = MyType({a: 1, b: 2});
+const updated = MyType.update(instance, {$remove: ['a']}); // => {b: 2}
 ```
 
 ### Swapping two list elements
 
 ```js
-const Type = list(Num);
-const instance = Type([1, 2, 3, 4]);
-const updated = Type.update(instance, {'$swap': {from: 1, to: 2}}); // => [1, 3, 2, 4]
+const MyType = list(t.Number);
+const instance = MyType([1, 2, 3, 4]);
+const updated = MyType.update(instance, {'$swap': {from: 1, to: 2}}); // => [1, 3, 2, 4]
 ```
 
 ### Adding other commands
@@ -663,7 +667,7 @@ t.update = function (instance, spec) {
 Returns a type's name:
 
 ```js
-getTypeName(Str); // => 'Str'
+t.getTypeName(String); // => 'String'
 ```
 
 If name is not specified, fallbacks according to [http://flowtype.org](http://flowtype.org)
@@ -673,8 +677,17 @@ If name is not specified, fallbacks according to [http://flowtype.org](http://fl
 Safe version of mixin, properties cannot be overwritten...
 
 ```js
-mixin({a: 1}, {b: 2}); // => {a: 1, b: 2}
-mixin({a: 1}, {a: 2}); // => throws
+t.mixin({a: 1}, {b: 2}); // => {a: 1, b: 2}
+t.mixin({a: 1}, {a: 2}); // => throws
 ```
 
 ...unless `override = true`
+
+## stringify(x: any): String
+
+Used internally to format the error messages. Since it uses by default `JSON.stringify` and can be slow in a performance intensive application so you may want to override it:
+
+```js
+// override with a less verbose but much faster function
+t.stringify = String;
+```
\ No newline at end of file
diff --git a/README.md b/README.md
index 30dbd18..0d2e972 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,124 @@
 [![build status](https://img.shields.io/travis/gcanti/tcomb/master.svg?style=flat-square)](https://travis-ci.org/gcanti/tcomb)
 [![dependency status](https://img.shields.io/david/gcanti/tcomb.svg?style=flat-square)](https://david-dm.org/gcanti/tcomb)
+![npm downloads](https://img.shields.io/npm/dm/tcomb.svg)
 
-tcomb is a library for Node.js and the browser which allows you to **check the types** of JavaScript values at runtime with a simple syntax. It's great for **Domain Driven Design** and for adding safety to your internal code.
+tcomb is a library for Node.js and the browser which allows you to **check the types** of JavaScript values at runtime with a simple and concise syntax. It's great for **Domain Driven Design** and for adding safety to your internal code.
 
 # Features
 
-1. **immutability**: instances are immutables (using `Object.freeze`) in development
-2. **speed**: asserts are active only in development mode and stripped in production code.
-3. **DDD**: write complex domain models in a breeze and with a small code footprint
-4. **debugging**: you can customize the behaviour when an assert fails leveraging the power of Chrome DevTools
-5. **runtime type introspection**: every model written with tcomb is inspectable at runtime
-6. **JSON**: encodes/decodes domain models to/from JSON for free
+## Lightweight
 
-# Quick example
+3KB gzipped.
+
+## Domain Driven Design
+
+Write complex domain models in a breeze and with a small code footprint. Supported types:
+
+* user defined types
+* structs
+* lists
+* enums
+* subtypes
+* unions
+* the option type
+* tuples
+* dictionaries
+* functions
+
+## Based on set theory
+
+- [JavaScript, Types and Sets - Part I](https://gcanti.github.io/2014/09/29/javascript-types-and-sets.html)
+- [JavaScript, Types and Sets - Part II](https://gcanti.github.io/2014/10/07/javascript-types-and-sets-part-II.html)
+
+## Safety
+
+All models defined by tcomb are type checked (using a built-in `assert(guard, [message])` function).
+
+## Immutability and immutability helpers
+
+Instances are immutables by default using `Object.freeze`. This means you can use standard JavaScript objects and arrays. You don't have to change how you normally code. You can update an immutable instance with the provided `update` function:
+
+```js
+MyType.update(instance, spec)
+```
+
+The following commands are compatible with the [Facebook Immutability Helpers](http://facebook.github.io/react/docs/update.html):
+
+* `$push`
+* `$unshift`
+* `$splice`
+* `$set`
+* `$apply`
+* `$merge`
+
+## Speed
+
+`Object.freeze` and the asserts are executed only during development and stripped out in production (using `process.env.NODE_ENV = 'production'` tests).
+
+## Debugging with Chrome DevTools
+
+You can customize the behaviour when an assert fails leveraging the power of Chrome DevTools.
+
+```js
+import t from 'tcomb';
+
+// default behaviour
+t.fail = function fail(message) {
+  throw new TypeError('[tcomb] ' + message); // set "Pause on exceptions" on the "Sources" panel
+};
+
+// .. or define your own handler
+t.fail = function fail(message) {
+  debugger; // starts the Chrome DevTools debugger
+  throw new TypeError('[tcomb] ' + message);
+};
+```
+
+## Runtime type introspection
+
+Every model is inspectable at runtime. You can read and reuse the informations stored in your types (in a `meta` object). See:
+
+- [tcomb-validation](https://github.com/gcanti/tcomb-validation)
+- [tcomb-form](https://github.com/gcanti/tcomb-form)
+- [JSON API Validation In Node.js](https://gcanti.github.io/2014/09/15/json-api-validation-in-node.html)
+
+## Easy JSON serialization / deseralization
+
+Encodes / decodes your domain models to / from JSON for free. See:
+
+- [JSON Deserialization Into An Object Model](https://gcanti.github.io/2014/09/12/json-deserialization-into-an-object-model.html)
+
+# Code example
 
 ```js
 import t from 'tcomb';
 
-// define a custom integer type
-const Integer = t.subtype(t.Num, n => n % 1 === 0);
+// a user defined type
+const Integer = t.subtype(t.Number, (n) => n % 1 === 0);
 
+// a struct
 const Person = t.struct({
-  name: t.Str,              // required string
-  surname: t.maybe(t.Str),  // optional string
-  age: Integer,             // required integer
-  tags: t.list(t.Str)       // a list of strings
+  name: t.String,              // required string
+  surname: t.maybe(t.String),  // optional string
+  age: Integer,                // required integer
+  tags: t.list(t.String)       // a list of strings
 });
 
+// methods are defined as usual
+Person.prototype.getFullName = function () {
+  return `${this.name} ${this.surname}`;
+};
+
+// an instance of Person (the keyword new is optional)
 const person = new Person({
   name: 'Giulio',
   surname: 'Canti',
   age: 41,
-  tags: ['developer', 'rock climber']
+  tags: ['js developer', 'rock climber']
 });
 ```
 
-# Documentation
+# Docs
 
 [GUIDE.md](GUIDE.md)
 
diff --git a/index.js b/index.js
index 089741a..e9e699c 100644
--- a/index.js
+++ b/index.js
@@ -1,14 +1,6 @@
 'use strict';
 
-exports.options = {
-  verbose: true
-};
-
 function stringify(x) {
-  // set options.verbose = false to improve performances in development
-  if (!exports.options.verbose) {
-    return String(x);
-  }
   try { // handle "Converting circular structure to JSON" error
     return JSON.stringify(x, null, 2);
   } catch (e) {
@@ -16,6 +8,8 @@ function stringify(x) {
   }
 }
 
+exports.stringify = stringify;
+
 function isInstanceOf(x, constructor) {
   return x instanceof constructor;
 }
@@ -81,7 +75,7 @@ function create(type, value) {
 
   if (process.env.NODE_ENV !== 'production') {
     // type should be a class constructor and value some instance, just check membership and return the value
-    assert(isInstanceOf(value, type), 'The value ' + stringify(value) + ' is not an instance of ' + getFunctionName(type));
+    assert(isInstanceOf(value, type), 'The value ' + exports.stringify(value) + ' is not an instance of ' + getFunctionName(type));
   }
 
   return value;
@@ -99,17 +93,15 @@ function getTypeName(constructor) {
 
 // configurable
 exports.fail = function fail(message) {
-  throw new TypeError(message);
+  throw new TypeError('[tcomb] ' + message);
 };
 
 function assert(guard, message) {
   if (guard !== true) {
-    exports.fail(message || 'assert failed');
+    exports.fail(message || 'Assert failed');
   }
 }
 
-var slice = Array.prototype.slice;
-
 // safe mixin: cannot override props unless specified
 function mixin(target, source, overwrite) {
   if (isNil(source)) { return target; }
@@ -117,7 +109,7 @@ function mixin(target, source, overwrite) {
     if (source.hasOwnProperty(k)) {
       if (overwrite !== true) {
         if (process.env.NODE_ENV !== 'production') {
-          assert(!target.hasOwnProperty(k), 'Cannot overwrite property ' + k + ' in mixin(' + stringify(target) + ', ' + stringify(source) + ')');
+          assert(!target.hasOwnProperty(k), 'Invalid call to mixin(): cannot overwrite property ' + exports.stringify(k) + ' of target object');
         }
       }
       target[k] = source[k];
@@ -142,7 +134,7 @@ function shallowCopy(x) {
 function update(instance, spec) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isObject(spec), 'Invalid argument spec = ' + stringify(spec) + ' supplied to function update(instance, spec): expected an object');
+    assert(isObject(spec), 'Invalid argument spec = ' + exports.stringify(spec) + ' supplied to function update(instance, spec): expected an object containing commands');
   }
 
   var value = shallowCopy(instance);
@@ -235,7 +227,7 @@ update.commands = {
 function irreducible(name, predicate) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isString(name), 'Invalid argument name = ' + stringify(name) + ' supplied to irreducible(name, predicate)');
+    assert(isString(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to irreducible(name, predicate)');
     assert(isFunction(predicate), 'Invalid argument predicate supplied to irreducible(name, predicate)');
   }
 
@@ -243,7 +235,7 @@ function irreducible(name, predicate) {
 
     if (process.env.NODE_ENV !== 'production') {
       forbidNewOperator(this, Irreducible);
-      assert(predicate(value), 'Invalid argument value = ' + stringify(value) + ' supplied to irreducible type ' + name);
+      assert(predicate(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to irreducible type ' + name);
     }
 
     return value;
@@ -267,35 +259,35 @@ var Any = irreducible('Any', function () {
 
 var Nil = irreducible('Nil', isNil);
 
-var Str = irreducible('Str', isString);
+var Str = irreducible('String', isString);
 
-var Num = irreducible('Num', isNumber);
+var Num = irreducible('Number', isNumber);
 
-var Bool = irreducible('Bool', isBoolean);
+var Bool = irreducible('Boolean', isBoolean);
 
-var Arr = irreducible('Arr', isArray);
+var Arr = irreducible('Array', isArray);
 
-var Obj = irreducible('Obj', isObject);
+var Obj = irreducible('Object', isObject);
 
-var Func = irreducible('Func', isFunction);
+var Func = irreducible('Function', isFunction);
 
-var Err = irreducible('Err', function (x) {
+var Err = irreducible('Error', function (x) {
   return isInstanceOf(x, Error);
 });
 
-var Re = irreducible('Re', function (x) {
+var Re = irreducible('RegExp', function (x) {
   return isInstanceOf(x, RegExp);
 });
 
-var Dat = irreducible('Dat', function (x) {
+var Dat = irreducible('Date', function (x) {
   return isInstanceOf(x, Date);
 });
 
 function struct(props, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(dict(Str, Func).is(props), 'Invalid argument props = ' + stringify(props) + ' supplied to struct(props, name): expected a dictionary of types');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(props) + ' supplied to struct(props, name): expected a string');
+    assert(dict(Str, Func).is(props), 'Invalid argument props = ' + exports.stringify(props) + ' supplied to struct(props, name): expected a dictionary of tcomb types');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to struct(props, name): expected a string');
   }
 
   var defaultName = '{' + Object.keys(props).map(function (prop) {
@@ -311,7 +303,7 @@ function struct(props, name) {
     }
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(isObject(value), 'Invalid argument value = ' + stringify(value) + ' supplied to struct ' + displayName + ': expected an object');
+      assert(isObject(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to struct ' + displayName + ': expected an object');
     }
 
     if (!isInstanceOf(this, Struct)) { // makes `new` optional
@@ -354,7 +346,7 @@ function struct(props, name) {
         return x;
       }
       if (process.env.NODE_ENV !== 'production') {
-        assert(isStruct(x), 'Invalid argument structs[' + i + '] = ' + stringify(structs[i]) + ' supplied to ' + displayName + '.extend(structs, name)');
+        assert(isStruct(x), 'Invalid argument structs[' + i + '] = ' + exports.stringify(structs[i]) + ' supplied to ' + displayName + '.extend(structs, name)');
       }
       return x.meta.props;
     });
@@ -370,8 +362,8 @@ function struct(props, name) {
 function union(types, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isArray(types) && types.every(isFunction) && types.length >= 2, 'Invalid argument types = ' + stringify(types) + ' supplied to union(types, name): expected an array of at least 2 types');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to union(types, name): expected a string');
+    assert(isArray(types) && types.every(isFunction) && types.length >= 2, 'Invalid argument types = ' + exports.stringify(types) + ' supplied to union(types, name): expected an array of at least 2 types');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to union(types, name): expected a string');
   }
 
   var defaultName = types.map(getTypeName).join(' | ');
@@ -422,7 +414,7 @@ function union(types, name) {
 function maybe(type, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isFunction(type), 'Invalid argument type = ' + stringify(type) + ' supplied to maybe(type, name): expected a type');
+    assert(isFunction(type), 'Invalid argument type = ' + exports.stringify(type) + ' supplied to maybe(type, name): expected a type');
   }
 
   if (isMaybe(type) || type === Any || type === Nil) { // makes the combinator idempotent and handle Any, Nil
@@ -430,7 +422,7 @@ function maybe(type, name) {
   }
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to maybe(type, name): expected a string');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to maybe(type, name): expected a string');
   }
 
   name = name || ('?' + getTypeName(type));
@@ -460,18 +452,18 @@ function maybe(type, name) {
 function enums(map, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isObject(map), 'Invalid argument map = ' + stringify(map) + ' supplied to enums(map, name): expected a hash of strings / numbers');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to enums(map, name): expected a string');
+    assert(isObject(map), 'Invalid argument map = ' + exports.stringify(map) + ' supplied to enums(map, name): expected a hash of strings / numbers');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to enums(map, name): expected a string');
   }
 
-  var defaultName = Object.keys(map).map(function (k) { return JSON.stringify(k); }).join(' | ');
+  var defaultName = Object.keys(map).map(function (k) { return exports.stringify(k); }).join(' | ');
 
   var displayName = name || defaultName;
 
   function Enums(value) {
     if (process.env.NODE_ENV !== 'production') {
       forbidNewOperator(this, Enums);
-      assert(Enums.is(value), 'Invalid argument value = ' + stringify(value) + ' supplied to enums ' + displayName + ': expected one of ' + stringify(Object.keys(map)));
+      assert(Enums.is(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to enums ' + displayName + ': expected one of ' + exports.stringify(Object.keys(map)));
     }
     return value;
   }
@@ -503,8 +495,8 @@ enums.of = function (keys, name) {
 function tuple(types, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isArray(types) && types.every(isFunction), 'Invalid argument types = ' + stringify(types) + ' supplied to tuple(types, name): expected an array of types');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to tuple(types, name): expected a string');
+    assert(isArray(types) && types.every(isFunction), 'Invalid argument types = ' + exports.stringify(types) + ' supplied to tuple(types, name): expected an array of types');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to tuple(types, name): expected a string');
   }
 
   var defaultName = '[' + types.map(getTypeName).join(', ') + ']';
@@ -520,7 +512,7 @@ function tuple(types, name) {
   function Tuple(value) {
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(isArray(value) && value.length === types.length, 'Invalid argument value = ' + stringify(value) + ' supplied to tuple ' + displayName + ': expected an array of length ' + types.length);
+      assert(isArray(value) && value.length === types.length, 'Invalid argument value = ' + exports.stringify(value) + ' supplied to tuple ' + displayName + ': expected an array of length ' + types.length);
     }
 
     if (isTuple(value)) { // makes Tuple idempotent
@@ -569,9 +561,9 @@ function tuple(types, name) {
 function subtype(type, predicate, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isFunction(type), 'Invalid argument type = ' + stringify(type) + ' supplied to subtype(type, predicate, name): expected a type');
+    assert(isFunction(type), 'Invalid argument type = ' + exports.stringify(type) + ' supplied to subtype(type, predicate, name): expected a type');
     assert(isFunction(predicate), 'Invalid argument predicate supplied to subtype(type, predicate, name): expected a function');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to subtype(type, predicate, name): expected a string');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to subtype(type, predicate, name): expected a string');
   }
 
   var defaultName = '{' + getTypeName(type) + ' | ' + getFunctionName(predicate) + '}';
@@ -587,7 +579,7 @@ function subtype(type, predicate, name) {
     var x = create(type, value);
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(predicate(x), 'Invalid argument value = ' + stringify(value) + ' supplied to subtype ' + displayName);
+      assert(predicate(x), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to subtype ' + displayName);
     }
 
     return x;
@@ -616,8 +608,8 @@ function subtype(type, predicate, name) {
 function list(type, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isFunction(type), 'Invalid argument type = ' + stringify(type) + ' supplied to list(type, name): expected a type');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to list(type, name): expected a string');
+    assert(isFunction(type), 'Invalid argument type = ' + exports.stringify(type) + ' supplied to list(type, name): expected a type');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to list(type, name): expected a string');
   }
 
   var defaultName = 'Array<' + getTypeName(type) + '>';
@@ -633,7 +625,7 @@ function list(type, name) {
   function List(value) {
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(isArray(value), 'Invalid argument value = ' + stringify(value) + ' supplied to list ' + displayName);
+      assert(isArray(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to list ' + displayName);
     }
 
     if (isList(value)) { // makes List idempotent
@@ -677,9 +669,9 @@ function list(type, name) {
 function dict(domain, codomain, name) {
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(isFunction(domain), 'Invalid argument domain = ' + stringify(domain) + ' supplied to dict(domain, codomain, name): expected a type');
-    assert(isFunction(codomain), 'Invalid argument codomain = ' + stringify(codomain) + ' supplied to dict(domain, codomain, name): expected a type');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to dict(domain, codomain, name): expected a string');
+    assert(isFunction(domain), 'Invalid argument domain = ' + exports.stringify(domain) + ' supplied to dict(domain, codomain, name): expected a type');
+    assert(isFunction(codomain), 'Invalid argument codomain = ' + exports.stringify(codomain) + ' supplied to dict(domain, codomain, name): expected a type');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to dict(domain, codomain, name): expected a string');
   }
 
   var defaultName = '{[key: ' + getTypeName(domain) + ']: ' + getTypeName(codomain) + '}';
@@ -700,7 +692,7 @@ function dict(domain, codomain, name) {
   function Dict(value) {
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(isObject(value), 'Invalid argument value = ' + stringify(value) + ' supplied to dict ' + displayName);
+      assert(isObject(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to dict ' + displayName);
     }
 
     if (isDict(value)) { // makes Dict idempotent
@@ -755,9 +747,9 @@ function func(domain, codomain, name) {
   domain = isArray(domain) ? domain : [domain]; // handle handy syntax for unary functions
 
   if (process.env.NODE_ENV !== 'production') {
-    assert(list(Func).is(domain), 'Invalid argument domain = ' + stringify(domain) + ' supplied to func(domain, codomain, name): expected an array of types');
-    assert(isFunction(codomain), 'Invalid argument codomain = ' + stringify(codomain) + ' supplied to func(domain, codomain, name): expected a type');
-    assert(isTypeName(name), 'Invalid argument name = ' + stringify(name) + ' supplied to func(domain, codomain, name): expected a string');
+    assert(list(Func).is(domain), 'Invalid argument domain = ' + exports.stringify(domain) + ' supplied to func(domain, codomain, name): expected an array of types');
+    assert(isFunction(codomain), 'Invalid argument codomain = ' + exports.stringify(codomain) + ' supplied to func(domain, codomain, name): expected a type');
+    assert(isTypeName(name), 'Invalid argument name = ' + exports.stringify(name) + ' supplied to func(domain, codomain, name): expected a string');
   }
 
   var defaultName = '(' + domain.map(getTypeName).join(', ') + ') => ' + getTypeName(codomain);
@@ -771,7 +763,7 @@ function func(domain, codomain, name) {
     }
 
     if (process.env.NODE_ENV !== 'production') {
-      assert(FuncType.is(value), 'Invalid argument value = ' + stringify(value) + ' supplied to func ' + displayName);
+      assert(FuncType.is(value), 'Invalid argument value = ' + exports.stringify(value) + ' supplied to func ' + displayName);
     }
 
     return value;
@@ -799,7 +791,7 @@ function func(domain, codomain, name) {
 
     if (process.env.NODE_ENV !== 'production') {
       assert(isFunction(f), 'Invalid argument f supplied to func.of ' + displayName + ': expected a function');
-      assert(isNil(curried) || isBoolean(curried), 'Invalid argument curried = ' + stringify(curried) + ' supplied to func.of ' + displayName + ': expected a boolean');
+      assert(isNil(curried) || isBoolean(curried), 'Invalid argument curried = ' + exports.stringify(curried) + ' supplied to func.of ' + displayName + ': expected a boolean');
     }
 
     if (FuncType.is(f)) { // makes FuncType.of idempotent
@@ -807,7 +799,7 @@ function func(domain, codomain, name) {
     }
 
     function fn() {
-      var args = slice.call(arguments);
+      var args = Array.prototype.slice.call(arguments);
       var len = curried ?
         args.length :
         domain.length;
@@ -843,7 +835,6 @@ function func(domain, codomain, name) {
 }
 
 mixin(exports, {
-  stringify: stringify,
   is: is,
   isType: isType,
   getTypeName: getTypeName,
@@ -853,14 +844,23 @@ mixin(exports, {
   Any: Any,
   Nil: Nil,
   Str: Str,
+  String: Str,
   Num: Num,
+  Number: Num,
   Bool: Bool,
+  Boolean: Bool,
   Arr: Arr,
+  Array: Arr,
   Obj: Obj,
+  Object: Obj,
   Func: Func,
+  Function: Func,
   Err: Err,
+  Error: Err,
   Re: Re,
+  RegExp: Re,
   Dat: Dat,
+  Date: Dat,
   irreducible: irreducible,
   struct: struct,
   enums: enums,
diff --git a/package.json b/package.json
index cd14b24..94f91a7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "tcomb",
-  "version": "2.0.1",
+  "version": "2.1.0",
   "description": "Type checking and DDD for JavaScript",
   "main": "index.js",
   "scripts": {


Test patch:
diff --git a/test/test.js b/test/test.js
index 1b0bd0b..ac31056 100644
--- a/test/test.js
+++ b/test/test.js
@@ -3,17 +3,6 @@
 var assert = require('assert');
 var t = require('../index');
 
-var Any = t.Any;
-var Nil = t.Nil;
-var Bool = t.Bool;
-var Num = t.Num;
-var Str = t.Str;
-var Arr = t.Arr;
-var Obj = t.Obj;
-var Func = t.Func;
-var Err = t.Err;
-var Re = t.Re;
-var Dat = t.Dat;
 var struct = t.struct;
 var enums = t.enums;
 var union = t.union;
@@ -36,7 +25,7 @@ var eq = assert.deepEqual;
 var throwsWithMessage = function (f, message) {
   assert.throws(f, function (err) {
     ok(err instanceof Error);
-    eq(err.message, message);
+    assert.strictEqual(err.message, message);
     return true;
   });
 };
@@ -44,21 +33,21 @@ var doesNotThrow = assert.doesNotThrow;
 
 var noop = function () {};
 var Point = struct({
-  x: Num,
-  y: Num
+  x: t.Number,
+  y: t.Number
 });
 
 describe('update', function () {
 
   var update = t.update;
-  var Tuple = tuple([Str, Num]);
-  var List = list(Num);
-  var Dict = dict(Str, Num);
+  var Tuple = tuple([t.String, t.Number]);
+  var List = list(t.Number);
+  var Dict = dict(t.String, t.Number);
 
   it('should throw if spec is invalid', function () {
     throwsWithMessage(function () {
       t.update({});
-    }, 'Invalid argument spec = undefined supplied to function update(instance, spec): expected an object');
+    }, '[tcomb] Invalid argument spec = undefined supplied to function update(instance, spec): expected an object containing commands');
   });
 
   it('should handle $set command', function () {
@@ -72,7 +61,7 @@ describe('update', function () {
   });
 
   it('$set and null value, fix #65', function () {
-    var NullStruct = struct({a: Num, b: maybe(Num)});
+    var NullStruct = struct({a: t.Number, b: maybe(t.Number)});
     var instance = new NullStruct({a: 1});
     var updated = update(instance, {b: {$set: 2}});
     eq(instance, {a: 1, b: null});
@@ -152,11 +141,11 @@ describe('update', function () {
       eq(instance, {x: 0, y: 1});
       eq(updated, {x: 2, y: 2});
       var Nested = struct({
-        a: Num,
+        a: t.Number,
         b: struct({
-          c: Num,
-          d: Num,
-          e: Num
+          c: t.Number,
+          d: t.Number,
+          e: t.Number
         })
       });
       instance = new Nested({a: 1, b: {c: 2, d: 3, e: 4}});
@@ -235,9 +224,9 @@ describe('update', function () {
 
     it('should reuse members that are not updated', function () {
       var Struct = struct({
-        a: Num,
-        b: Str,
-        c: tuple([Num, Num]),
+        a: t.Number,
+        b: t.String,
+        c: tuple([t.Number, t.Number]),
       });
       var List = list(Struct);
       var instance = List([{
@@ -266,7 +255,7 @@ describe('update', function () {
 
     it('should handle mixed commands', function () {
       var Struct = struct({
-        a: Num,
+        a: t.Number,
         b: Tuple,
         c: List,
         d: Dict
@@ -295,8 +284,8 @@ describe('update', function () {
       var Struct = struct({
         a: struct({
           b: tuple([
-            Str,
-            list(Num)
+            t.String,
+            list(t.Number)
           ])
         })
       });
@@ -334,13 +323,13 @@ describe('assert', function () {
   it('should throw a default message', function () {
     throwsWithMessage(function () {
       assert(1 === 2);
-    }, 'assert failed');
+    }, '[tcomb] Assert failed');
   });
 
   it('should throw the specified message', function () {
     throwsWithMessage(function () {
       assert(1 === 2, 'my message');
-    }, 'my message');
+    }, '[tcomb] my message');
   });
 
   it('should handle custom fail behaviour', function () {
@@ -380,7 +369,7 @@ describe('mixin(x, y, [overwrite])', function () {
       var o1 = {a: 1};
       var o2 = {a: 2, b: 2};
       mixin(o1, o2);
-    }, 'Cannot overwrite property a in mixin({\n  "a": 1\n}, {\n  "a": 2,\n  "b": 2\n})');
+    }, '[tcomb] Invalid call to mixin(): cannot overwrite property "a" of target object');
   });
 
   it('should not throw if a property already exists but overwrite = true', function () {
@@ -406,22 +395,22 @@ describe('getTypeName(constructor)', function () {
 
   var UnnamedStruct = struct({});
   var NamedStruct = struct({}, 'NamedStruct');
-  var UnnamedUnion = union([Str, Num]);
-  var NamedUnion = union([Str, Num], 'NamedUnion');
-  var UnnamedMaybe = maybe(Str);
-  var NamedMaybe = maybe(Str, 'NamedMaybe');
+  var UnnamedUnion = union([t.String, t.Number]);
+  var NamedUnion = union([t.String, t.Number], 'NamedUnion');
+  var UnnamedMaybe = maybe(t.String);
+  var NamedMaybe = maybe(t.String, 'NamedMaybe');
   var UnnamedEnums = enums({a: 'A', b: 'B'});
   var NamedEnums = enums({}, 'NamedEnums');
-  var UnnamedTuple = tuple([Str, Num]);
-  var NamedTuple = tuple([Str, Num], 'NamedTuple');
-  var UnnamedSubtype = subtype(Str, function notEmpty(x) { return x !== ''; });
-  var NamedSubtype = subtype(Str, function (x) { return x !== ''; }, 'NamedSubtype');
-  var UnnamedList = list(Str);
-  var NamedList = list(Str, 'NamedList');
-  var UnnamedDict = dict(Str, Str);
-  var NamedDict = dict(Str, Str, 'NamedDict');
-  var UnnamedFunc = func(Str, Str);
-  var NamedFunc = func(Str, Str, 'NamedFunc');
+  var UnnamedTuple = tuple([t.String, t.Number]);
+  var NamedTuple = tuple([t.String, t.Number], 'NamedTuple');
+  var UnnamedSubtype = subtype(t.String, function notEmpty(x) { return x !== ''; });
+  var NamedSubtype = subtype(t.String, function (x) { return x !== ''; }, 'NamedSubtype');
+  var UnnamedList = list(t.String);
+  var NamedList = list(t.String, 'NamedList');
+  var UnnamedDict = dict(t.String, t.String);
+  var NamedDict = dict(t.String, t.String, 'NamedDict');
+  var UnnamedFunc = func(t.String, t.String);
+  var NamedFunc = func(t.String, t.String, 'NamedFunc');
 
   it('should return the name of a function', function () {
     eq(getTypeName(function myname(){}), 'myname');
@@ -441,14 +430,14 @@ describe('getTypeName(constructor)', function () {
 
   it('should return a meaningful name of a unnamed type', function () {
     eq(getTypeName(UnnamedStruct), '{}');
-    eq(getTypeName(UnnamedUnion), 'Str | Num');
-    eq(getTypeName(UnnamedMaybe), '?Str');
+    eq(getTypeName(UnnamedUnion), 'String | Number');
+    eq(getTypeName(UnnamedMaybe), '?String');
     eq(getTypeName(UnnamedEnums), '"a" | "b"');
-    eq(getTypeName(UnnamedTuple), '[Str, Num]');
-    eq(getTypeName(UnnamedSubtype), '{Str | notEmpty}');
-    eq(getTypeName(UnnamedList), 'Array<Str>');
-    eq(getTypeName(UnnamedDict), '{[key: Str]: Str}');
-    eq(getTypeName(UnnamedFunc), '(Str) => Str');
+    eq(getTypeName(UnnamedTuple), '[String, Number]');
+    eq(getTypeName(UnnamedSubtype), '{String | notEmpty}');
+    eq(getTypeName(UnnamedList), 'Array<String>');
+    eq(getTypeName(UnnamedDict), '{[key: String]: String}');
+    eq(getTypeName(UnnamedFunc), '(String) => String');
   });
 
 });
@@ -457,14 +446,14 @@ describe('getTypeName(constructor)', function () {
 // Any
 //
 
-describe('Any', function () {
+describe('t.Any', function () {
 
-  var T = Any;
+  var T = t.Any;
 
   describe('constructor', function () {
 
     it('should behave like identity', function () {
-      eq(Any('a'), 'a');
+      eq(t.Any('a'), 'a');
     });
 
     it('should throw if used with new', function () {
@@ -472,7 +461,7 @@ describe('Any', function () {
         /* jshint ignore:start */
         var x = new T();
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type Any');
+      }, '[tcomb] Cannot use the new operator to instantiate a type Any');
     });
 
   });
@@ -506,20 +495,20 @@ describe('irreducible types constructors', function () {
   it('should throw if used with an invalid name argument', function () {
     throwsWithMessage(function () {
       t.irreducible(null, function () { return true; });
-    }, 'Invalid argument name = null supplied to irreducible(name, predicate)');
+    }, '[tcomb] Invalid argument name = null supplied to irreducible(name, predicate)');
   });
 
   [
-    {T: Nil, x: null},
-    {T: Str, x: 'a'},
-    {T: Num, x: 1},
-    {T: Bool, x: true},
-    {T: Arr, x: []},
-    {T: Obj, x: {}},
-    {T: Func, x: noop},
-    {T: Err, x: new Error()},
-    {T: Re, x: /a/},
-    {T: Dat, x: new Date()}
+    {T: t.Nil, x: null},
+    {T: t.String, x: 'a'},
+    {T: t.Number, x: 1},
+    {T: t.Boolean, x: true},
+    {T: t.Array, x: []},
+    {T: t.Object, x: {}},
+    {T: t.Function, x: noop},
+    {T: t.Error, x: new Error()},
+    {T: t.RegExp, x: /a/},
+    {T: t.Date, x: new Date()}
   ].forEach(function (o) {
 
     var T = o.T;
@@ -534,7 +523,7 @@ describe('irreducible types constructors', function () {
         /* jshint ignore:start */
         var x = new T();
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type ' + getTypeName(T));
+      }, '[tcomb] Cannot use the new operator to instantiate a type ' + getTypeName(T));
     });
 
   });
@@ -546,114 +535,114 @@ describe('Nil', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is null or undefined', function () {
-      ok(Nil.is(null));
-      ok(Nil.is(undefined));
+      ok(t.Nil.is(null));
+      ok(t.Nil.is(undefined));
     });
 
     it('should return false when x is neither null nor undefined', function () {
-      ko(Nil.is(0));
-      ko(Nil.is(true));
-      ko(Nil.is(''));
-      ko(Nil.is([]));
-      ko(Nil.is({}));
-      ko(Nil.is(noop));
-      ko(Nil.is(new Error()));
-      ko(Nil.is(new Date()));
-      ko(Nil.is(/a/));
-      ko(Nil.is(new RegExp('a')));
+      ko(t.Nil.is(0));
+      ko(t.Nil.is(true));
+      ko(t.Nil.is(''));
+      ko(t.Nil.is([]));
+      ko(t.Nil.is({}));
+      ko(t.Nil.is(noop));
+      ko(t.Nil.is(new Error()));
+      ko(t.Nil.is(new Date()));
+      ko(t.Nil.is(/a/));
+      ko(t.Nil.is(new RegExp('a')));
     });
 
   });
 
 });
 
-describe('Bool', function () {
+describe('t.Boolean', function () {
 
   describe('#is(x)', function () {
 
     it('should return true when x is true or false', function () {
-      ok(Bool.is(true));
-      ok(Bool.is(false));
+      ok(t.Boolean.is(true));
+      ok(t.Boolean.is(false));
     });
 
     it('should return false when x is neither true nor false', function () {
-      ko(Bool.is(null));
-      ko(Bool.is(undefined));
-      ko(Bool.is(0));
-      ko(Bool.is(''));
-      ko(Bool.is([]));
-      ko(Bool.is({}));
-      ko(Bool.is(noop));
-      ko(Bool.is(/a/));
-      ko(Bool.is(new RegExp('a')));
-      ko(Bool.is(new Error()));
-      ko(Bool.is(new Date()));
+      ko(t.Boolean.is(null));
+      ko(t.Boolean.is(undefined));
+      ko(t.Boolean.is(0));
+      ko(t.Boolean.is(''));
+      ko(t.Boolean.is([]));
+      ko(t.Boolean.is({}));
+      ko(t.Boolean.is(noop));
+      ko(t.Boolean.is(/a/));
+      ko(t.Boolean.is(new RegExp('a')));
+      ko(t.Boolean.is(new Error()));
+      ko(t.Boolean.is(new Date()));
     });
 
   });
 
 });
 
-describe('Num', function () {
+describe('t.Number', function () {
 
   describe('#is(x)', function () {
 
     it('should return true when x is a number', function () {
-      ok(Num.is(0));
-      ok(Num.is(1));
+      ok(t.Number.is(0));
+      ok(t.Number.is(1));
       /* jshint ignore:start */
-      ko(Num.is(new Number(1)));
+      ko(t.Number.is(new Number(1)));
       /* jshint ignore:end */
     });
 
     it('should return false when x is not a number', function () {
-      ko(Num.is(NaN));
-      ko(Num.is(Infinity));
-      ko(Num.is(-Infinity));
-      ko(Num.is(null));
-      ko(Num.is(undefined));
-      ko(Num.is(true));
-      ko(Num.is(''));
-      ko(Num.is([]));
-      ko(Num.is({}));
-      ko(Num.is(noop));
-      ko(Num.is(/a/));
-      ko(Num.is(new RegExp('a')));
-      ko(Num.is(new Error()));
-      ko(Num.is(new Date()));
+      ko(t.Number.is(NaN));
+      ko(t.Number.is(Infinity));
+      ko(t.Number.is(-Infinity));
+      ko(t.Number.is(null));
+      ko(t.Number.is(undefined));
+      ko(t.Number.is(true));
+      ko(t.Number.is(''));
+      ko(t.Number.is([]));
+      ko(t.Number.is({}));
+      ko(t.Number.is(noop));
+      ko(t.Number.is(/a/));
+      ko(t.Number.is(new RegExp('a')));
+      ko(t.Number.is(new Error()));
+      ko(t.Number.is(new Date()));
     });
 
   });
 
 });
 
-describe('Str', function () {
+describe('t.String', function () {
 
   describe('#is(x)', function () {
 
     it('should return true when x is a string', function () {
-      ok(Str.is(''));
-      ok(Str.is('a'));
+      ok(t.String.is(''));
+      ok(t.String.is('a'));
       /* jshint ignore:start */
-      ko(Str.is(new String('a')));
+      ko(t.String.is(new String('a')));
       /* jshint ignore:end */
     });
 
     it('should return false when x is not a string', function () {
-      ko(Str.is(NaN));
-      ko(Str.is(Infinity));
-      ko(Str.is(-Infinity));
-      ko(Str.is(null));
-      ko(Str.is(undefined));
-      ko(Str.is(true));
-      ko(Str.is(1));
-      ko(Str.is([]));
-      ko(Str.is({}));
-      ko(Str.is(noop));
-      ko(Str.is(/a/));
-      ko(Str.is(new RegExp('a')));
-      ko(Str.is(new Error()));
-      ko(Str.is(new Date()));
+      ko(t.String.is(NaN));
+      ko(t.String.is(Infinity));
+      ko(t.String.is(-Infinity));
+      ko(t.String.is(null));
+      ko(t.String.is(undefined));
+      ko(t.String.is(true));
+      ko(t.String.is(1));
+      ko(t.String.is([]));
+      ko(t.String.is({}));
+      ko(t.String.is(noop));
+      ko(t.String.is(/a/));
+      ko(t.String.is(new RegExp('a')));
+      ko(t.String.is(new Error()));
+      ko(t.String.is(new Date()));
     });
 
   });
@@ -665,24 +654,24 @@ describe('Arr', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is an array', function () {
-      ok(Arr.is([]));
+      ok(t.Array.is([]));
     });
 
     it('should return false when x is not an array', function () {
-      ko(Arr.is(NaN));
-      ko(Arr.is(Infinity));
-      ko(Arr.is(-Infinity));
-      ko(Arr.is(null));
-      ko(Arr.is(undefined));
-      ko(Arr.is(true));
-      ko(Arr.is(1));
-      ko(Arr.is('a'));
-      ko(Arr.is({}));
-      ko(Arr.is(noop));
-      ko(Arr.is(/a/));
-      ko(Arr.is(new RegExp('a')));
-      ko(Arr.is(new Error()));
-      ko(Arr.is(new Date()));
+      ko(t.Array.is(NaN));
+      ko(t.Array.is(Infinity));
+      ko(t.Array.is(-Infinity));
+      ko(t.Array.is(null));
+      ko(t.Array.is(undefined));
+      ko(t.Array.is(true));
+      ko(t.Array.is(1));
+      ko(t.Array.is('a'));
+      ko(t.Array.is({}));
+      ko(t.Array.is(noop));
+      ko(t.Array.is(/a/));
+      ko(t.Array.is(new RegExp('a')));
+      ko(t.Array.is(new Error()));
+      ko(t.Array.is(new Date()));
     });
 
   });
@@ -695,17 +684,17 @@ describe('Obj', function () {
 
     it('should return true when x is an object', function () {
       function A() {}
-      ok(Obj.is({}));
-      ok(Obj.is(new A()));
+      ok(t.Object.is({}));
+      ok(t.Object.is(new A()));
     });
 
     it('should return false when x is not an object', function () {
-      ko(Obj.is(null));
-      ko(Obj.is(undefined));
-      ko(Obj.is(0));
-      ko(Obj.is(''));
-      ko(Obj.is([]));
-      ko(Obj.is(noop));
+      ko(t.Object.is(null));
+      ko(t.Object.is(undefined));
+      ko(t.Object.is(0));
+      ko(t.Object.is(''));
+      ko(t.Object.is([]));
+      ko(t.Object.is(noop));
     });
 
   });
@@ -717,28 +706,28 @@ describe('Func', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is a function', function () {
-      ok(Func.is(noop));
+      ok(t.Function.is(noop));
       /* jshint ignore:start */
-      ok(Func.is(new Function()));
+      ok(t.Function.is(new Function()));
       /* jshint ignore:end */
     });
 
     it('should return false when x is not a function', function () {
-      ko(Func.is(null));
-      ko(Func.is(undefined));
-      ko(Func.is(0));
-      ko(Func.is(''));
-      ko(Func.is([]));
-      ko(Func.is({}));
+      ko(t.Function.is(null));
+      ko(t.Function.is(undefined));
+      ko(t.Function.is(0));
+      ko(t.Function.is(''));
+      ko(t.Function.is([]));
+      ko(t.Function.is({}));
       /* jshint ignore:start */
-      ko(Func.is(new String('1')));
-      ko(Func.is(new Number(1)));
-      ko(Func.is(new Boolean()));
+      ko(t.Function.is(new String('1')));
+      ko(t.Function.is(new Number(1)));
+      ko(t.Function.is(new Boolean()));
       /* jshint ignore:end */
-      ko(Func.is(/a/));
-      ko(Func.is(new RegExp('a')));
-      ko(Func.is(new Error()));
-      ko(Func.is(new Date()));
+      ko(t.Function.is(/a/));
+      ko(t.Function.is(new RegExp('a')));
+      ko(t.Function.is(new Error()));
+      ko(t.Function.is(new Date()));
     });
 
   });
@@ -750,23 +739,23 @@ describe('Err', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is an error', function () {
-      ok(Err.is(new Error()));
+      ok(t.Error.is(new Error()));
     });
 
     it('should return false when x is not an error', function () {
-      ko(Err.is(null));
-      ko(Err.is(undefined));
-      ko(Err.is(0));
-      ko(Err.is(''));
-      ko(Err.is([]));
+      ko(t.Error.is(null));
+      ko(t.Error.is(undefined));
+      ko(t.Error.is(0));
+      ko(t.Error.is(''));
+      ko(t.Error.is([]));
       /* jshint ignore:start */
-      ko(Err.is(new String('1')));
-      ko(Err.is(new Number(1)));
-      ko(Err.is(new Boolean()));
+      ko(t.Error.is(new String('1')));
+      ko(t.Error.is(new Number(1)));
+      ko(t.Error.is(new Boolean()));
       /* jshint ignore:end */
-      ko(Err.is(/a/));
-      ko(Err.is(new RegExp('a')));
-      ko(Err.is(new Date()));
+      ko(t.Error.is(/a/));
+      ko(t.Error.is(new RegExp('a')));
+      ko(t.Error.is(new Date()));
     });
 
   });
@@ -778,23 +767,23 @@ describe('Re', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is a regexp', function () {
-      ok(Re.is(/a/));
-      ok(Re.is(new RegExp('a')));
+      ok(t.RegExp.is(/a/));
+      ok(t.RegExp.is(new RegExp('a')));
     });
 
     it('should return false when x is not a regexp', function () {
-      ko(Re.is(null));
-      ko(Re.is(undefined));
-      ko(Re.is(0));
-      ko(Re.is(''));
-      ko(Re.is([]));
+      ko(t.RegExp.is(null));
+      ko(t.RegExp.is(undefined));
+      ko(t.RegExp.is(0));
+      ko(t.RegExp.is(''));
+      ko(t.RegExp.is([]));
       /* jshint ignore:start */
-      ko(Re.is(new String('1')));
-      ko(Re.is(new Number(1)));
-      ko(Re.is(new Boolean()));
+      ko(t.RegExp.is(new String('1')));
+      ko(t.RegExp.is(new Number(1)));
+      ko(t.RegExp.is(new Boolean()));
       /* jshint ignore:end */
-      ko(Re.is(new Error()));
-      ko(Re.is(new Date()));
+      ko(t.RegExp.is(new Error()));
+      ko(t.RegExp.is(new Date()));
     });
 
   });
@@ -806,23 +795,23 @@ describe('Dat', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is a Dat', function () {
-      ok(Dat.is(new Date()));
+      ok(t.Date.is(new Date()));
     });
 
     it('should return false when x is not a Dat', function () {
-      ko(Dat.is(null));
-      ko(Dat.is(undefined));
-      ko(Dat.is(0));
-      ko(Dat.is(''));
-      ko(Dat.is([]));
+      ko(t.Date.is(null));
+      ko(t.Date.is(undefined));
+      ko(t.Date.is(0));
+      ko(t.Date.is(''));
+      ko(t.Date.is([]));
       /* jshint ignore:start */
-      ko(Dat.is(new String('1')));
-      ko(Dat.is(new Number(1)));
-      ko(Dat.is(new Boolean()));
+      ko(t.Date.is(new String('1')));
+      ko(t.Date.is(new Number(1)));
+      ko(t.Date.is(new Boolean()));
       /* jshint ignore:end */
-      ko(Dat.is(new Error()));
-      ko(Dat.is(/a/));
-      ko(Dat.is(new RegExp('a')));
+      ko(t.Date.is(new Error()));
+      ko(t.Date.is(/a/));
+      ko(t.Date.is(new RegExp('a')));
     });
 
   });
@@ -841,15 +830,15 @@ describe('struct', function () {
 
       throwsWithMessage(function () {
         struct();
-      }, 'Invalid argument props = undefined supplied to struct(props, name): expected a dictionary of types');
+      }, '[tcomb] Invalid argument props = undefined supplied to struct(props, name): expected a dictionary of tcomb types');
 
       throwsWithMessage(function () {
         struct({a: null});
-      }, 'Invalid argument props = {\n  "a": null\n} supplied to struct(props, name): expected a dictionary of types');
+      }, '[tcomb] Invalid argument props = {\n  "a": null\n} supplied to struct(props, name): expected a dictionary of tcomb types');
 
       throwsWithMessage(function () {
         struct({}, 1);
-      }, 'Invalid argument name = {} supplied to struct(props, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to struct(props, name): expected a string');
 
     });
 
@@ -869,7 +858,7 @@ describe('struct', function () {
     it('should accept only valid values', function () {
       throwsWithMessage(function () {
         Point(1);
-      }, 'Invalid argument value = 1 supplied to struct {x: Num, y: Num}: expected an object');
+      }, '[tcomb] Invalid argument value = 1 supplied to struct {x: Number, y: Number}: expected an object');
     });
 
   });
@@ -885,7 +874,7 @@ describe('struct', function () {
 
   describe('#update()', function () {
 
-    var Type = struct({name: Str});
+    var Type = struct({name: t.String});
     var instance = new Type({name: 'Giulio'});
 
     it('should return a new instance', function () {
@@ -901,50 +890,50 @@ describe('struct', function () {
 
     it('should extend an existing struct', function () {
       var Point = struct({
-        x: Num,
-        y: Num
+        x: t.Number,
+        y: t.Number
       }, 'Point');
-      var Point3D = Point.extend({z: Num}, 'Point3D');
+      var Point3D = Point.extend({z: t.Number}, 'Point3D');
       eq(getTypeName(Point3D), 'Point3D');
-      eq(Point3D.meta.props.x, Num);
-      eq(Point3D.meta.props.y, Num);
-      eq(Point3D.meta.props.z, Num);
+      eq(Point3D.meta.props.x, t.Number);
+      eq(Point3D.meta.props.y, t.Number);
+      eq(Point3D.meta.props.z, t.Number);
     });
 
     it('should handle an array as argument', function () {
-      var Type = struct({a: Str}, 'Type');
-      var Mixin = [{b: Num, c: Bool}];
+      var Type = struct({a: t.String}, 'Type');
+      var Mixin = [{b: t.Number, c: t.Boolean}];
       var NewType = Type.extend(Mixin, 'NewType');
       eq(getTypeName(NewType), 'NewType');
-      eq(NewType.meta.props.a, Str);
-      eq(NewType.meta.props.b, Num);
-      eq(NewType.meta.props.c, Bool);
+      eq(NewType.meta.props.a, t.String);
+      eq(NewType.meta.props.b, t.Number);
+      eq(NewType.meta.props.c, t.Boolean);
     });
 
     it('should handle a struct (or list of structs) as argument', function () {
-      var A = struct({a: Str}, 'A');
-      var B = struct({b: Str}, 'B');
-      var C = struct({c: Str}, 'C');
-      var MixinD = {d: Str};
+      var A = struct({a: t.String}, 'A');
+      var B = struct({b: t.String}, 'B');
+      var C = struct({c: t.String}, 'C');
+      var MixinD = {d: t.String};
       var E = A.extend([B, C, MixinD]);
       eq(E.meta.props, {
-        a: Str,
-        b: Str,
-        c: Str,
-        d: Str
+        a: t.String,
+        b: t.String,
+        c: t.String,
+        d: t.String
       });
     });
 
     it('should support prototypal inheritance', function () {
       var Rectangle = struct({
-        w: Num,
-        h: Num
+        w: t.Number,
+        h: t.Number
       }, 'Rectangle');
       Rectangle.prototype.area = function () {
         return this.w * this.h;
       };
       var Cube = Rectangle.extend({
-        l: Num
+        l: t.Number
       });
       Cube.prototype.volume = function () {
         return this.area() * this.l;
@@ -976,11 +965,11 @@ describe('enums', function () {
 
       throwsWithMessage(function () {
         enums();
-      }, 'Invalid argument map = undefined supplied to enums(map, name): expected a hash of strings / numbers');
+      }, '[tcomb] Invalid argument map = undefined supplied to enums(map, name): expected a hash of strings / numbers');
 
       throwsWithMessage(function () {
         enums({}, 1);
-      }, 'Invalid argument name = 1 supplied to enums(map, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to enums(map, name): expected a string');
 
     });
 
@@ -995,14 +984,14 @@ describe('enums', function () {
         /* jshint ignore:start */
         var x = new T('a');
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type T');
+      }, '[tcomb] Cannot use the new operator to instantiate a type T');
     });
 
     it('should accept only valid values', function () {
       eq(T('a'), 'a');
       throwsWithMessage(function () {
         T('b');
-      }, 'Invalid argument value = "b" supplied to enums T: expected one of [\n  "a"\n]');
+      }, '[tcomb] Invalid argument value = "b" supplied to enums T: expected one of [\n  "a"\n]');
     });
 
   });
@@ -1062,7 +1051,7 @@ describe('union', function () {
 
   var Circle = struct({
     center: Point,
-    radius: Num
+    radius: t.Number
   }, 'Circle');
 
   var Rectangle = struct({
@@ -1073,7 +1062,7 @@ describe('union', function () {
   var Shape = union([Circle, Rectangle], 'Shape');
 
   Shape.dispatch = function (values) {
-    assert(Obj.is(values));
+    assert(t.Object.is(values));
     return values.hasOwnProperty('center') ?
       Circle :
       Rectangle;
@@ -1085,19 +1074,19 @@ describe('union', function () {
 
       throwsWithMessage(function () {
         union();
-      }, 'Invalid argument types = undefined supplied to union(types, name): expected an array of at least 2 types');
+      }, '[tcomb] Invalid argument types = undefined supplied to union(types, name): expected an array of at least 2 types');
 
       throwsWithMessage(function () {
         union([]);
-      }, 'Invalid argument types = [] supplied to union(types, name): expected an array of at least 2 types');
+      }, '[tcomb] Invalid argument types = [] supplied to union(types, name): expected an array of at least 2 types');
 
       throwsWithMessage(function () {
         union([1]);
-      }, 'Invalid argument types = [\n  1\n] supplied to union(types, name): expected an array of at least 2 types');
+      }, '[tcomb] Invalid argument types = [\n  1\n] supplied to union(types, name): expected an array of at least 2 types');
 
       throwsWithMessage(function () {
         union([Circle, Point], 1);
-      }, 'Invalid argument name = 1 supplied to union(types, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to union(types, name): expected a string');
 
     });
 
@@ -1107,22 +1096,22 @@ describe('union', function () {
 
     it('should throw when dispatch() is not implemented', function () {
       throwsWithMessage(function () {
-        var T = union([Str, Num], 'T');
+        var T = union([t.String, t.Number], 'T');
         T.dispatch = null;
         T(1);
-      }, 'Unimplemented dispatch() function for union T');
+      }, '[tcomb] Unimplemented dispatch() function for union T');
     });
 
     it('should have a default dispatch() implementation', function () {
-      var T = union([Str, Num], 'T');
+      var T = union([t.String, t.Number], 'T');
       eq(T(1), 1);
     });
 
     it('should throw when dispatch() does not return a type', function () {
       throwsWithMessage(function () {
-        var T = union([Str, Num], 'T');
+        var T = union([t.String, t.Number], 'T');
         T(true);
-      }, 'The dispatch() function of union T returns no type');
+      }, '[tcomb] The dispatch() function of union T returns no type');
     });
 
     it('should build instances when dispatch() is implemented', function () {
@@ -1132,12 +1121,12 @@ describe('union', function () {
 
     it('should throw if used with new and union types are not instantiables with new', function () {
       throwsWithMessage(function () {
-        var T = union([Str, Num], 'T');
-        T.dispatch = function () { return Str; };
+        var T = union([t.String, t.Number], 'T');
+        T.dispatch = function () { return t.String; };
         /* jshint ignore:start */
         var x = new T('a');
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type T');
+      }, '[tcomb] Cannot use the new operator to instantiate a type T');
     });
 
     it('should not throw if used with new and union types are instantiables with new', function () {
@@ -1179,25 +1168,25 @@ describe('maybe', function () {
 
       throwsWithMessage(function () {
         maybe();
-      }, 'Invalid argument type = undefined supplied to maybe(type, name): expected a type');
+      }, '[tcomb] Invalid argument type = undefined supplied to maybe(type, name): expected a type');
 
       throwsWithMessage(function () {
         maybe(Point, 1);
-      }, 'Invalid argument name = 1 supplied to maybe(type, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to maybe(type, name): expected a string');
 
     });
 
     it('should be idempotent', function () {
-      var MaybeStr = maybe(Str);
+      var MaybeStr = maybe(t.String);
       ok(maybe(MaybeStr) === MaybeStr);
     });
 
     it('should be noop with Any', function () {
-      ok(maybe(Any) === Any);
+      ok(maybe(t.Any) === t.Any);
     });
 
     it('should be noop with Nil', function () {
-      ok(maybe(Nil) === Nil);
+      ok(maybe(t.Nil) === t.Nil);
     });
 
   });
@@ -1207,10 +1196,10 @@ describe('maybe', function () {
     it('should throw if used with new', function () {
       throwsWithMessage(function () {
         /* jshint ignore:start */
-        var T = maybe(Str, 'T');
+        var T = maybe(t.String, 'T');
         var x = new T();
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type T');
+      }, '[tcomb] Cannot use the new operator to instantiate a type T');
     });
 
     it('should coerce values', function () {
@@ -1234,7 +1223,7 @@ describe('maybe', function () {
   describe('#is(x)', function () {
 
     it('should return true when x is an instance of the maybe', function () {
-      var Radio = maybe(Str);
+      var Radio = maybe(t.String);
       ok(Radio.is('a'));
       ok(Radio.is(null));
       ok(Radio.is(undefined));
@@ -1250,7 +1239,7 @@ describe('maybe', function () {
 
 describe('tuple', function () {
 
-  var Area = tuple([Num, Num], 'Area');
+  var Area = tuple([t.Number, t.Number], 'Area');
 
   describe('combinator', function () {
 
@@ -1258,15 +1247,15 @@ describe('tuple', function () {
 
       throwsWithMessage(function () {
         tuple();
-      }, 'Invalid argument types = undefined supplied to tuple(types, name): expected an array of types');
+      }, '[tcomb] Invalid argument types = undefined supplied to tuple(types, name): expected an array of types');
 
       throwsWithMessage(function () {
         tuple([1]);
-      }, 'Invalid argument types = [\n  1\n] supplied to tuple(types, name): expected an array of types');
+      }, '[tcomb] Invalid argument types = [\n  1\n] supplied to tuple(types, name): expected an array of types');
 
       throwsWithMessage(function () {
         tuple([Point, Point], 1);
-      }, 'Invalid argument name = 1 supplied to tuple(types, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to tuple(types, name): expected a string');
 
     });
 
@@ -1287,16 +1276,16 @@ describe('tuple', function () {
 
       throwsWithMessage(function () {
         T(1);
-      }, 'Invalid argument value = 1 supplied to tuple T: expected an array of length 2');
+      }, '[tcomb] Invalid argument value = 1 supplied to tuple T: expected an array of length 2');
 
       throwsWithMessage(function () {
         T([1, 1]);
-      }, 'Invalid argument value = 1 supplied to struct S: expected an object');
+      }, '[tcomb] Invalid argument value = 1 supplied to struct S: expected an object');
 
     });
 
     it('should be idempotent', function () {
-      var T = tuple([Str, Num]);
+      var T = tuple([t.String, t.Number]);
       var p1 = T(['a', 1]);
       var p2 = T(p1);
       eq(Object.isFrozen(p1), true);
@@ -1326,7 +1315,7 @@ describe('tuple', function () {
 
   describe('#update()', function () {
 
-    var Type = tuple([Str, Num]);
+    var Type = tuple([t.String, t.Number]);
     var instance = Type(['a', 1]);
 
     it('should return a new instance', function () {
@@ -1352,11 +1341,11 @@ describe('list', function () {
 
       throwsWithMessage(function () {
         list();
-      }, 'Invalid argument type = undefined supplied to list(type, name): expected a type');
+      }, '[tcomb] Invalid argument type = undefined supplied to list(type, name): expected a type');
 
       throwsWithMessage(function () {
         list(Point, 1);
-      }, 'Invalid argument name = 1 supplied to list(type, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to list(type, name): expected a string');
 
     });
 
@@ -1376,16 +1365,16 @@ describe('list', function () {
 
       throwsWithMessage(function () {
         T(1);
-      }, 'Invalid argument value = 1 supplied to list T');
+      }, '[tcomb] Invalid argument value = 1 supplied to list T');
 
       throwsWithMessage(function () {
         T([1]);
-      }, 'Invalid argument value = 1 supplied to struct S: expected an object');
+      }, '[tcomb] Invalid argument value = 1 supplied to struct S: expected an object');
 
     });
 
     it('should be idempotent', function () {
-      var T = list(Num);
+      var T = list(t.Number);
       var p1 = T([1, 2]);
       var p2 = T(p1);
       eq(Object.isFrozen(p1), true);
@@ -1413,7 +1402,7 @@ describe('list', function () {
 
   describe('#update()', function () {
 
-    var Type = list(Str);
+    var Type = list(t.String);
     var instance = Type(['a', 'b']);
 
     it('should return a new instance', function () {
@@ -1441,15 +1430,15 @@ describe('subtype', function () {
 
       throwsWithMessage(function () {
         subtype();
-      }, 'Invalid argument type = undefined supplied to subtype(type, predicate, name): expected a type');
+      }, '[tcomb] Invalid argument type = undefined supplied to subtype(type, predicate, name): expected a type');
 
       throwsWithMessage(function () {
         subtype(Point, null);
-      }, 'Invalid argument predicate supplied to subtype(type, predicate, name): expected a function');
+      }, '[tcomb] Invalid argument predicate supplied to subtype(type, predicate, name): expected a function');
 
       throwsWithMessage(function () {
         subtype(Point, True, 1);
-      }, 'Invalid argument name = 1 supplied to subtype(type, predicate, name): expected a string');
+      }, '[tcomb] Invalid argument name = 1 supplied to subtype(type, predicate, name): expected a string');
 
     });
 
@@ -1460,10 +1449,10 @@ describe('subtype', function () {
     it('should throw if used with new and a type that is not instantiable with new', function () {
       throwsWithMessage(function () {
         /* jshint ignore:start */
-        var T = subtype(Str, function () { return true; }, 'T');
+        var T = subtype(t.String, function () { return true; }, 'T');
         var x = new T();
         /* jshint ignore:end */
-      }, 'Cannot use the new operator to instantiate a type T');
+      }, '[tcomb] Cannot use the new operator to instantiate a type T');
     });
 
     it('should coerce values', function () {
@@ -1477,14 +1466,14 @@ describe('subtype', function () {
       var T = subtype(Point, predicate, 'T');
       throwsWithMessage(function () {
         T({x: 0, y: 0});
-      }, 'Invalid argument value = {\n  "x": 0,\n  "y": 0\n} supplied to subtype T');
+      }, '[tcomb] Invalid argument value = {\n  "x": 0,\n  "y": 0\n} supplied to subtype T');
     });
 
   });
 
   describe('#is(x)', function () {
 
-    var Positive = subtype(Num, function (n) {
+    var Positive = subtype(t.Number, function (n) {
       return n >= 0;
     });
 
@@ -1500,7 +1489,7 @@ describe('subtype', function () {
 
   describe('#update()', function () {
 
-    var Type = subtype(Str, function (s) { return s.length > 2; });
+    var Type = subtype(t.String, function (s) { return s.length > 2; });
     var instance = Type('abc');
 
     it('should return a new instance', function () {
@@ -1525,15 +1514,15 @@ describe('dict', function () {
 
       throwsWithMessage(function () {
         dict();
-      }, 'Invalid argument domain = undefined supplied to dict(domain, codomain, name): expected a type');
+      }, '[tcomb] Invalid argument domain = undefined supplied to dict(domain, codomain, name): expected a type');
 
       throwsWithMessage(function () {
-        dict(Str);
-      }, 'Invalid argument codomain = undefined supplied to dict(domain, codomain, name): expected a type');
+        dict(t.String);
+      }, '[tcomb] Invalid argument codomain = undefined supplied to dict(domain, codomain, name): expected a type');
 
       throwsWithMessage(function () {
-        dict(Str, Point, 1);
-      }, 'Invalid argument name = 1 supplied to dict(domain, codomain, name): expected a string');
+        dict(t.String, Point, 1);
+      }, '[tcomb] Invalid argument name = 1 supplied to dict(domain, codomain, name): expected a string');
 
     });
 
@@ -1542,7 +1531,7 @@ describe('dict', function () {
   describe('constructor', function () {
 
     var S = struct({}, 'S');
-    var Domain = subtype(Str, function (x) {
+    var Domain = subtype(t.String, function (x) {
       return x !== 'forbidden';
     }, 'Domain');
     var T = dict(Domain, S, 'T');
@@ -1556,20 +1545,20 @@ describe('dict', function () {
 
       throwsWithMessage(function () {
         T(1);
-      }, 'Invalid argument value = 1 supplied to dict T');
+      }, '[tcomb] Invalid argument value = 1 supplied to dict T');
 
       throwsWithMessage(function () {
         T({a: 1});
-      }, 'Invalid argument value = 1 supplied to struct S: expected an object');
+      }, '[tcomb] Invalid argument value = 1 supplied to struct S: expected an object');
 
       throwsWithMessage(function () {
         T({forbidden: {}});
-      }, 'Invalid argument value = "forbidden" supplied to subtype Domain');
+      }, '[tcomb] Invalid argument value = "forbidden" supplied to subtype Domain');
 
     });
 
     it('should be idempotent', function () {
-      var T = dict(Str, Str);
+      var T = dict(t.String, t.String);
       var p1 = T({a: 'a', b: 'b'});
       var p2 = T(p1);
       eq(Object.isFrozen(p1), true);
@@ -1581,7 +1570,7 @@ describe('dict', function () {
 
   describe('#is(x)', function () {
 
-    var T = dict(Str, Point);
+    var T = dict(t.String, Point);
     var p1 = new Point({x: 0, y: 0});
     var p2 = new Point({x: 1, y: 1});
 
@@ -1597,7 +1586,7 @@ describe('dict', function () {
 
   describe('#update()', function () {
 
-    var Type = dict(Str, Str);
+    var Type = dict(t.String, t.String);
     var instance = Type({p1: 'a', p2: 'b'});
 
     it('should return a new instance', function () {
@@ -1618,20 +1607,20 @@ describe('dict', function () {
 describe('func', function () {
 
   it('should handle a no types', function () {
-    var T = func([], Str);
+    var T = func([], t.String);
     eq(T.meta.domain.length, 0);
     var getGreeting = T.of(function () { return 'Hi'; });
     eq(getGreeting(), 'Hi');
   });
 
   it('should handle a single type', function () {
-    var T = func(Num, Num);
+    var T = func(t.Number, t.Number);
     eq(T.meta.domain.length, 1);
-    ok(T.meta.domain[0] === Num);
+    ok(T.meta.domain[0] === t.Number);
   });
 
   it('should automatically instrument a function', function () {
-    var T = func(Num, Num);
+    var T = func(t.Number, t.Number);
     var f = function () { return 'hi'; };
     ok(T.is(T(f)));
   });
@@ -1640,7 +1629,7 @@ describe('func', function () {
 
     it('should check the arguments', function () {
 
-      var T = func([Num, Num], Num);
+      var T = func([t.Number, t.Number], t.Number);
       var sum = T.of(function (a, b) {
         return a + b;
       });
@@ -1648,38 +1637,38 @@ describe('func', function () {
 
       throwsWithMessage(function () {
         sum(1, 2, 3);
-      }, 'Invalid argument value = [\n  1,\n  2,\n  3\n] supplied to tuple [Num, Num]: expected an array of length 2');
+      }, '[tcomb] Invalid argument value = [\n  1,\n  2,\n  3\n] supplied to tuple [Number, Number]: expected an array of length 2');
 
       throwsWithMessage(function () {
         sum('a', 2);
-      }, 'Invalid argument value = "a" supplied to irreducible type Num');
+      }, '[tcomb] Invalid argument value = "a" supplied to irreducible type Number');
 
     });
 
     it('should check the return value', function () {
 
-      var T = func([Num, Num], Num);
+      var T = func([t.Number, t.Number], t.Number);
       var sum = T.of(function () {
         return 'a';
       });
 
       throwsWithMessage(function () {
         sum(1, 2);
-      }, 'Invalid argument value = "a" supplied to irreducible type Num');
+      }, '[tcomb] Invalid argument value = "a" supplied to irreducible type Number');
 
     });
 
     it('should preserve `this`', function () {
       var o = {name: 'giulio'};
-      o.getTypeName = func([], Str).of(function () {
+      o.getTypeName = func([], t.String).of(function () {
         return this.name;
       });
       eq(o.getTypeName(), 'giulio');
     });
 
     it('should handle function types', function () {
-      var A = func([Str], Str);
-      var B = func([Str, A], Str);
+      var A = func([t.String], t.String);
+      var B = func([t.String, A], t.String);
 
       var f = A.of(function (s) {
         return s + '!';
@@ -1693,8 +1682,8 @@ describe('func', function () {
 
     it('should be idempotent', function () {
       var f = function (s) { return s; };
-      var g = func([Str], Str).of(f);
-      var h = func([Str], Str).of(g);
+      var g = func([t.String], t.String).of(f);
+      var h = func([t.String], t.String).of(g);
       ok(h === g);
     });
 
@@ -1703,7 +1692,7 @@ describe('func', function () {
   describe('currying', function () {
 
     it('should curry functions', function () {
-      var Type = func([Num, Num, Num], Num);
+      var Type = func([t.Number, t.Number, t.Number], t.Number);
       var sum = Type.of(function (a, b, c) {
         return a + b + c;
       }, true);
@@ -1713,7 +1702,7 @@ describe('func', function () {
       eq(sum(1)(2)(3), 6);
 
       // important: the curried function must be of the correct type
-      var CurriedType = func([Num, Num], Num);
+      var CurriedType = func([t.Number, t.Number], t.Number);
       var sum1 = sum(1);
       eq(sum1(2, 3), 6);
       eq(sum1(2)(3), 6);
@@ -1722,19 +1711,19 @@ describe('func', function () {
 
     it('should throw if partial arguments are wrong', function () {
 
-      var T = func([Num, Num], Num);
+      var T = func([t.Number, t.Number], t.Number);
       var sum = T.of(function (a, b) {
         return a + b;
       }, true);
 
       throwsWithMessage(function () {
         sum('a');
-      }, 'Invalid argument value = "a" supplied to irreducible type Num');
+      }, '[tcomb] Invalid argument value = "a" supplied to irreducible type Number');
 
       throwsWithMessage(function () {
         var sum1 = sum(1);
         sum1('a');
-      }, 'Invalid argument value = "a" supplied to irreducible type Num');
+      }, '[tcomb] Invalid argument value = "a" supplied to irreducible type Number');
 
     });
 
@@ -1743,14 +1732,14 @@ describe('func', function () {
   describe('uncurried', function () {
 
     it('should not curry functions', function () {
-      var Type = func([Num, Num, Num], Num);
+      var Type = func([t.Number, t.Number, t.Number], t.Number);
       var sum = Type.of(function (a, b, c) {
         return a + b + c;
       });
       eq(sum(1, 2, 3), 6);
       throwsWithMessage(function () {
         sum(1, 2);
-      }, 'Invalid argument value = [\n  1,\n  2\n] supplied to tuple [Num, Num, Num]: expected an array of length 3');
+      }, '[tcomb] Invalid argument value = [\n  1,\n  2\n] supplied to tuple [Number, Number, Number]: expected an array of length 3');
     });
 
   });
@@ -1772,7 +1761,7 @@ describe('ES6 classes', function () {
     eq(T.is(c), true);
     throwsWithMessage(function () {
       T(new Class('b'));
-    }, 'Invalid argument value = {\n  "a": "b"\n} supplied to subtype {Class | isA}');
+    }, '[tcomb] Invalid argument value = {\n  "a": "b"\n} supplied to subtype {Class | isA}');
   });
 
   it('should be handled by struct', function () {
@@ -1782,7 +1771,7 @@ describe('ES6 classes', function () {
     eq(T.is(new T({c: c})), true);
     throwsWithMessage(function () {
       T({c: 1});
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
   it('should be handled by maybe', function () {
@@ -1791,7 +1780,7 @@ describe('ES6 classes', function () {
     eq(T.is(c), true);
     throwsWithMessage(function () {
       T(1);
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
   it('should be handled by tuple', function () {
@@ -1799,7 +1788,7 @@ describe('ES6 classes', function () {
     eq(T.is([c]), true);
     throwsWithMessage(function () {
       T([1]);
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
   it('should be handled by list', function () {
@@ -1807,34 +1796,34 @@ describe('ES6 classes', function () {
     eq(T.is([c]), true);
     throwsWithMessage(function () {
       T([1]);
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
   it('should be handled by dict', function () {
-    var T = t.dict(t.Str, Class);
+    var T = t.dict(t.String, Class);
     eq(T.is({a: c}), true);
     throwsWithMessage(function () {
       T({a: 1});
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
   it('should be handled by union', function () {
-    var T = t.union([t.Str, Class]);
+    var T = t.union([t.String, Class]);
     eq(T.is(c), true);
     throwsWithMessage(function () {
       T(1);
-    }, 'The dispatch() function of union Str | Class returns no type');
+    }, '[tcomb] The dispatch() function of union String | Class returns no type');
   });
 
   it('should be handled by func', function () {
-    var T = t.func(Class, t.Str);
+    var T = t.func(Class, t.String);
     var f = T.of(function (c) {
       return c.constructor.name;
     });
     eq(f(c), 'Class');
     throwsWithMessage(function () {
       f(1);
-    }, 'The value 1 is not an instance of Class');
+    }, '[tcomb] The value 1 is not an instance of Class');
   });
 
 });