X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FdeSugar%2FDsBinds.lhs;h=764e44b470f53da5fdae3b20ff5b0833586ec337;hp=3df57d77a14d5426153ca05506beb80b7659acc0;hb=f16dbbbe59cf3aa19c5fd384560a1b89076d7bc8;hpb=78260da4deee97a866ba83f8d73a8284b371f405 diff --git a/compiler/deSugar/DsBinds.lhs b/compiler/deSugar/DsBinds.lhs index 3df57d7..764e44b 100644 --- a/compiler/deSugar/DsBinds.lhs +++ b/compiler/deSugar/DsBinds.lhs @@ -587,8 +587,11 @@ dsCoercion (WpLam id) thing_inside = do { expr <- thing_inside ; return (Lam id expr) } dsCoercion (WpTyLam tv) thing_inside = do { expr <- thing_inside ; return (Lam tv expr) } -dsCoercion (WpApp id) thing_inside = do { expr <- thing_inside - ; return (App expr (Var id)) } +dsCoercion (WpApp v) thing_inside + | isTyVar v = do { expr <- thing_inside + {- Probably a coercion var -} ; return (App expr (Type (mkTyVarTy v))) } + | otherwise = do { expr <- thing_inside + {- An Id -} ; return (App expr (Var v)) } dsCoercion (WpTyApp ty) thing_inside = do { expr <- thing_inside ; return (App expr (Type ty)) } dsCoercion WpInline thing_inside = do { expr <- thing_inside