
#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 goldfire): Thanks for linking to that. There may be two questions here: 1. Do we want 1 specialization or many? I have to say I really like using the `default` list to prescribe the specializations, but perhaps another criterion (like load order, as originally proposed in the linked-to email) can be used. 2. Do we want the output to come straight from `:type`, which would make every use of that very common command much longer? Re (1): I chose to produce 1 specialization for two reasons: A. Suppose we have a type constrained by `(Foldable f, Num a) => ...`. If we start printing out multiple specializations, we get a combinatorial number of them. Where do we cut this off? How are they ordered? B. Doing just 1 specialization could use the built-in defaulting mechanism very, very easily. Anything else would be quite a bit more challenging, I think. This isn't a reason to avoid other designs, exactly, but a point I wanted to make here. And, yes, I agree with comment:8 (written concurrently with this one) that we should seek more input. I'll put together that wiki page and post more broadly later today. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10963#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler