Skip to content

Cannot prove termination of functions on mutually recursive types #2552

Open
@facundominguez

Description

@facundominguez

I don't know how to convince LH that function f is terminating in the following program.

module Test where

data X = X Y
data Y = Y0 | Y X

f :: X -> Int
f (X y) = 1 + g y -- isn't y smaller than (X y)?

g :: Y -> Int
g Y0 = 0
g (Y x) = f x -- isn't x smaller than (Y x)?

The recursion does look structural, but LH does not agree.

This is likely related to #1685.

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