<commit_before>{-# LANGUAGE OverloadedStrings #-}

module SHC.Types
    where

import           Control.Monad (forM)
import           Data.Aeson
import qualified Data.HashMap.Strict as HM
import qualified Data.Text           as T
import           Trace.Hpc.Mix


data ConversionType = FullLines
                    | PartialLines
                    deriving (Show, Eq)

type CoverageEntry =
    ( [MixEntry]  -- Mix entries
    , [Integer]   -- Tix values
    , [String]    -- Entry source code
    )

data Hit = Full
         | Partial
         | None
         | Irrelevant
         deriving (Eq, Show)

type Lix = [Hit]

data PostResult = PostSuccess String
                | PostFailure String
                deriving (Show)
<commit_msg>Fix for GHC 7.8.<commit_after>{-# LANGUAGE CPP, OverloadedStrings #-}

module SHC.Types
    where

import           Control.Monad (forM)
import           Data.Aeson
import qualified Data.HashMap.Strict as HM
import qualified Data.Text           as T
import           Trace.Hpc.Mix

#if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>))
#endif


data ConversionType = FullLines
                    | PartialLines
                    deriving (Show, Eq)

type CoverageEntry =
    ( [MixEntry]  -- Mix entries
    , [Integer]   -- Tix values
    , [String]    -- Entry source code
    )

data Hit = Full
         | Partial
         | None
         | Irrelevant
         deriving (Eq, Show)

type Lix = [Hit]

data PostResult = PostSuccess String
                | PostFailure String
                deriving (Show)

{'fraction_non_alphanumeric': 0.0792332268370607, 'fraction_numerical': 0.003194888178913738, 'mean_word_length': 1.7329842931937174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5956816', 'n_tokens_mistral': 469, 'n_tokens_neox': 450, 'n_words': 134}