infer: Remove redundant checks for field selections and record projections (#1368)

… as pointed out by @MonoidMusician in #741.
This commit is contained in:
Simon Jakobi 2019-10-02 03:41:18 +02:00 committed by mergify[bot]
parent 75e6cc5ca7
commit a4b4cfb1b3

View File

@ -1107,8 +1107,6 @@ infer typer = loop
case _E' of
VRecord xTs' -> do
_ <- loop ctx _E''
case Dhall.Map.lookup x xTs' of
Just _T' -> return _T'
Nothing -> die (MissingField x _E'')
@ -1135,8 +1133,6 @@ infer typer = loop
case _E' of
VRecord xTs' -> do
_ <- loop ctx _E''
let process x =
case Dhall.Map.lookup x xTs' of
Just _T' -> return (x, _T')