Instructor :Tim Sheard
Textbook : The Haskell School of Expression by Paul Hudak
Download slides from here
- Slides: Course information, Intro to Hugs, Syllabus
- Haskell Code: hd,tl,plus,len,sort, etc.
- Slides: tuples, polymorphism, higher order functions, strings & characters, lazy evaluation
- Haskell Code: mymap, myfoldr, split, next, within, etc.
- Additional examples not covered in lecture
- Slides: Usefull pre-defined functions on lists. Data-Type declarations, Defining functions over datatypes using patterns, Enumerations, and the Shape Datatype of the text. This lecture defines the module Shape
- Haskell Code: Day, valday, dayval, Move, beats, Direction, Tagger, isNum, Temp, toKelvin, Shape, circle, square, area, triArea, distBetween etc.
- Slides: Homework #1 Solutions, Program Manipulation, Comparing the functional paradigm, Actions and Haskell, Monads, Simple Graphics.
- Homework #1 examples
- Haskell Code: strlen, fact, ncopies, power, str2int, explist, Bintree, leftmost, replace, replace', ex2, getline', wc, ex7, spaceclose, etc.
- Slides: Using the graphics primitives, Drawing Primitive Shapes, Sierpinski’s Triangle, Snow-flake, Coordinate Systems, Position independent shapes, Drawing the Shape Data-type. This lecture defines the module Draw
- Haskell Code: fillTri, sierpinskiTri,drawPloy,eqTri,drawStar, snow1,snow2,snow3,sh1,sh2,sh3,sh4,ColoredShapes, drawShapes etc.
- Slides: Polymorphic Functions, Polymorphic datatypes, Type Constructors define polymorphic Constructor functions, Recursive datatypes, Higher Order functions, Perimeters of Shapes.
- Haskell Code: len,tag1,Option,pos,Pair,Pair2,Mylist,Twolist,append2,rev2,Nat,twoNat, mymap,myfoldr,applyTwice.,z,concat1 concat2,perimeter,sides, side2, nextEl.
- Slides: Trees, Kinds of trees - branching factor, functions over trees, flattening a tree -- use of accumulating parameter, patterns of recursion - the fold for trees, Arithmetic expressions, Infinite trees.
- Haskell Code: Tree, IntegerTree, SimpleTree, InternalTree, FancyTree, mapTree, fringe, treeSize, treeHeight, foldTreee, Expr2, Expr, evaluate, sumFromN, sumAll, add1, sumAll2, showE, Region.
- Slides: Sets and characteristic functions, Regions, Is a point in a Region?, Currying, Sections, Anonymous functions, function composition. This lecture defines the module Region
- Haskell Code: Set, even, union, intersect, complement. Region, Vector, Ray, isLeftOf, containsS, containsR, simple, totalSquareArea.
- Slides: Review of Proofs by calculation, Structure of Proofs by induction over lists, Proofs by induction with case analysis, Proofs by structural Induction, Proofs by induction over Trees.
- There is no Haskell Code associted with this lecture, but there are additional sildes on using proof by induction to prove things about programs here: Using Calculation to prove 2 functions are equal, An example from class drawPic, Laws about Monads, Laws about sequence, Using Calculation to improve functions, An example from the first Homework assignment.
- Slides: Pictures, Low level graphics bit-maps: G.Region, From Region to G.Region, Shape to G.Region, Drawing G.Region, Reactive Pictures. This lecture defines the module Picture
- Haskell Code: Picture, regionToGRegion,shapeToGRegion, drawRegionInWindow,drawPic,draw,spaceClose
- Slides: The Haskell Class system, Instance declarations, Inheritance and dependent classes, Derived instances, The Show class, The Fix operator from homework #5.
- Haskell Code: Eq,Aop,Aexp,aop_eq,aexp_eq. Complex, complex_add, complex_sub, complex_mult. Num, Ord, Tree, Mylist, int_list_eq, list_eq. Bush, Show, showTree, showsTree, showsList. Color, Exp, member, fix.
- Slides: Simple animations, Buffered graphics, Animations in Haskell, Complex animations, Lifting primitives to animations, Behaviors, Type classes animations and Behaviors, Time translation.
- Haskell Code: Animation, Time,rubberBall,revolvingBall, Planets, animate,regionToGraphic,picToGraphic. Behavior, lift0, lift1, lift2. Instance defintions for Behavior(Num,Fractional,Floating). Class Ani with methods "empty" and "over". Instances for Ani([ ], (->), Picture,Behavior). timeTrans, ifFun, cond, animate2. Class Turnable, rotate, kaleido, spectrum. This lecture defines the module Animation.
- Slides: Infinite lists v.s. Streams, Normal order evaluation, Recursive streams, Stream Diagrams, Lazy patterns, Memoization, Inductive properties of infinite lists.
- Haskell Code: Stream, twos, ignore, fibA, fibs, counter, ifx, followedby, Response, Request, client, server, reqs, resps, fibsFn, memo1. The memo function memo1 can be found in the memo library.
- Slides: Simple Animations - Review. Reactive animations. Vocabulary. Examples. Implementation of behaviors and events.
- Haskell Code: This lecture defines the module Fal.
- Slides: Files, Channels, and Handles. IO exception handling. First Class Channels. Concurrency and ForkIO.
- Haskell Code:
- Slides: Higher Order types. Type constructors that take types as arguments. Functor, Monad, MonadPlus and MonadZero.
- Haskell Code:
- Slides: Haskore System. The Music datatype. MIDI Instruments. Pitch & absolute Pitch. Composing Music: Delay, Repeating, Transposing. Manipulating Music: Duration, Cutting, Reversing. Percussion. Presentation and the MIDI file format.
- Haskell Code:
- The Music Module.
- Slides: Interpreting Music, Performance, MidiFile.
- Haskell Code:
No comments:
Post a Comment