mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-16 19:40:22 +03:00
Apply simplifications
This commit is contained in:
parent
fceaaf33e2
commit
1db1a05c69
@ -83,9 +83,11 @@ rememberBadAlias { lookupAlias, canMissAliases } (Node moduleNameRange moduleNam
|
|||||||
|
|
||||||
moduleCallVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
moduleCallVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
||||||
moduleCallVisitor node context =
|
moduleCallVisitor node context =
|
||||||
case Node.value node of
|
let
|
||||||
( moduleName, function ) ->
|
( moduleName, function ) =
|
||||||
( [], Context.addModuleCall moduleName function (Node.range node) context )
|
Node.value node
|
||||||
|
in
|
||||||
|
( [], Context.addModuleCall moduleName function (Node.range node) context )
|
||||||
|
|
||||||
|
|
||||||
finalEvaluation : Options.AliasLookup -> Context.Module -> List (Error {})
|
finalEvaluation : Options.AliasLookup -> Context.Module -> List (Error {})
|
||||||
|
@ -124,28 +124,32 @@ rememberExposedNames { moduleName, moduleAlias, exposingList } context =
|
|||||||
|
|
||||||
valueVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
valueVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
||||||
valueVisitor node context =
|
valueVisitor node context =
|
||||||
case Node.value node of
|
let
|
||||||
( moduleName, name ) ->
|
( moduleName, name ) =
|
||||||
if Context.isFunctionExposed context moduleName name then
|
Node.value node
|
||||||
( [ moduleOnExposedValueError name (Node.range node) ]
|
in
|
||||||
, context
|
if Context.isFunctionExposed context moduleName name then
|
||||||
)
|
( [ moduleOnExposedValueError name (Node.range node) ]
|
||||||
|
, context
|
||||||
|
)
|
||||||
|
|
||||||
else
|
else
|
||||||
( [], context )
|
( [], context )
|
||||||
|
|
||||||
|
|
||||||
typeVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
typeVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
||||||
typeVisitor node context =
|
typeVisitor node context =
|
||||||
case Node.value node of
|
let
|
||||||
( moduleName, name ) ->
|
( moduleName, name ) =
|
||||||
if Context.isTypeExposed context moduleName name then
|
Node.value node
|
||||||
( [ moduleOnExposedTypeError name (Node.range node) ]
|
in
|
||||||
, context
|
if Context.isTypeExposed context moduleName name then
|
||||||
)
|
( [ moduleOnExposedTypeError name (Node.range node) ]
|
||||||
|
, context
|
||||||
|
)
|
||||||
|
|
||||||
else
|
else
|
||||||
( [], context )
|
( [], context )
|
||||||
|
|
||||||
|
|
||||||
moduleOnExposedValueError : String -> Range -> Error {}
|
moduleOnExposedValueError : String -> Range -> Error {}
|
||||||
|
Loading…
Reference in New Issue
Block a user