<commit_before>{-|
Module      : Idris.REPL
Description : Entry Point for the Idris REPL and CLI.
License     : BSD3
Maintainer  : The Idris Community.
-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
             PatternGuards, CPP #-}
module Idris.REPL
  ( idemodeStart
  , startServer
  , runClient
  , process
  , replSettings
  , repl
  , proofs
  ) where

import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.Apropos (apropos, aproposModules)
import Idris.REPL.Parser
import Idris.Error
import Idris.IBC
import Idris.ErrReverse
import Idris.Delaborate
import Idris.Docstrings (overview, renderDocstring, renderDocTerm)
import Idris.Help
import Idris.IdrisDoc
import Idris.Prover
import Idris.Parser hiding (indent)
import Idris.Coverage
import Idris.Docs hiding (Doc)
import Idris.Completion
import qualified Idris.IdeMode as IdeMode
import Idris.Colours hiding (colourise)
import Idris.Inliner
import Idris.Output
import Idris.Interactive
import Idris.WhoCalls
import Idris.TypeSearch (searchByType)

import Idris.REPL.Browse (namesInNS, namespacesInNS)
import Idris.REPL.Commands

import Idris.ElabDecls
import Idris.Elab.Clause
import Idris.Elab.Value
import Idris.Elab.Term
import Idris.ModeCommon
import Idris.Info

import Version_idris (gitHash)
import Util.System
import Util.DynamicLinker
import Util.Net (listenOnLocalhost, listenOnLocalhostAnyPort)
import Util.Pretty hiding ((</>))

import Idris.Core.Evaluate
import Idris.Core.Execute (execute)
import Idris.Core.TT
import Idris.Core.Unify
import Idris.Core.WHNF
import Idris.Core.Constraints

import IRTS.Compiler

import Control.Category
import qualified Control.Exception as X
import Prelude hiding ((<$>), (.), id)
import Data.List.Split (splitOn)
import qualified Data.Text as T

import Text.Trifecta.Result(Result(..), ErrInfo(..))

import System.Console.Haskeline as H
import System.FilePath
import System.Exit
import System.Environment
import System.Process
import System.Directory
import System.IO
import Control.Monad
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Control.Monad.Trans.State.Strict ( StateT, execStateT, evalStateT, get, put )
import Control.Monad.Trans ( lift )
import Control.Concurrent.MVar
import Network
import Control.Concurrent
import Data.Maybe
import Data.List hiding (group)
import Data.Char
import qualified Data.Set as S
import Data.Version
import Data.Either (partitionEithers)
import Control.DeepSeq

import Control.Concurrent.Async (race)
import System.FSNotify (withManager, watchDir)
import System.FSNotify.Devel (allEvents, doAllEvents)<commit_msg>Work around GHCJS's patched export of isWindows from System.FilePath<commit_after>{-|
Module      : Idris.REPL
Description : Entry Point for the Idris REPL and CLI.
License     : BSD3
Maintainer  : The Idris Community.
-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
             PatternGuards, CPP #-}
module Idris.REPL
  ( idemodeStart
  , startServer
  , runClient
  , process
  , replSettings
  , repl
  , proofs
  ) where

import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.Apropos (apropos, aproposModules)
import Idris.REPL.Parser
import Idris.Error
import Idris.IBC
import Idris.ErrReverse
import Idris.Delaborate
import Idris.Docstrings (overview, renderDocstring, renderDocTerm)
import Idris.Help
import Idris.IdrisDoc
import Idris.Prover
import Idris.Parser hiding (indent)
import Idris.Coverage
import Idris.Docs hiding (Doc)
import Idris.Completion
import qualified Idris.IdeMode as IdeMode
import Idris.Colours hiding (colourise)
import Idris.Inliner
import Idris.Output
import Idris.Interactive
import Idris.WhoCalls
import Idris.TypeSearch (searchByType)

import Idris.REPL.Browse (namesInNS, namespacesInNS)
import Idris.REPL.Commands

import Idris.ElabDecls
import Idris.Elab.Clause
import Idris.Elab.Value
import Idris.Elab.Term
import Idris.ModeCommon
import Idris.Info

import Version_idris (gitHash)
import Util.System
import Util.DynamicLinker
import Util.Net (listenOnLocalhost, listenOnLocalhostAnyPort)
import Util.Pretty hiding ((</>))

import Idris.Core.Evaluate
import Idris.Core.Execute (execute)
import Idris.Core.TT
import Idris.Core.Unify
import Idris.Core.WHNF
import Idris.Core.Constraints

import IRTS.Compiler

import Control.Category
import qualified Control.Exception as X
import Prelude hiding ((<$>), (.), id)
import Data.List.Split (splitOn)
import qualified Data.Text as T

import Text.Trifecta.Result(Result(..), ErrInfo(..))

import System.Console.Haskeline as H
import System.FilePath
  ( (</>)
  , (<.>)
  , splitExtension
  , addExtension
  , dropExtension
  , takeExtension
  , takeDirectory
  )
import System.Exit
import System.Environment
import System.Process
import System.Directory
import System.IO
import Control.Monad
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Control.Monad.Trans.State.Strict ( StateT, execStateT, evalStateT, get, put )
import Control.Monad.Trans ( lift )
import Control.Concurrent.MVar
import Network
import Control.Concurrent
import Data.Maybe
import Data.List hiding (group)
import Data.Char
import qualified Data.Set as S
import Data.Version
import Data.Either (partitionEithers)
import Control.DeepSeq

import Control.Concurrent.Async (race)
import System.FSNotify (withManager, watchDir)
import System.FSNotify.Devel (allEvents, doAllEvents)
{'fraction_non_alphanumeric': 0.08105595835657185, 'fraction_numerical': 0.0003718163227365681, 'mean_word_length': 5.219653179190751, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7175051', 'n_tokens_mistral': 1802, 'n_tokens_neox': 1688, 'n_words': 478}