How to create and use my own type?

Hello

It seems that I should be able to use my own concept (quoted) in a right side of the type equation (according to typesystem documentation (e.g. http://www.jetbrains.net/confluence/display/MPS/Typesystem#Typesystem-examplesinference). I've created a test language with two sample concepts CurrencyLiteral and CurrencyType, and tried to add and type inference rule for the CurrencyLiteral concept

typeof(literal) :==: <CurrencyType>

Unfortunately, I'm just able to create quotation node, but not a CurrencyType child node - autocompletion options do not contain it.

Am I missing something important here?

Thank you.

2 comments
Comment actions Permalink

Hello, Konstantin,

In order to use a type inside of quotation, you need to add a language which you write quotation in used model section of typesystem model. Add it manually (It's probably a bug. It should have been added automatically).

0
Comment actions Permalink

Thanks, works like a charm!

0

Please sign in to leave a comment.