HomePhorge

(#22363) Refactor Type system, add Enum, Regexp, and Variant
aef7e431f424Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#22363) Refactor Type system, add Enum, Regexp, and Variant

This changes the existing Pattern class to Regexp, and introduces
a new Pattern class to describe a subset of strings based on
a regular expression. An Enum type descriebs the set of strings
equal to one of its values. A Variant type is disjoint set of types
that describes instance of one of its types.

The type calculator tests have been refactored for better
maintainability.

The operation [] on a (old) Pattern type, now Regexp) was changed
to not produce an instance of Regexp, instead Regexp[s] produces a
narrow type that can be used instead of a regular expression in matches.

Details

Provenance
Henrik Lindberg <henrik.lindberg@cloudsmith.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU54300d97a403: (#22363) Fix failing tests on Ruby 1.8.7
Branches
Unknown
Tags
Unknown

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPUaef7e431f424: (#22363) Refactor Type system, add Enum, Regexp, and Variant (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Dec 5 2013, 1:24 AM