
7 Dec
2006
7 Dec
'06
7:07 a.m.
Hi, I've got an object model that I have a difficult time conceptualising how it might look like in Haskell: class Element { } class Inline : Element { } class ParentInline : Inline { List<Inline> children; } class Bold : ParentInline { } class Underline : ParentInline { } class Link : ParentInline { String link; } class Text : Inline { String text; } class Block : Element { } class Paragraph : Block { List<Inline> paragraph; } class Heading : Block { List<Inline> heading; } class Document : Element { List<Block> blocks; } How best to represent this OO data model in Haskell? Thanks -John