summaryrefslogtreecommitdiff
path: root/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2021-08-02 22:23:51 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-03 10:18:04 -0400
commit5155eafaef2d0cbecd58a808b5b357002a656ffe (patch)
tree18e7936f72992a67a5e36fd29b5d48b070049eee /libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
parentbd2874000ffa72f9d1f98b2223a37e6cc3c78567 (diff)
downloadhaskell-5155eafaef2d0cbecd58a808b5b357002a656ffe.tar.gz
Handle OverloadedRecordDot in TH (#20185)
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs8
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)) }