@@ -451,7 +451,7 @@ checkPossible info fc tcgen fname lhs_in
451 i <- getIState
451 i <- getIState
452 let lhs = addImplPat i lhs_in
452 let lhs = addImplPat i lhs_in
453 -- if the LHS type checks, it is possible
453 -- if the LHS type checks, it is possible
454− case elaborate ctxt (sMN 0 "patLHS") infP initEState
454+ case elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
455 (erun fc (buildTC i info ELHS [] fname (infTerm lhs))) of
455 (erun fc (buildTC i info ELHS [] fname (infTerm lhs))) of
456 OK (ElabResult lhs' _ _ ctxt' newDecls, _) ->
456 OK (ElabResult lhs' _ _ ctxt' newDecls, _) ->
457 do setContext ctxt'
457 do setContext ctxt'
@@ -538,7 +538,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
538 "\n" ++ show (fn_ty, fn_is))
538 "\n" ++ show (fn_ty, fn_is))
540 ((ElabResult lhs' dlhs [] ctxt' newDecls, probs, inj), _) <-
540 ((ElabResult lhs' dlhs [] ctxt' newDecls, probs, inj), _) <-
541− tclift $ elaborate ctxt (sMN 0 "patLHS") infP initEState
541+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
542 (do res <- errAt "left hand side of " fname
542 (do res <- errAt "left hand side of " fname
543 (erun fc (buildTC i info ELHS opts fname (infTerm lhs)))
543 (erun fc (buildTC i info ELHS opts fname (infTerm lhs)))
544 probs <- get_probs
544 probs <- get_probs
@@ -613,7 +613,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
613 ctxt <- getContext -- new context with where block added
613 ctxt <- getContext -- new context with where block added
614 logLvl 5 "STARTING CHECK"
614 logLvl 5 "STARTING CHECK"
615 ((rhs', defer, is, probs, ctxt', newDecls), _) <-
615 ((rhs', defer, is, probs, ctxt', newDecls), _) <-
616− tclift $ elaborate ctxt (sMN 0 "patRHS") clhsty initEState
616+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patRHS") clhsty initEState
617 (do pbinds ist lhs_tm
617 (do pbinds ist lhs_tm
618 mapM_ setinj (nub (params ++ inj))
618 mapM_ setinj (nub (params ++ inj))
619 setNextName
619 setNextName
@@ -774,7 +774,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
774 let lhs = stripLinear i $ stripUnmatchable i $ propagateParams i params fn_ty (addImplPat i lhs_in)
774 let lhs = stripLinear i $ stripUnmatchable i $ propagateParams i params fn_ty (addImplPat i lhs_in)
775 logLvl 2 ("LHS: " ++ show lhs)
775 logLvl 2 ("LHS: " ++ show lhs)
776 (ElabResult lhs' dlhs [] ctxt' newDecls, _) <-
776 (ElabResult lhs' dlhs [] ctxt' newDecls, _) <-
777− tclift $ elaborate ctxt (sMN 0 "patLHS") infP initEState
777+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
778 (errAt "left hand side of with in " fname
778 (errAt "left hand side of with in " fname
779 (erun fc (buildTC i info ELHS opts fname (infTerm lhs))) )
779 (erun fc (buildTC i info ELHS opts fname (infTerm lhs))) )
780 setContext ctxt'
780 setContext ctxt'
@@ -791,7 +791,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
791 logLvl 5 ("Checking " ++ showTmImpls wval)
791 logLvl 5 ("Checking " ++ showTmImpls wval)
792 -- Elaborate wval in this context
792 -- Elaborate wval in this context
793 ((wval', defer, is, ctxt', newDecls), _) <-
793 ((wval', defer, is, ctxt', newDecls), _) <-
794− tclift $ elaborate ctxt (sMN 0 "withRHS")
794+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "withRHS")
795 (bindTyArgs PVTy bargs infP) initEState
795 (bindTyArgs PVTy bargs infP) initEState
796 (do pbinds i lhs_tm
796 (do pbinds i lhs_tm
797 setNextName
797 setNextName
@@ -889,7 +889,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
889 ctxt <- getContext -- New context with block added
889 ctxt <- getContext -- New context with block added
890 i <- getIState
890 i <- getIState
891 ((rhs', defer, is, ctxt', newDecls), _) <-
891 ((rhs', defer, is, ctxt', newDecls), _) <-
892− tclift $ elaborate ctxt (sMN 0 "wpatRHS") clhsty initEState
892+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "wpatRHS") clhsty initEState
893 (do pbinds i lhs_tm
893 (do pbinds i lhs_tm
894 setNextName
894 setNextName
895 (ElabResult _ d is ctxt' newDecls) <- erun fc (build i info ERHS opts fname rhs)
895 (ElabResult _ d is ctxt' newDecls) <- erun fc (build i info ERHS opts fname rhs)