<commit_before>package lore.compiler.typing2

import lore.compiler.semantics.expressions.Expression
import lore.compiler.typing.Typing.logger

// TODO (multi-import): Check that important attempts and results are traced (especially call/function value typing).

object Typing2 {

  def traceExpressionType(expression: Expression, label: String, additional: String = ""): Unit = {
    logger.whenTraceEnabled {
      logger.trace(s"$label type ${expression.tpe} for `${expression.position.truncatedCode}`.$additional")
    }
  }

}<commit_msg>Compiler: Add loggers to Typing2.<commit_after>package lore.compiler.typing2

import com.typesafe.scalalogging.Logger
import lore.compiler.semantics.expressions.Expression
import lore.compiler.utils.IndentationLogger

// TODO (multi-import): Check that important attempts and results are traced (especially call/function value typing).
//                      Refactor and overhaul all current traces.

object Typing2 {

  val indentationLogger: IndentationLogger = IndentationLogger("lore.compiler.typing")
  val logger: Logger = Logger(indentationLogger)
  val loggerBlank: Logger = Logger("lore.compiler.typing.blank")

  def traceExpressionType(expression: Expression, label: String, additional: String = ""): Unit = {
    logger.whenTraceEnabled {
      logger.trace(s"$label type ${expression.tpe} for `${expression.position.truncatedCode}`.$additional")
    }
  }

}
{'fraction_non_alphanumeric': 0.10600706713780919, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 4.7560975609756095, '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': '6432220', 'n_tokens_mistral': 404, 'n_tokens_neox': 391, 'n_words': 96}