Re: Proposal: Fix a "bug" in the layout interpretation algorithm in Section 10.3 of Report 2010

2019-04-29 Thread Mario Blažević
On 2019-04-29 3:54 a.m., 佐藤玄基 wrote: Hello, I found that the layout interpretation algorithm in Section 10.3 of Report 2010 produces parse-error when applied to the following code snippet: [Snippet 1 : The code that fails to be parsed by Report] main = print t where { t = s where s = 1

Proposal: Fix a "bug" in the layout interpretation algorithm in Section 10.3 of Report 2010

2019-04-29 Thread 佐藤玄基
Hello, I found that the layout interpretation algorithm in Section 10.3 of Report 2010 produces parse-error when applied to the following code snippet: [Snippet 1 : The code that fails to be parsed by Report] main = print t where { t = s where s = 1 :: Int } [/Snippet 1] GHC 8.4.4 and GHC 8.6.4

layout was Re: Proposal: ArgumentDo

2016-07-08 Thread C Maeder
Hi, the layout language options are hard to find (at least in the user guide). Therefore I try to give an overview here. The relevant options I've found by using ghc-7.10.3 with option --supported-languages are: NondecreasingIndentation DoAndIfThenElse RelaxedLayout AlternativeLayoutRule

Re: [Haskell-cafe] Layout section of Haskell 2010 Language Report -- Notes 12

2013-04-03 Thread Seth Lastname
presence of {n} in the input to L). However, if you accept this interpretation of nested context, then the second sentence and example of Note 1 do not seem to make sense.  That is, there does not seem to be a case where the test for the layout error described in Note 1 would be met.  Indeed

Re: [Haskell-cafe] Layout section of Haskell 2010 Language Report -- Notes 12

2013-04-02 Thread Malcolm Wallace
On 1 Apr 2013, at 01:21, Seth Lastname wrote: Note 2 says, If the first token after a 'where' (say) is not indented more than the enclosing layout context, then the block must be empty, so empty braces are inserted. It seems that, in Note 2, the first token necessarily refers to a lexeme

[Haskell-cafe] Layout section of Haskell 2010 Language Report -- Notes 12

2013-03-31 Thread Seth Lastname
I'm sure I'm missing something, but I'm having difficulty parsing or reconciling Note 1 and Note 2 of Section 10.3 (Layout) of the Haskell 2010 Language Report. http://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17800010.3 Can somebody point me in the right direction

Modified layout for lambda-case

2012-07-09 Thread Tyson Whitehead
It seems my suggestion isn't getting too much traction. It occurs to me this may be because I jumped right into layout rules and didn't first give some simple motivating examples to get the idea across. SHORT VERSION: Assume '\' is a grouping construct. I proposed always interpreting

Re: [Haskell-cafe] The Layout Rule

2012-06-21 Thread Tillmann Rendel
Hi Michael, Michael D. Adams wrote: I am looking for background material on how GHC and other Haskell compilers implement the layout rule. In the context of our work on syntactic extensibility, we have implemented a declarative and extensible mechanism to specify and implement layout rules

[Haskell-cafe] The Layout Rule

2012-06-19 Thread Michael D. Adams
I am looking for background material on how GHC and other Haskell compilers implement the layout rule. Are there any papers, documentation, commentary, etc. that discus the actual implementation of this rule (even if only a paragraph or two)? I've already looked at the parsing code in GHC

Re: [GHC] #5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first)

2012-03-14 Thread GHC
#5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first) -+-- Reporter: nomeata | Owner: Type: bug | Status: new

Re: [GHC] #5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first)

2012-03-14 Thread GHC
#5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first) -+-- Reporter: nomeata | Owner: Type: bug | Status: new

Re: [GHC] #5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first)

2012-03-14 Thread GHC
#5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first) ---+ Reporter: nomeata | Owner: Type: bug | Status: closed

[GHC] #5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first)

2012-03-09 Thread GHC
#5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first) --+- Reporter: nomeata | Owner: Type: bug | Status: new

Re: [GHC] #5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first)

2012-03-09 Thread GHC
#5923: closure_flags[] contains wrong _BTM data (whether the layout is bitmap or pointer first) --+- Reporter: nomeata | Owner: Type: bug | Status: new

Re: [GHC] #3984: Handle multiline input in GHCi history (was: interpret layout in GHCi)

2012-01-24 Thread GHC
#3984: Handle multiline input in GHCi history ---+ Reporter: aavogt| Owner: Type: feature request | Status: new Priority: normal|

Re: [GHC] #3645: Layout and pragmas

2011-09-18 Thread GHC
#3645: Layout and pragmas +--- Reporter: igloo | Owner: Type: feature request| Status: new Priority: normal | Milestone: 7.4.1

Re: [Haskell-cafe] HaskellDB DB Layout Description

2011-07-15 Thread Mats Rauhala
On 18:12 Sat 09 Jul , Tom Murphy wrote: Hi, I've found good explanations of the HaskellDB combinators, but I can't find good information about how to correctly define the database layout. Can anyone point me to a resource, or give a quick example? Thanks! Tom Hello, I wrote

Re: [Haskell-cafe] HaskellDB DB Layout Description

2011-07-10 Thread Mats Rauhala
On 18:12 Sat 09 Jul , Tom Murphy wrote: Hi, I've found good explanations of the HaskellDB combinators, but I can't find good information about how to correctly define the database layout. Can anyone point me to a resource, or give a quick example? Thanks! Tom

[Haskell-cafe] HaskellDB DB Layout Description

2011-07-09 Thread Tom Murphy
Hi, I've found good explanations of the HaskellDB combinators, but I can't find good information about how to correctly define the database layout. Can anyone point me to a resource, or give a quick example? Thanks! Tom ___ Haskell-Cafe mailing

Re: [GHC] #3984: interpret layout in GHCi

2011-05-26 Thread GHC
#3984: interpret layout in GHCi --+- Reporter: aavogt | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.2.1

Re: [Haskell-cafe] Function application layout

2011-05-26 Thread Neil Brown
On 25/05/11 10:00, Jonas Almström Duregård wrote: As an equivalent to: f (x a) (y b) (z c) Of course my intention is that the new keyword should initiate layout syntax so we can write this: f applied to x a y b z c Here's a (tongue-in-cheek) trick that allows for layout close

Re: [Haskell-cafe] Function application layout

2011-05-26 Thread Daniel Fischer
On Thursday 26 May 2011 14:35:41, Neil Brown wrote: foo is the function we want to apply, and eg shows how to apply it in do-notation with an argument on each line. I couldn't manage to remove the r$ at the beginning of each line, which rather ruins the whole scheme :-( On the plus side,

Re: [Haskell-cafe] Function application layout

2011-05-26 Thread Jonas Almström Duregård
That's a useful operator! Unfortunately it does not play nice with $. Of less importance: some syntactic constructs can not appear in the arguments without parenthesis, let bindings for instance (although lambda abstraction works parenthesis-free). Also I'm not sure this can be used for defining

Re: [Haskell-cafe] Function application layout

2011-05-26 Thread Daniel Fischer
On Thursday 26 May 2011 17:22:10, Jonas Almström Duregård wrote: Unfortunately it does not play nice with $. Yes. Also I'm not sure this can be used for defining trees or nested function application since a nesting of the operator inevitably require parenthesis. It can't be nested, like ($)

Re: [Haskell-cafe] Function application layout

2011-05-26 Thread Casey McCann
2011/5/26 Daniel Fischer daniel.is.fisc...@googlemail.com As far as I'm concerned, a left-associative version of ($) would sometimes be nice (on the other hand, right-associativity of ($) is sometimes also nice), but usually, I don't find parentheses too obnoxious. I have a whole set of

[Haskell-cafe] Function application layout

2011-05-25 Thread Jonas Almström Duregård
Hi, Would it be possible to allow this in Haskell (where applied to is some new operator or keyword): f applied to {x a;y b;z c} As an equivalent to: f (x a) (y b) (z c) Of course my intention is that the new keyword should initiate layout syntax so we can write this: f applied to x a y

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Brandon Allbery
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se Would it be possible to allow this in Haskell (where applied to is some new operator or keyword): f applied to {x a;y b;z c} Sounds like idiom brackets to me. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Jonas Almström Duregård
I don't see the similarity (from reading this: http://www.haskell.org/haskellwiki/Idiom_brackets). My suggestion is just a way of using layout to avoid parenthesis. /J 2011/5/25 Brandon Allbery allber...@gmail.com: 2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se Would

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Alexander Solla
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se I don't see the similarity (from reading this: http://www.haskell.org/haskellwiki/Idiom_brackets). My suggestion is just a way of using layout to avoid parenthesis. This is exactly the applicative style, where idiom brackets come

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Jonas Almström Duregård
Hi Alexander, This is exactly the applicative style, where idiom brackets come from. I disagree. Layout has at least two advantages over applicative here: 1) Applicative costs (at least) three additional characters per function parameter. 2) You can not have arbitrary infix operators

Re: [Haskell-cafe] Function application layout

2011-05-25 Thread Alexander Solla
2011/5/25 Jonas Almström Duregård jonas.dureg...@chalmers.se Hi Alexander, This is exactly the applicative style, where idiom brackets come from. I disagree. Layout has at least two advantages over applicative here: 1) Applicative costs (at least) three additional characters per function

Re: [GHC] #3645: Layout and pragmas

2011-04-08 Thread GHC
#3645: Layout and pragmas +--- Reporter: igloo | Owner: Type: feature request| Status: new Priority: normal | Milestone: 7.2.1

Re: [Haskell-cafe] Layout styles and EclipseFP evolution.

2010-12-18 Thread John D. Ramsdell
., a HAppStack plugin that makes writing web apps in Haskell just as easy as it is for the Java community to write web services. I've just added Haskell code templates (*) to EclipseFP and, in the process, encountered the distinct lack of layout autoindentation. I'm sure it used to exist, but it doesn't

[Haskell-cafe] Layout styles and EclipseFP evolution.

2010-12-16 Thread Scott Michel
the distinct lack of layout autoindentation. I'm sure it used to exist, but it doesn't exist today. I've looked at the Emacs haskell-mode.el indentation style, which I'm inclined to port over. Are there other layout autoindentation styles that other people prefer and believe should be supported

Re: [GHC] #3645: Layout and pragmas

2010-12-14 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: patch Priority: normal |Milestone: 7.0.1

Re: [GHC] #3645: Layout and pragmas

2010-12-14 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: patch Priority: normal |Milestone: 7.0.1

Re: [GHC] #3645: Layout and pragmas

2010-12-13 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: patch Priority: normal |Milestone: 7.0.1

Re: [GHC] #3645: Layout and pragmas

2010-12-13 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: patch Priority: normal |Milestone: 7.0.1

Re: [GHC] #3645: Layout and pragmas

2010-12-11 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: patch Priority: normal |Milestone: 7.0.1

Re: [GHC] #3645: Layout and pragmas

2010-12-10 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: feature request| Status: new Priority: normal |Milestone: 7.0.1

Re: [GHC] #1060: GHC accepts program with incorrect layout

2010-11-24 Thread GHC
#1060: GHC accepts program with incorrect layout +--- Reporter: igloo | Owner: Type: bug| Status: closed Priority: normal

Re: [GHC] #3984: interpret layout in GHCi

2010-10-25 Thread GHC
#3984: interpret layout in GHCi --+- Reporter: aavogt | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.0.1

Re: new recursive do notation (ghc 6.12.x) spoils layout

2010-06-23 Thread Ross Paterson
There's also an underlying semantic issue, which is not yet resolved. The GHC implementation of mdo (following Levent and John's paper) performs a dependency analysis on the statements in the mdo to apply mfix to the shortest possible subsegments of statements. For example, mdo a - f b

new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread John Lask
- g b } putChar c return b it does spoil the nice layout - it would be nice to just be able to write (which does not parse) do rec a - getChar b - f c c - g b putChar c return b I don't particularly care that the only recursive statements are #2,#3 - I just want

Re: new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/21/10 13:18 , John Lask wrote: it does spoil the nice layout - it would be nice to just be able to write (which does not parse) do rec a - getChar b - f c c - g b putChar c return b I don't particularly care

Re: new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread John Lask
I think this would just require the lex layout rules already in place for do/let in GHC; my guess is that your example would work if the body were indented past the r of rec. for the record ... t2 = do rec a - getChar b - f c c - g b putChar c return b

[Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread John Lask
- g b } putChar c return b it does spoil the nice layout - it would be nice to just be able to write (which does not parse) do rec a - getChar b - f c c - g b putChar c return b I don't particularly care that the only recursive statements are #2,#3 - I just want

Re: [Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread Ivan Miljenovic
On 22 June 2010 03:18, John Lask jvl...@hotmail.com wrote: I just want my nice neat layout back. I have just spent an inordinate amount of time updating code when if the parser recognised do rec as a recursive group it would have been a drop in replacement and taken me one tenth of the time

Re: [Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread Alexander Solla
On Jun 21, 2010, at 10:18 AM, John Lask wrote: do rec a - getChar b - f c c - g b putChar c return b I don't particularly care that the only recursive statements are #2,#3 - I just want my nice neat layout back. I have just spent an inordinate amount of time updating code

Re: [Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread Alexander Solla
On Jun 20, 2010, at 6:24 PM, Alexander Solla wrote: do a - getChar let b = c = return . f let c = b = return . g c = putChar b Correction: by your construction, f and g are already in the Kliesli category, so you don't need the return compositions. I still

Re: [Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread Dan Doel
On Sunday 20 June 2010 9:24:54 pm Alexander Solla wrote: Why can't you just use let notation do deal with the recursion? I thought lets in do blocks were just a little bit of syntactic sugar for regular let expressions, which do allow mutual recursion. I could be totally wrong though. I'm

Re: [Haskell-cafe] new recursive do notation (ghc 6.12.x) spoils layout

2010-06-20 Thread John Lask
On 20/06/2010 6:32 PM, Alexander Solla wrote: in your example c will not be in scope in the expression (let b = c = return . f) - that's the purpose of the recursive do construct (mdo, now do .. rec ..) jvl On Jun 20, 2010, at 6:24 PM, Alexander Solla wrote: do a - getChar let b = c =

Re: [GHC] #3984: interpret layout in GHCi

2010-06-07 Thread GHC
#3984: interpret layout in GHCi --+- Reporter: aavogt | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-06-07 Thread GHC
#3984: interpret layout in GHCi --+- Reporter: aavogt | Owner: igloo Type: feature request | Status: closed Priority: normal | Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-06-02 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt|Owner: igloo Type: feature request | Status: patch Priority: normal|Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-04-30 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt|Owner: Type: feature request | Status: patch Priority: normal|Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-04-29 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt|Owner: Type: feature request | Status: new Priority: normal|Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-04-29 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt|Owner: Type: feature request | Status: new Priority: normal|Milestone: 6.14.1

Re: [GHC] #3984: interpret layout in GHCi

2010-04-29 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt|Owner: Type: feature request | Status: new Priority: normal|Milestone: 6.14.1

[GHC] #3984: interpret layout in GHCi

2010-04-13 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt| Owner: Type: bug | Status: new Priority: normal| Component: Compiler

Re: [GHC] #3984: interpret layout in GHCi

2010-04-13 Thread GHC
#3984: interpret layout in GHCi -+-- Reporter: aavogt| Owner: Type: feature request | Status: new Priority: normal| Component: GHCi

Re: [GHC] #3645: Layout and pragmas

2009-11-17 Thread GHC
#3645: Layout and pragmas +--- Reporter: igloo | Owner: Type: feature request| Status: new Priority: normal | Milestone: 6.14.1

[GHC] #3645: Layout and pragmas

2009-11-07 Thread GHC
#3645: Layout and pragmas +--- Reporter: igloo | Owner: Type: bug| Status: new Priority: normal | Milestone: 6.14.1

Re: [GHC] #3645: Layout and pragmas

2009-11-07 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: bug| Status: new Priority: normal |Milestone: 6.14.1

Re: [GHC] #3645: Layout and pragmas

2009-11-07 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: bug| Status: new Priority: normal |Milestone: 6.14.1

Re: [GHC] #3645: Layout and pragmas

2009-11-07 Thread GHC
#3645: Layout and pragmas --+- Reporter: igloo |Owner: Type: bug| Status: new Priority: normal |Milestone: 6.14.1

Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Jimmy Hartzell
) Ideally, I'd want something even more light-weight, but I can't think of anything backwards-compatible that satisfies the bracket-matching requirement (which I also care about, as I don't particularly want to hack my editor for this layout proposal either). * For the magic uncurried-function

Re[2]: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Bulat Ziganshin
Hello Jimmy, Wednesday, September 23, 2009, 11:11:58 AM, you wrote: How about this (which I believe to be backwards compatible): brilliant! -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___ Haskell-Cafe

[Haskell-cafe] Re: accessible layout proposal?

2009-09-23 Thread Stefan Monnier
http://www.haskell.org/haskellwiki/Accessible_layout_proposal I see two main problems with such a proposal (other than the particular details of the syntax chosen for it): - layout is not very well supported by most of the text editors, contrary to parens/brackets/braces. - more importantly

Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Jimmy Hartzell
I am a bit puzzled here. This seems to mean something like If you take readable code using an operator you can make it less readable, and when you do that you create another problem as well, and an even less readable hack can fix that. I know an old lady who swallowed a fly...

Re: [Haskell-cafe] accessible layout proposal?

2009-09-23 Thread Richard O'Keefe
where records were declared using layout (but not sum-of-product types) not unlike this. Here we have newline overloaded to mean or (Empty or Fork) and and (key and value and left and right). It could *work*, and it would be less typing for the *author*, but what would it do for the *reader

[Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal However, after some Google searching and contacting its original author, I have still not found any implementation or project to implement it. Are there any I'm missing? And, if not, who would be

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Raynor Vliegendhart
On Tue, Sep 22, 2009 at 10:01 AM, Jimmy Hartzell j...@shareyourgifts.net wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal I'm not sure whether I like the idea in general or not. It looks a bit odd. The suggestion on the talk page (

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 22, 2009, at 8:01 PM, Jimmy Hartzell wrote: I am in love with this proposal: http://www.haskell.org/haskellwiki/Accessible_layout_proposal I hadn't read it before. Now that I have, I really do not like it. Syntactic sugar causes cancer of the semicolon as Alan Perlis once said, and

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
. Meanwhile, you have to format your code very awkwardly, as the closing bracket can't be in the left-most column, and, all in all, you have lots and lots of commas cluttering up your otherwise clean-looking layout. You get humans reading the code based off of the physical layout, while the computer

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel Fischer
of my coding time finagling the layout to look sensible, and I don't think anyone would claim that I just shouldn't use records or ADTs. I see your point but remain not liking the proposal. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] This is a lot better, true, but it still takes a lot of typing, and the first element is now special-cased, preventing easy copy-and-paste (although, admittedly, much less opportunity for mistake). On a more

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
hello) because it looks very much as if enter and exit exist only to be passed (with suitable parameters) to bracket_. But I would *still* rather have: with a = bracket_ $# enter a exit a Layout is easier to read than parentheses. It all depends on size (small things being easy pretty

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Evan Laforge
it is hard, then improving the library to handle layout extensions would be a nice side-effect even if the preprocessor never became widely popular. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel Fischer
layout proposal. That's not a lot. first element is now special-cased, preventing easy copy-and-paste Making it slightly harder. Copy-Paste-Cursor to beginning-delete-comma. No big deal. Besides, how often does one need to copy the beginning of one list into the middle of another? (although

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Richard O'Keefe wrote: After all, someone might have started with ( ( ++ str ++ ) ) and ended up with ( ( ++ str ++ ) -- (oops, no ++!) lineEnd -- forgot I needed this ) I asked for the trailing

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 23, 2009, at 3:04 PM, Evan Laforge wrote: It would be so much better if we could discuss a _real_ example. Or implement one. I really did mean EXAMPLES. Examples of code which would be improved *more* by the proposal than by adopting an alternative style within the existing

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Richard O'Keefe
On Sep 23, 2009, at 3:40 PM, James Hartzell wrote: I asked for the trailing comma in Erlang for _social_ reasons, not because I believed it would fix all problems of this type. What do you mean, for social reasons? The proposal is http://www.erlang.org/eeps/eep-0021.html The abstract says

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Daniel McAllansmith
? Per line it's two keystrokes more than with the accessible layout proposal. That's not a lot. first element is now special-cased, preventing easy copy-and-paste Making it slightly harder. Copy-Paste-Cursor to beginning-delete-comma. No big deal. Besides, how often does one need to copy

Re: [Haskell-cafe] accessible layout proposal?

2009-09-22 Thread Jimmy Hartzell
Am Mittwoch 23 September 2009 04:06:11 schrieb Jimmy Hartzell: Daniel Fischer wrote: Or, what I do: concat [ ( , str , ) ] You're right: my objections to this seem mostly to be matters of taste -- as I think about it, I find fewer and fewer practical reasons for

Re: [Haskell-cafe] server directory layout for cabal-install?

2009-03-20 Thread Duncan Coutts
On Thu, 2009-03-19 at 11:50 +0100, Johannes Waldmann wrote: Thanks. Now the 00-index.tar.gz works. When studying the access log of my web server, I found that the cabal client (cabal-install/0.6.0) does not want $pkg/$ver/$pkg-$ver.tar.gz but uses packages/$pkg-$ver/tarball instead (yes,

Re: [Haskell-cafe] server directory layout for cabal-install?

2009-03-19 Thread Duncan Coutts
On Wed, 2009-03-18 at 22:24 +0100, Johannes Waldmann wrote: Hello. I wonder what is the required layout of directories and files on a server that supplies packages for cabal-install. I figure 00-index.tar.gz contains the *.cabal files. Right. The directory layout within the index

Re: [Haskell-cafe] server directory layout for cabal-install?

2009-03-19 Thread Johannes Waldmann
Thanks. Now the 00-index.tar.gz works. When studying the access log of my web server, I found that the cabal client (cabal-install/0.6.0) does not want $pkg/$ver/$pkg-$ver.tar.gz but uses packages/$pkg-$ver/tarball instead (yes, packages and tarball are constant strings). That's strange, since

[Haskell-cafe] server directory layout for cabal-install?

2009-03-18 Thread Johannes Waldmann
Hello. I wonder what is the required layout of directories and files on a server that supplies packages for cabal-install. I figure 00-index.tar.gz contains the *.cabal files. (The cabal files have to be on the server as well, unpacked?) Each $dir/$foo.cabal (in the archive) contains a Version

Re: [Haskell-cafe] if - then - else layout

2008-09-25 Thread Jason Dusek
I think it'd be nice if we just replaced the if with a question mark :) -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] if - then - else layout

2008-09-25 Thread Jules Bean
. The question I imagine you're asking involves layout mode: do if n5 then putStrLn big else putStrLn small this is shorthand for do { if n 5 then putStrLn big ; else putStrLn small } which is a syntax error. A statement in a do block cannot begin with the keyword else. If you

[Haskell-cafe] Re: if - then - else layout

2008-09-25 Thread Achim Schneider
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: I think Hugs is violating the Haskell98 layout rules. One could argue that GHC should, too. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting

[Haskell-cafe] Re: if - then - else layout

2008-09-25 Thread Achim Schneider
' is apparently going to include a hack to permit this case. I think that's a poor decision, because including a hack to the layout rule makes it harder to understand and explain the layout rule. There's no need to hack the layout rule, you're even giving pointers to the solution. Something like

[Haskell-cafe] Re: if - then - else layout

2008-09-25 Thread Achim Schneider
Achim Schneider [EMAIL PROTECTED] wrote: if i knew how to do it Sorry, apparent mistake, besides confusing b (bool) with p (predicate): if p _ c = do (_, _, a) - get put (p, c, a) mzero -- (c) this sig last receiving data processing entity. Inspect headers for

Re: [Haskell-cafe] if - then - else layout

2008-09-25 Thread Henning Thielemann
On Wed, 24 Sep 2008, leledumbo wrote: consider this partial program: if n5 then putStrLn big else putStrLn small this works fine in hugs, but in ghc I must change it to: if n5 then putStrLn big else putStrLn small maybe related http://www.haskell.org/haskellwiki/If-then-else

[Haskell-cafe] if - then - else layout

2008-09-24 Thread leledumbo
consider this partial program: if n5 then putStrLn big else putStrLn small this works fine in hugs, but in ghc I must change it to: if n5 then putStrLn big else putStrLn small -- View this message in context: http://www.nabble.com/if---then---else-layout-tp19663006p19663006

Re: [Haskell-cafe] if - then - else layout

2008-09-24 Thread Brandon S. Allbery KF8NH
else putStrLn small Except in a do, the else must be indented beyond the start of the if. I think Hugs is violating the Haskell98 layout rules. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL

Re: [Haskell-cafe] if - then - else layout

2008-09-24 Thread Fraser Wilson
layout rules. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon university KF8NH ___ Haskell

patch applied (haskell-prime-status): add John Meacham's layout proposal

2008-04-14 Thread Simon Marlow
Mon Apr 14 12:04:30 PDT 2008 Simon Marlow [EMAIL PROTECTED] * add John Meacham's layout proposal M ./status.hs +2 View patch online: http://darcs.haskell.org/haskell-prime-status/_darcs/patches/20080414190430-8214f-810333212d57fcd21f9e15177ea4ebe551c00bd9.gz

[Haskell-cafe] Layout to non-layout code

2007-11-02 Thread Maurí­cio
Hi, I understand that many people like using layout in their code, and 99% of all Haskell examples use some kind of layout rule. However, sometimes, I would like not to use layout, so I can find errors easier (and maybe convert it to layout for presentation after all problems are solved). So, I

  1   2   3   >