Skip to content

Instantly share code, notes, and snippets.

@NorfairKing
Created August 17, 2016 09:11
Show Gist options
  • Save NorfairKing/6199aa3e264fb0c322dc7584910cb40d to your computer and use it in GitHub Desktop.
Save NorfairKing/6199aa3e264fb0c322dc7584910cb40d to your computer and use it in GitHub Desktop.
newtype Deprecated a b = Deprecated { undeprecate :: a -> b }
(💩 ) :: Deprecated a b -> a -> b
(💩 ) = undeprecate
myDeprecatedFunction :: Deprecated Int Int
myDeprecatedFunction = Deprecated myFunction
where
myFunction :: Int -> Int
myFunction = (*2)
main :: IO ()
main = print $ myDeprecatedFunction 💩 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment