• Andrei Paskevich's avatar
    be more stricte in accepting inductives and algebraics · efaf0dc2
    Andrei Paskevich authored
    1. We only accept an algebraic type declaration
        T 'a1 ... 'aN
    whenever every constructor has ls_value = Some (T 'a1 ... 'aN),
    no type variable renaming is allowed.
    2. We only accept an inductive predicate declaration
        P (_x1 : T1) ... (_xN : TN)
    whenever every inductive clause has a conclusion of the form
    (P (t1 : T1) ... (tN : TN)), no type variable renaming is allowed.
    3. To this purpose, we must typecheck the whole (mutual) inductive
    declaration group in the same denv. This must be ok, since user-named
    type variables cannot be destructively instantiated anyway. However,
    I'd like Jean-Christoph to check my changes in Typing.add_inductives.
decl.ml 21 KB