haskell compiler never comes back

Haskellians, The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated. Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com

Haskellians, An even simpler version http://paste.pocoo.org/show/95518/ that reveals the issue. i'm astounded that the compiler literally just hangs. Best wishes, --greg On Mon, Dec 15, 2008 at 12:23 PM, Greg Meredith < lgreg.meredith@biosimilarity.com> wrote:
Haskellians,
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
Best wishes,
--greg
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105
+1 206.650.3740
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com

Am Montag, 15. Dezember 2008 23:16 schrieb Greg Meredith:
Haskellians,
An even simpler version http://paste.pocoo.org/show/95518/ that reveals the issue. i'm astounded that the compiler literally just hangs.
Best wishes,
--greg
On Mon, Dec 15, 2008 at 12:23 PM, Greg Meredith <
lgreg.meredith@biosimilarity.com> wrote:
Haskellians,
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
Best wishes,
--greg
I can't confirm it, with 6.8.3: $ ghc -O2 --make Monoidal.hs [1 of 1] Compiling Monoidal ( Monoidal.hs, Monoidal.o ) Monoidal.hs:110:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal.hs:103:42 In the expression: (PutIn (\ a -> (HFTLVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTLVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTLVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $ and the earlier version: $ ghc -O2 --make Monoidal2.hs [1 of 1] Compiling Monoidal2 ( Monoidal2.hs, Monoidal2.o ) Monoidal2.hs:105:18: Couldn't match expected type `HFTensorExpr a i' against inferred type `[i1] -> [i1] -> HFTensorExpr a i1' In the expression: HFTExpr (HFTLVal a) (HFTRVal b) In the definition of `tMult': a tMult b = HFTExpr (HFTLVal a) (HFTRVal b) In the definition for method `tMult' Monoidal2.hs:122:10: Couldn't match expected type `[]' against inferred type `++ msa' Expected type: [i] Inferred type: ++ msa msb In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb)' In the expression: (HFTExpr (HFTExpr a b msa msb) c ((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb) msc) Monoidal2.hs:139:10: Couldn't match expected type `[]' against inferred type `++ msl' Expected type: [i] Inferred type: ++ msl msr In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr)' In the expression: (HFTExpr (HFTExpr l r msl msr) (HFTRVal b) ((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr) [(PutIn (\ b -> (HFTRVal b)))]) Monoidal2.hs:150:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal2.hs:103:42 In the expression: (PutIn (\ a -> (HFTRVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTRVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTRVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $ No hang, which compiler version did you use?

Daniel, Thanks. i'm using GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> :l monoidal.hs [1 of 1] Compiling Monoidal ( monoidal.hs, interpreted ) C-c C-cInterrupted.
:q
Best wishes,
--greg
On Mon, Dec 15, 2008 at 2:50 PM, Daniel Fischer
Am Montag, 15. Dezember 2008 23:16 schrieb Greg Meredith:
Haskellians,
An even simpler version http://paste.pocoo.org/show/95518/ that reveals the issue. i'm astounded that the compiler literally just hangs.
Best wishes,
--greg
On Mon, Dec 15, 2008 at 12:23 PM, Greg Meredith <
lgreg.meredith@biosimilarity.com> wrote:
Haskellians,
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
Best wishes,
--greg
I can't confirm it, with 6.8.3:
$ ghc -O2 --make Monoidal.hs [1 of 1] Compiling Monoidal ( Monoidal.hs, Monoidal.o )
Monoidal.hs:110:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal.hs:103:42 In the expression: (PutIn (\ a -> (HFTLVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTLVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTLVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $
and the earlier version:
$ ghc -O2 --make Monoidal2.hs [1 of 1] Compiling Monoidal2 ( Monoidal2.hs, Monoidal2.o )
Monoidal2.hs:105:18: Couldn't match expected type `HFTensorExpr a i' against inferred type `[i1] -> [i1] -> HFTensorExpr a i1' In the expression: HFTExpr (HFTLVal a) (HFTRVal b) In the definition of `tMult': a tMult b = HFTExpr (HFTLVal a) (HFTRVal b) In the definition for method `tMult'
Monoidal2.hs:122:10: Couldn't match expected type `[]' against inferred type `++ msa' Expected type: [i] Inferred type: ++ msa msb In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb)' In the expression: (HFTExpr (HFTExpr a b msa msb) c ((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb) msc)
Monoidal2.hs:139:10: Couldn't match expected type `[]' against inferred type `++ msl' Expected type: [i] Inferred type: ++ msl msr In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr)' In the expression: (HFTExpr (HFTExpr l r msl msr) (HFTRVal b) ((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr) [(PutIn (\ b -> (HFTRVal b)))])
Monoidal2.hs:150:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal2.hs:103:42 In the expression: (PutIn (\ a -> (HFTRVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTRVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTRVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $
No hang, which compiler version did you use?
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com

Daniel, BTW, if i comment out the version of PutIn that calls HF{L,R}Val and put in the unit, instead, i see the complaint you're seeing. i'll upgrade ghc. Best wishes, --greg On Mon, Dec 15, 2008 at 2:49 PM, Greg Meredith < lgreg.meredith@biosimilarity.com> wrote:
Daniel,
Thanks. i'm using
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> :l monoidal.hs [1 of 1] Compiling Monoidal ( monoidal.hs, interpreted ) C-c C-cInterrupted.
:q
Best wishes,
--greg
On Mon, Dec 15, 2008 at 2:50 PM, Daniel Fischer
wrote: Am Montag, 15. Dezember 2008 23:16 schrieb Greg Meredith:
Haskellians,
An even simpler version http://paste.pocoo.org/show/95518/ that reveals the issue. i'm astounded that the compiler literally just hangs.
Best wishes,
--greg
On Mon, Dec 15, 2008 at 12:23 PM, Greg Meredith <
lgreg.meredith@biosimilarity.com> wrote:
Haskellians,
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
Best wishes,
--greg
I can't confirm it, with 6.8.3:
$ ghc -O2 --make Monoidal.hs [1 of 1] Compiling Monoidal ( Monoidal.hs, Monoidal.o )
Monoidal.hs:110:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal.hs:103:42 In the expression: (PutIn (\ a -> (HFTLVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTLVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTLVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $
and the earlier version:
$ ghc -O2 --make Monoidal2.hs [1 of 1] Compiling Monoidal2 ( Monoidal2.hs, Monoidal2.o )
Monoidal2.hs:105:18: Couldn't match expected type `HFTensorExpr a i' against inferred type `[i1] -> [i1] -> HFTensorExpr a i1' In the expression: HFTExpr (HFTLVal a) (HFTRVal b) In the definition of `tMult': a tMult b = HFTExpr (HFTLVal a) (HFTRVal b) In the definition for method `tMult'
Monoidal2.hs:122:10: Couldn't match expected type `[]' against inferred type `++ msa' Expected type: [i] Inferred type: ++ msa msb In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb)' In the expression: (HFTExpr (HFTExpr a b msa msb) c ((Shuffle (\ (HFTExpr (HFTExpr u v msu msv) w msuv msw) -> (tAssoc (HFTExpr (HFTExpr u v msu msv) w msuv msw)))) :: msa ++ msb) msc)
Monoidal2.hs:139:10: Couldn't match expected type `[]' against inferred type `++ msl' Expected type: [i] Inferred type: ++ msl msr In the third argument of `HFTExpr', namely `((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr)' In the expression: (HFTExpr (HFTExpr l r msl msr) (HFTRVal b) ((Shuffle (\ (HFTExpr (HFTExpr a b msa msb) c msab msc) -> (tAssoc (HFTExpr (HFTExpr a b msa msb) c msab msc)))) :: msl ++ msr) [(PutIn (\ b -> (HFTRVal b)))])
Monoidal2.hs:150:11: Couldn't match expected type `i1' against inferred type `Isomorpism (HFTensorExpr a i) a' `i1' is a rigid type variable bound by the instance declaration at Monoidal2.hs:103:42 In the expression: (PutIn (\ a -> (HFTRVal a))) In the third argument of `HFTExpr', namely `[(PutIn (\ a -> (HFTRVal a)))]' In the expression: (HFTExpr (HFTLVal a) (HFTRVal b) [(PutIn (\ a -> (HFTRVal a)))] [(PutIn (\ b -> (HFTRVal b)))]) $
No hang, which compiler version did you use?
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105
+1 206.650.3740
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com

Am Montag, 15. Dezember 2008 23:49 schrieb Greg Meredith:
Daniel,
Thanks. i'm using
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Indeed, 6.8.2 hangs here, too.
Loading package base ... linking ... done. Prelude> :l monoidal.hs [1 of 1] Compiling Monoidal ( monoidal.hs, interpreted ) C-c C-cInterrupted.
:q
Best wishes,
--greg
Cheers, Daniel

Hi Greg, On Mon, Dec 15, 2008 at 12:23:08PM -0800, Greg Meredith wrote:
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
I've lost track of this thread, but if you still think there's a bug then can you report it in the GHC trac please?: http://hackage.haskell.org/trac/ghc/wiki/ReportABug Please give an example without UndecidableInstances if possible, and the smaller the example is the easier it is for us to look into it. Thanks Ian

Ian,
Thanks for your diligence! i upgraded to ghc 6.10.1 and that resolved the
issue. i've a working version of the sample at this
linkhttp://paste.pocoo.org/show/95533/
.
Best wishes,
--greg
On Tue, Dec 16, 2008 at 10:28 AM, Ian Lynagh
Hi Greg,
On Mon, Dec 15, 2008 at 12:23:08PM -0800, Greg Meredith wrote:
The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated.
I've lost track of this thread, but if you still think there's a bug then can you report it in the GHC trac please?: http://hackage.haskell.org/trac/ghc/wiki/ReportABug
Please give an example without UndecidableInstances if possible, and the smaller the example is the easier it is for us to look into it.
Thanks Ian
-- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740 http://biosimilarity.blogspot.com
participants (3)
-
Daniel Fischer
-
Greg Meredith
-
Ian Lynagh