19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TypeAlias ::= type Id [StaticParams] = TypeRef<br />

<strong>Fortress</strong> allows names to serve as aliases for more complex type instantiations. A type alias begins with the special<br />

reserved word type followed by the name of the alias type, followed by optional static parameters, followed by = ,<br />

followed by the type it stands for. Parameterized type aliases are allowed but recursively defined type aliases are not.<br />

Here are some examples:<br />

type IntList = ListZ64<br />

type BinOp = Float × Float → Float<br />

type SimpleFloatnat e,nat s = DetailedFloatUnity, e, s,false,false,false,false,true<br />

All uses of type aliases are expanded before type checking. Type aliases do not define new types nor nominal equivalence<br />

relations among types.<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!