Skip to content

*Log b (b^n) is wrongly reduced to n if b is not a literal  #44

@rowanG077

Description

@rowanG077

While working on #43 I noticed this bug. It is not allowed to reduce because if b <= 1 then the logarithm will never reduce. This check is already applied if b is a literal but not in the general case.

Easy fix is just adding that check. Which sucks because now existing code will break. Better would be to start emitting new constraints, similar to how ghc-typelits-natnormalise does it. This will still break existing code. But at least the only thing that would need to happen is add the appropriate constraints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions