-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would love a complete Person
example :)
#20
Comments
Hmm; maybe the answer is this: data HMaybe a
= HNothing
| HJust (a :# HMaybe)
maybePerson :: HMaybe # Person
maybePerson = HJust $ Person
{ height = HNothing
, weight = HNothing
, name = HJust $ Const "Name"
} ? |
I guess I was hoping there was a way to re-use existing types instead of defining my own? But I can live with the fact that there isn't; but I'm sure there's a way to make it work ... |
I'm fairly sure there has to be a way to define a kind of |
I feel like I'm missing access to a crucial type variable. I want to write: data ToHyper :: (Type -> Type) -> AHyperType -> Type where
ToHyper :: f :# ToHyper f -> ToHyper f h but I somehow need to get out the variable of |
Hello; thanks for this lovely library!
I'm trying to wrap my mind around it.
In the README, you start with a
Person
example; but then quickly jump into ASTs.My usage isn't actually an AST; it's much more like the
Person
example. I'm here because I couldn't quite getbarbies
to work ( see jcpetruzza/barbies#47 ).In my own hacking, I'm trying something like
what's not clear to me is how to define the
maybePerson
type. As-is, it doesn't compile. I think I need to somehow adapt theMaybe
type to be a kind ofHyper
type; but I'm missing exactly how.I'd love to know how to do this; and then do barbie-style things such as a
bmap
which takes, say, anIdentity # Person
and converts it to aMaybe # Person
viarunIdentity
.Thanks!
The text was updated successfully, but these errors were encountered: