diff options
author | Greg Brown <greg.brown01@ed.ac.uk> | 2023-01-07 23:42:14 +0000 |
---|---|---|
committer | Greg Brown <greg.brown01@ed.ac.uk> | 2023-01-07 23:42:14 +0000 |
commit | 028685cef60b5d32e42a0951856e78f39165635a (patch) | |
tree | a7ce24acf65cbe9ed5e850345362cd047a27eb99 /src/Obs/Typing.idr | |
parent | eb49ef28b93431d9694a17b1ad44d9ea966bcb05 (diff) |
Correct typing of container extensions.
Diffstat (limited to 'src/Obs/Typing.idr')
-rw-r--r-- | src/Obs/Typing.idr | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Obs/Typing.idr b/src/Obs/Typing.idr index e8db1db..50c4824 100644 --- a/src/Obs/Typing.idr +++ b/src/Obs/Typing.idr @@ -432,10 +432,12 @@ infer' ctx (Sem {pred = MkLambda var pred, arg}) = do } (predSort, pred) <- inferType predCtx pred - let semSort = container.inputSort ~> max container.shapeSort (container.positionSort ~> predSort) - semType <- doSem container predSort pred arg + let semType = containerSemType container predSort + sem <- doSem container predSort pred arg - pure (succ semSort ** (cast semSort, semType)) + pure ((container.inputSort ~> + succ (max container.shapeSort (container.positionSort ~> predSort))) ** + (semType, sem)) infer' ctx Bool = do info "encountered bool" |