From 7d94ffe26df8ba28d8db28e1433f333acb65af8e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 5 Aug 2016 09:51:50 -0400 Subject: [PATCH] Revert "Add a function to update fields." This reverts commit 1ab7e06cd7b06c9d688c1cea9c0bec2d4d505593. --- src/Data/Record.hs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Data/Record.hs b/src/Data/Record.hs index b31adf4fc..8af2fcca8 100644 --- a/src/Data/Record.hs +++ b/src/Data/Record.hs @@ -29,11 +29,6 @@ maybeGetField :: Typeable field => Record fields -> Maybe field maybeGetField (RCons h t) = cast h <|> maybeGetField t maybeGetField RNil = Nothing -updateField :: forall field fields. Typeable field => Record fields -> field -> Record fields -updateField record a = case record of - RNil -> RNil - cons@(RCons _ _) -> updateRCons cons a - updateRCons :: forall h t field. (Typeable h, Typeable field) => Record (h ': t) -> field -> Record (h ': t) updateRCons (RCons h t) a = case eqT :: Maybe (h :~: field) of Just Refl -> RCons a t