<commit_before>port module Todo.MainHelp exposing (..)

import Context
import Document
import Document.Types exposing (DocId, getDocId)
import DomPorts exposing (autoFocusInputCmd, autoFocusInputRCmd)
import Entity.Types exposing (Entity(..), EntityListViewType(ContextsView), GroupEntityType(..))
import ExclusiveMode.Types exposing (ExclusiveMode(XMTodoForm))
import GroupDoc.Types exposing (ContextStore, ProjectStore)
import Lazy exposing (Lazy)
import Model.TodoStore exposing (findTodoById, todoStore)
import Set exposing (Set)
import Store
import Time exposing (Time)
import Todo.Form
import Todo.FormTypes exposing (..)
import Todo.MainHelpPort exposing (..)
import Todo.Notification.Model
import Todo.Notification.Types exposing (TodoReminderOverlayModel)
import Tuple2
import ViewType exposing (ViewType)
import X.Record as Record exposing (overT2, set)
import X.Return exposing (rAndThenMaybe, returnWith)
import X.Time
import Notification
import Return exposing (andThen, command, map)
import Todo
import Toolkit.Helpers exposing (..)
import Toolkit.Operators exposing (..)
import X.Function.Infix exposing (..)
import List.Extra as List
import Maybe.Extra as Maybe
import Todo.TimeTracker as Tracker
import Todo.Types exposing (TodoAction(..), TodoStore)
import X.Function exposing (applyMaybeWith)


type alias SubModel model =
    { model
        | now : Time
        , todoStore : TodoStore
        , projectStore : ProjectStore
        , contextStore : ContextStore
        , reminderOverlay : TodoReminderOverlayModel
        , timeTracker : Tracker.Model
        , mainViewType : ViewType
        , focusInEntity : Entity
        , selectedEntityIdSet : Set DocId
    }


type alias SubReturn msg model =
    Return.Return msg (SubModel model)


type alias SubReturnF msg model =
    SubReturn msg model -> SubReturn msg model


type alias Config msg model =
    { switchToContextsView : SubReturnF msg model
    , setFocusInEntityWithTodoId : DocId -> SubReturnF msg model
    , setFocusInEntity : Entity -> SubReturnF msg model
    , closeNotification : String -> SubReturnF msg model
    , afterTodoUpdate : SubReturnF msg model
    , setXMode : ExclusiveMode -> SubReturnF msg model
    , currentViewEntityList : Lazy (List Entity)
    }


findAndUpdateAllTodos findFn action model =<commit_msg>* try to reduce elm compile time<commit_after>port module Todo.MainHelp exposing (..)

import Context
import Document
import Document.Types exposing (DocId, getDocId)
import DomPorts exposing (autoFocusInputCmd, autoFocusInputRCmd)
import Entity.Types exposing (Entity(..), EntityListViewType(ContextsView), GroupEntityType(..))
import ExclusiveMode.Types exposing (ExclusiveMode(XMTodoForm))
import Lazy exposing (Lazy)
import Model.TodoStore exposing (findTodoById, todoStore)
import Set exposing (Set)
import Store
import Time exposing (Time)
import Todo.Form
import Todo.FormTypes exposing (..)
import Todo.MainHelpPort exposing (..)
import Todo.Notification.Model
import Todo.Notification.Types exposing (TodoReminderOverlayModel)
import Tuple2
import X.Record as Record exposing (overT2, set)
import X.Return exposing (rAndThenMaybe, returnWith)
import X.Time
import Notification
import Return exposing (andThen, command, map)
import Todo
import Toolkit.Helpers exposing (..)
import Toolkit.Operators exposing (..)
import X.Function.Infix exposing (..)
import List.Extra as List
import Maybe.Extra as Maybe
import Todo.TimeTracker as Tracker
import Todo.Types exposing (TodoAction(..), TodoStore)
import X.Function exposing (applyMaybeWith)


type alias SubModel model =
    { model
        | now : Time
        , todoStore : TodoStore
        , reminderOverlay : TodoReminderOverlayModel
        , timeTracker : Tracker.Model
        , focusInEntity : Entity
        , selectedEntityIdSet : Set DocId
    }


type alias SubReturn msg model =
    Return.Return msg (SubModel model)


type alias SubReturnF msg model =
    SubReturn msg model -> SubReturn msg model


type alias Config msg model =
    { switchToContextsView : SubReturnF msg model
    , setFocusInEntityWithTodoId : DocId -> SubReturnF msg model
    , setFocusInEntity : Entity -> SubReturnF msg model
    , closeNotification : String -> SubReturnF msg model
    , afterTodoUpdate : SubReturnF msg model
    , setXMode : ExclusiveMode -> SubReturnF msg model
    , currentViewEntityList : Lazy (List Entity)
    }


findAndUpdateAllTodos findFn action model =
{'fraction_non_alphanumeric': 0.07260058440098899, 'fraction_numerical': 0.0008990784445942908, 'mean_word_length': 4.266272189349112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5598407', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1233, 'n_words': 413}