Commit dc822382 authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Fixed bug in interface check

parent 87bf4bb8
...@@ -147,16 +147,16 @@ interface module only. However, this has not been implemented yet. ...@@ -147,16 +147,16 @@ interface module only. However, this has not been implemented yet.
> checkConstrImport tc tvs (ConstrDecl p evs c tys) = do > checkConstrImport tc tvs (ConstrDecl p evs c tys) = do
> m <- getModuleIdent > m <- getModuleIdent
> let qc = qualifyLike tc c > let qc = qualifyLike tc c
> checkConstr (DataConstructor c' _ (ForAllExist m' n' ty')) = > checkConstr (DataConstructor c' _ (ForAllExist uqvs eqvs ty')) =
> qc == c' && length evs == m' && length tvs == n' && > qc == c' && length evs == eqvs && length tvs == uqvs &&
> toQualTypes m tvs tys == arrowArgs ty' > toQualTypes m tvs tys == arrowArgs ty'
> checkConstr _ = False > checkConstr _ = False
> checkValueInfo "data constructor" checkConstr p qc > checkValueInfo "data constructor" checkConstr p qc
> checkConstrImport tc tvs (ConOpDecl p evs ty1 op ty2) = do > checkConstrImport tc tvs (ConOpDecl p evs ty1 op ty2) = do
> m <- getModuleIdent > m <- getModuleIdent
> let qc = qualifyLike tc op > let qc = qualifyLike tc op
> checkConstr (DataConstructor c' _ (ForAllExist m' n' ty')) = > checkConstr (DataConstructor c' _ (ForAllExist uqvs eqvs ty')) =
> qc == c' && length evs == m' && length tvs == n' && > qc == c' && length evs == eqvs && length tvs == uqvs &&
> toQualTypes m tvs [ty1,ty2] == arrowArgs ty' > toQualTypes m tvs [ty1,ty2] == arrowArgs ty'
> checkConstr _ = False > checkConstr _ = False
> checkValueInfo "data constructor" checkConstr p qc > checkValueInfo "data constructor" checkConstr p qc
...@@ -165,8 +165,8 @@ interface module only. However, this has not been implemented yet. ...@@ -165,8 +165,8 @@ interface module only. However, this has not been implemented yet.
> checkNewConstrImport tc tvs (NewConstrDecl p evs c ty) = do > checkNewConstrImport tc tvs (NewConstrDecl p evs c ty) = do
> m <- getModuleIdent > m <- getModuleIdent
> let qc = qualifyLike tc c > let qc = qualifyLike tc c
> checkNewConstr (NewtypeConstructor c' (ForAllExist m' n' ty')) = > checkNewConstr (NewtypeConstructor c' (ForAllExist uqvs eqvs ty')) =
> qc == c' && length evs == m' && length tvs == n' && > qc == c' && length evs == eqvs && length tvs == uqvs &&
> toQualType m tvs ty == head (arrowArgs ty') > toQualType m tvs ty == head (arrowArgs ty')
> checkNewConstr _ = False > checkNewConstr _ = False
> checkValueInfo "newtype constructor" checkNewConstr p qc > checkValueInfo "newtype constructor" checkNewConstr p qc
......
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