Skip to content

Instantly share code, notes, and snippets.

@laser
Last active January 14, 2016 18:29
Show Gist options
  • Save laser/525185fbffcf7bf11589 to your computer and use it in GitHub Desktop.
Save laser/525185fbffcf7bf11589 to your computer and use it in GitHub Desktop.
CIS 194: Second Meeting (Week 01 Homework + Discussion of Week 02)

CIS 194: Second Meeting (12:00PM - 1:30PM PDT)

Agenda

  • 12:00PM: Sandwiches
  • Some useful tools
  • Solicit presentation for Feb 5 (type classes)
  • 12:30PM: Pain points from Week 1
  • 12:50PM: Week 1 Homework Demo (Jeegar)

Tools

GHCi

  • The :type command
  • The :browse command
  • The :load command
  • Importing a module from a loaded package
  • GHCi w/out importing modules

Stackage and Cabal

  • LTS versions (stack.yml)
  • Anatomy of a .cabal file
  • Finding documentation for your LTS version

Debug.Trace

import Debug.Trace

example :: Int -> Int -> Int
example x y = trace ("x and y: " ++ (show x) ++ " " ++ (show y)) (x + y)

Typed Holes

sum :: [Int] -> Int
sum xs = foldr _f 10 xs
sum' :: _ -> Int
sum' xs = foldr (+) 10 xs

Weekly Presentations

I'm looking for someone who'd like to present a summary of the Week 5 lecture on February 4th.

Pain Points from the First Week

  • Problems running the tests?
  • Problems using the REPL?
  • ???

Homework 1 Demo and Discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment