Re: Newtype wrappers

2013-01-21 Thread wren ng thornton
On 1/21/13 1:40 AM, Shachaf Ben-Kiki wrote: For example: {-# LANGUAGE TypeFamilies #-} import Unsafe.Coerce newtype Id a = MkId { unId :: a } {-# RULES "fmap unId" fmap unId = unsafeCoerce #-} data family Foo x y a data instance Foo x y (Id a) = FooI x data

Re: Error building ghc on raspberry pi.

2013-01-21 Thread Karel Gardas
On 01/21/13 04:43 PM, rocon...@theorem.ca wrote: So the binary-dist has a settings.in file. It is the configure step in the binary-dist that generates the corrupt settings file. Perhaps you've forgotten to regenerate bin-dist configure as you did with build tree configure after applying my pat

Re: Error building ghc on raspberry pi.

2013-01-21 Thread roconnor
On Mon, 21 Jan 2013, Karel Gardas wrote: On 01/21/13 12:49 AM, rocon...@theorem.ca wrote: On Sun, 20 Jan 2013, Karel Gardas wrote: Okay, I patched the settings filed generted by ./configure in the binary-dist and rank make install which completed. However, pi@raspberrypi /tmp/bindist $ bin/g

Re: any successfull ghc registerised builds on arm?

2013-01-21 Thread Simon Marlow
On 19/01/13 07:32, Stephen Paul Weber wrote: Somebody claiming to be Stephen Paul Weber wrote: Somebody claiming to be Nathan Hüsken wrote: Was that an registerised or unregisterised build? Did anyone succesfully build ghc on an arm system which produces non crashing executables? Just finally

RE: Global constant propagation

2013-01-21 Thread Simon Peyton-Jones
Your example is complicated by the fact that k is overloaded (will work on any value in class Num), and in fact the numbers end up having type Integer, not Int. But still, it is indeed like SpecConstr. Maybe we should generate a specialised version of 'k', specialised for k=0. That might be a