idris-lang / idris-tutorial Goto Github PK
View Code? Open in Web Editor NEWA tutorial to the Idris Programming Language.
A tutorial to the Idris Programming Language.
Add a section detailing how to roll your own library.
Add an explanation that totality checking is not perfect (nor even particularly good yet). Too many people seem surprised when it doesn't work as well as they'd like.
idris-lang/Idris-dev#1553 makes the names of the library far more consistent. We need to update the documentation to match the renamings.
It would be a good idea to add a Creative Commons 4.0 License to the tutorial. BSD license isn't good for content. I propose use of the: CC BY-SA 4.0.
More information over CC licensing can be found here: http://creativecommons.org/
Use listings package and link to the provided examples within the tutorial instead of duplicating them.
Change
instance Functor Eval where
fmap f (MkEval g) = MkEval (\e => fmap f (g e))
to
instance Functor Eval where
map f (MkEval g) = MkEval (\e => map f (g e))
Here:
https://github.com/idris-lang/idris-tutorial/blob/master/content/starting.tex#L75-108
Specifically, the :js / :javascript command no longer exists.
In its place, you can use :compile <codegen> <filename>
.
The end of section 2.2 doesn't display the flag prefixes properly.
From #idris:
ziman: it's probably latex that converts "--" to an en-dash
jfdm: indeed it is
jfdm: you can get round it using \verb!--check!
Section 3.3 expands Nat
s at the REPL. Latest behaviour seems to pretty-print Nat
s as normal integers.
! notation is currently not documented anywhere except by example
Currently the tutorial talks briefly about the so data type and using it to ensure some runtime check has been performed but it doesn't mention any ways to construct so types.
Someone in IRC got bit by this.
Just putting it here as a reminder to mention.
See idris-lang/Idris-dev#1502 where the following was reported:
It seems there's an error on the code example in 3.8.3 / Dependent Pairs:
data Exists : (A : Type) -> (P : A -> Type) -> Type where
Ex_intro : {P : A -> Type} -> (a : A) -> P a -> Exists A P
has error:
When elaborating type of Main.Ex_intro:
No such variable A
I think it should be:
data Exists : (A : Type) -> (P : A -> Type) -> Type where
Ex_intro : {A : Type} -> {P : A -> Type} -> (a : A) -> P a -> Exists A P
The user shaleh on Reddit pointed out that section 5.3 on parameters
blocks doesn't explicitly state that the new parameters come before the ones specified on each definition.
Create print and electronic versions of the tutorial.
Point being that they are not really different, but the tutorial mentions both and doesn't qualify what the difference is.
The tutorial needs to explain the new 'Lazy' type and implict Force/Delay
It would be immensely useful to have even at least one of those available out of the box without having to clone the repo (or a fork really) and figure out a way to build it. PDF's aren't particularly nice for on-screen reading!
Update tutorial to account for bitrot since latest released version of Idris.
Of note the section on unit testing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.