diff --git a/src/Cryptol/TypeCheck/Infer.hs b/src/Cryptol/TypeCheck/Infer.hs index 687d063c..98eb5e29 100644 --- a/src/Cryptol/TypeCheck/Infer.hs +++ b/src/Cryptol/TypeCheck/Infer.hs @@ -140,8 +140,9 @@ appTys expr ts tGoal = P.ETyped {} -> mono P.ETypeVal {} -> mono P.EFun {} -> mono - P.EParens {} -> tcPanic "appTys" [ "Unexpected EParens" ] - P.EInfix {} -> tcPanic "appTys" [ "Unexpected EInfix" ] + + P.EParens e -> appTys e ts tGoal + P.EInfix a op _ b -> appTys (P.EVar (thing op) `P.EApp` a `P.EApp` b) ts tGoal where mono = do e' <- checkE expr tGoal (ie,t) <- instantiateWith e' (Forall [] [] tGoal) ts diff --git a/tests/issues/issue322.icry b/tests/issues/issue322.icry new file mode 100644 index 00000000..bc51918a --- /dev/null +++ b/tests/issues/issue322.icry @@ -0,0 +1 @@ +:t (split`{a=[3]})`{3} diff --git a/tests/issues/issue322.icry.stdout b/tests/issues/issue322.icry.stdout new file mode 100644 index 00000000..2ce58fcf --- /dev/null +++ b/tests/issues/issue322.icry.stdout @@ -0,0 +1,4 @@ +Loading module Cryptol + +[error] at :1:2--1:7: + Named and positional type applications may not be mixed.