1
1
mirror of https://github.com/github/semantic.git synced 2024-12-20 21:31:48 +03:00

IsField specifies a setter.

This commit is contained in:
Rob Rix 2016-06-16 17:34:36 -04:00
parent 856e3ed809
commit 047cc81f4f

View File

@ -42,6 +42,7 @@ class HasField (fields :: [*]) (field :: *) where
class IsField field where class IsField field where
getValue :: field -> ValueOf field getValue :: field -> ValueOf field
setValue :: ValueOf field -> field
-- Instances -- Instances
@ -66,3 +67,4 @@ type instance ValueOf ((:=>) tag value) = value
instance IsField (tag :=> value) where instance IsField (tag :=> value) where
getValue = unField getValue = unField
setValue = field