0

Hi, has anybody here experience miranda before? I need help with algebraic types and type synonym?

Thanks

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by sarehu
0

Miranda has a lot of similarities to Haskell. I can't say for sure that I can help you, but post your question and we'll see.

Even if I can't, there are a lot of knowledgeable Haskell folks here that probably can.

0

Hi, thanks for the reply. I need to do create an alegbraic type to show the suits in a card and use this type in a type synonym to like show a specific card like ' 9 of spades '

I think the first bit i can do

cardsuit ::= Hearts | Diamonds | Spades | Clubs

but i dont know what types they should be or the type synonym? any ideas? I think i should be using enumerated types?

Thanls

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.