<commit_before>{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS -fno-warn-missing-signatures #-}
-- | During testing, we compare the output of each invocation of the lifted
--   combinators in "Data.Array.Parallel.PArray" with the reference implementations. 
--
--   This module helps convert the to and from the array representation
--   used by the reference implementation.

--   TODO: we could use this to trace the lengths of the vectors being used, 
--         as well as the types that each opeartor is being called at.
--
module Data.Array.Parallel.PArray.Reference
        ( Similar(..), PprPhysical1 (..)
        , withRef1, withRef2
        , toRef1,   toRef2,   toRef3)
where
import Data.Array.Parallel.Pretty
import qualified Data.Array.Parallel.Array      as A
import qualified Data.Vector                    as V
import Data.Vector                              (Vector)
import Prelude hiding (length)
import System.IO
import System.IO.Unsafe
import Control.Monad

-- Config ---------------------------------------------------------------------
debugLiftedTrace        :: Bool
debugLiftedTrace        = True

debugLiftedCompare      :: Bool
debugLiftedCompare      = True

class Similar a where
 similar :: a -> a -> Bool

class PprPhysical1 a where
 pprp1  :: a -> Doc<commit_msg>dph-lifted-base: turn off debugging<commit_after>{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS -fno-warn-missing-signatures #-}
-- | During testing, we compare the output of each invocation of the lifted
--   combinators in "Data.Array.Parallel.PArray" with the reference implementations. 
--
--   This module helps convert the to and from the array representation
--   used by the reference implementation.

--   TODO: we could use this to trace the lengths of the vectors being used, 
--         as well as the types that each opeartor is being called at.
--
module Data.Array.Parallel.PArray.Reference
        ( Similar(..), PprPhysical1 (..)
        , withRef1, withRef2
        , toRef1,   toRef2,   toRef3)
where
import Data.Array.Parallel.Pretty
import qualified Data.Array.Parallel.Array      as A
import qualified Data.Vector                    as V
import Data.Vector                              (Vector)
import Prelude hiding (length)
import System.IO
import System.IO.Unsafe
import Control.Monad

-- Config ---------------------------------------------------------------------
debugLiftedTrace        :: Bool
debugLiftedTrace        = False

debugLiftedCompare      :: Bool
debugLiftedCompare      = False

class Similar a where
 similar :: a -> a -> Bool

class PprPhysical1 a where
 pprp1  :: a -> Doc
{'fraction_non_alphanumeric': 0.13111620795107035, 'fraction_numerical': 0.0061162079510703364, 'mean_word_length': 2.1992665036674817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5213412', 'n_tokens_mistral': 725, 'n_tokens_neox': 708, 'n_words': 252}