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:
parent
856e3ed809
commit
047cc81f4f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user