Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created January 17, 2014 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pedrofurla/8467057 to your computer and use it in GitHub Desktop.
Save pedrofurla/8467057 to your computer and use it in GitHub Desktop.
error "todo" is special? `in` can contain statements?
hardCoreFunction a b c =
let z = a + b
k = b + c
in
error "todo" -- should be removed when the code below is not comment
z + k -- these are only experiements, usually explorations into the types of z and k
@pedrofurla
Copy link
Author

The real case - compiled! And obvious throws exceptions!

natural ::
  Parser Int
natural =
  -- bindParser :: (a -> Parser b) -> Parser a -> Parser b
  let 
    oparser :: Chars -> Optional (Parser Int)
    oparser cs = (valueParser . fst) <$> (reads cs)
  in 
    error ""
    bindParser (\cs -> (oparser cs) ?? failed) (list digit)

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