Re: Aliasing current module qualifier

2014-09-30 Thread John Meacham
worked differently then a larger recursive group, but it is not at all obvious why B should export 'x'. And for those who like this kind of puzzle: what should happen if 'A' also had a definition for 'x'? Iavor On Sep 29, 2014 11:02 PM, John Meacham j...@repetae.net wrote: You don't need

Re: Aliasing current module qualifier

2014-09-29 Thread John Meacham
, kerberos, infrastructure, xmonad http://sinenomine.net ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- John Meacham - http://notanumber.net

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-05 Thread John Meacham
, infrastructure, xmonadhttp://sinenomine.net -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-05 Thread John Meacham
that is the result you pass to the compiler. John On Sat, Jul 5, 2014 at 1:09 PM, Luite Stegeman stege...@gmail.com wrote: How would you do reification with that approach? On Sat, Jul 5, 2014 at 9:59 PM, John Meacham j...@repetae.net wrote: Actually, I was looking into it a little, and template

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-04 Thread John Meacham
on my Nexus 7 and got: Error: package file was not signed correctly. D On Thu, Jul 3, 2014 at 4:47 PM, John Meacham j...@repetae.net wrote: In case anyone wanted to start writing haskell android code now, jhc fully supports android as a target. here is an app made with it https

Re: GHCJS now runs Template Haskell on node.js - Any interest in out of process TH for general cross compilation?

2014-07-03 Thread John Meacham
-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org

Re: RFC: Unicode primes and super/subscript characters in GHC

2014-06-27 Thread John Meacham
just abandon things like `a'bc'd` altogether... On 06/15/2014 03:58 AM, John Meacham wrote: I have this feature in jhc, where I have a 'trailing' character class that can appear at the end of both symbols and ids. currently it consists of $trailing = [₀₁₂₃₄₅₆₇₈₉⁰¹²³⁴⁵⁶⁷⁸⁹₍₎⁽⁾₊₋] John

Re: RFC: Unicode primes and super/subscript characters in GHC

2014-06-17 Thread John Meacham
-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

Re: RFC: Unicode primes and super/subscript characters in GHC

2014-06-14 Thread John Meacham
/listinfo/glasgow-haskell-users -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: AlternateLayoutRule

2014-06-10 Thread John Meacham
extensions. John -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

[Haskell] PROPOSAL: Record field type inference

2014-06-04 Thread John Meacham
This is also available as html at http://repetae.net/computer/jhc/record_inference.html Record Type Inference = An extension to the named field mechanism that will greatly enhance the utility of them when combined with the existing `DisambiguateRecordFields`, `RecordPuns`,

Re: [Haskell] [Haskell-cafe] PROPOSAL: Record field type inference

2014-06-04 Thread John Meacham
respects, this sounds like syntax sugar around https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields have you had a look at that? (its not quite merged into HEAD yet, but that due soon i'm told) On Wed, Jun 4, 2014 at 2:26 AM, John Meacham j...@repetae.net wrote: This is also

Command line options for forcing 98 and 2010 mode

2014-06-03 Thread John Meacham
in addition to language features, but this may be undesireable as then it would behave differently when specified in a LANGUAGE pragma. John -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

[Haskell] ANNOUNCE: jhc 0.8.2

2014-06-02 Thread John Meacham
representation using LEB128 - Data.String added with mild magic. -- John Meacham - http://notanumber.net/ ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: RFC: changes to -i flag for finding source files

2014-05-30 Thread John Meacham
___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: RFC: changes to -i flag for finding source files

2014-05-30 Thread John Meacham
. John -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: RFC: changes to -i flag for finding source files

2014-05-30 Thread John Meacham
, Herbert Valerio Riedel h...@gnu.org wrote: On 2014-05-30 at 11:00:38 +0200, John Meacham wrote: JHC has the feature that Graphics.UI.GTK.Button can live in any of: Graphics/UI/GTK/Button.hs Graphics/UI/GTK.Button.hs Graphics/UI.GTK.Button.hs Graphics.UI.GTK.Button.hs Just wondering

Re: AlternateLayoutRule

2014-05-14 Thread John Meacham
Okay, I believe I have come up with a modified version that accepts many more programs and doesn't require complicated comma handling, you can make all decisions based on the top of the context stack. It also allows many useful layouts that were illegal under the old system. The main change was

Re: AlternateLayoutRule

2014-05-14 Thread John Meacham
matching on current symbol and current top of stack and can be listed as a set of tuples. in other words, a textbook deterministic push down automaton. John On Wed, May 14, 2014 at 7:29 AM, Ian Lynagh ig...@earth.li wrote: On Tue, May 13, 2014 at 11:20:25PM -0700, John Meacham wrote

AlternateLayoutRule

2014-05-13 Thread John Meacham
-- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: AlternateLayoutRule

2014-05-13 Thread John Meacham
... maybe I can revert my current lexer parser back to simpler haskell 98 syntax and require anything that uses extensions to use the new layout rule. Thanks, John -- John Meacham - http://notanumber.net/ ___ Glasgow-haskell-users mailing list Glasgow

Re: [Haskell] ANNOUNCE: jhc-0.8.1

2014-05-13 Thread John Meacham
:09 AM, John Meacham j...@repetae.net wrote: Yeah, there was a bug in the way it detected editline/readline which has been fixed in the repo. You can run configure with --disable-line to work around it. or change the word USE_NOLINE to USE_READLINE in src/Util/Interact.hs always some silly

Re: [Haskell] ANNOUNCE: jhc-0.8.1

2014-05-12 Thread John Meacham
regards, Krzysztof Skrzętnicki On Sun, May 11, 2014 at 10:20 PM, John Meacham j...@repetae.net wrote: After a hiatus, jhc 0.8.1 is released. http://repetae.net/computer/jhc - New license, jhc is now released under a permissive BSD style licence rather than the GPL. The license

Re: [Haskell] ANNOUNCE: jhc-0.8.1

2014-05-12 Thread John Meacham
...@community.haskell.org wrote: Thank you for the new release. :) On 13 May 2014 04:40, John Meacham j...@repetae.net wrote: as for the packages i've been testing with fgl,regex-compat,bytestring,binary,mtl,containers,unix,utf8-string,zlib,HsSyck,filepath,process,syb,old-time,pretty. and editline ? For me

Re: Does GHC 7.8 make targeting bare metal ARM any easier?

2013-03-20 Thread John Meacham
kiwamu has been targeting an arm cortex-m3 succesfully with jhc. this is a CPU with 40k of RAM running Haskell code very much on bare metal. :) John On Tue, Mar 19, 2013 at 6:07 PM, Jeremy Shaw jer...@n-heptane.com wrote: There have been at least a couple projects, such as hOp and HaLVM

Re: [Haskell-cafe] Does GHC 7.8 make targeting bare metal ARM any easier?

2013-03-20 Thread John Meacham
kiwamu has been targeting an arm cortex-m3 succesfully with jhc. this is a CPU with 40k of RAM running Haskell code very much on bare metal. :) John On Tue, Mar 19, 2013 at 6:07 PM, Jeremy Shaw jer...@n-heptane.com wrote: There have been at least a couple projects, such as hOp and HaLVM

Re: [Haskell-cafe] [jhc] ANNOUNCE: Ajhc 0.8.0.2 Release

2013-03-16 Thread John Meacham
I have merged your changes back into the main jhc tree. Thanks! John On Sat, Mar 16, 2013 at 5:28 AM, Kiwamu Okabe kiw...@debian.or.jp wrote: We are happy to announce Ajhc 0.8.0.2. It's first release announce for Ajhc. Major change on this release is ability to compile Haskell code for

Re: [Haskell-cafe] ANNOUNCE: Start Ajhc project with forking jhc.

2013-03-06 Thread John Meacham
/watch?v=3R9sogReVHg And I created many patches for jhc. But...I think that the upstream author of jhc, John Meacham, can't pull the contribution speedy, because he is too busy. It's difficult that maintain many patches without any repositories, for me. Then, I have decided to fork jhc, named

Re: data kinds

2013-01-26 Thread John Meacham
On Fri, Jan 25, 2013 at 7:19 AM, Ross Paterson r...@soi.city.ac.uk wrote: GHC implements data kinds by promoting data declarations of a certain restricted form, but I wonder if it would be better to have a special syntax for kind definitions, say data kind Nat = Zero | Succ Nat This is

Re: [Haskell-cafe] Record syntax, reopening a can of worms.

2012-05-26 Thread John Meacham
Is it any more ridiculous than f x@Nothing {} = fromJust x main = print (f Nothing) crashing at run time? That is what you are expressing with your first one. This issue is completely unrelated to the named field syntax, they behave exactly like data types with non-named fields. However, you

Re: [Haskell] Types of when and unless in Control.Monad

2012-04-21 Thread John Meacham
Yes, this has always bothered me too. John On Sat, Apr 21, 2012 at 2:51 AM, Andreas Abel andreas.a...@ifi.lmu.de wrote: In Control.Monad, when has type  when :: Monad m = Bool - m () - m () I think this type should be generalized to  when :: Monad m = Bool - m a - m () to avoid silly

Re: [Haskell-cafe] New in haskell for old-timers?

2012-03-30 Thread John Meacham
On Fri, Mar 30, 2012 at 1:05 PM, Mats Rauhala mats.rauh...@gmail.com wrote: Oh wow, I thought jhc was discontinued, but just checked the repositories and mailing lists and it's alive and well. No idea where I got the idea that it was discontinued. Going a little bit on tangent here, but if I

Re: Stealing ideas from the latest GCC release

2012-03-22 Thread John Meacham
I support a form of this in jhc by allowing specialization of values, not just types. It is actually the same mechanism as type specialization since that is just value specialization where the value being specialized on is the type parameter. foo :: Bool - Int {-# SPECIALIZE foo True :: Int #-}

Re: [Haskell-cafe] Is there a better way to subtyping?

2012-03-13 Thread John Meacham
Why not data Super = SuperA { commonFields :: () aFields :: () } | SuperB { commonFields :: () bFields :: () } | SuperC { commonFields :: ()

Re: Getting the file descriptor of a handle, without closing it

2012-03-10 Thread John Meacham
Can you use 'dup' to copy the file descriptor and return that version? That will keep a reference to the file even if haskell closes the original descriptor. John On Sat, Mar 10, 2012 at 5:31 PM, Volker Wysk p...@volker-wysk.de wrote: Hi This is an addition to my previous post. This

Re: How unsafe are unsafeThawArray# and unsafeFreezeArray#

2012-03-09 Thread John Meacham
Out of curiosity, Is the reason you keep track of mutable vs not mutable heap allocations in order to optimize the generational garbage collector? as in, if a non-mutable value is placed in an older generation you don't need to worry about it being updated with a link to a newer one or is there

Re: [Haskell-cafe] Global Arrays

2012-03-09 Thread John Meacham
On Fri, Mar 9, 2012 at 12:48 PM, Clark Gaebel cgae...@csclub.uwaterloo.ca wrote: static const double globalArray[] = { huge list of doubles }; double* getGlobalArray() { return globalArray; } int        getGlobalArraySize() { return sizeof(globalArray)/sizeof(globalArray[0]); } And importing

Re: [Haskell-cafe] Global Arrays

2012-03-09 Thread John Meacham
On Fri, Mar 9, 2012 at 5:49 PM, Clark Gaebel cgae...@csclub.uwaterloo.ca wrote: What's the advantage of using D.A.Storable over D.Vector? And yes, good call with creating an array of HSDouble directly. I didn't think of that! Oh, looks like D.Vector has an unsafeFromForeignPtr too, I didn't

Re: Interpreting the strictness annotations output by ghc --show-iface

2012-03-07 Thread John Meacham
L = lazy S = strict A = absent f :: Int - (Char,Char) - Int - Char LS(S,L)A means that it is lazy in the first int, strict in the tuple, strict in the first argument of the tuple but lazy in the second and the third argument is not used at all. I have a paper that describes it somewhere. I

Re: Interpreting the strictness annotations output by ghc --show-iface

2012-03-07 Thread John Meacham
On Wed, Mar 7, 2012 at 3:26 PM, John Meacham j...@repetae.net wrote: L = lazy S = strict A = absent f :: Int - (Char,Char) - Int - Char LS(S,L)A means that it is lazy in the first int, strict in the tuple, strict in the first argument of the tuple but lazy in the second and the third

Re: Interpreting the strictness annotations output by ghc --show-iface

2012-03-07 Thread John Meacham
Ah, looks like it got a bit more complicated since I looked at it last... time to update jhc :) Actually. not sure if the Eval/Box split is relevant to my core. hmm John ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: Interpreting the strictness annotations output by ghc --show-iface

2012-03-07 Thread John Meacham
On Wed, Mar 7, 2012 at 5:01 PM, Johan Tibell johan.tib...@gmail.com wrote: On Wed, Mar 7, 2012 at 4:38 PM, Brandon Allbery allber...@gmail.com wrote: I think the original type signature is needed to figure it out.  In the earlier example it indicated ghc drilling down into the type (a tuple)

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2012-03-07 Thread John Meacham
On Mon, Dec 19, 2011 at 7:10 PM, Alexander Solla alex.so...@gmail.com wrote: * Documentation that discourages thinking about bottom as a 'value'.  It's not a value, and that is what defines it. The fact that bottom is a value in Haskell is the fundamental thing that differentiates Haskell from

Re: FW: 7.4.1-pre: Show Integral

2012-03-06 Thread John Meacham
On Sat, Dec 24, 2011 at 12:37 PM, Ian Lynagh ig...@earth.li wrote: On Fri, Dec 23, 2011 at 05:41:23PM +, Simon Peyton-Jones wrote: I'm confused too.  I'd welcome clarification from the Haskell Prime folk. We use the library process to agree changes to the libraries, and Haskell' should

Re: simple extension to ghc's record disambiguation rules

2012-02-19 Thread John Meacham
On Sun, Feb 19, 2012 at 4:21 PM, AntC anthony_clay...@clear.net.nz wrote: Hi, I'd like to propose an extremely simple extension to ghc's record disambiguation rules, I wonder if John is teasing us? Nothing wrt to records is simple (IMHO). That is rather defeatist. Degree of simplicity is

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread John Meacham
It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a differently sized off_t. John On Fri, Feb 17, 2012 at 4:23 AM, Simon Marlow marlo...@gmail.com wrote: On 16/02/2012 13:25, Eugene Crosser wrote:

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread John Meacham
On Fri, Feb 17, 2012 at 2:12 PM, Simon Marlow marlo...@gmail.com wrote: On 17/02/12 19:36, John Meacham wrote: It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a differently sized off_t. But we're

simple extension to ghc's record disambiguation rules

2012-02-17 Thread John Meacham
Hi, I'd like to propose an extremely simple extension to ghc's record disambiguation rules, my motivation is that I often have record types with multiple constructors but common fields. so the handy idiom of f Rec { .. } = do blah return Rec { .. } won't work, because I don't

simple extension to ghc's record disambiguation rules

2012-02-17 Thread John Meacham
Hi, I'd like to propose an extremely simple extension to ghc's record disambiguation rules, my motivation is that I often have record types with multiple constructors but common fields. so the handy idiom of f Rec { .. } = do blah return Rec { .. } won't work, because I don't

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-16 Thread John Meacham
I have similar issues to this in jhc due to its pervasive caching of compilation results. Basically I must keep track of any potentially ABI-changing flags and ensure they are consistently passed to every compilation unit and include them in the signature hash along with the file contents. I make

Re: Unpack primitive types by default in data

2012-02-16 Thread John Meacham
FWIW jhc has always unboxed everything smaller or equal to the size of a pointer unconditionally. It's all about the cache performance. John On Thu, Feb 16, 2012 at 4:25 PM, Johan Tibell johan.tib...@gmail.com wrote: Hi all, I've been thinking about this some more and I think we should

Re: Unpack primitive types by default in data

2012-02-16 Thread John Meacham
On Thu, Feb 16, 2012 at 4:42 PM, Johan Tibell johan.tib...@gmail.com wrote: 1. In theory the user could create a cut-n-paste copy of the data structure and specialize it to a particular type, but I think we all agree that would be unfortunate (not to say that it cannot be justified in extreme

Re: [Haskell] [Haskell-cafe] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-16 Thread John Meacham
On Thu, Feb 16, 2012 at 1:20 PM, Ian Lynagh ig...@earth.li wrote: I've now implemented this in GHC. For now, the syntax is: type    {-# CTYPE some C type #-} Foo = ... newtype {-# CTYPE some C type #-} Foo = ... data    {-# CTYPE some C type #-} Foo = ... The magic for (Ptr a) is built in

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-16 Thread John Meacham
On Thu, Feb 16, 2012 at 1:20 PM, Ian Lynagh ig...@earth.li wrote: I've now implemented this in GHC. For now, the syntax is: type    {-# CTYPE some C type #-} Foo = ... newtype {-# CTYPE some C type #-} Foo = ... data    {-# CTYPE some C type #-} Foo = ... The magic for (Ptr a) is built in

Re: Changes to Typeable

2012-02-14 Thread John Meacham
Proxy also has the advantage that it almost exactly mirrors what it ends up looking like in core. The application to proxy is the user visible type application. John On Tue, Feb 14, 2012 at 8:18 AM, Iavor Diatchki iavor.diatc...@gmail.com wrote: Hello, On Mon, Feb 13, 2012 at 5:32 PM,

Re: [jhc] new extension in jhc: explicit namespaces in import/export lists

2012-02-13 Thread John Meacham
On Sun, Feb 12, 2012 at 11:26 PM, Roman Cheplyaka r...@ro-che.info wrote: * John Meacham j...@repetae.net [2012-02-12 19:26:24-0800] In haskell 98 [...] Not sure what you mean here. You aren't going to modify an existing standard, are you? :) [...] a name such as 'Foo' in an export list

Re: [Haskell-cafe] Stable pointers: use of cast to/from Ptr

2012-02-12 Thread John Meacham
No, you can do nothing with the pointer on the C side other than pass it back into haskell. It may not even be a pointer, it may be an index into an array deep within the RTS for instance. The reason they can be cast to void *'s is so you can store them in C data structures that don't know about

Re: Changes to Typeable

2012-02-11 Thread John Meacham
: On 10/02/2012, at 23:30, John Meacham wrote: something I have thought about is perhaps a special syntax for Proxy, like {:: Int - Int } is short for (Proxy :: Proxy (Int - Int)). not sure whether that is useful enough in practice though, but could be handy if we are throwing around types a lot

Re: Changes to Typeable

2012-02-11 Thread John Meacham
On Fri, Feb 10, 2012 at 2:24 PM, Ian Lynagh ig...@earth.li wrote: But it would be better if they could use the new definition. Is PolyKinds sufficiently well-defined and simple that it is feasible for other Haskell implementations to implement it? There is actually a much simpler extension I

Re: Changes to Typeable

2012-02-11 Thread John Meacham
typo, I meant Proxy :: (exists k . k) - * is isomorphic to Proxy :: forall k . k - * John On Sat, Feb 11, 2012 at 6:02 PM, John Meacham j...@repetae.net wrote: On Fri, Feb 10, 2012 at 2:24 PM, Ian Lynagh ig...@earth.li wrote: But it would be better if they could use the new definition

Re: Changes to Typeable

2012-02-10 Thread John Meacham
Would it be useful to make 'Proxy' an unboxed type itself? so Proxy :: forall k . k - # This would statically ensure that no one accidentally passes ⊥ as a parameter or will get anything other than the unit 'Proxy' when trying to evaluate it. So the compiler can unconditionally elide the

Re: [Haskell] [Haskell-cafe] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Wed, Feb 8, 2012 at 10:56 AM, Ian Lynagh ig...@earth.li wrote: That sounds right. It basically means you don't have to write the C stubs yourself, which is nice because (a) doing so is a pain, and (b) when the foreign import is inside 2 or 3 CPP conditionals it's even more of a pain to

Re: [Haskell] ANNOUNCE: jhc-0.8.0

2012-02-09 Thread John Meacham
the drift_procesed one. hmm.. John On Thu, Feb 9, 2012 at 10:49 AM, Sergei Trofimovich sly...@gmail.com wrote: On Tue, 7 Feb 2012 20:03:20 -0800 John Meacham j...@repetae.net wrote: I am happy to announce jhc 0.8.0 There have been A lot of major changes in jhc with this release.  - http

Re: [Haskell] [Haskell-cafe] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Thu, Feb 9, 2012 at 11:23 AM, Ian Lynagh ig...@earth.li wrote: On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote: Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char** and so

Re: Proposal: require spaces around the dot operator

2012-02-09 Thread John Meacham
I mean, it is not worth worrying about the syntax until the extension has been implemented, used, and proven useful to begin with. Monads were in use well before the 'do' notation. Shaking out what the base primitives that make up a monad took a while to figure out. Even discussing syntax feels

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Wed, Feb 8, 2012 at 10:56 AM, Ian Lynagh ig...@earth.li wrote: That sounds right. It basically means you don't have to write the C stubs yourself, which is nice because (a) doing so is a pain, and (b) when the foreign import is inside 2 or 3 CPP conditionals it's even more of a pain to

Re: [Haskell-cafe] Cannot understand liftM2

2012-02-09 Thread John Meacham
A good first step would be understanding how the other entry works: cartProd :: [a] - [b] - [(a,b)] cartProd xs ys = do x - xs y - ys return (x,y) It is about halfway between the two choices. John On Thu, Feb 9, 2012 at 9:37 AM, readams richard.ad...@lvvwd.com

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-09 Thread John Meacham
On Thu, Feb 9, 2012 at 11:23 AM, Ian Lynagh ig...@earth.li wrote: On Thu, Feb 09, 2012 at 04:52:16AM -0800, John Meacham wrote: Since CSigSet has sigset_t associated with it, 'Ptr CSigSet' ends up turning into 'sigset_t *' in the generated code. (Ptr (Ptr CChar)) turns into char** and so

Re: [Haskell] [Haskell-cafe] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-07 Thread John Meacham
On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlow marlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we decided not to document because it was

[Haskell] ANNOUNCE: jhc-0.8.0

2012-02-07 Thread John Meacham
I am happy to announce jhc 0.8.0 There have been A lot of major changes in jhc with this release. - http://repetae.net/computer/jhc - A brand new and sanified library description file format. Now it is a true YAML file. The previous quasi-cabal files are supported but deprecated. - new

Re: [Haskell-cafe] [Haskell] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4

2012-02-07 Thread John Meacham
On Tue, Feb 7, 2012 at 4:24 AM, Simon Marlow marlo...@gmail.com wrote: Separately the unix package added support for undecoded FilePaths (RawFilePath), but unfortunately at the same time we started using a new extension in GHC 7.4.1 (CApiFFI), which we decided not to document because it was

Re: [Haskell-cafe] -XPolyKinds and undefined arguments

2012-02-07 Thread John Meacham
Can't you do something like have the kind be unlifted? for instance data Proxy (a :: #) data Type1 :: # data Type2 :: # John On Tue, Feb 7, 2012 at 12:19 PM, Douglas McClean douglas.mccl...@gmail.com wrote: There are all sorts of useful functions that would otherwise require explicit

Impredicative types error

2012-01-31 Thread John Meacham
Hi, I am running into an issue where some code that compiled and worked under 6.12 is failing under 7.0, the offending code is class DeNameable a where deName :: Module - a - a getDeName :: Tc (DeNameable n = n - n) getDeName = do mn - asks (tcInfoModName . tcInfo) return (\n -

Re: [Haskell-cafe] where to put general-purpose utility functions

2012-01-25 Thread John Meacham
That is one of the wonderful things about haskell, most languages have a negative correlation between codesize and productivity, however with haskell there is a strong positive correlation. You can re-use so much that as your code base grows it becomes easier to add new features rather than

Re: [Haskell-cafe] Why were unfailable patterns removed and fail added to Monad?

2012-01-19 Thread John Meacham
As expected, no warnings. But if I change this unfailable code above to the following failable version:    data MyType = Foo | Bar    test myType = do        Foo - myType        return () I *still* get no warnings! We didn't make sure the compiler spits out warnings. Instead, we

[Haskell] ANNOUNCE: jhc-0.7.8

2012-01-18 Thread John Meacham
Announcing jhc 0.7.8! This is mainly a bug fix release. http://repetae.net/computer/jhc/ Changes include: * Now compiles under ghc 7.0.x as well as 6.12 * new standard libraries * filepath * deepseq * new platforms supported Nintendo DSi, GBA, and GP32 (thanks to Brian McKenna)

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread John Meacham
Not to mention ebay, craigslist, etc.. http://www.techdirt.com/articles/20111005/10082416208/monster-cable-claims-ebay-craigslist-costco-sears-are-rogue-sites.shtml when there is no burden of proof for someone to take down a site then things get very complicated. for instance this package could

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread John Meacham
And such a thing can take months or years for the courts to figure out, and unless your free site has a lawyer to fight for your side, under SOPA/PIPA you can be down the entire time with little recourse. For anyone hosting content lke hackage, github, etc. when you have thousands of packages,

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread John Meacham
themselves shut off or delisted and sites linking to them shut down. John On Wed, Jan 18, 2012 at 3:42 PM, Hans Aberg haber...@telia.com wrote: Actually, it is a battle between the Hollywood and Silicon Valley industries. Hans On 19 Jan 2012, at 00:11, John Meacham wrote: And such a thing can

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread John Meacham
Yes, they are major pains for frisby, which is a parser but needs to be cleverer about recursion, the many and some that come with applicative actually cause infinite loops. John On Sun, Dec 11, 2011 at 9:18 PM, Gregory Crosswhite gcrosswh...@gmail.com wrote: Hey everyone, I am sure that

Re: Revert a CAF?

2011-12-06 Thread John Meacham
Can you use a weak pointer to do what you want? If you keep a weak pointer to the head of your expensive list then itwill be reclaimed at the next major GC I believe. I have used weakpointers for vaugely similar purposes before. I guess a downside is that they will always be reclaimed on GC even

Re: [Haskell-cafe] A Mascot

2011-11-15 Thread John Meacham
People tend to concentrate on the lambda which cooresponds to the functional aspect of haskell when designing logos. Not nearly enough attention is paid to the other striking feature, the laziness. The 'bottom' symbol _|_ should feature prominently. The two most defining features of haskell are

Re: case of an empty type should have no branches

2011-10-10 Thread John Meacham
What are you trying to acomplish? A case doesn't necessarily force evaluation in haskell depending on the binding pattern. for instance case x of _ - undefined will parse, but the function is still lazy in x. it is exactly equivalant to quodlibet x = undefined If you want to actually enforce

Re: [Haskell-cafe] Why not Darcs?

2011-04-21 Thread John Meacham
Um, the patch theory is what makes darcs just work. There is no need to understand it any more than you have to know VLSI design to understand how your computer works. The end result is that darcs repositories don't get corrupted and the order you integrate patches doesn't affect things meaning

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread John Meacham
Error is not catchable in haskell 98. Only things thrown by raiseIO are. On Apr 1, 2011 12:02 AM, o...@okmij.org wrote: ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Strictness is observable

2011-04-01 Thread John Meacham
On Fri, Apr 1, 2011 at 2:23 AM, o...@okmij.org wrote: John Meacham wrote: Error is not catchable in haskell 98. Only things thrown by raiseIO are. I see; so GHC, absent any LANGUAGE pragma, should have arranged for `error' to generate a non-catchable exception. Actually, it was because you

Re: specify call-by-need

2011-02-15 Thread John Meacham
Except for the fact that compilers don't actually implement call by need. An example would be the speculative evaluation of ghc. http://research.microsoft.com/en-us/um/people/simonpj/papers/optimistic/adaptive_speculation.ps And local optimizations that affect asymptotic behavior are used all

Re: Injective type families?

2011-02-14 Thread John Meacham
Isn't this what data families (as opposed to type families) do? John On Mon, Feb 14, 2011 at 1:28 PM, Conal Elliott co...@conal.net wrote: Is there a way to declare a type family to be injective? I have data Z data S n type family n :+: m type instance Z   :+: m = m type instance S

Re: [Haskell-cafe] ($) not as transparent as it seems

2011-02-03 Thread John Meacham
In general, errors are always interchangeable with another. An exception in haskell is a value, rather than an event. Haskell prescribes no evaluation order other than if the result is defined it must be equivalant to the one generated by a normal-order reduction strategy. Since error is not a

Re: OSX i386/x86 and x86_64 - time to switch supported platforms?

2011-02-01 Thread John Meacham
Even though the hardware is x86_64, I thought the vast majority of macs used a 32 bit build of OSX and 32 bit programs? John On Tue, Feb 1, 2011 at 3:38 AM, Max Cantor mxcan...@gmail.com wrote: The last 32-bit, Intel Mac was the Mac Mini, discontinued in August 2007. The bulk of them

Re: Kernel panic when building HEAD on OS X 10.6.4

2011-01-31 Thread John Meacham
Any chance a cooling fan inside died and you are overheating it? Can you reproduce the failure with other heavy load programs, can you run a widget that monitors the internal temperatures and other sensors during the build? It does seem odd... John On Mon, Jan 31, 2011 at 12:46 AM, Johan

Re: [Haskell-cafe] [Haskell] ANNOUNCE: jhc 0.7.7 is out.

2011-01-30 Thread John Meacham
On Sun, Jan 30, 2011 at 4:44 AM, Roman Cheplyaka r...@ro-che.info wrote: A few questions about the inclusion of parsec: 1. It is parsec-2, not parsec-3, right? Yes, it is parsec-2. 2.1.0.1 to be exact. 2. Does this change consist of merely inclusion parsec as a standard   library, or are

[Haskell] ANNOUNCE: jhc 0.7.7 is out.

2011-01-29 Thread John Meacham
Announcing jhc 0.7.7! This release fixes a large number of bugs that cropped up when compiling haskell out in the wild as well as adds some more features. A major one being the garbage collector is enabled by default.  http://repetae.net/computer/jhc/ Changes: (including some changes from the

Re: [Haskell-cafe] Splittable random numbers

2011-01-21 Thread John Meacham
On Wed, Nov 10, 2010 at 11:33 AM, Lauri Alanko l...@iki.fi wrote: So a naive implementation of split would be: split g = (mkGen seed, g')  where (seed, g') = random g (Where mkGen creates a new state from some sufficiently big seed data.) So what is the problem here? What kinds of

Re: backward compatibility

2011-01-19 Thread John Meacham
On Wed, Jan 19, 2011 at 6:32 PM, Kazu Yamamoto k...@iij.ad.jp wrote: Hello, I have been using GHC HEAD for some months and am suffering from the breaks of backward compatibility. 1) MANY packages cannot be complied with GHC HEAD because of lack of FlexibleInstances and BangPatterns. 2)

Re: [Haskell-cafe] Haskell for Gingerbread

2011-01-13 Thread John Meacham
On Thu, Jan 13, 2011 at 3:07 AM, Stefan Kersten s...@k-hornz.de wrote: On 28.12.10 21:25, John Meacham wrote: jhc generated C works on the android/ARM just fine. Android specific libraries arn't available, so you would have to bind to what you want with the FFI. is there a recommended

Re: [Haskell-cafe] Haskell for Gingerbread

2010-12-28 Thread John Meacham
jhc generated C works on the android/ARM just fine. Android specific libraries arn't available, so you would have to bind to what you want with the FFI. John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Identity type

2010-12-22 Thread John Meacham
On Tue, Dec 14, 2010 at 10:31 AM, Pierre-Etienne Meunier pierreetienne.meun...@gmail.com wrote: Is there something like an identity type, transparent to the type-checker, in haskell ? For instance, I'm defining an interval arithmetic, with polynomials, matrices, and all that... defined with

Re: [Haskell-cafe] Data.Typeable TypeRep Ord instance.

2010-12-22 Thread John Meacham
On Sat, Dec 4, 2010 at 2:08 PM, Serguey Zefirov sergu...@gmail.com wrote: Why TypeRep does have equality and doesn't have ordering? It would be good to have that. Yes, I have wanted that too. It would make maps from types to values possible/efficient. There is a very critical path in jhc that

Re: Type families status

2010-12-13 Thread John Meacham
FWIW, I am forgoing functional dependencies and going straight to type families/associated types in jhc. They are easier to implement and much cleaner IMHO. John On Mon, Dec 13, 2010 at 12:29 AM, Simon Peyton-Jones simo...@microsoft.com wrote: Yes, I think type families are here to stay.

  1   2   3   4   5   6   7   8   9   10   >