projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify TcSimplify, by removing Free
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcRnTypes.lhs
diff --git
a/compiler/typecheck/TcRnTypes.lhs
b/compiler/typecheck/TcRnTypes.lhs
index
d01710c
..
42f4ff4
100644
(file)
--- a/
compiler/typecheck/TcRnTypes.lhs
+++ b/
compiler/typecheck/TcRnTypes.lhs
@@
-30,7
+30,7
@@
module TcRnTypes(
-- Insts
Inst(..), InstOrigin(..), InstLoc(..),
pprInstLoc, pprInstArising, instLocSpan, instLocOrigin,
-- 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
plusLIEs, mkLIE, isEmptyLIE, lieToList, listToLIE,
-- Misc other types
@@
-726,6
+726,12
@@
functions that deal with it.
-------------------------------------------
data InstLoc = InstLoc InstOrigin SrcSpan ErrCtxt
-------------------------------------------
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
instLocSpan :: InstLoc -> SrcSpan
instLocSpan (InstLoc _ s _) = s