mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-16 11:30:26 +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 context =
|
||||
case Node.value node of
|
||||
( moduleName, function ) ->
|
||||
( [], Context.addModuleCall moduleName function (Node.range node) context )
|
||||
let
|
||||
( moduleName, function ) =
|
||||
Node.value node
|
||||
in
|
||||
( [], Context.addModuleCall moduleName function (Node.range node) context )
|
||||
|
||||
|
||||
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 context =
|
||||
case Node.value node of
|
||||
( moduleName, name ) ->
|
||||
if Context.isFunctionExposed context moduleName name then
|
||||
( [ moduleOnExposedValueError name (Node.range node) ]
|
||||
, context
|
||||
)
|
||||
let
|
||||
( moduleName, name ) =
|
||||
Node.value node
|
||||
in
|
||||
if Context.isFunctionExposed context moduleName name then
|
||||
( [ moduleOnExposedValueError name (Node.range node) ]
|
||||
, context
|
||||
)
|
||||
|
||||
else
|
||||
( [], context )
|
||||
else
|
||||
( [], context )
|
||||
|
||||
|
||||
typeVisitor : Node ( ModuleName, String ) -> Context.Module -> ( List (Error {}), Context.Module )
|
||||
typeVisitor node context =
|
||||
case Node.value node of
|
||||
( moduleName, name ) ->
|
||||
if Context.isTypeExposed context moduleName name then
|
||||
( [ moduleOnExposedTypeError name (Node.range node) ]
|
||||
, context
|
||||
)
|
||||
let
|
||||
( moduleName, name ) =
|
||||
Node.value node
|
||||
in
|
||||
if Context.isTypeExposed context moduleName name then
|
||||
( [ moduleOnExposedTypeError name (Node.range node) ]
|
||||
, context
|
||||
)
|
||||
|
||||
else
|
||||
( [], context )
|
||||
else
|
||||
( [], context )
|
||||
|
||||
|
||||
moduleOnExposedValueError : String -> Range -> Error {}
|
||||
|
Loading…
Reference in New Issue
Block a user