diff options
author | Zubin Duggal <zubin.duggal@gmail.com> | 2021-08-02 22:23:51 +0530 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2021-08-02 23:37:03 +0530 |
commit | 41eb56da86db5ccc63ba8bd93cef544513144aa0 (patch) | |
tree | a6f867bffb3a203f9da982d3f003da7fc2069cc6 /libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | |
parent | 34e352173dd1fc3cd86c49380fda5a4eb5dd7aef (diff) | |
download | haskell-wip/T20185.tar.gz |
Handle OverloadedRecordDot in TH (#20185)wip/T20185
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs')
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs index d921a60e6b..11e53ca701 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs @@ -366,6 +366,14 @@ labelE s = pure (LabelE s) implicitParamVarE :: Quote m => String -> m Exp implicitParamVarE n = pure (ImplicitParamVarE n) +getFieldE :: Quote m => m Exp -> String -> m Exp +getFieldE e f = do + e' <- e + pure (GetFieldE e' f) + +projectionE :: Quote m => [String] -> m Exp +projectionE xs = pure (ProjectionE xs) + -- ** 'arithSeqE' Shortcuts fromE :: Quote m => m Exp -> m Exp fromE x = do { a <- x; pure (ArithSeqE (FromR a)) } |