case'string':returntypeof(value)==='string'?Either.of(valueasany):Either.failure(projectProblem(`expected a string, got ${fancyTypeOf(value)}`));
case'string':returntypeof(value)==='string'?Either.of<any>(value):Either.failure(projectProblem(`expected a string, got ${fancyTypeOf(value)}`));
case'boolean':returntypeof(value)==='boolean'?Either.of(valueasany):Either.failure(projectProblem(`expected a boolean, got ${fancyTypeOf(value)}`));
case'boolean':returntypeof(value)==='boolean'?Either.of<any>(value):Either.failure(projectProblem(`expected a boolean, got ${fancyTypeOf(value)}`));
case'any':returnEither.of(valueasA);
case'any':returnEither.of(valueasA);
case'nat':returntypeof(value)!=='number'?Either.failure(projectProblem('not a number')):(value|0)===value&&value>=0?Either.of(valueasany):Either.failure(projectProblem('not a natural number'));
case'nat':returntypeof(value)!=='number'?Either.failure(projectProblem('not a number')):(value|0)===value&&value>=0?Either.of(valueasany):Either.failure(projectProblem('not a natural number'));
case'int':returntypeof(value)!=='number'?Either.failure(projectProblem('not a number')):(value|0)===value?Either.of(valueasany):Either.failure(projectProblem('not an integer'))
case'int':returntypeof(value)!=='number'?Either.failure(projectProblem('not a number')):(value|0)===value?Either.of(valueasany):Either.failure(projectProblem('not an integer'))