On 2016-01-20 at 06:39:32 +0100, Richard Eisenberg wrote: > I'm sure there's an easy answer to this, but I'm wondering: why is the > CallStack feature implemented with implicit parameters instead of just > a magical constraint? Whenever I use this feature, I don't want to > have to enable -XImplicitParams and then make sure I get the name > right. What would be wrong with, e.g., > >> undefined :: AppendsCallStack => a > > Seems simpler. Is it problems with a nullary class?
Btw, would that, as a side-effect, make the currently shown type-signature in GHCi a bit nicer than the current ,---- | GHCi, version 8.1.20160117: http://www.haskell.org/ghc/ :? for help | Loaded GHCi configuration from /home/hvr/.ghci | | λ:1> :info error | error :: forall (v :: GHC.Types.Levity) (a :: TYPE v). ?callStack::GHC.Stack.Types.CallStack => [Char] -> a -- Defined in ‘GHC.Err’ | | λ:2> :info undefined | undefined :: forall (v :: GHC.Types.Levity) (a :: TYPE v). ?callStack::GHC.Stack.Types.CallStack => a -- Defined in ‘GHC.Err’ `---- ...? _______________________________________________ ghc-devs mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
