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