diff --git a/patches/free-5.1.2.patch b/patches/free-5.1.2.patch index c89a2df9fe5f5228dc4e1c2f926ec6bec4e2cfff..0db32c77fb2475f8030a884a55f592b5c4c122c4 100644 --- a/patches/free-5.1.2.patch +++ b/patches/free-5.1.2.patch @@ -1,10 +1,15 @@ diff --git a/src/Control/Monad/Free/TH.hs b/src/Control/Monad/Free/TH.hs -index 1a5ace9..856bb39 100644 +index 1a5ace9..225de20 100644 --- a/src/Control/Monad/Free/TH.hs +++ b/src/Control/Monad/Free/TH.hs -@@ -112,7 +112,13 @@ mkArg (VarT n) t +@@ -110,9 +110,17 @@ mkArg (VarT n) t + [ "expected final return type `" ++ pprint n ++ "'" + , "but got `" ++ pprint name ++ "'" , "in a constructor's argument type: `" ++ pprint t ++ "'" ] - let tup = foldl AppT (TupleT $ length ts) ts +- let tup = foldl AppT (TupleT $ length ts) ts ++ let tup = case ts of ++ [t'] -> t' ++ _ -> foldl AppT (TupleT $ length ts) ts xs <- mapM (const $ newName "x") ts - return $ Captured tup (LamE (map VarP xs) (TupE (map VarE xs))) + return $ Captured tup (LamE (map VarP xs) (TupE (map