summaryrefslogtreecommitdiff
path: root/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2021-09-28 15:30:13 +0530
committerZubin Duggal <zubin.duggal@gmail.com>2021-09-28 15:35:07 +0530
commit6a96a238c0673a8dc597e9e63801c7435f472989 (patch)
tree35a1576aa05e3b5c8d089d35658efa8c256ad98b /libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
parent26f24aeca7784f9f9a2a49bce42eaeb60b94d39f (diff)
downloadhaskell-wip/20389.tar.gz
Use 'NonEmpty' for the fields in an 'HsProjection' (#20389)wip/20389
Diffstat (limited to 'libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs')
-rw-r--r--libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
index 11e53ca701..0154c59d22 100644
--- a/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
+++ b/libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
@@ -23,6 +23,7 @@ import qualified Language.Haskell.TH.Syntax as TH
import Control.Applicative(liftA, liftA2)
import qualified Data.Kind as Kind (Type)
import Data.Word( Word8 )
+import Data.List.NonEmpty ( NonEmpty(..) )
import GHC.Exts (TYPE)
import Prelude
@@ -371,8 +372,8 @@ getFieldE e f = do
e' <- e
pure (GetFieldE e' f)
-projectionE :: Quote m => [String] -> m Exp
-projectionE xs = pure (ProjectionE xs)
+projectionE :: Quote m => NonEmpty String -> m Exp
+projectionE (x :| xs) = pure (ProjectionE x xs)
-- ** 'arithSeqE' Shortcuts
fromE :: Quote m => m Exp -> m Exp