summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/hsSyn/Convert.lhs13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs
index 616e05c9de..59cbc7b24c 100644
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@ -480,6 +480,19 @@ cvtPragmaD (RuleP nm bndrs lhs rhs phases)
rhs' placeHolderNames
}
+cvtPragmaD (AnnP target exp)
+ = do { exp' <- cvtl exp
+ ; target' <- case target of
+ ModuleAnnotation -> return ModuleAnnProvenance
+ TypeAnnotation n -> do
+ n' <- tconName n
+ return (TypeAnnProvenance n')
+ ValueAnnotation n -> do
+ n' <- if isVarName n then vName n else cName n
+ return (ValueAnnProvenance n')
+ ; returnL $ Hs.AnnD $ HsAnnotation target' exp'
+ }
+
dfltActivation :: TH.Inline -> Activation
dfltActivation TH.NoInline = NeverActive
dfltActivation _ = AlwaysActive