
Adding Richard to CC.
Tom Ellis
On Fri, Feb 19, 2016 at 03:07:59PM +0300, Kosyrev Serge wrote:
Tom Ellis
writes: I agree. FGL seems inappropriate to model people owning hamsters because you genuinely want to reflect the difference between people and hamsters by having two different node types.
What would you propose instead?
If I were utterly insane I would propose that FGL be extended with higher-typed indexes, so instead of
Gr :: * -> * -> *
we would have
Gr :: (k -> *) -> (k -> k -> *) -> *
Then Hamster and Person would be the only inhabitants of some kind k, and you can could choose two different types to represent them, and four different types to represent the (directed) edges between them.
Richard, is something like this possible with what is in GHC 8? Or would DataKinds already be sufficient for this? -- с уважениeм / respectfully, Косырев Сергей