Skip to content

Commit

Permalink
Add HasSrcSpan instances
Browse files Browse the repository at this point in the history
  • Loading branch information
July541 committed May 23, 2022
1 parent ce83ac1 commit 9283e5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ghcide/src/Development/IDE/GHC/Compat/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ pattern L l a <- GHC.L (getLoc -> l) a
type HasSrcSpan = SrcLoc.HasSrcSpan
getLoc :: SrcLoc.HasSrcSpan a => a -> SrcLoc.SrcSpan
getLoc = SrcLoc.getLoc
instance HasSrcSpan SrcLoc.SrcSpan where
getLoc = id

#else

Expand All @@ -849,6 +851,8 @@ instance HasSrcSpan Name where
getLoc = nameSrcSpan
instance HasSrcSpan (SrcLoc.GenLocated SrcSpan a) where
getLoc = SrcLoc.getLoc
instance HasSrcSpan SrcSpan where
getLoc = id

#endif

Expand Down

0 comments on commit 9283e5f

Please sign in to comment.