Skip to content

Commit 2c8b751

Browse files
committed
Fix TyVar BndrVis
dhall-lang#2542 allowed `dhall` to compile with template-haskell-2.21 and GHC-9.8 by adapting to the addition of a binder visibility field on type variables. Previously all binders were taken to be required, but in GHC-9.8 the possibility of invisible binders was introduced. The above patch mistakenly set all binders generated by Dhall to be invisible, rather than default value of required. This changes the semantics of the code and broke some examples in the test suite. This patch fixes this by correctly setting binders to be BndrReq. Resolves dhall-lang#2567
1 parent 063357f commit 2c8b751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dhall/src/Dhall/TH.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ toDeclaration generateOptions@GenerateOptions{..} haskellTypes typ =
265265
interpretOptions = generateToInterpretOptions generateOptions typ
266266

267267
#if MIN_VERSION_template_haskell(2,21,0)
268-
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i)) Syntax.BndrInvis
268+
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i)) Syntax.BndrReq
269269
#elif MIN_VERSION_template_haskell(2,17,0)
270270
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i)) ()
271271
#else

0 commit comments

Comments
 (0)