<commit_before>{-# LANGUAGE TemplateHaskell #-}

module Main where

import           Safe                           ( headMay )
import           System.Environment             ( getArgs )
import qualified Unison.Codebase.FileCodebase  as FileCodebase
import qualified Unison.CommandLine.Main       as CommandLine
import qualified Unison.Runtime.Rt1IO          as Rt1
import qualified Unison.Codebase.Path          as Path
import qualified Version as Version


main :: IO ()
main = do
  args               <- getArgs
  -- hSetBuffering stdout NoBuffering -- cool
  (dir, theCodebase) <- FileCodebase.ensureCodebaseInitialized
  putStrLn $ "Version: " ++ Version.gitDescribe
  let initialPath = Path.absoluteEmpty
      launch      = CommandLine.main dir
                                     initialPath
                                     (headMay args)
                                     (pure Rt1.runtime)
                                     theCodebase
  launch<commit_msg>switch to `unison --version` to print version<commit_after>module Main where

import           Safe                           ( headMay )
import           System.Environment             ( getArgs )
import qualified Unison.Codebase.FileCodebase  as FileCodebase
import qualified Unison.CommandLine.Main       as CommandLine
import qualified Unison.Runtime.Rt1IO          as Rt1
import qualified Unison.Codebase.Path          as Path
import qualified Version as Version


main :: IO ()
main = do
  args               <- getArgs
  -- hSetBuffering stdout NoBuffering -- cool
  (dir, theCodebase) <- FileCodebase.ensureCodebaseInitialized
  let initialPath = Path.absoluteEmpty
      launch      = CommandLine.main dir
                                     initialPath
                                     (headMay args)
                                     (pure Rt1.runtime)
                                     theCodebase
  case args of
    ["--version"] -> putStrLn $ "ucm version: " ++ Version.gitDescribe
    _ -> launch
{'fraction_non_alphanumeric': 0.05897051474262868, 'fraction_numerical': 0.0029985007496251873, 'mean_word_length': 1.5932642487046633, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '952230', 'n_tokens_mistral': 492, 'n_tokens_neox': 478, 'n_words': 139}