[GHC] #13811: eta reduction in GHCi for an educational purpose

GHC ghc-devs at haskell.org
Sat Jun 10 16:17:55 UTC 2017


#13811: eta reduction in GHCi for an educational purpose
-------------------------------------+-------------------------------------
           Reporter:  vanto          |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.0.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13811>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list