@@ -451,7 +451,7 @@ checkPossible info fc tcgen fname lhs_in
451451 i <- getIState
452452 let lhs = addImplPat i lhs_in
453453 -- 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
455455 (erun fc (buildTC i info ELHS [] fname (infTerm lhs))) of
456456 OK (ElabResult lhs' _ _ ctxt' newDecls, _) ->
457457 do setContext ctxt'
@@ -538,7 +538,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
538538 "\n" ++ show (fn_ty, fn_is))
539539
540540 ((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
542542 (do res <- errAt "left hand side of " fname
543543 (erun fc (buildTC i info ELHS opts fname (infTerm lhs)))
544544 probs <- get_probs
@@ -613,7 +613,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
613613 ctxt <- getContext -- new context with where block added
614614 logLvl 5 "STARTING CHECK"
615615 ((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
617617 (do pbinds ist lhs_tm
618618 mapM_ setinj (nub (params ++ inj))
619619 setNextName
@@ -774,7 +774,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
774774 let lhs = stripLinear i $ stripUnmatchable i $ propagateParams i params fn_ty (addImplPat i lhs_in)
775775 logLvl 2 ("LHS: " ++ show lhs)
776776 (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
778778 (errAt "left hand side of with in " fname
779779 (erun fc (buildTC i info ELHS opts fname (infTerm lhs))) )
780780 setContext ctxt'
@@ -791,7 +791,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
791791 logLvl 5 ("Checking " ++ showTmImpls wval)
792792 -- Elaborate wval in this context
793793 ((wval', defer, is, ctxt', newDecls), _) <-
794− tclift $ elaborate ctxt (sMN 0 "withRHS")
794+ tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "withRHS")
795795 (bindTyArgs PVTy bargs infP) initEState
796796 (do pbinds i lhs_tm
797797 setNextName
@@ -889,7 +889,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
889889 ctxt <- getContext -- New context with block added
890890 i <- getIState
891891 ((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
893893 (do pbinds i lhs_tm
894894 setNextName
895895 (ElabResult _ d is ctxt' newDecls) <- erun fc (build i info ERHS opts fname rhs)