Alex compilation fails on ambiguous type [was: Re: Alex requirement for Setup.lhs]

2008-12-04 Thread Philip K.F. Hölzenspies
On Thursday 04 December 2008 00:11:13 Ian Lynagh wrote: If you have downloaded the source tarball then the preprocessed files are included. Cabal may be getting confused by the .x files also being present, so rm src/Scan.x should fix it. You may also need to rm src/Parser.y if you

Re: Alex compilation fails on ambiguous type [was: Re: Alex requirement for Setup.lhs]

2008-12-04 Thread Philip K.F. Hölzenspies
On Thursday 04 December 2008 14:24:32 Philip K.F. Hölzenspies wrote: [16 of 16] Compiling Main ( src/Main.hs, dist/build/alex/alex-tmp/Main.o ) src/Main.hs:316:25: Ambiguous type variable `e' in the constraint: `GHC.Exception.Exception e' arising from a use of

Type checker loops with type families, overlapping and undecidable instances

2008-12-04 Thread José Pedro Magalhães
Hello all, Please consider the following code: {-# OPTIONS -Wall #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances#-} {-# LANGUAGE TypeOperators#-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE

Re: Type checker loops with type families, overlapping and undecidable instances

2008-12-04 Thread Lennart Augustsson
Turning on UndecidableInstances is the same as saying: OK typechcker, you can loop if I make a mistake. I've not looked closely at your code, but if you turn on that flag, looping is probably not a bug. -- Lennart 2008/12/4 José Pedro Magalhães [EMAIL PROTECTED]: Hello all, Please consider

Re: Type checker loops with type families, overlapping and undecidable instances

2008-12-04 Thread José Pedro Magalhães
Hello Lennart, Yes, but according to the manual ( http://www.haskell.org/ghc/docs/latest/html/users_guide/type-class-extensions.html#undecidable-instances), Termination is ensured by having a fixed-depth recursion stack. So I would expect at least termination, which I'm not getting (but I guess

Re: Type checker loops with type families, overlapping and undecidable instances

2008-12-04 Thread Tom Schrijvers
-- Uncommenting the line below causes the typechecker to loop (GHC 6.10.1, Windows) --test = f Zero Is this expected behavior or a bug? The call f Zero requires a co-inductive proof of the type class constraint (F Nat): F Nat = Vieweable Nat /\ F' (View Nat) = True /\

hsc2hs problem

2008-12-04 Thread Creighton Hogg
Hello, Since hsc2hs is distributed with GHC, I thought this might be a decent place to ask. I tried to run hsc2hs on a file that I know worked with my 6.8.3 installation, but now I'm getting the error /usr/local/lib/ghc-6.10.1/hsc2hs-0.67/template-hsc.h:4:19: error: HsFFI.h: No such file or

Re: hsc2hs problem

2008-12-04 Thread Creighton Hogg
Ah, just to reply to myself the problem was rather simple: hsc2hs couldn't find any of the header files in the ghc/include directory. It was easy enough to fix that, but it was weird that installing ghc didn't take of that for me. Especially since I never had this problem with previous versions.