git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Delint
commit88d118343e1422262282e83b3d3dce9c22dcb2ec authorGary Burgess <gary.burgess@gmail.com> dateWed 5 Mar 2014, 20:21 (13 years ago) parenta36f24f
2 files changed+5−5
src/Language/PureScript/Sugar/CaseDeclarations.hs+1−1 src/Language/PureScript/Sugar/Names.hs+4−4
src/Language/PureScript/Sugar/CaseDeclarations.hs+1−1
@@ -54,7 +54,7 @@ desugarCases :: [Declaration] -> Either String [Declaration]
5454desugarCases = desugarRest <=< fmap join . mapM toDecls . groupBy inSameGroup
5555 where
5656 desugarRest :: [Declaration] -> Either String [Declaration]
57− desugarRest ((TypeInstanceDeclaration name constraints className tys ds) : rest) =
57+ desugarRest (TypeInstanceDeclaration name constraints className tys ds : rest) =
5858 (:) <$> (TypeInstanceDeclaration name constraints className tys <$> desugarCases ds) <*> desugarRest rest
5959 desugarRest (d : ds) = (:) d <$> desugarRest ds
6060 desugarRest [] = pure []
src/Language/PureScript/Sugar/Names.hs+4−4
@@ -184,14 +184,14 @@ renameInModule imports exports (Module mn decls exps) =
184184 updateTypeName (Qualified Nothing name) = update "type" importedTypes name
185185 updateTypeName (Qualified (Just mn) name) = do
186186 modExports <- getExports mn
187− case name `lookup` (S.toList (exportedTypes modExports)) of
187+ case name `lookup` S.toList (exportedTypes modExports) of
188188 Nothing -> throwError $ "Unknown type '" ++ show (Qualified (Just mn) name) ++ "'"
189189 _ -> return $ Qualified (Just mn) name
190190
191191 updateDataConstructorName (Qualified Nothing name) = update "data constructor" importedDataConstructors name
192192 updateDataConstructorName (Qualified (Just mn) name) = do
193193 modExports <- getExports mn
194− let allDcons = join (snd `map` (S.toList $ exportedTypes modExports))
194+ let allDcons = join $ snd `map` S.toList (exportedTypes modExports)
195195 if name `elem` allDcons
196196 then return $ Qualified (Just mn) name
197197 else throwError $ "Unknown data constructor '" ++ show (Qualified (Just mn) name) ++ "'"
@@ -210,7 +210,7 @@ renameInModule imports exports (Module mn decls exps) =
210210 check :: (Show a, Ord a) => String -> (Exports -> S.Set a) -> ModuleName -> a -> Either String (Qualified a)
211211 check t get mn name = do
212212 modExports <- getExports mn
213− if name `S.member` (get modExports)
213+ if name `S.member` get modExports
214214 then return $ Qualified (Just mn) name
215215 else throwError $ "Unknown " ++ t ++ " '" ++ show (Qualified (Just mn) name) ++ "'"
216216
@@ -226,7 +226,7 @@ findExports = foldM addModule $ M.singleton (ModuleName [ProperName "Prim"]) pri
226226 where
227227
228228 -- The exported types from the Prim module
229− primExports = Exports (S.fromList $ (\(Qualified _ name) -> (name, [])) `map` (M.keys primTypes)) S.empty S.empty
229+ primExports = Exports (S.fromList $ (\(Qualified _ name) -> (name, [])) `map` M.keys primTypes) S.empty S.empty
230230
231231 -- Add all of the exported declarations from a module to the global export environment
232232 addModule :: ExportEnvironment -> Module -> Either String ExportEnvironment