[GHC] #10963: Beginner-targeted language extension

GHC ghc-devs at haskell.org
Tue Apr 26 12:55:09 UTC 2016


#10963: Beginner-targeted language extension
-------------------------------------+-------------------------------------
        Reporter:  kanetw            |                Owner:
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2136
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by takenobu):

 Replying to goldfire and kanetw in comment:9 and comment:10:

 Thank you for explaining by comments and wiki page.

 I recognized that multiple specialization will confuse beginners.

 So I like (1D, 2B, 3D) in Richard's wiki page.

  * 1D, 2B :
     I think it's better that `:type` is simply keep for beginners.

  * 3D :
     For instance, we adopt `:type-verbose` or `:tv` command.
     The command intuitively represents the relation between instantiation
 and generalization.
     It's good for middle users.


 {{{
 ghci> :tv length
 length :: forall {t :: * -> *} {a}. Foldable t => t a -> Int

 Specialized:
 length :: [a] -> Int      -- with default (2B)
 length :: Maybe a -> Int  -- with one of any order
 }}}

 [[BR]]

 My decision criteria:
 * Basic command (:t) is priority for beginners.
 * Additional command (:tv) intuitively provide the relation between
 instantiation and generalization for middle users.

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


More information about the ghc-tickets mailing list