Open agentm opened 3 years ago
Hi @agentm
I've tried to embed the TutorialD in Haskell. I guess you might want to see it: ShortCut.hs It needs the convertible library.
Although it has some drawbacks:
{,,,} => [,,,] since Haskell can only overload []. the # prefix is needed for attribute names due to OverloadedLabels extension. the # prefix for relation-related operator and @ prefix for attribute-related operator is needed due to some keyword operator is preserved. f "count" [...] for function expressions. ... so it may look a bit weird. (And right now, relation type expression haven't been implemented.)
But there are some advantages too:
It can have a persistent with macro because Haskell can give an expression a function name. So it can compose. And maybe it can make expression as a function, not sure about that, haven't tried that. And plus, it can turn a type with Atomable type class in haskell into ConstructedAtomType directly.
Hope it helps.
Hm... the link included in the comment claims the file has been deleted. Can you make a pull request?
Oops. Okay, I've pulled a request now.
f "count" [...] for function expressions
is a bad/not-working design. I'll see if I can fix it.
This could be a useful improvement so that users don't have to use the more verbose Haskell ADT directly.