/
preamble.tex
114 lines (112 loc) · 7.01 KB
/
preamble.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
%\usepackage{lmodern} % math, rm, ss, tt
% Contents of listings-setup.tex
\usepackage{xcolor}
\usepackage[scaled]{beramono}
\usepackage{graphicx}
\lstset{ %
basicstyle=\ttfamily\linespread{4},
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color[rgb]{0.127,0.427,0.514}\ttfamily\itshape,
deletekeywords={}, % if you want to delete keywords from the given language
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
%frame=single, % adds a frame around the code
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
language=Haskell, % the language of the code
keywordstyle=\color[HTML]{228B22}\bfseries,
morekeywords={xs},
keywords=[2]{}, % if you want to add more keywords to the set
keywordstyle=[2]{\ttfamily\color[HTML]{800000}},
keywordstyle=[3]{\ttfamily\color[HTML]{800000}},
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=true, % show tabs within strings adding particular underscores
stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color[rgb]{0.639,0.082,0.082}\ttfamily,
tabsize=2, % sets default tabsize to 2 spaces
%title=\lstname,
%postbreak = \mbox{\ensuremath{\hookrightarrow}},
% showstringspaces=false,
%ndkeywordstyle=\color[HTML]{228B22}\bfseries
% show the filename of files included with \lstinputlisting; also try caption instead of title,
}
\lstdefinelanguage{Haskell}
{otherkeywords={=>},%
morekeywords={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,exitFailure,exitSuccess,abs,%
accum,accumArray,accumulate,acos,acosh,all,and,any,ap,appendFile,
approxRational,array,asTypeOf,asin,asinh,assocs,atan,atan2,atanh,%
bounds,bracket,bracket_,break,catch,catMaybes,ceiling,chr,cis,%
compare,concat,concatMap,conjugate,const,cos,cosh,curry,cycle,%
decodeFloat,delete,deleteBy,deleteFirstsBy,denominator,applyM,%
digitToInt,div,divMod,drop,dropWhile,either,elem,elems,elemIndex,%
elemIndices,encodeFloat,enumFrom,enumFromThen,enumFromThenTo,%
enumFromTo,error,even,exitFailure,exitWith,exp,exponent,fail,%
filter,filterM,find,findIndex,findIndices,flip,floatDigits,%
floatRadix,floatRange,floatToDigits,floor,foldl,foldM,foldl1,%
foldr,foldr1,fromDouble,fromEnum,fromInt,fromInteger,%
fromIntegral,fromJust,fromMaybe,fromRat,fromRational,%
fromRealFrac,fst,gcd,genericLength,genericTake,genericDrop,%
genericSplitAt,genericIndex,genericReplicate,getArgs,getChar,%
getContents,getEnv,getLine,getProgName,getStdGen,getStdRandom,%
group,groupBy,guard,hClose,hFileSize,hFlush,hGetBuffering,%
hGetChar,hGetContents,hGetLine,hGetPosn,hIsClosed,hIsEOF,hIsOpen,%
hIsReadable,hIsSeekable,hIsWritable,hLookAhead,hPutChar,hPutStr,%
hPutStrLn,hPrint,hReady,hSeek,hSetBuffering,hSetPosn,head,%
hugsIsEOF,hugsHIsEOF,hugsIsSearchErr,hugsIsNameErr,%
hugsIsWriteErr,id,ioError,imagPart,index,indices,init,inits,%
inRange,insert,insertBy,interact,intersect,intersectBy,%
intersperse,intToDigit,ioeGetErrorString,ioeGetFileName,%
ioeGetHandle,isAlreadyExistsError,isAlreadyInUseError,isAlpha,%
isAlphaNum,isAscii,isControl,isDenormalized,isDoesNotExistError,%
isDigit,isEOF,isEOFError,isFullError,isHexDigit,isIEEE,%
isIllegalOperation,isInfinite,isJust,isLower,isNaN,%
isNegativeZero,isNothing,isOctDigit,isPermissionError,isPrefixOf,%
isPrint,isSpace,isSuffixOf,isUpper,isUserError,iterate,ixmap,%
join,last,lcm,length,lex,lexDigits,lexLitChar,liftM,liftM2,%
liftM3,liftM4,liftM5,lines,listArray,listToMaybe,log,logBase,%
lookup,magnitude,makePolar,map,mapAccumL,mapAccumR,mapAndUnzipM,%
mapM,mapM_,mapMaybe,max,maxBound,maximum,maximumBy,maybe,%
maybeToList,min,minBound,minimum,minimumBy,mkPolar,mkStdGen,%
mplus,mod,msum,mzero,negate,next,newStdGen,not,notElem,nub,nubBy,%
null,numerator,odd,openFile,or,ord,otherwise,partition,phase,pi,%
polar,pred,print,product,properFraction,putChar,putStr,putStrLn,%
quot,quotRem,random,randomIO,randomR,randomRIO,randomRs,randoms,%
rangeSize,read,readDec,readFile,readFloat,readHex,readInt,readIO,%
readList,readLitChar,readLn,readParen,readOct,readSigned,reads,%
readsPrec,realPart,realToFrac,recip,rem,repeat,replicate,return,%
reverse,round,scaleFloat,scanl,scanl1,scanr,scanr1,seq,sequence,%
sequence_,setStdGen,show,showChar,showEFloat,showFFloat,%
showFloat,showGFloat,showInt,showList,showLitChar,showParen,%
showSigned,showString,shows,showsPrec,significand,signum,sin,%
sinh,snd,sort,sortBy,span,split,splitAt,sqrt,stderr,stdin,stdout,%
strict,subtract,succ,sum,system,tail,tails,take,takeWhile,tan,%
tanh,toEnum,toInt,toInteger,toLower,toRational,toUpper,transpose,%
truncate,try,uncurry,undefined,unfoldr,union,unionBy,unless,%
unlines,until,unwords,unzip,unzip3,unzip4,unzip5,unzip6,unzip7,%
userError,when,words,writeFile,zero,zip,zip3,zip4,zip5,zip6,zip7,%
zipWith,zipWithM,zipWithM_,zipWith3,zipWith4,zipWith5,zipWith6,%
zipWith7},%
morekeywords=[2]{AbsoluteSeek,AppendMode,%
Array,BlockBuffering,Bool,BufferMode,Char,Complex,Double,Either,%
FilePath,Float,Int,Integer,IO,IOError,Ix,LineBuffering,Maybe,%
Ordering,NoBuffering,ReadMode,ReadWriteMode,ReadS,RelativeSeek,%
SeekFromEnd,SeekMode,ShowS,StdGen,String,Void,Bounded,Enum,Eq,%
Eval,ExitCode,Floating,Fractional,%
Functor,Handle,HandlePosn,IOMode,Integral,List,Monad,MonadPlus,%
MonadZero,Num,Numeric,Ord,Random,RandomGen,Ratio,Rational,Read,%
Real,RealFloat,RealFrac,Show,System,Prelude,EQ,False,GT,Just,%
Left,LT,Nothing,Right,WriteMode,True,},%
morekeywords=[3]{Player,Kalaha,PitCount,StoneCount,KPos,KState,Tree,Node,Game,AlphaBeta},%
sensitive,%
morecomment=[l]--,%
morecomment=[n]{\{-}{-\}},%
morestring=[b]"%
}[keywords,comments,strings]%