summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilFreeman <>2014-04-17 05:44:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-04-17 05:44:00 (GMT)
commitf6472f48d003d550de3ee5b5d9fbbfe6566658d5 (patch)
tree85bf28042745c0e2a88c545d2017cc35c5113b6f
parent2e5f2b2995a5ce55b52c8167e027682c11f101f4 (diff)
version 0.4.19.10.4.19.1
-rw-r--r--purescript.cabal2
-rw-r--r--src/Language/PureScript/TypeChecker/Types.hs7
2 files changed, 5 insertions, 4 deletions
diff --git a/purescript.cabal b/purescript.cabal
index 3ec910c..7e6ca1b 100644
--- a/purescript.cabal
+++ b/purescript.cabal
@@ -1,5 +1,5 @@
name: purescript
-version: 0.4.19
+version: 0.4.19.1
cabal-version: >=1.8
build-type: Custom
license: MIT
diff --git a/src/Language/PureScript/TypeChecker/Types.hs b/src/Language/PureScript/TypeChecker/Types.hs
index 386e516..89297d6 100644
--- a/src/Language/PureScript/TypeChecker/Types.hs
+++ b/src/Language/PureScript/TypeChecker/Types.hs
@@ -680,7 +680,7 @@ infer' (TypedValue checkType val ty) = do
Just moduleName <- checkCurrentModule <$> get
kind <- liftCheck $ kindOf moduleName ty
guardWith (strMsg $ "Expected type of kind *, was " ++ prettyPrintKind kind) $ kind == Star
- ty' <- introduceSkolemScope <=< replaceAllTypeSynonyms $ ty
+ ty' <- introduceSkolemScope <=< replaceAllTypeSynonyms $ ty
val' <- if checkType then check val ty' else return val
return $ TypedValue True val' ty'
infer' (PositionedValue pos val) = rethrowWithPosition pos $ infer' val
@@ -693,8 +693,9 @@ inferLetBinding seen (ValueDeclaration ident nameKind [] Nothing tv@(TypedValue
kind <- liftCheck $ kindOf moduleName ty
guardWith (strMsg $ "Expected type of kind *, was " ++ prettyPrintKind kind) $ kind == Star
let dict = if isFunction val then M.singleton (moduleName, ident) (ty, nameKind) else M.empty
- TypedValue _ val' ty' <- if checkType then bindNames dict (check val ty) else return tv
- bindNames (M.singleton (moduleName, ident) (ty', nameKind)) $ inferLetBinding (seen ++ [ValueDeclaration ident nameKind [] Nothing (TypedValue checkType val' ty')]) rest ret j
+ ty' <- introduceSkolemScope <=< replaceAllTypeSynonyms $ ty
+ TypedValue _ val' ty'' <- if checkType then bindNames dict (check val ty') else return tv
+ bindNames (M.singleton (moduleName, ident) (ty'', nameKind)) $ inferLetBinding (seen ++ [ValueDeclaration ident nameKind [] Nothing (TypedValue checkType val' ty'')]) rest ret j
inferLetBinding seen (ValueDeclaration ident nameKind [] Nothing val : rest) ret j = do
valTy <- fresh
Just moduleName <- checkCurrentModule <$> get