You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dataY:Bool->TypewhereT: Y True
F: Y False
failing "While processing left hand side of with block in foo. Can't match on T (Erased argument)"foo: {f : _} -> (b : Bool) -> (0 _ : Y (f b)) ->()
foo b y with (f b)
foo b T|True=()
foo b F|False=()
But it works with a nested function:
foo: {f : _} -> (b : Bool) -> (0 _ : Y (f b)) ->()
foo b y = go (f b) y
wherego: (b : Bool) -> (0 _ : Y b) ->()
go TrueT=()
go FalseF=()
The types in context are correct:
foo: {f : _} -> (b : Bool) -> (0 _ : Y (f b)) ->()
foo b y with (f b)
foo b y |True=?hole
foo b y |False=()
Main>:t hole
f:Bool->Bool0y: Y True
b:Bool------------------------------hole:()
Expected Behavior
Successful compilation
Observed Behavior
Error: While processing left hand side of with block in foo. Can't match on T (Erased argument).
Main:7:9--7:10
3|F: Y False
4|5|foo: {f : _} -> (b : Bool) -> (0 _ : Y (f b)) ->()6| foo b y with (f b)
7| foo b T|True=()
^
The text was updated successfully, but these errors were encountered:
Steps to Reproduce
But it works with a nested function:
The types in context are correct:
Expected Behavior
Successful compilation
Observed Behavior
The text was updated successfully, but these errors were encountered: