git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Delinting again
80fc5f5Gary Burgess
src/Language/PureScript/Sugar/Names.hs+2−2
@@ -54,8 +54,8 @@ addTypeclass env mn id = env { exportedTypeClasses = M.insertWith addExport mn (
54addExport :: (Ord s, Show s) => S.Set s -> S.Set s -> S.Set s
54addExport :: (Ord s, Show s) => S.Set s -> S.Set s -> S.Set s
55addExport new old =
55addExport new old =
56 if null overlap
56 if null overlap
57− then S.union new old
57+ then new `S.union` old
58− else error $ (show $ head overlap) ++ " has already been defined"
58+ else error $ show (head overlap) ++ " has already been defined"
59 where overlap = S.toList $ S.intersection new old
59 where overlap = S.toList $ S.intersection new old
60
60
61rename :: [Module] -> Either String [Module]
61rename :: [Module] -> Either String [Module]
src/Language/PureScript/TypeChecker.hs+2−2
@@ -111,9 +111,9 @@ typeCheckAll mainModuleName moduleName (d@(DataBindingGroupDeclaration tys) : re
111 let syns = mapMaybe toTypeSynonym tys
111 let syns = mapMaybe toTypeSynonym tys
112 let dataDecls = mapMaybe toDataDecl tys
112 let dataDecls = mapMaybe toDataDecl tys
113 (syn_ks, data_ks) <- kindsOfAll moduleName syns (map (\(name, args, dctors) -> (name, args, concatMap snd dctors)) dataDecls)
113 (syn_ks, data_ks) <- kindsOfAll moduleName syns (map (\(name, args, dctors) -> (name, args, concatMap snd dctors)) dataDecls)
114− forM_ (zip dataDecls data_ks) $ \((name, args, dctors), ctorKind) -> do
114+ forM_ (zip dataDecls data_ks) $ \((name, args, dctors), ctorKind) ->
115 addDataType moduleName name args dctors ctorKind
115 addDataType moduleName name args dctors ctorKind
116− forM_ (zip syns syn_ks) $ \((name, args, ty), kind) -> do
116+ forM_ (zip syns syn_ks) $ \((name, args, ty), kind) ->
117 addTypeSynonym moduleName name args ty kind
117 addTypeSynonym moduleName name args ty kind
118 ds <- typeCheckAll mainModuleName moduleName rest
118 ds <- typeCheckAll mainModuleName moduleName rest
119 return $ d : ds
119 return $ d : ds
src/Language/PureScript/TypeChecker/Monad.hs+5−5
@@ -91,11 +91,11 @@ data Environment = Environment {
91-- The basic types existing in the external javascript environment
91-- The basic types existing in the external javascript environment
92--
92--
93jsTypes ::M.Map (Qualified ProperName) Kind
93jsTypes ::M.Map (Qualified ProperName) Kind
94−jsTypes = M.fromList [ (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Function"), (FunKind Star (FunKind Star Star)))
94+jsTypes = M.fromList [ (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Function"), FunKind Star (FunKind Star Star))
95− , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Array"), (FunKind Star Star))
95+ , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Array"), FunKind Star Star)
96− , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "String"), (Star))
96+ , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "String"), Star)
97− , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Number"), (Star))
97+ , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Number"), Star)
98− , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Boolean"), (Star)) ]
98+ , (Qualified (Just $ ModuleName [ProperName "Prim"]) (ProperName "Boolean"), Star) ]
99
99
100-- |
100-- |
101-- The initial environment with no values and only the default javascript types defined
101-- The initial environment with no values and only the default javascript types defined