Steps to Reproduce
Load this:
public export
data Tree : Type where
Leaf : Tree
Node : Tree -> Tree -> Tree
namespace Foo
public export
data Path : Type where
Nil : Path
ConsL : Path -> Path
ConsR : Path -> Path
namespace Bar
public export
data PathIn : Tree -> Type where
Nil : PathIn Leaf
ConsL : PathIn lft -> PathIn (Node lft rgt)
ConsR : PathIn rgt -> PathIn (Node lft rgt)
-- Expecting identity transformation to kick in
f : PathIn tree -> Path
f [] = []
f (ConsL t) = ConsL (f t)
f (ConsR t) = ConsR (f t)
Then at the REPL:
Expected Behavior
Main.f
...
Compiled: \ {arg:1} => {arg:1}
Observed Behavior
Main.f
...
Compiled: \ {arg:1} => case {arg:1} of
{ Main.Bar.Nil {tag = 0} => Main.Foo.Nil {tag = 0}
; Main.Bar.ConsL {tag = 1} {e:2} => Main.Foo.ConsL {tag = 1} (Main.f {e:2})
; Main.Bar.ConsR {tag = 2} {e:5} => Main.Foo.ConsR {tag = 2} (Main.f {e:5})
}
Steps to Reproduce
Load this:
Then at the REPL:
Expected Behavior
Observed Behavior