on master help sign in
Fix bug with code that ensures that type annotations are right above their corresponding definition. Due to a lack of parens, the check only worked with one type annotation.
3c245edevancz
elm/src/Types/Alias.hs+1−1
@@ -122,7 +122,7 @@ badOrder stmts = map msg $ missings (sort $ expectedPairs as ds) (sort $ actualP
122 actualPairs stmts =
122 actualPairs stmts =
123 case stmts of
123 case stmts of
124 TypeAnnotation n _ : Definition d : rest ->
124 TypeAnnotation n _ : Definition d : rest ->
125− if n == defName d then [n] else [] ++ actualPairs rest
125+ (if n == defName d then [n] else []) ++ actualPairs rest
126 t:s:rest -> actualPairs (s:rest)
126 t:s:rest -> actualPairs (s:rest)
127 _ -> []
127 _ -> []
128
128