@@ -19,6 +19,7 @@ import Idris.DeepSeq
1919import Idris.Output (iputStrLn, pshow, iWarn, iRenderResult)
2020import IRTS.Lang
2121
22+import Idris.Elab.AsPat
2223import Idris.Elab.Type
2324import Idris.Elab.Transform
2425import Idris.Elab.Utils
@@ -543,9 +544,10 @@ elabClause info opts (_, PClause fc fname lhs_in [] PImpossible [])
543544 (Msg $ show lhs_in ++ " is a valid case"))
544545 False -> do ptm <- mkPatTm lhs_in
545546 return (Left ptm, lhs)
546−elabClause info opts (cnum, PClause fc fname lhs_in withs rhs_in whereblock)
547+elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as whereblock)
547548 = do let tcgen = Dictionary `elem` opts
548549 ctxt <- getContext
550+ let (lhs_in, rhs_in) = desugarAs lhs_in_as rhs_in_as
549551
550552 -- Build the LHS as an "Infer", and pull out its type and
551553 -- pattern bindings