Visitar URL original
Partial support for ghc 8.6 · Pull Request #87 · hdevtools/hdevtools · GitHub
Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Info: handle MatchGroup seems to contain MatchGroupTc inside
  • Loading branch information
pacak committed Nov 7, 2018
commit 7079bca4c6cf80061e57459cff424dfa58a2563d
6 changes: 4 additions & 2 deletions src/Info.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ getSrcSpan (GHC.RealSrcSpan spn) =
, GHC.srcSpanEndCol spn)
getSrcSpan _ = Nothing

getTypeLHsBind :: GHC.TypecheckedModule -> GHC.LHsBind TypecheckI -> GHC.Ghc (Maybe (GHC.SrcSpan, GHC.Type))
getTypeLHsBind :: GHC.TypecheckedModule -> GHC.LHsBind TypecheckI
-> GHC.Ghc (Maybe (GHC.SrcSpan, GHC.Type))
#if __GLASGOW_HASKELL__ >= 708
getTypeLHsBind _ (GHC.L spn GHC.FunBind{GHC.fun_matches = grp}) = return $ Just (spn, HsExpr.mg_res_ty grp)
getTypeLHsBind _ (GHC.L spn GHC.FunBind{GHC.fun_matches = grp}) =
return $ Just (spn, HsExpr.mg_res_ty $ HsExpr.mg_ext grp)
#else
getTypeLHsBind _ (GHC.L spn GHC.FunBind{GHC.fun_matches = GHC.MatchGroup _ typ}) = return $ Just (spn, typ)
#endif
Expand Down