eta reduction in GHCi for an educational purpose
Hello,\\
Is it possible to have in GHCi an eta reduction of an expression for an educational purpose?\\
We would have access by typing a command like this on the line
:eta reduction <expr>
with the following annotation
show the eta reduction of <expr>
in short :er <expr>
.\\
example:\\
Prelude> length xs = foldl (\n _ -> n+1) 0 xs
Prelude> :eta reduction length --or :er length
length = foldl (\n _ -> n+1) 0
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |