1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

🔥 Cost.

This commit is contained in:
Rob Rix 2017-02-21 14:58:39 -05:00
parent d288ec1d17
commit 04b929822e
2 changed files with 1 additions and 11 deletions

View File

@ -6,7 +6,6 @@ module Info
, Category(..)
, category
, setCategory
, Cost(..)
, SourceSpan(..)
, SourcePos(..)
, SourceSpans(..)
@ -16,7 +15,6 @@ module Info
, sourceText
) where
import Data.Functor.Listable
import Data.Record
import Prologue
import Category
@ -24,9 +22,6 @@ import Range
import SourceSpan
import Data.Aeson
newtype Cost = Cost { unCost :: Int }
deriving (Eq, Num, Ord, Show, ToJSON)
newtype SourceText = SourceText { unText :: Text }
deriving (Show, ToJSON)
@ -50,8 +45,3 @@ sourceSpan = getField
setSourceSpan :: HasField fields SourceSpan => Record fields -> SourceSpan -> Record fields
setSourceSpan = setField
-- Instances
instance Listable Cost where
tiers = cons1 Cost

View File

@ -56,7 +56,7 @@ spec = parallel $ do
describe "DiffInfo" $ do
prop "patches in summaries match the patches in diffs" $
\a -> let
diff = unListableDiff a :: SyntaxDiff String '[Category, Cost, Range, SourceSpan]
diff = unListableDiff a :: SyntaxDiff String '[Category, Range, SourceSpan]
summaries = diffToDiffSummaries (source <$> blobs) diff
patches = toList diff
in