on master help sign in
Some documentation updates
5399670Edwin Brady
CHANGELOG+7−1
@@ -8,11 +8,17 @@ User visible changes:
8* Totality checking and 'total' keyword
8* Totality checking and 'total' keyword
9* Auto implicits and default argument values {auto n : T}, {default val n : T}
9* Auto implicits and default argument values {auto n : T}, {default val n : T}
10* Additions to prelude, including Nat and List theorems
10* Additions to prelude, including Nat and List theorems
11+* Overlapping type class instances disallowed
12+* Many extensions to nat and list libraries (mostly thanks to Dominic
13+ Mulligan)
11−* New libs: control.monad.identity, control.monad.state
14+* New libraries: control.monad.identity, control.monad.state
15+* Small improvements in error reporting
12
16
13Internal changes:
17Internal changes:
14
18
15* Faster compilation (only compiling names which are used)
19* Faster compilation (only compiling names which are used)
20+* Better type class resolution
21+* Lots of minor bug fixes
16
22
170.1.x to 0.9.0:
230.1.x to 0.9.0:
18
24
idris.cabal+1−1
@@ -41,7 +41,7 @@ Cabal-Version: >= 1.6
41Build-type: Custom
41Build-type: Custom
42
42
43Extra-source-files: lib/Makefile lib/*.idr lib/prelude/*.idr lib/network/*.idr
43Extra-source-files: lib/Makefile lib/*.idr lib/prelude/*.idr lib/network/*.idr
44− tutorial/examples/*.idr
44+ lib/control/monad/*.idr tutorial/examples/*.idr
45
45
46source-repository head
46source-repository head
47 type: git
47 type: git
tutorial/classes.tex+7−5
@@ -53,6 +53,7 @@ Idris> show (S (S (S O)))
53\useverb{shownat}
53\useverb{shownat}
54
54
55\noindent
55\noindent
56+Only one instance of a class can be given for a type --- instances may not overlap.
56Instance declarations can themselves have constraints. For example, to define a
57Instance declarations can themselves have constraints. For example, to define a
57\texttt{Show} instance for vectors, we need to know that there is a \texttt{Show}
58\texttt{Show} instance for vectors, we need to know that there is a \texttt{Show}
58instance for the element type, because we are going to use it to convert each element
59instance for the element type, because we are going to use it to convert each element
@@ -71,11 +72,12 @@ instance Show a => Show (Vect a n) where
71\useverb{showvec}
72\useverb{showvec}
72
73
73\noindent
74\noindent
74−\textbf{Remark: } The type of the auxiliary function \texttt{show'} is important. The type
75+\textbf{Remark: } The type of the auxiliary function \texttt{show'} is
75−variables \texttt{a} and \texttt{n} which are part of the instance declaration for
76+important. The type variables \texttt{a} and \texttt{n} which are part of the
76−\texttt{Show (Vect a n)} are fixed across the entire instance declaration. As a result,
77+instance declaration for \texttt{Show (Vect a n)} are fixed across the entire
78+instance declaration. As a result, we do not have to constrain \texttt{a}
77−we do not have to constrain \texttt{a} again. Furthermore, it means that if we use
79+again. Furthermore, it means that if we use \texttt{n} in the type, it refers
78−\texttt{n} in the type, it refers to the length of the outermost list \texttt{xs}. Therefore,
80+to the (fixed) length of the outermost list \texttt{xs}. Therefore,
79we use a different name for the length \texttt{n'} in \texttt{show'}.
81we use a different name for the length \texttt{n'} in \texttt{show'}.
80
82
81\subsection{Default Definitions}
83\subsection{Default Definitions}
tutorial/idris-tutorial.pdf

Binary file not shown.