Commit 9558e65a authored by Jan Rasmus Tikovsky 's avatar Jan Rasmus Tikovsky
Browse files

Minor bugfix

parent 2a65272a
......@@ -743,6 +743,7 @@ checkVariable v
[Constr _ _] -> return $ Constructor v
[GlobalVar _ _] -> return $ Variable v
[LocalVar v' _] -> return $ Variable $ qualify v'
[RecordLabel _ _] -> return $ Variable v
rs -> do
m <- getModuleIdent
case qualLookupVar (qualQualify m v) env of
......@@ -751,6 +752,7 @@ checkVariable v
[Constr _ _] -> return $ Constructor v
[GlobalVar _ _] -> return $ Variable v
[LocalVar v' _] -> return $ Variable $ qualify v'
[RecordLabel _ _] -> return $ Variable v
rs' -> do report $ errAmbiguousIdent rs' v
return $ Variable v
......
......@@ -1083,8 +1083,10 @@ sureVarType v tyEnv = case lookupValue v tyEnv of
funType :: ModuleIdent -> QualIdent -> ValueEnv -> TypeScheme
funType m f tyEnv = case qualLookupValue f tyEnv of
[Value _ _ sigma] -> sigma
[Label _ _ sigma] -> sigma
_ -> case qualLookupValue (qualQualify m f) tyEnv of
[Value _ _ sigma] -> sigma
[Label _ _ sigma] -> sigma
_ -> internalError $ "TypeCheck.funType " ++ show f
++ ", more precisely " ++ show (unqualify f)
......
......@@ -14,3 +14,7 @@ fun2 C {} = False
-- update
upd r = r { x = False, l = 0 }
-- selection
getL :: R a -> Int
getL r = l r
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment