@@ -749,38 +749,38 @@ getConstraints pkg vsn =
749749 |> Task . bind
750750 ( \ guidaResult ->
751751 case guidaResult of
752- Err _ ->
753- Website . metadata pkg vsn " elm.json"
754- |> Task . bind
755- ( \ elmUrl ->
756- Http . get manager elmUrl [] identity ( Task . pure << Ok )
757- |> Task . bind
758- ( \ elmResult ->
759- case elmResult of
760- Err elmHttpProblem ->
761- Task . pure ( ISErr ( Exit . SolverBadHttp pkg vsn elmHttpProblem))
762-
763- Ok body ->
764- case D . fromByteString constraintsDecoder body of
765- Ok cs ->
766- Utils . dirCreateDirectoryIfMissing True home
767- |> Task . bind ( \ _ -> File . writeUtf8 elmPath body)
768- |> Task . fmap ( \ _ -> ISOk ( toNewState cs) cs)
769-
770- Err _ ->
771- Task . pure ( ISErr ( Exit . SolverBadHttpElmData pkg vsn elmUrl))
772- )
773- )
774-
775- Ok body ->
776- case D . fromByteString constraintsDecoder body of
752+ Err guidaHttpProblem ->
753+ Task . pure ( ISErr ( Exit . SolverBadHttp pkg vsn guidaHttpProblem))
754+
755+ Ok guidaBody ->
756+ case D . fromByteString constraintsDecoder guidaBody of
777757 Ok cs ->
778758 Utils . dirCreateDirectoryIfMissing True home
779- |> Task . bind ( \ _ -> File . writeUtf8 guidaPath body )
759+ |> Task . bind ( \ _ -> File . writeUtf8 guidaPath guidaBody )
780760 |> Task . fmap ( \ _ -> ISOk ( toNewState cs) cs)
781761
782762 Err _ ->
783- Task . pure ( ISErr ( Exit . SolverBadHttpGuidaData pkg vsn guidaUrl))
763+ Website . metadata pkg vsn " elm.json"
764+ |> Task . bind
765+ ( \ elmUrl ->
766+ Http . get manager elmUrl [] identity ( Task . pure << Ok )
767+ |> Task . bind
768+ ( \ elmResult ->
769+ case elmResult of
770+ Err elmHttpProblem ->
771+ Task . pure ( ISErr ( Exit . SolverBadHttp pkg vsn elmHttpProblem))
772+
773+ Ok elmBody ->
774+ case D . fromByteString constraintsDecoder elmBody of
775+ Ok cs ->
776+ Utils . dirCreateDirectoryIfMissing True home
777+ |> Task . bind ( \ _ -> File . writeUtf8 elmPath elmBody)
778+ |> Task . fmap ( \ _ -> ISOk ( toNewState cs) cs)
779+
780+ Err _ ->
781+ Task . pure ( ISErr ( Exit . SolverBadHttpElmData pkg vsn elmUrl))
782+ )
783+ )
784784 )
785785 )
786786 )
0 commit comments