Rename toGlobalContext to fromModuleToGlobal

This commit is contained in:
Jeroen Engels 2020-01-01 20:37:22 +01:00
parent 9cc72c659f
commit 1d1e2d7f27
2 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ rule =
, context =
{ initGlobalContext = initGlobalContext
, initModuleContext = initModuleContext
, toGlobalContext = toGlobalContext
, fromModuleToGlobal = fromModuleToGlobal
, fold = fold
}
, finalEvaluation = finalEvaluationForProject
@ -95,8 +95,8 @@ initModuleContext _ _ _ =
}
toGlobalContext : Rule.FileKey -> Node ModuleName -> ModuleContext -> GlobalContext
toGlobalContext fileKey moduleName moduleContext =
fromModuleToGlobal : Rule.FileKey -> Node ModuleName -> ModuleContext -> GlobalContext
fromModuleToGlobal fileKey moduleName moduleContext =
{ modules =
Dict.singleton
(Node.value moduleName)

View File

@ -536,7 +536,7 @@ type MultiSchema globalContext moduleContext
, context :
{ initGlobalContext : globalContext
, initModuleContext : FileKey -> Node ModuleName -> globalContext -> moduleContext
, toGlobalContext : FileKey -> Node ModuleName -> moduleContext -> globalContext
, fromModuleToGlobal : FileKey -> Node ModuleName -> moduleContext -> globalContext
, fold : globalContext -> globalContext -> globalContext
}
, elmJsonVisitors : List (Maybe Elm.Project.Project -> globalContext -> globalContext)
@ -555,7 +555,7 @@ newMultiSchema :
, context :
{ initGlobalContext : globalContext
, initModuleContext : FileKey -> Node ModuleName -> globalContext -> moduleContext
, toGlobalContext : FileKey -> Node ModuleName -> moduleContext -> globalContext
, fromModuleToGlobal : FileKey -> Node ModuleName -> moduleContext -> globalContext
, fold : globalContext -> globalContext -> globalContext
}
, finalEvaluation : globalContext -> List Error
@ -660,7 +660,7 @@ runMulti (MultiSchema schema) startCache project =
{ source = file.source
, errors = List.map (\(Error err) -> Error { err | filePath = file.path }) fileErrors
, context =
schema.context.toGlobalContext
schema.context.fromModuleToGlobal
fileKey
moduleNameNode_
context