@@ -358,10 +358,10 @@ moduleToCpp otherOpts env (Module _ mn imps _ foreigns decls) = do
358 valueToCpp (Var (_, _, _, Just IsNewtype) ident) = return $ varToCpp ident
358 valueToCpp (Var (_, _, _, Just IsNewtype) ident) = return $ varToCpp ident
359 valueToCpp (Var (_, _, _, Just (IsConstructor _ [])) ident) = return $ CppApp (varToCpp ident) []
359 valueToCpp (Var (_, _, _, Just (IsConstructor _ [])) ident) = return $ CppApp (varToCpp ident) []
360 valueToCpp (Var (_, _, Just ty, _) ident@(Qualified (Just _) _))
360 valueToCpp (Var (_, _, Just ty, _) ident@(Qualified (Just _) _))
361− | arity ty > 0 = return . curriedName' $ varToCpp ident
361+ | arity ty > 0 = return . curriedVar $ varToCpp ident
362 valueToCpp (Var (_, _, Nothing, _) ident@(Qualified (Just _) _))
362 valueToCpp (Var (_, _, Nothing, _) ident@(Qualified (Just _) _))
363 | Just (ty, _, _) <- M.lookup ident (E.names env)
363 | Just (ty, _, _) <- M.lookup ident (E.names env)
364− , arity ty > 0 = return . curriedName' $ varToCpp ident
364+ , arity ty > 0 = return . curriedVar $ varToCpp ident
365 valueToCpp (Var _ ident) = return $ varToCpp ident
365 valueToCpp (Var _ ident) = return $ varToCpp ident
366 valueToCpp (Literal _ (NumericLiteral n)) = return (CppNumericLiteral n)
366 valueToCpp (Literal _ (NumericLiteral n)) = return (CppNumericLiteral n)
367 valueToCpp (Literal _ (StringLiteral s)) = return (CppStringLiteral s)
367 valueToCpp (Literal _ (StringLiteral s)) = return (CppStringLiteral s)
@@ -410,7 +410,7 @@ moduleToCpp otherOpts env (Module _ mn imps _ foreigns decls) = do
411 (CppSymbol . mkString <$> (sort $ superClassDictionaryNames constraints) ++ (fst <$> fns))
411 (CppSymbol . mkString <$> (sort $ superClassDictionaryNames constraints) ++ (fst <$> fns))
413− Var _ (Qualified (Just _) _) -> applied f args' curriedName'
413+ Var _ (Qualified (Just _) _) -> applied f args' curriedVar
414 _ -> applied f args' id
414 _ -> applied f args' id
416 applied f args g = flip (foldl (\fn a -> CppApp (g fn) [a])) args <$> valueToCpp f
416 applied f args g = flip (foldl (\fn a -> CppApp (g fn) [a])) args <$> valueToCpp f
@@ -745,20 +745,11 @@ optIndexers classes = everywhereOnCpp dictIndexerToEnum
745 dictIndexerToEnum cpp = cpp
745 dictIndexerToEnum cpp = cpp
747---------------------------------------------------------------------------------------------------
747---------------------------------------------------------------------------------------------------
748−curriedName :: Text -> Text
748+curriedVar :: Cpp -> Cpp
749---------------------------------------------------------------------------------------------------
749---------------------------------------------------------------------------------------------------
751− | Text.null name = name
753− | Text.head name == '*' = name
754− | otherwise = '*' `Text.cons` name
756−---------------------------------------------------------------------------------------------------
757−curriedName' :: Cpp -> Cpp
758−---------------------------------------------------------------------------------------------------
759−curriedName' (CppVar name) = CppVar (curriedName name)
750+curriedVar (CppVar name) = CppVar (curriedName name)
760−curriedName' (CppAccessor a b) = CppAccessor (curriedName' a) b
751+curriedVar (CppAccessor a b) = CppAccessor (curriedVar a) b
761−curriedName' cpp = cpp
752+curriedVar cpp = cpp
763---------------------------------------------------------------------------------------------------
754---------------------------------------------------------------------------------------------------
764primFn :: T.Type -> ([CppType], Maybe CppType)
755primFn :: T.Type -> ([CppType], Maybe CppType)