1
1
mirror of https://github.com/github/semantic.git synced 2024-12-27 00:44:57 +03:00

Use version of this on master

This commit is contained in:
Ayman Nadeem 2018-06-01 10:25:33 -07:00
parent fe066369fc
commit 9df4478751

View File

@ -5,7 +5,6 @@ import Data.Range
import Data.Record
import Data.Span
import Data.Term
import Prologue
import Data.Aeson
import Data.ByteString.Char8 (pack)
@ -33,11 +32,3 @@ type Location = '[Range, Span]
nodeLocation :: Node grammar -> Record Location
nodeLocation Node{..} = nodeByteRange :. nodeSpan :. Nil
newtype Tree (syntax) = Tree (syntax (Tree syntax))
instance (Show1 syntax) => Show (Tree syntax) where
showsPrec precedence (Tree syntax) = showsPrec1 precedence syntax
termToTree :: Functor syntax => Term syntax annotation -> Tree syntax
termToTree = cata (\ (In _ syntax) -> Tree syntax)