Commit 173dd12c authored by audreyt@audreyt.org's avatar audreyt@audreyt.org

In tcSplittyConApp_maybe, add the PredTy case

such that this can compile again:

    newtype Moose = MkMoose () deriving (Eq, Ord)
parent f35cbb25
......@@ -712,6 +712,8 @@ tcSplitTyConApp_maybe :: Type -> Maybe (TyCon, [Type])
tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty'
tcSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
tcSplitTyConApp_maybe (AppTy arg res) = Just (funTyCon, [arg,res])
tcSplitTyConApp_maybe (PredTy (ClassP _ [ty'])) = tcSplitTyConApp_maybe ty'
-- Newtypes are opaque, so they may be split
-- However, predicates are not treated
-- as tycon applications by the type checker
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment