Skip to content

Commit 9283e5f

Browse files
committed
Add HasSrcSpan instances
1 parent ce83ac1 commit 9283e5f

File tree

1 file changed

+4
-0
lines changed
  • ghcide/src/Development/IDE/GHC/Compat

1 file changed

+4
-0
lines changed

ghcide/src/Development/IDE/GHC/Compat/Core.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,8 @@ pattern L l a <- GHC.L (getLoc -> l) a
840840
type HasSrcSpan = SrcLoc.HasSrcSpan
841841
getLoc :: SrcLoc.HasSrcSpan a => a -> SrcLoc.SrcSpan
842842
getLoc = SrcLoc.getLoc
843+
instance HasSrcSpan SrcLoc.SrcSpan where
844+
getLoc = id
843845

844846
#else
845847

@@ -849,6 +851,8 @@ instance HasSrcSpan Name where
849851
getLoc = nameSrcSpan
850852
instance HasSrcSpan (SrcLoc.GenLocated SrcSpan a) where
851853
getLoc = SrcLoc.getLoc
854+
instance HasSrcSpan SrcSpan where
855+
getLoc = id
852856

853857
#endif
854858

0 commit comments

Comments
 (0)