@@ -784,6 +784,7 @@ addDatatype (Data n tag ty cons) uctxt
784-- FIXME: Too many arguments! Refactor all these Bools.
784-- FIXME: Too many arguments! Refactor all these Bools.
785addCasedef :: Name -> CaseInfo -> Bool -> Bool -> Bool -> Bool ->
785addCasedef :: Name -> CaseInfo -> Bool -> Bool -> Bool -> Bool ->
786 [Type] -> -- argument types
786 [Type] -> -- argument types
787+ [Int] -> -- inaccessible arguments
787 [Either Term (Term, Term)] ->
788 [Either Term (Term, Term)] ->
788 [([Name], Term, Term)] -> -- totality
789 [([Name], Term, Term)] -> -- totality
789 [([Name], Term, Term)] -> -- compile time
790 [([Name], Term, Term)] -> -- compile time
@@ -791,16 +792,16 @@ addCasedef :: Name -> CaseInfo -> Bool -> Bool -> Bool -> Bool ->
791 [([Name], Term, Term)] -> -- run time
792 [([Name], Term, Term)] -> -- run time
792 Type -> Context -> Context
793 Type -> Context -> Context
793addCasedef n ci@(CaseInfo alwaysInline tcdict)
794addCasedef n ci@(CaseInfo alwaysInline tcdict)
794− tcase covering reflect asserted argtys
795+ tcase covering reflect asserted argtys inacc
795 ps_in ps_tot ps_inl ps_ct ps_rt ty uctxt
796 ps_in ps_tot ps_inl ps_ct ps_rt ty uctxt
796 = let ctxt = definitions uctxt
797 = let ctxt = definitions uctxt
797 access = case lookupDefAcc n False uctxt of
798 access = case lookupDefAcc n False uctxt of
798 [(_, acc)] -> acc
799 [(_, acc)] -> acc
799 _ -> Public
800 _ -> Public
800− ctxt' = case (simpleCase tcase covering reflect CompileTime emptyFC argtys ps_tot,
801+ ctxt' = case (simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_tot,
801− simpleCase tcase covering reflect CompileTime emptyFC argtys ps_ct,
802+ simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_ct,
802− simpleCase tcase covering reflect CompileTime emptyFC argtys ps_inl,
803+ simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_inl,
803− simpleCase tcase covering reflect RunTime emptyFC argtys ps_rt) of
804+ simpleCase tcase covering reflect RunTime emptyFC inacc argtys ps_rt) of
804 (OK (CaseDef args_tot sc_tot _),
805 (OK (CaseDef args_tot sc_tot _),
805 OK (CaseDef args_ct sc_ct _),
806 OK (CaseDef args_ct sc_ct _),
806 OK (CaseDef args_inl sc_inl _),
807 OK (CaseDef args_inl sc_inl _),
@@ -827,7 +828,7 @@ simplifyCasedef n uctxt
827 [(CaseOp ci ty atys ps_in ps cd, acc, tot, metainf)] ->
828 [(CaseOp ci ty atys ps_in ps cd, acc, tot, metainf)] ->
828 let ps_in' = map simpl ps_in
829 let ps_in' = map simpl ps_in
829 pdef = map debind ps_in' in
830 pdef = map debind ps_in' in
830− case simpleCase False True False CompileTime emptyFC atys pdef of
831+ case simpleCase False True False CompileTime emptyFC [] atys pdef of
831 OK (CaseDef args sc _) ->
832 OK (CaseDef args sc _) ->
832 addDef n (CaseOp ci
833 addDef n (CaseOp ci
833 ty atys ps_in' ps (cd { cases_totcheck = (args, sc) }),
834 ty atys ps_in' ps (cd { cases_totcheck = (args, sc) }),