1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

No longer need printTerms

This commit is contained in:
Timothy Clem 2017-04-21 17:54:58 -07:00
parent 190dca165d
commit 779b6afde2
2 changed files with 1 additions and 4 deletions

View File

@ -28,7 +28,7 @@ import Data.Aeson
type DefaultFields = '[ Range, Category, SourceSpan ]
-- | A type alias for HasField constraints commonly used throughout semantic-diff.
type HasDefaultFields fields = (HasField fields Range, HasField fields Category, HasField fields SourceSpan)
type HasDefaultFields fields = (HasField fields Category, HasField fields Range, HasField fields SourceSpan)
newtype SourceText = SourceText { unText :: Text }
deriving (Show, ToJSON)

View File

@ -44,9 +44,6 @@ printDiff diff level format = case runFree diff of
| n < 1 = "\n"
| otherwise = "\n" <> replicate (2 * n) space
-- printTerms :: (HasField fields Category, HasField fields SourceSpan) => SExpressionFormat -> [Term (Syntax t) (Record fields)] -> ByteString
-- printTerms format terms = foldr (\t acc -> printTerm t 0 format <> acc) "" terms
printTerm :: (HasField fields Category, HasField fields SourceSpan) => Term (Syntax t) (Record fields) -> Int -> SExpressionFormat -> ByteString
printTerm term level format = go term level 0
where