git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: update to 0.9.3
39204abAndy Arvanitis
purescript.cabal+1−1
@@ -491,7 +491,7 @@ executable psc-ide-client
491executable pcc
491executable pcc
492 build-depends: base >=4 && <5,
492 build-depends: base >=4 && <5,
493 purescript -any,
493 purescript -any,
494− aeson >= 0.8 && < 0.12,
494+ aeson -any,
495 ansi-terminal >= 0.6.2 && < 0.7,
495 ansi-terminal >= 0.6.2 && < 0.7,
496 base-compat >=0.6.0,
496 base-compat >=0.6.0,
497 bytestring -any,
497 bytestring -any,
src/Language/PureScript/CodeGen/Cpp.hs+4−4
@@ -169,7 +169,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
169 return (CppComment com fn)
169 return (CppComment com fn)
170 where
170 where
171 ty' | Just t <- ty = Just t
171 ty' | Just t <- ty = Just t
172− | Just (t, _, _) <- M.lookup (mn, ident) (E.names env) = Just t
172+ | Just (t, _, _) <- M.lookup (Qualified (Just mn) ident) (E.names env) = Just t
173 | otherwise = Nothing
173 | otherwise = Nothing
174 argcnt = maybe 0 countArgs ty'
174 argcnt = maybe 0 countArgs ty'
175 name = identToCpp ident
175 name = identToCpp ident
@@ -484,7 +484,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
484 return $ foldl (\fn a -> CppApp fn [a]) fn' curriedArgs
484 return $ foldl (\fn a -> CppApp fn [a]) fn' curriedArgs
485 where
485 where
486 ty | (_, _, Just t, _) <- ann = Just t
486 ty | (_, _, Just t, _) <- ann = Just t
487− | Just (t, _, _) <- M.lookup (mn', ident) (E.names env) = Just t
487+ | Just (t, _, _) <- M.lookup (Qualified (Just mn') ident) (E.names env) = Just t
488 | otherwise = Nothing
488 | otherwise = Nothing
489 _ ->
489 _ ->
490 flip (foldl (\fn a -> CppApp fn [a])) args' <$> valueToCpp f
490 flip (foldl (\fn a -> CppApp fn [a])) args' <$> valueToCpp f
@@ -810,8 +810,8 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
810 go _ = return []
810 go _ = return []
811
811
812 allForeigns :: [(Ident, T.Type)]
812 allForeigns :: [(Ident, T.Type)]
813− allForeigns = map (\((_, ident), (ty, _, _)) -> (ident, ty)) .
813+ allForeigns = map (\((Qualified _ ident), (ty, _, _)) -> (ident, ty)) .
814− filter (\((mn', _), (_, kind, _)) -> mn' == mn && kind == E.External) .
814+ filter (\((Qualified mn' _), (_, kind, _)) -> mn' == Just mn && kind == E.External) .
815 M.toList $ E.names env
815 M.toList $ E.names env
816
816
817---------------------------------------------------------------------------------------------------
817---------------------------------------------------------------------------------------------------
src/Language/PureScript/CodeGen/Cpp/AST.hs+3−3
@@ -53,7 +53,7 @@ data UnaryOperator
53 -- Constructor
53 -- Constructor
54 --
54 --
55 | New
55 | New
56− deriving (Show, Read, Eq)
56+ deriving (Show, Eq)
57
57
58-- |
58-- |
59-- Built-in binary operators
59-- Built-in binary operators
@@ -136,7 +136,7 @@ data BinaryOperator
136 --
136 --
137 | ShiftRight
137 | ShiftRight
138 --
138 --
139− deriving (Show, Read, Eq)
139+ deriving (Show, Eq)
140
140
141-- |
141-- |
142-- Data type for simplified C++11 expressions
142-- Data type for simplified C++11 expressions
@@ -282,7 +282,7 @@ data Cpp
282 -- Commented C++11
282 -- Commented C++11
283 --
283 --
284 | CppComment [Comment] Cpp
284 | CppComment [Comment] Cpp
285− deriving (Show, Read, Eq)
285+ deriving (Show, Eq)
286
286
287--
287--
288-- Traversals
288-- Traversals