mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
No longer need printTerms
This commit is contained in:
parent
190dca165d
commit
779b6afde2
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user