git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: update to 0.9.3
commit39204abbd0a4db2868cb15eb6caf8a266bc29abe authorAndy Arvanitis <andyarvanitis@gmail.com> dateSun 14 Aug 2016, 15:38 (10 years ago) parent95fdf2e
3 files changed+8−8
purescript.cabal+1−1 src/Language/PureScript/CodeGen/Cpp.hs+4−4 src/Language/PureScript/CodeGen/Cpp/AST.hs+3−3
purescript.cabal+1−1
@@ -491,7 +491,7 @@ executable psc-ide-client
491491executable pcc
492492 build-depends: base >=4 && <5,
493493 purescript -any,
494− aeson >= 0.8 && < 0.12,
494+ aeson -any,
495495 ansi-terminal >= 0.6.2 && < 0.7,
496496 base-compat >=0.6.0,
497497 bytestring -any,
src/Language/PureScript/CodeGen/Cpp.hs+4−4
@@ -169,7 +169,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
169169 return (CppComment com fn)
170170 where
171171 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
173173 | otherwise = Nothing
174174 argcnt = maybe 0 countArgs ty'
175175 name = identToCpp ident
@@ -484,7 +484,7 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
484484 return $ foldl (\fn a -> CppApp fn [a]) fn' curriedArgs
485485 where
486486 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
488488 | otherwise = Nothing
489489 _ ->
490490 flip (foldl (\fn a -> CppApp fn [a])) args' <$> valueToCpp f
@@ -810,8 +810,8 @@ moduleToCpp env (Module _ mn imps _ foreigns decls) = do
810810 go _ = return []
811811
812812 allForeigns :: [(Ident, T.Type)]
813− allForeigns = map (\((_, ident), (ty, _, _)) -> (ident, ty)) .
814− filter (\((mn', _), (_, kind, _)) -> mn' == mn && kind == E.External) .
813+ allForeigns = map (\((Qualified _ ident), (ty, _, _)) -> (ident, ty)) .
814+ filter (\((Qualified mn' _), (_, kind, _)) -> mn' == Just mn && kind == E.External) .
815815 M.toList $ E.names env
816816
817817---------------------------------------------------------------------------------------------------
src/Language/PureScript/CodeGen/Cpp/AST.hs+3−3
@@ -53,7 +53,7 @@ data UnaryOperator
5353 -- Constructor
5454 --
5555 | New
56− deriving (Show, Read, Eq)
56+ deriving (Show, Eq)
5757
5858-- |
5959-- Built-in binary operators
@@ -136,7 +136,7 @@ data BinaryOperator
136136 --
137137 | ShiftRight
138138 --
139− deriving (Show, Read, Eq)
139+ deriving (Show, Eq)
140140
141141-- |
142142-- Data type for simplified C++11 expressions
@@ -282,7 +282,7 @@ data Cpp
282282 -- Commented C++11
283283 --
284284 | CppComment [Comment] Cpp
285− deriving (Show, Read, Eq)
285+ deriving (Show, Eq)
286286
287287--
288288-- Traversals