<commit_before>%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
%************************************************************************
%*									*
\section[OccurAnal]{Occurrence analysis pass}
%*									*
%************************************************************************

The occurrence analyser re-typechecks a core expression, returning a new
core expression with (hopefully) improved usage information.

\begin{code}
module OccurAnal (
	occurAnalysePgm, occurAnalyseExpr
    ) where

#include "HsVersions.h"

import CoreSyn
import CoreFVs		( idRuleVars )
import CoreUtils	( exprIsTrivial, isDefaultAlt )
import Id		( isDataConWorkId, isOneShotBndr, setOneShotLambda, 
			  idOccInfo, setIdOccInfo, isLocalId,
			  isExportedId, idArity, 
			  idType, idUnique, Id
			)
import BasicTypes	( OccInfo(..), isOneOcc, InterestingCxt )

import VarSet
import VarEnv

import Type		( isFunTy, dropForAlls )
import Maybes		( orElse )
import Digraph		( stronglyConnCompR, SCC(..) )
import PrelNames	( buildIdKey, foldrIdKey, runSTRepIdKey, augmentIdKey )
import Unique		( Unique )
import UniqFM		( keysUFM )  
import Util		( zipWithEqual, mapAndUnzip )
import Outputable
\end{code}


%************************************************************************
%*									*
\subsection[OccurAnal-main]{Counting occurrences: main function}
%*									*<commit_msg>Sigh: one more fix to undoing the erroneous patch<commit_after>%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
%************************************************************************
%*									*
\section[OccurAnal]{Occurrence analysis pass}
%*									*
%************************************************************************

The occurrence analyser re-typechecks a core expression, returning a new
core expression with (hopefully) improved usage information.

\begin{code}
module OccurAnal (
	occurAnalysePgm, occurAnalyseExpr
    ) where

#include "HsVersions.h"

import CoreSyn
import CoreFVs		( idRuleVars )
import CoreUtils	( exprIsTrivial, isDefaultAlt )
import Id		( isDataConWorkId, isOneShotBndr, setOneShotLambda, 
			  idOccInfo, setIdOccInfo, isLocalId,
			  isExportedId, idArity, idSpecialisation,
			  idType, idUnique, Id
			)
import IdInfo		( isEmptySpecInfo )
import BasicTypes	( OccInfo(..), isOneOcc, InterestingCxt )

import VarSet
import VarEnv

import Type		( isFunTy, dropForAlls )
import Maybes		( orElse )
import Digraph		( stronglyConnCompR, SCC(..) )
import PrelNames	( buildIdKey, foldrIdKey, runSTRepIdKey, augmentIdKey )
import Unique		( Unique )
import UniqFM		( keysUFM )  
import Util		( zipWithEqual, mapAndUnzip )
import Outputable
\end{code}


%************************************************************************
%*									*
\subsection[OccurAnal-main]{Counting occurrences: main function}
%*									*
{'fraction_non_alphanumeric': 0.22768798313422348, 'fraction_numerical': 0.005621925509486999, 'mean_word_length': 5.0963597430406855, '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': '6942899', 'n_tokens_mistral': 990, 'n_tokens_neox': 844, 'n_words': 214}