1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 21:01:35 +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
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 p = case Sum.project (termOut p) of
Just (Literal.Float t) -> remark Refactored (termIn (termAnnotation p) (inject (Literal.Float (t <> "0"))))
Nothing -> Term (fmap increaseNumbers (unTerm p))
increaseNumbers :: (term ~ Term (Sum fs) (Record (History : fields))) => Rewrite (env, term) m (Literal.Float term)
increaseNumbers = do
(Literal.Float c) <- id
pure (Literal.Float (c <> "0"))
addKVPair :: forall effs syntax ann fields term .
( Apply Functor syntax