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

fix increaseNumbers

This commit is contained in:
Patrick Thomson 2018-09-18 17:06:02 -04:00
parent 649dd2132f
commit 62560cf462

View File

@ -101,10 +101,10 @@ testRenameKey = do
pPrint tagged pPrint tagged
printToTerm $ runReprinter src defaultJSONPipeline tagged printToTerm $ runReprinter src defaultJSONPipeline tagged
increaseNumbers :: (Literal.Float :< fs, Apply Functor fs) => Term (Sum fs) (Record (History ': fields)) -> Term (Sum fs) (Record (History ': fields)) increaseNumbers :: (term ~ Term (Sum fs) (Record (History : fields))) => Rewrite (env, term) m (Literal.Float term)
increaseNumbers p = case Sum.project (termOut p) of increaseNumbers = do
Just (Literal.Float t) -> remark Refactored (termIn (termAnnotation p) (inject (Literal.Float (t <> "0")))) (Literal.Float c) <- id
Nothing -> Term (fmap increaseNumbers (unTerm p)) pure (Literal.Float (c <> "0"))
addKVPair :: forall effs syntax ann fields term . addKVPair :: forall effs syntax ann fields term .
( Apply Functor syntax ( Apply Functor syntax