ndmitchell / debug

Haskell library for debugging
BSD 3-Clause "New" or "Revised" License
122 stars 7 forks source link

Function param names missing #25

Closed marklnichols closed 6 years ago

marklnichols commented 6 years ago

For example, with this function

debug [d|
    lcm_gcd :: (Integral a) => a -> a -> Double
    lcm_gcd x y =
        let least = lcm x y
        in fromIntegral least ^^ gcd x y
    |]

We still get $arg1 and $arg2, but x and y are missing.

pepeiborra commented 6 years ago

I will eventually take a look at this since it's probably my fault, but my life would be much easier if there was a failing test.

pepeiborra commented 6 years ago

This stopped working because of 272f8ad676fb66e22d1ea65f81827dc75a15d381 which was intended as a fix for list comprehensions. I'll roll it back and create a separate issue for list comps.

marklnichols commented 6 years ago

I'd like to have some automated tests as well. It's not clear to me how to do this...

pepeiborra commented 6 years ago

You can follow the approach I've taken in https://github.com/ndmitchell/debug/pull/30