wiki:LiberalTypeSynonyms

Version 1 (modified by simonmar@…, 9 years ago) (diff)

--

Liberal Type Synonyms

Brief Explanation

See the GHC Documentation on this extension.

The basic idea is that type validity checking is done after expanding type synonyms. This means that type synonyms can be written unsaturated, as long as the result of expanding synonyms leaves everything saturated. This is sometimes quite useful.

There are also interactions with RankNTypes - a type synonym may expand to a quantified type.

Proposal

Adopt GHC's approach to type synonym expansion.

References

Tickets

#102
add Liberal Type Synonyms

Pros

  • Small generalisation
  • Easily specified
  • Quite handy

Cons

  • any?