Skip to content

Fix position/price_level type ambiguity in risk module - #18

Merged
SamoraDC merged 1 commit into
mainfrom
claude/fix-ocaml-build-errors-ZJjTT
Dec 12, 2025
Merged

Fix position/price_level type ambiguity in risk module#18
SamoraDC merged 1 commit into
mainfrom
claude/fix-ocaml-build-errors-ZJjTT

Conversation

@SamoraDC

Copy link
Copy Markdown
Owner

Add explicit type annotations to check_total_exposure and check_order functions for the 'positions' parameter. Both position and price_level types have a 'quantity' field, causing OCaml to infer the wrong type.

The explicit annotation ~(positions:position list) resolves the type mismatch error: "This expression has type Types.position list but an expression was expected of type Types.price_level list"

Add explicit type annotations to check_total_exposure and check_order
functions for the 'positions' parameter. Both position and price_level
types have a 'quantity' field, causing OCaml to infer the wrong type.

The explicit annotation ~(positions:position list) resolves the type
mismatch error: "This expression has type Types.position list but an
expression was expected of type Types.price_level list"
@SamoraDC
SamoraDC merged commit cfa5887 into main Dec 12, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants