[Haskell-cafe] mutually recursive types

rodrigo.bonifacio rodrigo.bonifacio at uol.com.br
Wed Aug 8 10:56:48 EDT 2007


Hi, I am learning the haskell programming language and had tried to define the following types:

type Scenario = (String, String, [Step])
type Step = (String, Scenario, String, String, String)

Notice that Scenario depends on a list of steps and Step has a dependence with scenario. I know that this is a kind of "bad smell".... in Haskell, are there any pattern or language idiom to deal with cyclical dependences?

Regards,

Rodrigo.







More information about the Haskell-Cafe mailing list