git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
C++: minor cleanup
ebc80c6Andy Arvanitis
src/Language/PureScript/CodeGen/Cpp/Types.hs−15
@@ -24,12 +24,6 @@ import Data.List
24import Data.Monoid ((<>))
24import Data.Monoid ((<>))
25import Data.Text
25import Data.Text
26
26
27−import Language.PureScript.CodeGen.Cpp.Common
28−import Language.PureScript.Names
29−import qualified Language.PureScript.Constants as C
30−
31−-- import Debug.Trace
32−
33data CppType = Primitive Text | Auto [TypeQual] | Any [TypeQual]
27data CppType = Primitive Text | Auto [TypeQual] | Any [TypeQual]
34 deriving (Show, Read, Eq)
28 deriving (Show, Read, Eq)
35
29
@@ -104,15 +98,6 @@ runValueQual TopLevel = ""
104runCaptureType :: CaptureType -> Text
98runCaptureType :: CaptureType -> Text
105runCaptureType CaptureAll = "="
99runCaptureType CaptureAll = "="
106
100
107−-- TODO: move or remove this
108−--
109−qualifiedToStr :: ModuleName -> (a -> Ident) -> Qualified a -> Text
110−qualifiedToStr _ f (Qualified (Just (ModuleName [ProperName mn])) a)
111− | mn == C.prim = runIdent $ f a
112−qualifiedToStr m f (Qualified (Just m') a)
113− | m /= m' = moduleNameToCpp m' <> "::" <> identToCpp (f a)
114−qualifiedToStr _ f (Qualified _ a) = identToCpp (f a)
115−
116boolType :: CppType
101boolType :: CppType
117boolType = Primitive "bool"
102boolType = Primitive "bool"
118
103