From 32b323c89231d433e54fcda267ee665bcc5c7c35 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Wed, 23 Nov 2016 13:31:59 -0600 Subject: [PATCH] :fire: dead code --- src/Parse.hs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/Parse.hs b/src/Parse.hs index f64472d17..f1dcd3c53 100644 --- a/src/Parse.hs +++ b/src/Parse.hs @@ -35,24 +35,11 @@ run Arguments{..} = do sources <- sequence $ readAndTranscodeFile <$> filePaths terms <- zipWithM (\parser sourceBlob -> parser sourceBlob) parsers (sourceBlobs sources) - let sourceBlobs = Source.SourceBlob <$> sources <*> pure mempty <*> filePaths <*> pure (Just Source.defaultPlainBlob) - let parsers = parserWithSource <$> filePaths - terms <- zipWithM (\parser sourceBlob -> parser sourceBlob) parsers sourceBlobs - - let termsWithParseJSON = (cata algebra <$> terms) - - traverse_ (\ (annotation :< syntax) -> putStrLn annotation) (head $ runCofree <$> termsWithParseJSON) - - pure () where sourceBlobs sources = Source.SourceBlob <$> sources <*> pure mempty <*> filePaths <*> pure (Just Source.defaultPlainBlob) parsers = parserWithSource <$> filePaths algebra term = case term of - (annotation :< syntax) -> cofree $ (ParseJSON category' range' sourceText') :< syntax - where category' = toS $ Info.category annotation - range' = characterRange annotation - sourceText' = Info.sourceText annotation -- | Return a parser that decorates with the cost of a term and its children. parserWithCost :: FilePath -> Parser (Syntax Text) (Record '[Cost, Range, Category, SourceSpan])