<commit_before>{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE BlockArguments #-}


module Unison.Codebase.FileCodebase.SlimCopyRegenerateIndex (syncToDirectory) where

import Unison.Prelude

import qualified Data.Set                      as Set
import           Control.Lens
import           Control.Monad.State            ( MonadState, evalStateT )
import           Control.Monad.Writer           ( MonadWriter, execWriterT )
import qualified Control.Monad.Writer          as Writer
import           UnliftIO.Directory             ( doesFileExist )
import           Unison.Codebase                ( CodebasePath )
import qualified Unison.Codebase.Causal        as Causal
import           Unison.Codebase.Branch         ( Branch(..) )
import qualified Unison.Codebase.Branch        as Branch
import qualified Unison.Codebase.Branch.Dependencies as BD
import qualified Unison.Codebase.Patch         as Patch
import qualified Unison.Codebase.Serialization as S
import qualified Unison.Codebase.Serialization.V1 as V1
import qualified Unison.Codebase.TermEdit      as TermEdit
import qualified Unison.Codebase.TypeEdit      as TypeEdit
import qualified Unison.DataDeclaration        as DD
import qualified Unison.LabeledDependency      as LD
import           Unison.Reference               ( Reference )
import qualified Unison.Reference              as Reference
import qualified Unison.Referent               as Referent
import qualified Unison.Term                   as Term
import           Unison.Type                    ( Type )
import qualified Unison.Type                   as Type
import           Unison.Var                     ( Var )
import qualified Unison.Util.Relation          as Relation
import           Unison.Util.Relation           ( Relation )<commit_msg>make SlimCopy use State.Strict and Writer.Strict for a tiny improvement<commit_after>{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE BlockArguments #-}


module Unison.Codebase.FileCodebase.SlimCopyRegenerateIndex (syncToDirectory) where

import Unison.Prelude

import qualified Data.Set                      as Set
import           Control.Lens
import           Control.Monad.State.Strict     ( MonadState, evalStateT )
import           Control.Monad.Writer.Strict    ( MonadWriter, execWriterT )
import qualified Control.Monad.Writer.Strict   as Writer
import           UnliftIO.Directory             ( doesFileExist )
import           Unison.Codebase                ( CodebasePath )
import qualified Unison.Codebase.Causal        as Causal
import           Unison.Codebase.Branch         ( Branch(..) )
import qualified Unison.Codebase.Branch        as Branch
import qualified Unison.Codebase.Branch.Dependencies as BD
import qualified Unison.Codebase.Patch         as Patch
import qualified Unison.Codebase.Serialization as S
import qualified Unison.Codebase.Serialization.V1 as V1
import qualified Unison.Codebase.TermEdit      as TermEdit
import qualified Unison.Codebase.TypeEdit      as TypeEdit
import qualified Unison.DataDeclaration        as DD
import qualified Unison.LabeledDependency      as LD
import           Unison.Reference               ( Reference )
import qualified Unison.Reference              as Reference
import qualified Unison.Referent               as Referent
import qualified Unison.Term                   as Term
import           Unison.Type                    ( Type )
import qualified Unison.Type                   as Type
import           Unison.Var                     ( Var )
import qualified Unison.Util.Relation          as Relation
import           Unison.Util.Relation           ( Relation )
{'fraction_non_alphanumeric': 0.06720038816108685, 'fraction_numerical': 0.0009704027171276079, 'mean_word_length': 2.3574918566775245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '261821', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1096, 'n_words': 295}