some GHC 8.0.1 fixes
This commit is contained in:
parent
66c6379945
commit
22318105ae
@ -134,7 +134,7 @@ getSignature modSum lineNo colNo = do
|
|||||||
Just (clsName,loc) -> obtainClassInfo minfo clsName loc
|
Just (clsName,loc) -> obtainClassInfo minfo clsName loc
|
||||||
_ -> return Nothing
|
_ -> return Nothing
|
||||||
#if __GLASGOW_HASKELL__ >= 800
|
#if __GLASGOW_HASKELL__ >= 800
|
||||||
[L loc (G.TyClD (G.FamDecl (G.FamilyDecl info (L _ name) (G.HsQTvs _ vars) _ _)))] -> do
|
[L loc (G.TyClD (G.FamDecl (G.FamilyDecl info (L _ name) (G.HsQTvs _ vars _) _ _)))] -> do
|
||||||
#elif __GLASGOW_HASKELL__ >= 708
|
#elif __GLASGOW_HASKELL__ >= 708
|
||||||
[L loc (G.TyClD (G.FamDecl (G.FamilyDecl info (L _ name) (G.HsQTvs _ vars) _)))] -> do
|
[L loc (G.TyClD (G.FamDecl (G.FamilyDecl info (L _ name) (G.HsQTvs _ vars) _)))] -> do
|
||||||
#elif __GLASGOW_HASKELL__ >= 706
|
#elif __GLASGOW_HASKELL__ >= 706
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{-# LANGUAGE TupleSections, FlexibleInstances, Rank2Types, ImpredicativeTypes #-}
|
-- TODO: remove CPP once Gap(ed)
|
||||||
|
{-# LANGUAGE CPP, TupleSections, FlexibleInstances, Rank2Types, ImpredicativeTypes #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|
||||||
module Language.Haskell.GhcMod.SrcUtils where
|
module Language.Haskell.GhcMod.SrcUtils where
|
||||||
@ -106,7 +107,12 @@ collectSpansTypes withConstraints tcs lc =
|
|||||||
-- list of constraints
|
-- list of constraints
|
||||||
preds = concatMap fst ctys
|
preds = concatMap fst ctys
|
||||||
-- Type variable substitutions
|
-- Type variable substitutions
|
||||||
|
#if __GLASGOW_HASKELL__ >= 800
|
||||||
|
-- TODO: move to Gap
|
||||||
|
subs = G.mkTvSubstPrs $ concatMap snd ctys
|
||||||
|
#else
|
||||||
subs = G.mkTopTvSubst $ concatMap snd ctys
|
subs = G.mkTopTvSubst $ concatMap snd ctys
|
||||||
|
#endif
|
||||||
-- Constrained type
|
-- Constrained type
|
||||||
ty = G.substTy subs $ G.mkFunTys preds genTyp
|
ty = G.substTy subs $ G.mkFunTys preds genTyp
|
||||||
in [(spn, ty)]
|
in [(spn, ty)]
|
||||||
|
@ -133,7 +133,7 @@ boundNames decl =
|
|||||||
#endif
|
#endif
|
||||||
map ((,) TcClsName) (conNames ctor)
|
map ((,) TcClsName) (conNames ctor)
|
||||||
|
|
||||||
InstanceD _ _ty _ ->
|
InstanceD {} -> -- _ _ty _
|
||||||
error "notcpp: Instance declarations are not supported yet"
|
error "notcpp: Instance declarations are not supported yet"
|
||||||
ForeignD _ ->
|
ForeignD _ ->
|
||||||
error "notcpp: Foreign declarations are not supported yet"
|
error "notcpp: Foreign declarations are not supported yet"
|
||||||
|
Loading…
Reference in New Issue
Block a user