Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Stricter code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc committed Nov 1, 2018
1 parent 385faeb commit c1e24ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Converter.re
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ let typToConverterOpaque =
| Not_found => exportTypeMapFromOtherFiles |> StringMap.find(s)
}
) {
| {annotation: GenTypeOpaque} => (IdentC, true)
| {annotation: NoGenType} => (IdentC, true)
| {typeVars, typ} =>
| {annotation: GenTypeOpaque, _} => (IdentC, true)
| {annotation: NoGenType, _} => (IdentC, true)
| {typeVars, typ, _} =>
let pairs =
try (List.combine(typeVars, typeArguments)) {
| Invalid_argument(_) => []
Expand Down
4 changes: 2 additions & 2 deletions src/EmitJs.re
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ let typeNameIsInterface =
| _ => false
};
switch (exportTypeMap |> StringMap.find(typeName)) {
| {typ} => typ |> typIsInterface
| {typ, _} => typ |> typIsInterface
| exception Not_found =>
switch (exportTypeMapFromOtherFiles |> StringMap.find(typeName)) {
| {typ} => typ |> typIsInterface
| {typ,_} => typ |> typIsInterface
| exception Not_found => false
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/TranslateStructure.re
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let rec addAnnotationsToTyps = (expr: Typedtree.expression, typs: list(typ)) =>
let (fields1, nextTyps1) =
addAnnotationsToFields(expr, fields, nextTyps);
[GroupOfLabeledArgs(fields1), ...nextTyps1];
| (Texp_function(_lbl, [{c_rhs}], _), [typ, ...nextTyps]) =>
| (Texp_function(_lbl, [{c_rhs, _}], _), [typ, ...nextTyps]) =>
let nextTyps1 = addAnnotationsToTyps(c_rhs, nextTyps);
[typ, ...nextTyps1];
| _ => typs
Expand All @@ -15,7 +15,7 @@ and addAnnotationsToFields =
(expr: Typedtree.expression, fields: fields, typs: list(typ)) =>
switch (expr.exp_desc, fields, typs) {
| (_, [], _) => ([], addAnnotationsToTyps(expr, typs))
| (Texp_function(_lbl, [{c_rhs}], _), [field, ...nextFields], _) =>
| (Texp_function(_lbl, [{c_rhs, _}], _), [field, ...nextFields], _) =>
let genTypeAsPayload =
expr.exp_attributes
|> Annotation.getAttributePayload(Annotation.tagIsGenTypeAs);
Expand Down

0 comments on commit c1e24ba

Please sign in to comment.