X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnTypes.lhs;h=42f4ff43a67532515ccdfb43087ab5241788c16f;hp=d01710c9f4c7f66ff7a3095d76402560bc017662;hb=a3a15a646977ab98f9150bb2b926d960796077e4;hpb=831f57c9563981a2e785e64b5d308922bd2c5af3 diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index d01710c..42f4ff4 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -30,7 +30,7 @@ module TcRnTypes( -- Insts Inst(..), InstOrigin(..), InstLoc(..), pprInstLoc, pprInstArising, instLocSpan, instLocOrigin, - LIE, emptyLIE, unitLIE, plusLIE, consLIE, + LIE, emptyLIE, unitLIE, plusLIE, consLIE, instLoc, instSpan, plusLIEs, mkLIE, isEmptyLIE, lieToList, listToLIE, -- Misc other types @@ -726,6 +726,12 @@ functions that deal with it. ------------------------------------------- data InstLoc = InstLoc InstOrigin SrcSpan ErrCtxt +instLoc :: Inst -> InstLoc +instLoc inst = tci_loc inst + +instSpan :: Inst -> SrcSpan +instSpan wanted = instLocSpan (instLoc wanted) + instLocSpan :: InstLoc -> SrcSpan instLocSpan (InstLoc _ s _) = s