Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Dec 15, 2016
1 parent 7f86562 commit 90f4fc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fsharp/NameResolution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,9 @@ let rec CollectAtMostOneResult f = function
| [] -> NoResultsOrUsefulErrors
| [h] -> OneResult (f h)
| h :: t ->
match OneResult (f h) with
| Result r when not (isNil r) -> Result r
| r -> AddResults r (CollectAtMostOneResult f t)
match f h with
| Result r -> Result [r]
| Exception e -> AddResults (Exception e) (CollectAtMostOneResult f t)

let CollectResults2 atMostOne f = if atMostOne then CollectAtMostOneResult f else CollectResults f

Expand Down

0 comments on commit 90f4fc8

Please sign in to comment.