-
-
Save kvanbere/c44fb5762ee9189bd8d74a9028c15daa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- Specialization of return | |
plus_Retn :: Int -> Int -> Int# | |
plus_Retn (I# a) (I# b) = a +# b | |
(+) :: Int -> Int -> Int | |
a + b = I# (plus_Retn a b) | |
-- Specialization of arguments | |
plus_Retn2 :: Int# -> Int# -> Int# | |
plus_Retn2 a b = a +# b | |
plus_Retn1 :: Int# -> Int -> Int# | |
plus_Retn1 a b = case b of { I# b' -> plus_Retn2 a b' } | |
plus_Retn :: Int -> Int -> Int# | |
plus_Retn a b = case a of { I# a' -> plus_Retn1 a' b } | |
(+) :: Int -> Int -> Int | |
a + b = I# (plus_Retn a b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment