[GHC] #10803: New SignatureSections extension (was: New TypeSignatureSections extension)

GHC ghc-devs at haskell.org
Tue Sep 8 13:26:38 UTC 2015


#10803: New SignatureSections extension
-------------------------------------+-------------------------------------
        Reporter:  hvr               |                   Owner:  hvr
            Type:  feature request   |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       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 Revisions:  Phab:D1185
-------------------------------------+-------------------------------------
Description changed by hvr:

Old description:

> Originally [http://augustss.blogspot.co.at/2014/04/a-small-haskell-
> extension.html proposed by Lennart Augustsson]
>
> Incomplete work-in-progress can be found in
> [https://git.haskell.org/ghc.git/log/refs/heads/wip/T10803 wip/T10803]
> branch
>
> = Preliminary specification
>
> Have
>
>  - `(::` ''type'' `)`
>
> be syntax sugar for
>
>  - `(\x -> x ::` ''type'' `)`
>
> This new syntax extension is enabled via a new `SignatureSections` or
> maybe `TypeSignatureSections` language pragma, e.g.
>
> {{{#!hs
> {-# LANGUAGE TypeSignatureSections #-}
> }}}
>
> Typing judgement:
>
> {{{
> _________________________
>  G ⊢ (:: ty) :: ty -> ty
> }}}
>

> TODO: formalise this a bit more

New description:

 Originally [http://augustss.blogspot.co.at/2014/04/a-small-haskell-
 extension.html proposed by Lennart Augustsson]

 See also SignatureSections

 = Preliminary specification

 Have

  - `(::` ''type'' `)`

 be syntax sugar for

  - `(\x -> x ::` ''type'' `)`

 This new syntax extension is enabled via a new `SignatureSections` (or
 maybe `TypeSignatureSections`) language pragma, e.g.

 {{{#!hs
 {-# LANGUAGE SignatureSections #-}
 }}}

 Typing judgement:

 {{{
 _________________________
  G ⊢ (:: ty) :: ty -> ty
 }}}

--

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


More information about the ghc-tickets mailing list