Re: [Haskell-cafe] Re: Haskell and OS X
I don't think it's so much bugs as it's funky indentation :-). For example... data TableInfo = TableInfo { avgPot :: Double, I would have preferred not to offset the fields from the brace but I don't know how to change this and maybe I'm going against standard Haskell style here. You mean you'd like data TableInfo = TableInfo { avgPot :: Double, ? That'd look odd to me, but to each his own. I don't know what's standard Haskell style here, but since it'd look odd to me, I guess it's indeed not very standard. In such a case I wouldn't consider it a bug (I do want the indentation code to allow the use of various styles, but only those styles that are standard. I think variety in indentation style is detrimental to the readability of a language). case findprop attr props of Just x - x seems like a lot of space is wasted by hanging the Just from the of. Indeed. I've added this case to indent.hs. Hopefully I'll get to fix it before the next release. Note that the second choice offered is case findprop attr props of Just x - x which is much better. I'd personally prefer case findprop attr props of Just x - x but I haven't coded it yet. Try this to see that you cannot indent something here at the same level as let. main = do let foo = 10 bar = 20 something here Yes, this one is a known bug, and I haven't tried fixing it yet. Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell and OS X
You mean you'd like data TableInfo = TableInfo { avgPot :: Double, No, I would actually like to offset avgPot 4 spaces from TableInfo. In that case I'm with you. It's on my wish list as well. which is much better. I'd personally prefer case findprop attr props of Just x - x but I haven't coded it yet. Yes, that's what I would like to have too. I'm no stranger to Lisp but haven't spent the time to figure out how to do the two cases above yet. Maybe you could point me in the right direction. Not really. If I knew how/where to start I'd have done it already. I suspect it'll require some refactoring. Luckily this same refactoring should hopefully allow handling the first example above as well. Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell and OS X
Can I throw a vote in for handling data T = T { granularity :: (Int, Int, Int, Int) , items :: Map (Int, Int, Int, Int) [Item] } correctly? That (and case statements) are the only things that really still bother me about haskell-mode. AFAIK this is handled correctly in the CVS version of haskell-mode. Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FFI and modifying haskell memory
Is with better than allocaBytes? On Oct 22, 2005, at 12:42 AM, John Meacham wrote: because haskell values don't have the same representation as C values. haskell values are pointers to updatable thunks. in any case 'with' just allocates 4 bytes on the stack (the same as a auto C declaration) so is quite speedy compared to what it would take to make a haskell value look like a C one. not to mention haskell values can't be modified. -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe