git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into 1846
0dc8a34Phil Freeman
.travis.yml+1−1
@@ -51,7 +51,7 @@ install:
51 - mkdir -p .cabal-sandbox
51 - mkdir -p .cabal-sandbox
52 - cabal sandbox init --sandbox .cabal-sandbox
52 - cabal sandbox init --sandbox .cabal-sandbox
53 # Download stackage cabal.config, not sure whether filtering is necessary
53 # Download stackage cabal.config, not sure whether filtering is necessary
54− - if [ -n "$STACKAGE" ]; then curl http://www.stackage.org/$STACKAGE/cabal.config | grep -v purescript > cabal.config; fi
54+ - if [ -n "$STACKAGE" ]; then curl https://www.stackage.org/$STACKAGE/cabal.config | grep -v purescript > cabal.config; fi
55 - cabal install --only-dependencies --enable-tests
55 - cabal install --only-dependencies --enable-tests
56 - cabal install hpc-coveralls
56 - cabal install hpc-coveralls
57 # Snapshot state of the sandbox now, so we don't need to make new one for test install
57 # Snapshot state of the sandbox now, so we don't need to make new one for test install
src/Language/PureScript/TypeChecker.hs+5−5
@@ -230,14 +230,14 @@ typeCheckAll moduleName _ ds = traverse go ds <* traverse_ checkFixities ds
230 let args' = args `withKinds` kind
230 let args' = args `withKinds` kind
231 addTypeSynonym moduleName name args' ty kind
231 addTypeSynonym moduleName name args' ty kind
232 return $ TypeSynonymDeclaration name args ty
232 return $ TypeSynonymDeclaration name args ty
233− go (TypeDeclaration{}) = internalError "Type declarations should have been removed"
233+ go TypeDeclaration{} = internalError "Type declarations should have been removed"
234 go (ValueDeclaration name nameKind [] (Right val)) =
234 go (ValueDeclaration name nameKind [] (Right val)) =
235 warnAndRethrow (addHint (ErrorInValueDeclaration name)) $ do
235 warnAndRethrow (addHint (ErrorInValueDeclaration name)) $ do
236 valueIsNotDefined moduleName name
236 valueIsNotDefined moduleName name
237 [(_, (val', ty))] <- typesOf moduleName [(name, val)]
237 [(_, (val', ty))] <- typesOf moduleName [(name, val)]
238 addValue moduleName name ty nameKind
238 addValue moduleName name ty nameKind
239 return $ ValueDeclaration name nameKind [] $ Right val'
239 return $ ValueDeclaration name nameKind [] $ Right val'
240− go (ValueDeclaration{}) = internalError "Binders were not desugared"
240+ go ValueDeclaration{} = internalError "Binders were not desugared"
241 go (BindingGroupDeclaration vals) =
241 go (BindingGroupDeclaration vals) =
242 warnAndRethrow (addHint (ErrorInBindingGroup (map (\(ident, _, _) -> ident) vals))) $ do
242 warnAndRethrow (addHint (ErrorInBindingGroup (map (\(ident, _, _) -> ident) vals))) $ do
243 for_ (map (\(ident, _, _) -> ident) vals) $ \name ->
243 for_ (map (\(ident, _, _) -> ident) vals) $ \name ->
@@ -264,8 +264,8 @@ typeCheckAll moduleName _ ds = traverse go ds <* traverse_ checkFixities ds
264 Just _ -> throwError . errorMessage $ RedefinedIdent name
264 Just _ -> throwError . errorMessage $ RedefinedIdent name
265 Nothing -> putEnv (env { names = M.insert (moduleName, name) (ty, External, Defined) (names env) })
265 Nothing -> putEnv (env { names = M.insert (moduleName, name) (ty, External, Defined) (names env) })
266 return d
266 return d
267− go (d@(FixityDeclaration{})) = return d
267+ go (d@FixityDeclaration{}) = return d
268− go (d@(ImportDeclaration{})) = return d
268+ go (d@ImportDeclaration{}) = return d
269 go (d@(TypeClassDeclaration pn args implies tys)) = do
269 go (d@(TypeClassDeclaration pn args implies tys)) = do
270 addTypeClass moduleName pn args implies tys
270 addTypeClass moduleName pn args implies tys
271 return d
271 return d
@@ -429,7 +429,7 @@ typeCheckModule (Module ss coms mn decls (Just exps)) = warnAndRethrow (addHint
429 checkNonAliasesAreExported dr@(ValueRef (Op name)) =
429 checkNonAliasesAreExported dr@(ValueRef (Op name)) =
430 case listToMaybe (mapMaybe getAlias decls) of
430 case listToMaybe (mapMaybe getAlias decls) of
431 Just alias ->
431 Just alias ->
432− when (not $ any (== ValueRef alias) exps) $
432+ unless (ValueRef alias `elem` exps) $
433 throwError . errorMessage $ TransitiveExportError dr [ValueRef alias]
433 throwError . errorMessage $ TransitiveExportError dr [ValueRef alias]
434 _ -> return ()
434 _ -> return ()
435 where
435 where