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
data Lit = Lit Int | |
data Add l r = Add l r | |
class Eval x where | |
eval :: x -> Int | |
instance Eval Lit where | |
eval (Lit x) = x | |
instance (Eval l, Eval r) => Eval (Add l r) where |
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
.file "main.cpp" | |
.text | |
.p2align 4,,15 | |
.type _ZL3addRKiS0_.isra.0, @function | |
_ZL3addRKiS0_.isra.0: | |
.LFB3: | |
.cfi_startproc | |
leal (%rdi,%rsi), %eax | |
ret | |
.cfi_endproc |
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
.file "main.cpp" | |
.text | |
.type _ZL3addRKiS0_.isra.0, @function | |
_ZL3addRKiS0_.isra.0: | |
.LFB3: | |
.cfi_startproc | |
leal (%rdi,%rsi), %eax | |
ret | |
.cfi_endproc | |
.LFE3: |
NewerOlder