Curry-Browser discards variables in view "Curry code (generated from FlatCurry)"
Consider the following program:
f x@(y:xs) = x
g xs = fcase xs of
_ : _ -> xs
The generated FlatCurry code for this program is
f :: [a] -> [a]
f v1 = fcase v1 of
v2 : v3 -> v1
g :: [a] -> [a]
g v1 = fcase v1 of
v2 : v3 -> v1
whereas the Curry code generated from this code is
f :: [a] -> [a]
f (v2 : v3) = v1
g :: [a] -> [a]
g (v2 : v3) = v1
Obviously, variables that are matched against on top of the right-hand side are discarded independent of whether they are used in the remaining expression or not. This should be changed to either leave the fcase-expression as is or generate an as-pattern whenever the matched variable is used afterwards.