From 047cc81f4f1448e182244b92848897dcf3ea77fc Mon Sep 17 00:00:00 2001 From: Rob Rix <rob.rix@github.com> Date: Thu, 16 Jun 2016 17:34:36 -0400 Subject: [PATCH] IsField specifies a setter. --- src/Data/Record.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/Record.hs b/src/Data/Record.hs index ebbc76ebd..f4dff20ce 100644 --- a/src/Data/Record.hs +++ b/src/Data/Record.hs @@ -42,6 +42,7 @@ class HasField (fields :: [*]) (field :: *) where class IsField field where getValue :: field -> ValueOf field + setValue :: ValueOf field -> field -- Instances @@ -66,3 +67,4 @@ type instance ValueOf ((:=>) tag value) = value instance IsField (tag :=> value) where getValue = unField + setValue = field