[GHC] #10794: Extension request: "where" clauses in type signatures
GHC
ghc-devs at haskell.org
Tue Aug 25 22:44:25 UTC 2015
#10794: Extension request: "where" clauses in type signatures
-------------------------------------+-------------------------------------
Reporter: danso | Owner:
Type: feature request | Status: new
Priority: lowest | Milestone:
Component: Compiler (Type | Version: 7.10.2
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by danso):
Replying to [comment:1 nomeata]:
> {{{#!hs
> fold :: f -> [a] -> a
> where f :: a -> a -> a
> }}}
> is certainly confusing, because in the first line `f` is used like a
type, but in the second, `f` is used like a value (or `a -> a -> a` is
used like a kind
>
> Maybe you meant
> {{{#!hs
> fold :: f -> [a] -> a
> where f = a -> a -> a
> }}}
> which could be extended to allow
>
> {{{#!hs
> fold :: f -> [a] -> a
> where f :: *
> f = a -> a -> a
> }}}
>
> I’m sure the type level programming wizards and dependently typed
programmers will have the greatest need for such an extension, and have a
good opinion here.
Good catch. I agree that your suggestion makes more sense and have changed
the ticket accordingly.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10794#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list