@@ -64,11 +64,9 @@ generateExp = prettyPrint . runExpression . fst . runGenerate
6464caseE :: ExpG x -> [(Pat, ExpG t)] -> ExpG t
6565caseE v alt = do
6666 v' <- v
67−#if MIN_VERSION_haskell_src_exts(1,17,0)
68− alt' <- mapM (\(p,a) -> fmap (\a' -> Alt noLoc p (UnGuardedRhs $ runExpression a') Nothing) a) alt
69−#elif MIN_VERSION_haskell_src_exts(1,16,0)
67+#if MIN_VERSION_haskell_src_exts(1,16,0)
7068 alt' <- mapM (\(p,a) -> fmap (\a' -> Alt noLoc p (UnGuardedRhs $ runExpression a') (BDecls [])) a) alt
71−#else
69+#else
7270 alt' <- mapM (\(p,a) -> fmap (\a' -> Alt noLoc p (UnGuardedAlt $ runExpression a') (BDecls [])) a) alt
7371#endif
7472 return $ Expression $ Case (runExpression v') alt'
@@ -214,7 +212,7 @@ instance GenExp (FunRef t) where
214212
215213-- | Generate a ExportSpec for a given function item.
216214exportFun :: FunRef t -> ExportSpec
217−#if MIN_VERSION_haskell_src_exts(1,16,0) && !MIN_VERSION_haskell_src_exts(1,17,0)
215+#if MIN_VERSION_haskell_src_exts(1,16,0)
218216exportFun (FunRef name) = EVar NoNamespace (UnQual name)
219217#else
220218exportFun (FunRef name) = EVar (UnQual name)
@@ -224,11 +222,7 @@ exportFun (FunRef name) = EVar (UnQual name)
224222addDecl :: Name -> ExpG t -> ModuleM (FunRef t)
225223addDecl name e = ModuleM $ do
226224 let (body, mods) = runGenerate e
227−#if MIN_VERSION_haskell_src_exts(1,17,0)
228− tell (mods, [FunBind [Match noLoc name [] Nothing (UnGuardedRhs $ runExpression body) Nothing]])
229−#else
230225 tell (mods, [FunBind [Match noLoc name [] Nothing (UnGuardedRhs $ runExpression body) $ BDecls []]])
231−#endif
232226 return $ FunRef name
233227
234228-- | Extract the Module from a module generator.