@@ -39,7 +39,7 @@ toHeader = catMaybes . map go
3939 go cpp@(CppUseNamespace{}) = Just cpp
4040 go (CppFunction _ _ _ qs _)
4141 | CppInline `elem` qs = Nothing
42− go (CppFunction _ [(_, atyp)] _ _ (CppBlock [CppReturn (CppApp _ [_])])) | atyp == Just CppAuto
42+ go (CppFunction _ [(_, atyp)] _ _ (CppBlock [CppReturn (CppApp _ [_])])) | atyp == Just (CppAuto [])
4343 = Nothing
4444 go (CppFunction name args rtyp qs _) =
4545 let args' = (\(_,t) -> ("", t)) <$> args in
@@ -58,7 +58,7 @@ toHeader = catMaybes . map go
5858 -- Generate thunks for top-level values
5959 go (CppVariableIntroduction (name, _) _ (Just cpp)) =
6060 case cpp of
61− CppObjectLiteral CppInstance vals ->
61+ CppObjectLiteral CppInstance _ ->
6262 Just $ CppFunction name [("", Just thunkMarkerType)] (Just $ CppAny [CppConst, CppRef]) [] CppNoOp
6363 _ ->
6464 Just $ CppVariableIntroduction (name, Just $ CppAny [CppConst]) [CppExtern] Nothing
@@ -81,7 +81,7 @@ toHeaderFns = catMaybes . map go
8181 go cpp@(CppFunction _ _ _ qs _)
8282 | CppInline `elem` qs = Just cpp
8383 go (CppFunction name [(_, atyp)] _ _ (CppBlock [CppReturn (CppApp cpp [_])]))
84− | atyp == Just CppAuto
84+ | Just CppAuto {} <- atyp
8585 = Just (CppVariableIntroduction (name, Nothing) [] (Just cpp))
8686 go cpp@(CppVariableIntroduction _ _ (Just CppNumericLiteral {})) =
8787 Just cpp
@@ -130,7 +130,7 @@ toBody = catMaybes . map go
130130 -- Generate thunks for top-level values
131131 go (CppVariableIntroduction (name, _) _ (Just cpp)) =
132132 case cpp of
133− CppObjectLiteral CppInstance vals ->
133+ CppObjectLiteral CppInstance _ ->
134134 Just $ CppFunction name [("", Just thunkMarkerType)] (Just $ CppAny [CppConst, CppRef]) [] block
135135 _ ->
136136 Just $ CppVariableIntroduction (name, Just $ CppAny [CppConst]) [] (Just lambda)