git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge branch 'master' into 1846
commit0dc8a34ec4a9a06a3f2cb1b69d5d09d8c148702e authorPhil Freeman <paf31@cantab.net> dateFri 5 Feb 2016, 20:13 (11 years ago) parent6566dd42380c68
2 files changed+6−6
.travis.yml+1−1 src/Language/PureScript/TypeChecker.hs+5−5
.travis.yml+1−1
@@ -51,7 +51,7 @@ install:
5151 - mkdir -p .cabal-sandbox
5252 - cabal sandbox init --sandbox .cabal-sandbox
5353 # 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
5555 - cabal install --only-dependencies --enable-tests
5656 - cabal install hpc-coveralls
5757 # 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
230230 let args' = args `withKinds` kind
231231 addTypeSynonym moduleName name args' ty kind
232232 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"
234234 go (ValueDeclaration name nameKind [] (Right val)) =
235235 warnAndRethrow (addHint (ErrorInValueDeclaration name)) $ do
236236 valueIsNotDefined moduleName name
237237 [(_, (val', ty))] <- typesOf moduleName [(name, val)]
238238 addValue moduleName name ty nameKind
239239 return $ ValueDeclaration name nameKind [] $ Right val'
240− go (ValueDeclaration{}) = internalError "Binders were not desugared"
240+ go ValueDeclaration{} = internalError "Binders were not desugared"
241241 go (BindingGroupDeclaration vals) =
242242 warnAndRethrow (addHint (ErrorInBindingGroup (map (\(ident, _, _) -> ident) vals))) $ do
243243 for_ (map (\(ident, _, _) -> ident) vals) $ \name ->
@@ -264,8 +264,8 @@ typeCheckAll moduleName _ ds = traverse go ds <* traverse_ checkFixities ds
264264 Just _ -> throwError . errorMessage $ RedefinedIdent name
265265 Nothing -> putEnv (env { names = M.insert (moduleName, name) (ty, External, Defined) (names env) })
266266 return d
267− go (d@(FixityDeclaration{})) = return d
268− go (d@(ImportDeclaration{})) = return d
267+ go (d@FixityDeclaration{}) = return d
268+ go (d@ImportDeclaration{}) = return d
269269 go (d@(TypeClassDeclaration pn args implies tys)) = do
270270 addTypeClass moduleName pn args implies tys
271271 return d
@@ -429,7 +429,7 @@ typeCheckModule (Module ss coms mn decls (Just exps)) = warnAndRethrow (addHint
429429 checkNonAliasesAreExported dr@(ValueRef (Op name)) =
430430 case listToMaybe (mapMaybe getAlias decls) of
431431 Just alias ->
432− when (not $ any (== ValueRef alias) exps) $
432+ unless (ValueRef alias `elem` exps) $
433433 throwError . errorMessage $ TransitiveExportError dr [ValueRef alias]
434434 _ -> return ()
435435 where