diff options
author | Mario Blažević <blamario@protonmail.com> | 2021-03-07 12:01:56 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-21 02:47:25 -0400 |
commit | 10124b16538091806953d732e24ca485a0664895 (patch) | |
tree | 179bba83b2daccb63cad2b8d6288209b614ec77d /compiler/GHC/ThToHs.hs | |
parent | 5b157eb2bea7fc4ad654c83258cf1ab6ad0f85f0 (diff) | |
download | haskell-10124b16538091806953d732e24ca485a0664895.tar.gz |
template-haskell: Add support for default declarations
Fixes #19373
Diffstat (limited to 'compiler/GHC/ThToHs.hs')
-rw-r--r-- | compiler/GHC/ThToHs.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index e452841f7a..8d3df10185 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -226,6 +226,10 @@ cvtDec (TH.InfixD fx nm) ; returnJustLA (Hs.SigD noExtField (FixSig noAnn (FixitySig noExtField [nm'] (cvtFixity fx)))) } +cvtDec (TH.DefaultD tys) + = do { tys' <- traverse cvtType tys + ; returnJustLA (Hs.DefD noExtField $ DefaultDecl noAnn tys') } + cvtDec (PragmaD prag) = cvtPragmaD prag |