logo       

Re: [GHC] #315: Arbitrary function sections: msg#00158

lang.haskell.glasgow.bugs

Subject: Re: [GHC] #315: Arbitrary function sections

#315: Arbitrary function sections
-------------------------------+--------------------------------------------
Reporter: a0s | Owner: nobody
Type: feature request | Status: assigned
Priority: normal | Milestone: _|_
Component: Compiler (Parser) | Version: None
Severity: minor | Resolution: None
Keywords: | Difficulty: Moderate (1 day)
Testcase: N/A | Architecture: Unknown
Os: Unknown |
-------------------------------+--------------------------------------------
Changes (by igloo):

* architecture: => Unknown
* difficulty: => Moderate (1 day)
* component: None => Compiler (Parser)
* milestone: => _|_
* testcase: => N/A
* os: => Unknown

Old description:

> {{{
> For operators we have the following shorthand:
>
> op :: a -> b -> c
> (`op` y) === \x -> x `op` y
> (x `op`) === \y -> x `op` y
>
> It would be nice to have a similar facility for
> functions, e.g.:
>
> f :: a -> b -> c -> d -> e
> f _ y _ t === \x z -> f x y z t
> f x _ z _ === \y t -> f x y z t
> f x _ z === \y -> f x y z === \y t -> f x y z t
>
> Because "_" is currently not allowed as an identifier
> in contexts where this facility could possibly be in
> effect, it seems safe to use it to indicate omitted
> parameters in function application.
> }}}

New description:

{{{
For operators we have the following shorthand:

op :: a -> b -> c
(`op` y) === \x -> x `op` y
(x `op`) === \y -> x `op` y

It would be nice to have a similar facility for
functions, e.g.:

f :: a -> b -> c -> d -> e
f _ y _ t === \x z -> f x y z t
f x _ z _ === \y t -> f x y z t
f x _ z === \y -> f x y z === \y t -> f x y z t

Because "_" is currently not allowed as an identifier
in contexts where this facility could possibly be in
effect, it seems safe to use it to indicate omitted
parameters in function application.
}}}

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/315>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise