mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Add a typeclass for fields.
This commit is contained in:
parent
b18a30b441
commit
2822ec2f51
@ -40,6 +40,9 @@ type family ValueOf field
|
||||
class HasField (fields :: [*]) (field :: *) where
|
||||
getField :: Record fields -> field
|
||||
|
||||
class IsField field where
|
||||
getValue :: field -> ValueOf field
|
||||
|
||||
|
||||
-- Instances
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user