This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# TypeBully forces functions to respect their typespecs by rewriting the function clauses to include proper guards. | |
# | |
# For example, the Wimp module below: cry/3 has typespecs, but no enforcing guards, normally, calling cry/3 would | |
# always match the first function clause, but TypeBully forces it to select the correct one based on its typespec. | |
# | |
# | |
# Without TypeBully: | |
# | |
# iex(1)> Wimp.cry("whaa") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Would this be useful to Phoenix? | |
# | |
# In controllers, it'd be nice to be able to refer to status codes as atoms instead of integers. | |
# | |
defmodule Phoenix.Controller.StatusCodes do | |
@http_status_codes %{ |
OlderNewer