Comparing StableNames of different type

2012-08-23 Thread Emil Axelsson
Hi! Are there any dangers in comparing two StableNames of different type? stEq :: StableName a -> StableName b -> Bool stEq a b = a == (unsafeCoerce b) I could guard the coercion by first comparing the type representations, but that would give me a `Typeable` constraint that would spread

Re: 7.6.1 RC1 panic "coVarsOfTcCo:Bind"

2012-08-23 Thread Ganesh Sittampalam
Hi Simon, Now I get the below. I tarred up the project + dependencies and put it at http://urchin.earth.li/~ganesh/temp/tcproblem.tar.bz (run build.sh), or I'm happy to keep testing on my machine. Cheers, Ganesh ghc.exe: panic! (the 'impossible' happened) (GHC version 7.6.0.20120822 for i38

is this a type lits/nats bug or my incorrect understanding ?

2012-08-23 Thread Carter Schonwald
Hello, I'm trying to understand how much i can build on top of type literals, so as an exercise, i've been trying to see if I can define a type level "absolute different of two natural numbers" i have a minimal example that either type checks in a useless way, or gives a misleading type errors! (

Re: Problem with default signatures

2012-08-23 Thread Nicolas Frisby
I've investigated this behavior a bit, and I have two things worth mentioning. (1) One of the ingredients in this behavior is the non-injectivity of type families. If we make the class parameter f accessible in the signature of emptyAlt, there are no more type errors. For example, if you can cha

Re: GADTs in the wild

2012-08-23 Thread Scott Michel
Probably useful to include a "mkFixed" function example as well, to show how a Fixed can be constructed using the "optimal" data representation: -- | Make a fixed field. -- -- Note that this type constructor function chooses the minimal type -- representation for the fixed value stored. Unsigned r

Re: GADTs in the wild

2012-08-23 Thread Scott Michel
Here's an example (not a complete module) I was using to represent bit-oriented structures as they occur in certain space applications, notably GPS frames. "Fixed" allows for fixed-sized fields and lets the end user choose the integral type that's best for the structure. At least it's not a parser

Re: Fwd: Request for comments on proposal for literate programming using markdown

2012-08-23 Thread Ian Lynagh
On Thu, Aug 23, 2012 at 10:28:46AM +, Philip Holzenspies wrote: > Below message was rejected because I included the screenshot which was to > big. The screenshot referred to is now here: > > http://tinypic.com/r/2yy6tcy/6 (screenshot shows: http://www.haskell.org/ghc/docs/latest/html/librari

Fwd: Request for comments on proposal for literate programming using markdown

2012-08-23 Thread Philip Holzenspies
Below message was rejected because I included the screenshot which was to big. The screenshot referred to is now here: http://tinypic.com/r/2yy6tcy/6 Begin forwarded message: From: "Philip K. F. Hölzenspies" mailto:p...@st-andrews.ac.uk>> Subject: Re: Request for comments on proposal for lite