Remove some redundant declarations.

This commit is contained in:
Dillon Kearns 2022-02-10 08:46:52 -08:00
parent 92abb27596
commit 49e8360030

View File

@ -113,6 +113,17 @@ nextStep :
-> ( StaticResponses, NextStep route )
nextStep ({ allRawResponses, errors } as model) maybeRoutes =
let
staticRequestsStatus : StaticHttpRequest.Status ()
staticRequestsStatus =
allRawResponses
|> StaticHttpRequest.cacheRequestResolution request
request : DataSource ()
request =
case staticResponses of
NotFetched request_ _ ->
request_
staticResponses : StaticHttpResult
staticResponses =
case model.staticResponses of
@ -128,13 +139,8 @@ nextStep ({ allRawResponses, errors } as model) maybeRoutes =
pendingRequests : Bool
pendingRequests =
case staticResponses of
NotFetched request rawResponses ->
NotFetched _ rawResponses ->
let
staticRequestsStatus : StaticHttpRequest.Status ()
staticRequestsStatus =
allRawResponses
|> StaticHttpRequest.cacheRequestResolution request
hasPermanentError : Bool
hasPermanentError =
case staticRequestsStatus of
@ -177,15 +183,8 @@ nextStep ({ allRawResponses, errors } as model) maybeRoutes =
True
in
if pendingRequests then
let
requestContinuations : DataSource ()
requestContinuations =
case staticResponses of
NotFetched request _ ->
request
in
case
performStaticHttpRequests allRawResponses requestContinuations
performStaticHttpRequests allRawResponses request
of
urlsToPerform ->
let
@ -229,19 +228,7 @@ nextStep ({ allRawResponses, errors } as model) maybeRoutes =
let
failedRequests : List BuildError
failedRequests =
case staticResponses of
NotFetched request _ ->
let
staticRequestsStatus : StaticHttpRequest.Status ()
staticRequestsStatus =
StaticHttpRequest.cacheRequestResolution
request
usableRawResponses
usableRawResponses : RequestsAndPending
usableRawResponses =
allRawResponses
maybePermanentError : Maybe StaticHttpRequest.Error
maybePermanentError =
case staticRequestsStatus of
@ -308,19 +295,7 @@ nextStep ({ allRawResponses, errors } as model) maybeRoutes =
let
failedRequests : List BuildError
failedRequests =
case staticResponses of
NotFetched request _ ->
let
staticRequestsStatus : StaticHttpRequest.Status ()
staticRequestsStatus =
StaticHttpRequest.cacheRequestResolution
request
usableRawResponses
usableRawResponses : RequestsAndPending
usableRawResponses =
allRawResponses
maybePermanentError : Maybe StaticHttpRequest.Error
maybePermanentError =
case staticRequestsStatus of