mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
The diff & term types are mutually supporting.
This commit is contained in:
parent
0c5342a030
commit
68ea7e147d
@ -1,4 +1,4 @@
|
||||
{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses, TypeOperators, UndecidableInstances #-}
|
||||
{-# LANGUAGE FunctionalDependencies, GeneralizedNewtypeDeriving, TypeOperators, UndecidableInstances #-}
|
||||
module Diffing.Interpreter
|
||||
( diffTerms
|
||||
, DiffTerms(..)
|
||||
@ -29,7 +29,7 @@ stripDiff :: Functor syntax
|
||||
-> Diff.Diff syntax ann1 ann2
|
||||
stripDiff = bimap snd snd
|
||||
|
||||
class DiffTerms term diff where
|
||||
class DiffTerms term diff | diff -> term, term -> diff where
|
||||
-- | Diff a 'These' of terms.
|
||||
diffTermPair :: These (term ann1) (term ann2) -> diff ann1 ann2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user