Re: Arrow Development

2015-02-21 Thread Ross Paterson
On Fri, Feb 20, 2015 at 02:58:14AM -0500, Thomas Bereknyei wrote:
 I am looking at the proc notation de-sugar and I see results like this when
 using a Free Arrow (mostly copied from [1]):
 line2 = proc n - do
   Effect getURLSum *** Effect getURLSum - n
 
 Seq [Pure ] (Seq [Pure ] (Seq [Pure ] (Seq [Pure ](Par Effect  {Effect } ) 
 ) ) )
 
 while this is so much simpler:
 line2 = Effect getURLSum *** Effect getURLSum 
 
 Par Effect  {Effect }
 
 Those `Seq [Pure ]` sequences come from application of (.) and I have noticed
 many similar inefficiencies in the Arrow preprocessor. Eventually the goal
 would be to optimize when possible, for example I started looking into this in
 order to use `concurrently` for (***) when in IO.
 
 There was a rewrite mentioned here [2]. The deSugar/DsArrows.hs [3] looks
 convoluted. Any progress or work needed? Or are Arrows not used much and not
 worth the effort?

I don't think it's feasible to try to do optimization in the desugarer,
which certainly is convoluted.  You might have more luck using RULES to
simplify the output.

(The desugarer could be simplified -- a lot of what it does probably belongs
in the renamer -- but I'm not sure that would help with optimization.)
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Desugaring introduces

2015-02-21 Thread Adam Gundry
Hi Gabor,

Interesting! While in principle it is true that t1 is the desugaring of
t2, GHC does typechecking before desugaring (even with RebindableSyntax)
in the interests of generating error messages that reflect what the user
actually wrote. The typechecker probably should treat t1 and t2
identically, but in practice this may be difficult to ensure. In this
case, I suspect the typechecking rules for do-notation assume that (=)
has a more usual type.

The user's guide section on RebindableSyntax says

 In all cases (apart from arrow notation), the static semantics should
 be that of the desugared form, even if that is a little unexpected.

so on that basis you're probably justified in reporting this as a bug.

Hope this helps,

Adam


On 21/02/15 11:42, Gabor Greif wrote:
 Hi devs,
 
 before I file a bug, I'd like to double check on a strange desugaring
 behaviour with RankNTypes and RebindableSyntax.
 
 Here is the snippet
 {{{
 {-# LANGUAGE RankNTypes, RebindableSyntax #-}
 {-# LANGUAGE ImpredicativeTypes #-}
 
 import qualified Prelude as P
 
 (=) :: a - ((forall b . b) - c) - c
 a = f = f P.undefined
 return a = a
 fail s = P.undefined
 
 t1 = 'd' = (\_ - 'k')
 
 t2 = do _ - 'd'
 'k'
 
 main = P.putStrLn [t1, t2]
 }}}
 
 Without ImpredicativeTypes I get this error:
 {{{
 rebindtest.hs:13:9:
 Cannot instantiate unification variable ‘t0’
 with a type involving foralls: forall b. b
   Perhaps you want ImpredicativeTypes
 In a stmt of a 'do' block: _ - 'd'
 In the expression:
   do { _ - 'd';
'k' }
 In an equation for ‘t2’:
 t2
   = do { _ - 'd';
  'k' }
 }}}
 
 t1 is supposed to be the desugaring of t2. Strangely t2 only compiles
 with ImpredicativeTypes. Why? Isn't desugaring a purely syntactic
 transformation (esp. with RebindableSyntax)?
 
 Any hints welcome!
 
 Cheers,
 
 Gabor


-- 
Adam Gundry, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: ANNOUNCE: GHC 7.10.1 Release Candidate 2

2015-02-21 Thread Miëtek Bak
My previous email was about the x86_64 bindist GHC 7.10.1-rc2.  I’ve now added 
i386 support to Halcyon, and it appears only the x86_64 version works fine on 
CentOS 6 (6.5), while the i386 version fails to configure:

   checking for path to top of build tree... 
utils/ghc-pwd/dist-install/build/tmp/ghc-pwd: symbol lookup error: 
libraries/integer-gmp2/dist-install/build/libHSinteg_21cuTlnn00eFNd4GMrxOMi-ghc7.10.0.20150123.so:
 undefined symbol: __gmpn_andn_n
   configure: error: cannot determine current directory


-- 
Miëtek




On 2015-01-27, at 06:26, Miëtek Bak mie...@bak.io wrote:

 It appears GHC 7.10.1-rc2 doesn’t support glibc 2.11 — specifically, 2.11.1 
 (Ubuntu 10.04 LTS) and 2.11.3 (Debian 6).  glibc 2.12 (CentOS 6) seems to 
 work fine.  Symptoms include:
 
   Installing library in
   /app/ghc/lib/ghc-7.10.0.20150123/ghc_0kOYffGYd794400D7yvIjm
   /app/ghc/lib/ghc-7.10.0.20150123/bin/ghc-pkg --force --global-package-db 
 /app/ghc/lib/ghc-7.10.0.20150123/package.conf.d update 
 rts/dist/package.conf.install
   Reading package info from rts/dist/package.conf.install ... done.
   utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist register 
 libraries/ghc-prim dist-install /app/ghc/lib/ghc-7.10.0.20150123/bin/ghc 
 /app/ghc/lib/ghc-7.10.0.20150123/bin/ghc-pkg 
 /app/ghc/lib/ghc-7.10.0.20150123 '' '/app/ghc' 
 '/app/ghc/lib/ghc-7.10.0.20150123' '/app/ghc/share/doc/ghc/html/libraries' NO 
  
   Warning: cannot determine version of 
 /app/ghc/lib/ghc-7.10.0.20150123/bin/ghc
   :
   
   ghc-cabal: '/app/ghc/lib/ghc-7.10.0.20150123/bin/ghc' exited with an error:
   /app/ghc/lib/ghc-7.10.0.20150123/bin/ghc: symbol lookup error:
   
 /app/ghc/lib/ghc-7.10.0.20150123/bin/../rts/libHSrts_thr-ghc7.10.0.20150123.so:
   undefined symbol: pthread_setname_np
 
 The bindist name does mention 'deb7', so perhaps this is all working as 
 intended.  However, similarly named bindists for GHC 7.8.* work fine with 
 glibc 2.11.
 
 
 In other news, I’m happy to say Halcyon now supports GHC 7.10.1-rc2 on CentOS 
 6 and 7, Debian 7, Fedora 19, 20, and 21, and Ubuntu 12 and 14.
 https://halcyon.sh/
 
   $ halcyon install --ghc-version=7.10.1-rc2 --cabal-version=1.22.0.0
 
 
 Best,
 
 -- 
 Miëtek
 
 
 
 
 On 2015-01-27, at 00:13, Austin Seipp aus...@well-typed.com wrote:
 
 We are pleased to announce the second release candidate for GHC 7.10.1:
 
  https://downloads.haskell.org/~ghc/7.10.1-rc2/
 
 This includes the source tarball and bindists for 64bit/32bit Linux
 and Windows. Binary builds for other platforms will be available
 shortly. (CentOS 6.5 binaries are not available at this time like they
 were for 7.8.x). These binaries and tarballs have an accompanying
 SHA256SUMS file signed by my GPG key id (0x3B58D86F).
 
 We plan to make the 7.10.1 release sometime in February of 2015.
 
 Please test as much as possible; bugs are much cheaper if we find them
 before the release!
 
 -- 
 Regards,
 
 Austin Seipp, Haskell Consultant
 Well-Typed LLP, http://www.well-typed.com/
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs
 
 ___
 Glasgow-haskell-users mailing list
 glasgow-haskell-us...@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



smime.p7s
Description: S/MIME cryptographic signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs