Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-11-23 Thread GHC
#6026: Unboxed operators have wrong fixity +--- Reporter: benl | Owner: igloo Type: bug | Status: patch

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-11-23 Thread GHC
#6026: Unboxed operators have wrong fixity --+- Reporter: benl | Owner: igloo Type: bug | Status: closed

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-11-13 Thread GHC
#6026: Unboxed operators have wrong fixity +--- Reporter: benl | Owner: Type: bug | Status: patch

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-11-13 Thread GHC
#6026: Unboxed operators have wrong fixity +--- Reporter: benl | Owner: igloo Type: bug | Status: patch

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-10-07 Thread GHC
#6026: Unboxed operators have wrong fixity +--- Reporter: benl | Owner: Type: bug | Status: new

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-06 Thread Johannes Waldmann
wren ng thornton wren at freegeek.org writes: As for whether the default should be infix 9 instead of infixl 9 ... that was exactly the point of my message. - J. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-06 Thread Albert Y. C. Lai
On 12-10-06 05:18 AM, Johannes Waldmann wrote: wren ng thornton wren at freegeek.org writes: As for whether the default should be infix 9 instead of infixl 9 ... that was exactly the point of my message. - J. Perhaps, half of the people want infixl, another half of the people want infixr,

[Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Johannes Waldmann
a fixity declaration is assumed to be infixl 9. This really should be infix 9? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Roman Cheplyaka
) or they are undefined, so the parser rejects. but the Haskell standard says Any operator lacking a fixity declaration is assumed to be infixl 9. This really should be infix 9? This behaviour is really handy when you use functions as operators (using backticks notation). They typically lack infix

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Clark Gaebel
rejects. but the Haskell standard says Any operator lacking a fixity declaration is assumed to be infixl 9. This really should be infix 9? This behaviour is really handy when you use functions as operators (using backticks notation). They typically lack infix annotations, but having to put

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread wren ng thornton
, I'm profoundly glad that Haskell doesn't do this. The fixity of an operator is a property of the operator itself, not of the notation used to display the operator. There's no reason for my (+) operator to have the same fixity as your (+) operator, regardless of whether we happen to use the same

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Евгений Пермяков
Your idea looks _much_ better from code clarity point of view, but it's unclear to me, how to deal with it internally and in error messages. I'm not a compiler guy, though. Worse, it does not allow to set up fixity relative to operator that is not in scope and it will create unnecessary

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ryan Ingram
is pretty weak, however; even the lip service paid to unary - is a source of many problems in parsing Haskell. Worse, it does not allow to set up fixity relative to operator that is not in scope and it will create unnecessary intermodule dependencies. One should fall back to numeric fixities

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Евгений Пермяков
can guess it. This way. however, is linearly dependent in time from number of operators in scope. It is clearly much worse then looking into Map OperatorName Fixity . But changing numeric fixity in Map when adding operator somewhere in between existing stack is also linearly - dependent

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Ketil Malde
AntC anthony_clay...@clear.net.nz writes: I agree. I don't declare operators very often, and when I do I always struggle to remember which way round the precedence numbers go. [...] (Anything else we can bikeshed about while we're at it?) infixl * before + Perhaps before and after

Re: [Haskell-cafe] Fixity declaration extension

2012-08-14 Thread Twan van Laarhoven
would suffice if the default was for operators to be non-fix and of indeterminate precedence. Multiple fixity declarations for the same operator should then be allowed. Or perhaps just require that separate declarations use the same infix[lr]? keyword. Twan

Re: [Haskell-cafe] Fixity declaration extension

2012-08-13 Thread Ryan Ingram
also separate precedence from fixity declaration precedence $ below + -- function application has higher precedence than all operators by default, but you can override that infixl . above APP -- == is non-associative infix == Here's some parses with this system: a + b - c = (a+b)-c f.x.y z == g

Re: [Haskell-cafe] Fixity declaration extension

2012-08-13 Thread AntC
aiming for, then copy its definition. It would be much easier to declare the fixity of myop to be same as someotherop (which would presumably have to be already declared/fixed in an imported module). [It's also slightly counterintuitive that the thing being defined comes last in an infix

[Haskell-cafe] Fixity declaration extension

2012-08-12 Thread Евгений Пермяков
fixity declaration has form *infix(l|r)? [Digit]* in haskell. I'm pretty sure, that this is not enough for complicated cases. Ideally, fixity declarations should have form *infix(l|r)? [Digit](\.(+|-)[Digit])** , with implied infinitely long repeated (.0) tail. This will allow fine tuning

[GHC] #7007: Fixity declaration reported as ambiguous

2012-06-18 Thread GHC
#7007: Fixity declaration reported as ambiguous -+-- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #6091: Fixity in :info for backticks operators

2012-05-14 Thread GHC
#6091: Fixity in :info for backticks operators -+-- Reporter: guest | Owner: pcapriotti Type: bug | Status: new Priority: normal

Re: [GHC] #6091: Fixity in :info for backticks operators

2012-05-14 Thread GHC
#6091: Fixity in :info for backticks operators ---+ Reporter: guest | Owner: pcapriotti Type: bug | Status: closed Priority: normal

[GHC] #6091: Fixity in :info for backticks operators

2012-05-11 Thread GHC
#6091: Fixity in :info for backticks operators --+- Reporter: guest | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #6091: Fixity in :info for backticks operators

2012-05-11 Thread GHC
#6091: Fixity in :info for backticks operators -+-- Reporter: guest | Owner: pcapriotti Type: bug | Status: new Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-26 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: patch Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-26 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: patch Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-26 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: patch Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-26 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: patch Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-26 Thread GHC
#6027: Allow changing fixity of new type operators ---+ Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: closed Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-25 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: patch Priority: normal

Re: [GHC] #6027: Allow changing fixity of new type operators

2012-04-24 Thread GHC
#6027: Allow changing fixity of new type operators -+-- Reporter: atnnn | Owner: pcapriotti Type: feature request | Status: new Priority: normal

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-04-20 Thread GHC
#6026: Unboxed operators have wrong fixity -+-- Reporter: benl | Owner: Type: bug | Status: new Priority: normal

[GHC] #6027: Allow changing fixity of new type operators

2012-04-20 Thread GHC
#6027: Allow changing fixity of new type operators --+- Reporter: atnnn | Owner: Type: feature request | Status: new Priority: normal

[GHC] #6026: Unboxed operators have wrong fixity

2012-04-19 Thread GHC
#6026: Unboxed operators have wrong fixity -+-- Reporter: benl | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #6026: Unboxed operators have wrong fixity

2012-04-19 Thread GHC
#6026: Unboxed operators have wrong fixity -+-- Reporter: benl | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2012-03-27 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell ---+ Reporter: guest | Owner: reinerp Type: bug | Status: closed

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2012-03-16 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest | Owner: reinerp Type: bug | Status: new

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2012-03-16 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell ---+ Reporter: guest | Owner: reinerp Type: bug | Status: closed

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2012-02-29 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest | Owner: reinerp Type: bug | Status: new

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2012-02-17 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest | Owner: reinerp Type: bug | Status: new

Re: [Haskell-cafe] Monadic bind fixity: do vs ()

2012-02-16 Thread Ryan Ingram
guess is that is infixl because (1) m = f = g should make sense (2) should match fixity and precedence with = On Tue, Feb 14, 2012 at 9:50 PM, Michael Baikov manpac...@gmail.com wrote: Most docs ([1], [2]) about do-notation syntactic sugar tends to describe following expressions as equivalent

[Haskell-cafe] Monadic bind fixity: do vs ()

2012-02-14 Thread Michael Baikov
Most docs ([1], [2]) about do-notation syntactic sugar tends to describe following expressions as equivalent: do { a; b; c } and a b c, but they are not: first one gets de-sugared into a (b c), second one is equivalent to (a b) c, because () is declared using infixl. This should not be

[Haskell-cafe] fixity declaration in GHCi

2012-01-16 Thread Takayuki Muranushi
Hello everyone, while I'm playing with fixity declaration in GHCi, I found a strange behavior. Can anyone explain this? Is this actually an expected behavior, or is it a glitch? $ ghci GHCi, version 7.0.3: http://www.haskell.org

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2010-11-09 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: reinerp Type: bug | Status: new

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2010-11-06 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: reinerp Type: bug | Status: new

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-31 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: feature request| Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-19 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-16 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-16 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-16 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-16 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-13 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution --+- Reporter: maeder |Owner: Type: proposal | Status: new Priority

Re: [GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-12 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution -+-- Reporter: maeder| Owner: Type: proposal | Status: new Priority

[GHC] #4180: do not consider associativity for unary minus for fixity resolution

2010-07-08 Thread GHC
#4180: do not consider associativity for unary minus for fixity resolution -+-- Reporter: maeder| Owner: Type: proposal | Status: new Priority

Re: fixity resolution

2010-07-08 Thread Simon Marlow
fixity resolution is more strict than it needs to be. The intention in Haskell 2010 was not to change the way fixity resolution worked, but rather to avoid the problems caused by having it as part of the grammar. The grammar (in particular an ambiguous one) describes a superset of the language

Re: fixity resolution

2010-07-07 Thread Christian Maeder
Christian Maeder schrieb: http://www.haskell.org/~simonmar/haskell-2010-draft-report-2/haskellch10.html#x17-17300010 Fixity resolution also applies to Haskell patterns, but patterns are a subset of expressions so in what follows we consider only expressions for simplicity. I suggest

Re: fixity resolution

2010-07-07 Thread Christian Maeder
also: http://hackage.haskell.org/trac/ghc/ticket/4176 Christian Furthermore fixity resolution does not distinguish between constructors and other operators as it should according to the grammar: pat → lpat qconop pat (infix constructor) | lpat funlhs

Re: fixity resolution

2010-07-07 Thread Simon Marlow
)! 1 * - 1 = 2 Main 1 Main.* (-1) 2 Well, that's a bug in GHC, not the Haskell report :-) see also: http://hackage.haskell.org/trac/ghc/ticket/4176 Thanks for reporting it. Cheers, Simon Christian Furthermore fixity resolution does not distinguish between constructors

Re: fixity resolution

2010-07-07 Thread Christian Maeder
associativity - 1 ## 2 ~~~ (-1) ## 2 Yes, again I agree. The current fixity resolution is more strict than it needs to be. The intention in Haskell 2010 was not to change the way fixity resolution worked, but rather to avoid the problems caused by having it as part of the grammar. The grammar

fixity resolution

2010-07-06 Thread Christian Maeder
http://www.haskell.org/~simonmar/haskell-2010-draft-report-2/haskellch10.html#x17-17300010 Fixity resolution also applies to Haskell patterns, but patterns are a subset of expressions so in what follows we consider only expressions for simplicity. The string 1 * - 1 is legal as pattern

Re: Fixity

2010-02-15 Thread Christian Maeder
let me try again to fix the issue. Apologies, if you mind. Christian Maeder schrieb: S. Doaitse Swierstra schrieb: weird :: Int - Int weird = (if True then 3 else 5+) is perfectly correct Haskell? Yes, this is legal according to the grammar http://haskell.org/onlinereport/syntax-iso.html

Fixity was: Negation

2010-02-14 Thread Christian Maeder
S. Doaitse Swierstra schrieb: weird :: Int - Int weird = (if True then 3 else 5+) is perfectly correct Haskell? Yes, this is legal according to the grammar http://haskell.org/onlinereport/syntax-iso.html but rejected by ghc and hugs, because 5+ is illegal. The problem is to allow let-, if-,

Re: Fixity was: Negation

2010-02-14 Thread Christian Maeder
Christian Maeder schrieb: S. Doaitse Swierstra schrieb: weird :: Int - Int weird = (if True then 3 else 5+) [...] infixexp - fexp qop infixexp | exp10 This is no good, because it would exclude: do ... ++ do expressions. It would be even possible to avoid parenthesis

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2009-04-11 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: Type: bug | Status: new

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-23 Thread Reiner Pope
It turns out that there is at least a (partial) solution to my quasiquote problem. Template Haskell's reify function can be used to find an operator's fixity, although it seems not for all cases. However, for the purposes of this discussion, suppose I can write a function userFixity :: String - Q

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-23 Thread Niklas Broberg
of the fixities, so that I can insert the correct ones there. For this use case, I would want HSE to use an AST like I suggested, because it allows the parser to say, I'm not sure what the correct fixity is. As noted above, I really don't like that change. If you use HSE for parsing expressions

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-23 Thread Reiner Pope
it unsure of the fixities, so that I can insert the correct ones there. For this use case, I would want HSE to use an AST like I suggested, because it allows the parser to say, I'm not sure what the correct fixity is. As noted above, I really don't like that change. If you use HSE for parsing

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-23 Thread Niklas Broberg
with the fixity fixing. However... I would also like to point out that a list representation as I suggested can in fact encode the correct fixities if they are known to HSE. This is true simply because the list constructor is isomorphic to the current constructor in the special case where the list

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-22 Thread Niklas Broberg
what uses you envision and how it would be made easier. I'm still in the process of designing the fixity support for HSE, and all input is valuable. :-) Cheers, /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Fixity parsing, Template Haskell

2008-11-22 Thread Reiner Pope
It seems to me that fixity information behaves more like semantics than like syntax. For instance, fixities may be imported, and obey namespacing rules. Knowing and correctly handling these rules seems beyond the scope of a mere parser: I would hope that a single Haskell file could be parsed

[Haskell-cafe] Fixity parsing, Template Haskell

2008-11-21 Thread Reiner Pope
operators, (+*) and (+^), and then write [$list|1+*2+^3|] Being able to correctly parse such an expression depends on known the two operator's fixities, which is currently impossible. The problem is that potentially non-local fixity declarations affect parsing. As far as I can see, the correct

[Haskell-cafe] Re: Fixity parsing, Template Haskell

2008-11-21 Thread Reiner Pope
on known the two operator's fixities, which is currently impossible. The problem is that potentially non-local fixity declarations affect parsing. As far as I can see, the correct solution is to change the Template Haskell AST representation of fixity expressions from data Exp = ... | InfixE

Re: [GHC] #2632: Template Haskell confused by operator fixity

2008-10-04 Thread GHC
#2632: Template Haskell confused by operator fixity --+- Reporter: simonpj | Owner: igloo Type: merge | Status: closed Priority: normal

Re: [GHC] #2632: Template Haskell confused by operator fixity

2008-10-03 Thread GHC
#2632: Template Haskell confused by operator fixity --+- Reporter: simonpj | Owner: igloo Type: merge | Status: new Priority: normal

[GHC] #2632: Template Haskell confused by operator fixity

2008-09-29 Thread GHC
#2632: Template Haskell confused by operator fixity -+-- Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal| Milestone: 6.10.1 Component

Re: [GHC] #2632: Template Haskell confused by operator fixity

2008-09-29 Thread GHC
#2632: Template Haskell confused by operator fixity --+- Reporter: simonpj | Owner: simonpj Type: bug | Status: new Priority: normal| Milestone: 6.10.1 Component: Compiler

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2007-07-31 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: Type: bug | Status: new Priority: normal

Re: [Haskell-cafe] Fixity of

2007-07-26 Thread Donald Bruce Stewart
ross: On Fri, Jul 27, 2007 at 12:08:30AM +1000, Donald Bruce Stewart wrote: There's a theory this should work: getContents = lines map read sum print But unfortunately we have: `(=)' [infixl 1] `()' [infixr 1] Meaning we must write: getContents =

Re: [Haskell-cafe] Fixity of

2007-07-26 Thread Ross Paterson
On Fri, Jul 27, 2007 at 12:08:30AM +1000, Donald Bruce Stewart wrote: There's a theory this should work: getContents = lines map read sum print But unfortunately we have: `(=)' [infixl 1] `()' [infixr 1] Meaning we must write: getContents = (lines map read

[Haskell-cafe] Fixity of

2007-07-26 Thread Donald Bruce Stewart
There's a theory this should work: getContents = lines map read sum print But unfortunately we have: `(=)' [infixl 1] `()' [infixr 1] Meaning we must write: getContents = (lines map read sum print) Indeed, all Arrow ops are infixr. Are there any technical/compelling

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2007-07-22 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: Type: bug | Status: new Priority: normal

[GHC] #1541: No way to set build fixity declarations in template haskell

2007-07-16 Thread GHC
#1541: No way to set build fixity declarations in template haskell ---+ Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Milestone

Re: [GHC] #1541: No way at all to set fixity for infix operators defined in template haskell

2007-07-16 Thread GHC
#1541: No way at all to set fixity for infix operators defined in template haskell -+-- Reporter: guest |Owner: Type: bug | Status: new Priority: normal

Re: default fixity for `quotRem`, `divMod` ??

2007-06-19 Thread Bulat Ziganshin
Hello Isaac, Monday, June 18, 2007, 9:20:29 PM, you wrote: I was just bitten in ghci by `divMod` being the default infixl 9 instead of the same as `div` and `mod`. one of my hard-to-find bugs was exactly in this area: i wrote something like x `div` y+1 instead of x `div` (y+1) so, based

default fixity for `quotRem`, `divMod` ??

2007-06-18 Thread Isaac Dupree
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was just bitten in ghci by `divMod` being the default infixl 9 instead of the same as `div` and `mod`. Sure enough, the standard prelude doesn't specify a fixity for `quotRem` and `divMod` even though `quot`, `rem`, `div`, and `mod` are all infixl

Re: default fixity for `quotRem`, `divMod` ??

2007-06-18 Thread Iavor Diatchki
by `divMod` being the default infixl 9 instead of the same as `div` and `mod`. Sure enough, the standard prelude doesn't specify a fixity for `quotRem` and `divMod` even though `quot`, `rem`, `div`, and `mod` are all infixl 7. I propose that `quotRem` and `divMod` also become infixl 7. Isaac -BEGIN

Re: Fixity resolution, possible specification

2007-02-19 Thread Simon Marlow
Twan van Laarhoven wrote: Add subsection: === 3.4.1 Fixity Resolution === Fixity resolution is applied after parsing to convert all operator applications to the form @e1 qop [EMAIL PROTECTED] Fixity resolution is specified by the following algorithm: Let $e$ be an expression anywhere

Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
[EMAIL PROTECTED] wrote: I think that computable real fixity levels are useful, too. Only finitely many operators can be declared in a given Haskell program. Thus the strongest property you need in your set of precedence levels is that given arbitrary finite sets of precedences A and B

Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. -- Ben ___ Haskell-prime mailing list Haskell-prime@haskell.org

Re: [Haskell-cafe] Re: Fractional/negative fixity?

2006-11-10 Thread Henning Thielemann
On Fri, 10 Nov 2006, Ben Rudiak-Gould wrote: I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. Very true. Does it mean, that the Functional Graph Library has to become part of the

Re: [Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Henning Thielemann
On Fri, 10 Nov 2006, Benjamin Franksen wrote: Although one could view this as a bug in the offending module it makes me somewhat uneasy that one additional import can have such a drastic effect on the code in a module /even if you don't use anything from that module/. It's the same as with

[Haskell-cafe] Re: Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Benjamin Franksen
Henning Thielemann wrote: On Fri, 10 Nov 2006, Benjamin Franksen wrote: Although one could view this as a bug in the offending module it makes me somewhat uneasy that one additional import can have such a drastic effect on the code in a module /even if you don't use anything from that

Re: [Haskell-cafe] Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Jan-Willem Maessen
On Nov 9, 2006, at 7:16 PM, Benjamin Franksen wrote: Carl Witty wrote: On Thu, 2006-11-09 at 22:20 +0100, Benjamin Franksen wrote: Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought

[Haskell-cafe] Re: Re: non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-10 Thread Benjamin Franksen
Jan-Willem Maessen wrote: On Nov 9, 2006, at 7:16 PM, Benjamin Franksen wrote: Carl Witty wrote: If you have operators op1 and op2, where the compiler sees conflicting requirements for the precedence of op1 and op2, then they are treated as non-associative relative to each other: the

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-10 Thread Ben Rudiak-Gould
I'm surprised that no one has mentioned showsPrec and readsPrec. Anything more complicated than negative fixities would require their interfaces to be changed. -- Ben ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
more) are a lot better than precedence numbers, whether they be fractional or integral. Let us add compiler/interpreter support for querying known precedence/fixity relations and it's (almost) perfect. Cheers Ben ___ Haskell-prime mailing list Haskell

Re: [Haskell-cafe] Fractional/negative fixity?

2006-11-09 Thread Henning Thielemann
between (==) and (+). Yes, presumably. However, currently a fixity declaration for an operator can only be given in the module where the operator is defined. In this hypothetical new system, how would one import/export fixity declarations? Should they be named, or should they be treated like

[Haskell-cafe] Re: Re[2]: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
* backticks for operators with function names can be left out) Fixity would have to be declared separately as (using 'infixl' or 'infixr'; or whatever). Whenever we would currently declare an operator as having precedence N, we'd now declare it to have precedence equal to one or more operators from

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-09 Thread Benjamin Franksen
more) are a lot better than precedence numbers, whether they be fractional or integral. Let us add compiler/interpreter support for querying known precedence/fixity relations and it's (almost) perfect. Cheers Ben ___ Haskell-Cafe mailing list Haskell-Cafe

[Haskell-cafe] non-total operator precedence order (was:Fractional/negative fixity?)

2006-11-09 Thread Benjamin Franksen
Henning Thielemann wrote: Maybe making fixity declarations like type class instance declarations is good. I thought so too at first but, having thought about it for a while, I now see this will cause /major/ problems. The precedence relations as declared explicitly by the programmer must form

  1   2   >