refactor Naming_global.type_canon_pos
Summary:
Look at this code:
```
let type_canon_pos ctx name =
let name2 = Option.value (type_canon_name ctx name1) ~default:name1 in
let pos_opt = type_pos ctx name2 in
pos_opt
```
1. It looks up the naming-table to see if there's a canonical casing for name1
2. If there was a canonical casing name2, it looks up in the naming table to find name2's position
3. If the name was absent from the naming table, then it makes a futile lookup of the naming table to find name1's position
I don't know why the code was written this way. If nothing was found in the naming table in step1, there's no point in looking it up in step 3. The code should have been written
```
type_canon_name ctx name |> Option.bind ~f:(type_pos ctx)
```
That's all this diff does. Just minor cleanup. (Also, I moved the function out of being a top-level function, into an inline function in the only place it's used).
Reviewed By: CatherineGasnier
Differential Revision:
D27420750
fbshipit-source-id:
a1e608c6d8149021d27b947cc534d640e45c446e