% !TEX TS-program = XeLaTeX

\documentclass{memoir}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setmainlanguage{english} 
\setotherlanguage{arabic} 
\usepackage[modulo,right,perpage,para*]{ednotes}
\usepackage{bidi}

%%% Ednotes commands %%% 
\modulolinenumbers[1] 
\PrecedeLevelWith{A}{\setRL} 

%% The uncommented lines below are changed for typesetting the 
%% apparatus in Arabic. 
\renewcommand*{\linesfmt}[1]{\raisebox{1ex}{\linenumberfont #1}~}% 
\renewcommand{\lemmafmt}[1]{#1~[ }% 

\SelectFootnoteRule[1]{lft}
\DeclareNewFootnote{B}[alph]
\SelectFootnoteRule{extra}
\DeclareNewFootnote{C}[roman]
\makeatletter
\renewcommand\extrafootnoterule{}
\renewcommand\footnoterule{\right@footnoterule}
\newcommand\lftfootnoterule{\left@footnoterule}
\makeatother
\setmainfont{Charis SIL}
\begin{document}
\chapter{A chapter}
\begin{linenumbers}
This is some text. \Anote{foo}{bar} This is some more text. \Anote{Foo}{Bar} This is some more text.\footnoteB{A B footnote}. This is some more text.\footnoteC{A C footnote}
\end{linenumbers}

\end{document}
