summaryrefslogtreecommitdiff
path: root/compiler/utils/OutputableAnnotation.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-07-27 09:55:21 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2017-07-27 09:55:21 +0000
commit1a9aae88ec8f57393db4992748a7de08c54cfe61 (patch)
tree1bdea5c47394fb32b4cbaf5c7b5304fb183bdea4 /compiler/utils/OutputableAnnotation.hs
parent36b847896360d4e9b7ae86b4b1e664b8af476d2b (diff)
downloadhaskell-1a9aae88ec8f57393db4992748a7de08c54cfe61.tar.gz
Use NamedThing rather than just outputablebndr
Diffstat (limited to 'compiler/utils/OutputableAnnotation.hs')
-rw-r--r--compiler/utils/OutputableAnnotation.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/utils/OutputableAnnotation.hs b/compiler/utils/OutputableAnnotation.hs
index 71b9c69435..12a7bba9e6 100644
--- a/compiler/utils/OutputableAnnotation.hs
+++ b/compiler/utils/OutputableAnnotation.hs
@@ -3,18 +3,19 @@ module OutputableAnnotation (PExpr(..), BindType(..), varBinder, varReference) w
import CoreSyn
import Outputable ( OutputableBndr(..))
+import Name (NamedThing)
data PExpr where
- PCoreExpr :: OutputableBndr a => Expr a -> PExpr
- PBind :: OutputableBndr a => Bind a -> PExpr
- PVar :: OutputableBndr a => BindType -> a -> PExpr
+ PCoreExpr :: (OutputableBndr a, NamedThing a) => Expr a -> PExpr
+ PBind :: (OutputableBndr a, NamedThing a) => Bind a -> PExpr
+ PVar :: (OutputableBndr a, NamedThing a) => BindType -> a -> PExpr
data BindType = Binder | Reference
-varBinder :: OutputableBndr a => a -> PExpr
+varBinder :: (OutputableBndr a, NamedThing a) => a -> PExpr
varBinder a = PVar Binder a
-varReference :: OutputableBndr a => a -> PExpr
+varReference :: (OutputableBndr a, NamedThing a) => a -> PExpr
varReference a = PVar Reference a