diff --git a/ghcide/src/Development/IDE/GHC/Compat/Core.hs b/ghcide/src/Development/IDE/GHC/Compat/Core.hs index 9d4cf17e6fb..4a83901103d 100644 --- a/ghcide/src/Development/IDE/GHC/Compat/Core.hs +++ b/ghcide/src/Development/IDE/GHC/Compat/Core.hs @@ -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 @@ -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