\lstdefinelanguage[Regular]{Haskell}[]{Haskell}{%
	keywords={abstype,if,then,else,case,class,data,default,deriving,hiding,if,in,infix,infixl,infixr,import,instance,let,module,newtype,of,qualified,type,where,do,Q},
	morekeywords={forall},
	literate=%
%		{forall}{{$\forall$}}1
		{\_}{{\raisebox{.15ex}{\_}}}1
		{~}{{\raisebox{-.6ex}{\textasciitilde}}}1
%		{\\}{{$\lambda\:$}}1
		{->}{{$\shortrightarrow$}}2
		{>->}{{>->}}3
		{<-}{{$\shortleftarrow$}}2
		{=>}{{$\Rightarrow$}}2
		{<=}{{$\Leftarrow$}}2
		{...}{{$\cdots$}}3 %chktex 11
		{\[p|}{{$\llbracket_p$}}2
		{\[d|}{{$\llbracket_d$}}2
		{\[t|}{{$\llbracket_t$}}2
		{\[e|}{{$\llbracket_e$}}2
		{\[dsl|}{{$\llbracket_{dsl}$}}4
		{\[bin|}{{$\llbracket_{bin}$}}4
		{\[|}{{$\llbracket$}}1
		{|\]}{{$\rrbracket$}}1
		{\(}{{{\rm\tt(}}}1
		{\)}{{{\rm\tt)}}}1
}
\lstdefinelanguage[Lhs2Tex]{Haskell}[Regular]{Haskell}{%
	moreliterate=%
		{e1}{{e\textsubscript{1}}}2
		{e2}{{e\textsubscript{2}}}2
		{e3}{{e\textsubscript{3}}}2
		{e1p}{{e\textsubscript{1}\textsuperscript{$\prime$}}}2
		{e2p}{{e\textsubscript{2}\textsuperscript{$\prime$}}}2
		{eval_0}{{eval\textsubscript{0}}}5
		{Eval_0}{{Eval\textsubscript{0}}}5
		{Expr_0}{{Expr\textsubscript{0}}}5
		{Lit_0}{{Lit\textsubscript{0}}}4
		{Add_0}{{Add\textsubscript{0}}}4
		{Sub_0}{{Sub\textsubscript{0}}}4
		{Print_0}{{Print\textsubscript{0}}}6
		{print_0}{{print\textsubscript{0}}}6
		{Sem_s}{{Sem\textsubscript{s}}}4
		{lit_s}{{lit\textsubscript{s}}}4
		{add_s}{{add\textsubscript{s}}}4
		{sub_s}{{sub\textsubscript{s}}}4
		{Expr_t}{{Expr\textsubscript{t}}}5
		{Eval_t}{{Eval\textsubscript{t}}}5
		{E_t}{{E\textsubscript{t}}}2
		{Printer_t}{{Printer\textsubscript{t}}}8
		{P_t}{{P\textsubscript{t}}}2
		{lit_t}{{lit\textsubscript{t}}}4
		{add_t}{{add\textsubscript{t}}}4
		{Sub_t}{{Sub\textsubscript{t}}}4
		{sub_t}{{sub\textsubscript{t}}}4
		{eval_1}{{eval\textsubscript{1}}}5
		{Eval_1}{{Eval\textsubscript{1}}}5
		{Expr_1}{{Expr\textsubscript{1}}}5
		{Lit_1}{{Lit\textsubscript{1}}}4
		{Add_1}{{Add\textsubscript{1}}}4
		{Sub_1}{{Sub\textsubscript{1}}}4
		{Print_1}{{Print\textsubscript{1}}}6
		{print_1}{{print\textsubscript{1}}}6
		{eval_2}{{eval\textsubscript{2}}}5
		{Eval_2}{{Eval\textsubscript{2}}}5
		{Expr_2}{{Expr\textsubscript{2}}}5
		{Lit_2}{{Lit\textsubscript{2}}}4
		{Add_2}{{Add\textsubscript{2}}}4
		{Sub_2}{{Sub\textsubscript{2}}}4
		{sub_2}{{sub\textsubscript{2}}}4
		{Ext_2}{{Ext\textsubscript{2}}}4
		{Print_2}{{Print\textsubscript{2}}}6
		{print_2}{{print\textsubscript{2}}}6
		{Semantics_2}{{Semantics\textsubscript{2}}}{10}
		{eval_3}{{eval\textsubscript{3}}}5
		{Eval_3}{{Eval\textsubscript{3}}}5
		{Print_3}{{Print\textsubscript{3}}}6
		{print_3}{{print\textsubscript{3}}}6
		{opt_3}{{opt\textsubscript{3}}}4
		{Opt_3}{{Opt\textsubscript{3}}}4
		{HasEval_3}{{HasEval\textsubscript{3}}}8
		{getEval_3}{{getEval\textsubscript{3}}}8
		{EvalDict_3}{{EvalDict\textsubscript{3}}}9
		{HasPrint_3}{{HasPrint\textsubscript{3}}}9
		{getPrint_3}{{getPrint\textsubscript{3}}}9
		{PrintDict_3}{{PrintDict\textsubscript{3}}}{10}
		{HasOpt_3}{{HasOpt\textsubscript{3}}}7
		{getOpt_3}{{getOpt\textsubscript{3}}}7
		{OptDict_3}{{OptDict\textsubscript{3}}}8
		{Expr_3}{{Expr\textsubscript{3}}}5
		{Lit_3}{{Lit\textsubscript{3}}}4
		{Add_3}{{Add\textsubscript{3}}}4
		{Sub_3}{{Sub\textsubscript{3}}}4
		{sub_3}{{sub\textsubscript{3}}}4
		{Ext_3}{{Ext\textsubscript{3}}}4
		{eval_4}{{eval\textsubscript{4}}}5
		{Eval_4}{{Eval\textsubscript{4}}}5
		{Print_4}{{Print\textsubscript{4}}}5
		{print_4}{{print\textsubscript{4}}}5
		{opt_4}{{opt\textsubscript{4}}}4
		{Opt_4}{{Opt\textsubscript{4}}}4
		{HasEval_4}{{HasEval\textsubscript{4}}}8
		{getEval_4}{{getEval\textsubscript{4}}}8
		{EvalDict_4}{{EvalDict\textsubscript{4}}}9
		{HasPrint_4}{{HasPrint\textsubscript{4}}}9
		{getPrint_4}{{getPrint\textsubscript{4}}}9
		{PrintDict_4}{{PrintDict\textsubscript{4}}}{10}
		{HasOpt_4}{{HasOpt\textsubscript{4}}}7
		{getOpt_4}{{getOpt\textsubscript{4}}}7
		{OptDict_4}{{OptDict\textsubscript{4}}}8
		{OptPrintDict_4}{{OptPrintDict\textsubscript{4}}}{14}
		{OPD_4}{{OPD\textsubscript{4}}}4
		{Expr_4}{{Expr\textsubscript{4}}}5
		{Lit_4}{{Lit\textsubscript{4}}}4
		{Add_4}{{Add\textsubscript{4}}}4
		{Sub_4}{{Sub\textsubscript{4}}}4
		{SubLoop_4}{{SubLoop\textsubscript{4}}}8
		{sub_4}{{sub\textsubscript{4}}}4
		{Neg_4}{{Neg\textsubscript{4}}}4
		{NegLoop_4}{{NegLoop\textsubscript{4}}}8
		{neg_4}{{neg\textsubscript{4}}}4
		{Ext_4}{{Ext\textsubscript{4}}}4
		{eval_g}{{eval\textsubscript{g}}}5
		{Eval_g}{{Eval\textsubscript{g}}}5
		{Print_g}{{Print\textsubscript{g}}}6
		{print_g}{{print\textsubscript{g}}}6
		{opt_g}{{opt\textsubscript{g}}}4
		{Opt_g}{{Opt\textsubscript{g}}}4
		{HasEval_g}{{HasEval\textsubscript{g}}}8
		{getEval_g}{{getEval\textsubscript{g}}}8
		{EvalDict_g}{{EvalDict\textsubscript{g}}}9
		{HasPrint_g}{{HasPrint\textsubscript{g}}}9
		{getPrint_g}{{getPrint\textsubscript{g}}}9
		{PrintDict_g}{{PrintDict\textsubscript{g}}}{10}
		{HasOpt_g}{{HasOpt\textsubscript{g}}}7
		{getOpt_g}{{getOpt\textsubscript{g}}}7
		{OptDict_g}{{OptDict\textsubscript{g}}}8
		{OptPrintDict_g}{{OptPrintDict\textsubscript{g}}}{14}
		{OPD_g}{{OPD\textsubscript{g}}}4
		{Expr_g}{{Expr\textsubscript{g}}}5
		{Lit_g}{{Lit\textsubscript{g}}}4
		{Add_g}{{Add\textsubscript{g}}}4
		{Sub_g}{{Sub\textsubscript{g}}}4
		{SubLoop_g}{{SubLoop\textsubscript{g}}}8
		{sub_g}{{sub\textsubscript{g}}}4
		{Neg_g}{{Neg\textsubscript{g}}}4
		{NegLoop_g}{{NegLoop\textsubscript{g}}}8
		{neg_g}{{neg\textsubscript{g}}}4
		{NotLoop_g}{{NotLoop\textsubscript{g}}}8
		{Not_g}{{Not\textsubscript{g}}}4
		{not_g}{{not\textsubscript{g}}}4
		{EqLoop_g}{{EqLoop\textsubscript{g}}}7
		{Eq_g}{{Eq\textsubscript{g}}}3
		{eq_g}{{eq\textsubscript{g}}}3
		{Ext_g}{{Ext\textsubscript{g}}}4
}
