From 9a1f6e9835e30530517d3920b51f69b35c2f4e08 Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Wed, 19 Sep 2018 11:58:44 -0400 Subject: [PATCH] bump api --- src/Data/Syntax.hs | 2 +- src/Semantic/Util/Rewriting.hs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Syntax.hs b/src/Data/Syntax.hs index 226913c4f..7d4245b0c 100644 --- a/src/Data/Syntax.hs +++ b/src/Data/Syntax.hs @@ -18,7 +18,7 @@ import GHC.TypeLits import Diffing.Algorithm hiding (Empty) import Prelude import Prologue -import Reprinting.Tokenize hiding (Context, Element) +import Reprinting.Tokenize hiding (Element) import qualified Assigning.Assignment as Assignment import qualified Data.Error as Error import Proto3.Suite.Class diff --git a/src/Semantic/Util/Rewriting.hs b/src/Semantic/Util/Rewriting.hs index 125cc4410..b3c839cca 100644 --- a/src/Semantic/Util/Rewriting.hs +++ b/src/Semantic/Util/Rewriting.hs @@ -88,7 +88,7 @@ renameKey :: ( Literal.TextElement :< fs , Apply Functor fs , term ~ Term (Sum fs) (Record (History : fields)) ) - => Rewrite (env, term) m (Literal.KeyValue term) + => Rewrite (env, term) (Literal.KeyValue term) renameKey = do Literal.KeyValue k v <- id guard (projectTerm k == (Just (Literal.TextElement "\"foo\""))) @@ -97,11 +97,11 @@ renameKey = do testRenameKey = do (src, tree) <- testJSONFile - let (Right tagged) = applyPure (somewhere renameKey) () (mark Unmodified tree) + let (Right tagged) = rewrite (somewhere' renameKey) () (mark Unmodified tree) pPrint tagged printToTerm $ runReprinter src defaultJSONPipeline tagged -increaseNumbers :: (term ~ Term (Sum fs) (Record (History : fields))) => Rewrite (env, term) m (Literal.Float term) +increaseNumbers :: (term ~ Term (Sum fs) (Record (History : fields))) => Rewrite (env, term) (Literal.Float term) increaseNumbers = do (Literal.Float c) <- id pure (Literal.Float (c <> "0"))