mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
🔥 redundant definitions of unListableDiff.
This commit is contained in:
parent
7227e27428
commit
e543a192ef
@ -11,6 +11,7 @@ import Info
|
||||
import Interpreter
|
||||
import Patch
|
||||
import Prologue
|
||||
import SpecHelpers
|
||||
import Term
|
||||
import Test.Hspec
|
||||
import Test.Hspec.LeanCheck
|
||||
@ -35,6 +36,3 @@ spec = parallel $ do
|
||||
prop "recovers the after term" $
|
||||
\ a b -> let diff = stripDiff $ diffTerms (decorate (unListableF a)) (decorate (unListableF b :: SyntaxTerm String '[Category])) in
|
||||
afterTerm diff `shouldBe` Just (unListableF b)
|
||||
|
||||
unListableDiff :: Functor f => ListableF (Free (TermF f (ListableF (Join (,)) annotation))) (Patch (ListableF (Term f) annotation)) -> Diff f annotation
|
||||
unListableDiff diff = hoistFree (first unListableF) $ fmap unListableF <$> unListableF diff
|
||||
|
@ -15,6 +15,7 @@ import Interpreter
|
||||
import Patch
|
||||
import Prologue
|
||||
import Source
|
||||
import SpecHelpers
|
||||
import Syntax
|
||||
import Term
|
||||
import Test.Hspec (Spec, describe, it, parallel)
|
||||
@ -98,6 +99,3 @@ isIndexedOrFixed' syntax = case syntax of
|
||||
|
||||
isBranchNode :: Patch DiffInfo -> Bool
|
||||
isBranchNode = any isBranchInfo
|
||||
|
||||
unListableDiff :: Functor f => ListableF (Free (TermF f (ListableF (Join (,)) annotation))) (Patch (ListableF (Term f) annotation)) -> Diff f annotation
|
||||
unListableDiff diff = hoistFree (first unListableF) $ fmap unListableF <$> unListableF diff
|
||||
|
Loading…
Reference in New Issue
Block a user