This is the first pass at displaying values for intermediate function calls. The function added to Main.hs should result in this UI:
Source
g :: forall a . Integral a => a -> a -> Double
g x y =
let least = lcm x y
in fromIntegral least ^^ gcd x y
Variables
$arg1 = 6
$arg2 = 15
$result = 27000.0
fromIntegral = 30.0
_gcd = \
_gcd' = 3
_lcm = \
_lcm' = 30
least = 30
x = 6
y = 15
I disabled infix function handling for this PR, I realized I have to do some substitution to create legal variable names for some of the operator functions.
The couple of tests I added should be automated hspec, etc. tests, but I left them as just 'prints' for now to avoid breaking your build.
I should say more generally that it looks quite plausible, thanks a lot. I've got the flu right now so not in a detail state of mind but will get to it soon.
This is the first pass at displaying values for intermediate function calls. The function added to Main.hs should result in this UI:
Source
Variables
I disabled infix function handling for this PR, I realized I have to do some substitution to create legal variable names for some of the operator functions.
The couple of tests I added should be automated hspec, etc. tests, but I left them as just 'prints' for now to avoid breaking your build.