1
1
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:
Rob Rix 2019-10-01 22:14:12 -04:00
parent 0c5342a030
commit 68ea7e147d
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -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