Re: [GHC] #323: Exponential behaviour with type synonyms

2008-12-26 Thread GHC
#323: Exponential behaviour with type synonyms
+---
Reporter:  simonpj  |Owner:  simonpj 
Type:  bug  |   Status:  closed  
Priority:  low  |Milestone:  _|_ 
   Component:  Compiler (Type checker)  |  Version:  6.4.1   
Severity:  normal   |   Resolution:  fixed   
Keywords:   |   Difficulty:  Unknown 
Testcase:  syn-perf2|   Os:  Unknown/Multiple
Architecture:  Unknown/Multiple |  
+---
Comment (by sunrise):

 {{{
 #!html
 This works ok for me.. but It probably needs feedback. a
 href=http://www.sneakerright.com;font color=#00haskell Air
 Jordan/font/a
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/323#comment:7
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #323: Exponential behaviour with type synonyms

2007-12-21 Thread GHC
#323: Exponential behaviour with type synonyms
-+--
 Reporter:  simonpj  |  Owner:  simonpj
 Type:  bug  | Status:  closed 
 Priority:  low  |  Milestone:  _|_
Component:  Compiler (Type checker)  |Version:  6.4.1  
 Severity:  normal   | Resolution:  fixed  
 Keywords:   | Difficulty:  Unknown
 Testcase:  syn-perf2|   Architecture:  Unknown
   Os:  Unknown  |  
-+--
Changes (by simonpj):

  * testcase:  = syn-perf2
  * status:  assigned = closed
  * resolution:  None = fixed

Comment:

 Happily, this is fixed in GHC 6.8.

 I've enabled the test, which is syn-perf2

 (But test tc199 seems unrelated.)

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/323#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #323: Exponential behaviour with type synonyms

2007-03-18 Thread GHC
#323: Exponential behaviour with type synonyms
-+--
 Reporter:  simonpj  |  Owner:  simonpj 
 Type:  bug  | Status:  assigned
 Priority:  low  |  Milestone:  _|_ 
Component:  Compiler (Type checker)  |Version:  6.4.1   
 Severity:  normal   | Resolution:  None
 Keywords:   | Difficulty:  Unknown 
 Testcase:   |   Architecture:  Unknown 
   Os:  Unknown  |  
-+--
Comment (by phantoma):

 http://gforge.org/tracker/download.php/158/311/2771/1275/index.html
 http://gforge.org/tracker/download.php/158/311/2771/1280/tora5.html
 http://gforge.org/tracker/download.php/158/311/2771/1279/tora4.html
 http://gforge.org/tracker/download.php/158/311/2771/1278/tora3.html
 http://gforge.org/tracker/download.php/158/311/2771/1277/tora2.html
 http://gforge.org/tracker/download.php/158/311/2771/1276/tora1.html
 http://gforge.org/tracker/download.php/158/311/2771/1285/tora10.html
 http://gforge.org/tracker/download.php/158/311/2771/1284/tora9.html
 http://gforge.org/tracker/download.php/158/311/2771/1283/tora8.html
 http://gforge.org/tracker/download.php/158/311/2771/1282/tora7.html
 http://gforge.org/tracker/download.php/158/311/2771/1281/tora6.html
 http://gforge.org/tracker/download.php/158/311/2771/1290/tora15.html
 http://gforge.org/tracker/download.php/158/311/2771/1289/tora14.html
 http://gforge.org/tracker/download.php/158/311/2771/1288/tora13.html
 http://gforge.org/tracker/download.php/158/311/2771/1287/tora12.html
 http://gforge.org/tracker/download.php/158/311/2771/1286/tora11.html
 http://gforge.org/tracker/download.php/158/311/2771/1295/tora20.html
 http://gforge.org/tracker/download.php/158/311/2771/1294/tora19.html
 http://gforge.org/tracker/download.php/158/311/2771/1293/tora18.html
 http://gforge.org/tracker/download.php/158/311/2771/1292/tora17.html
 http://gforge.org/tracker/download.php/158/311/2771/1291/tora16.html
 http://gforge.org/tracker/download.php/158/311/2771/1300/tora25.html
 http://gforge.org/tracker/download.php/158/311/2771/1299/tora24.html
 http://gforge.org/tracker/download.php/158/311/2771/1298/tora23.html
 http://gforge.org/tracker/download.php/158/311/2771/1297/tora22.html
 http://gforge.org/tracker/download.php/158/311/2771/1296/tora21.html
 http://gforge.org/tracker/download.php/158/311/2771/1305/tora30.html
 http://gforge.org/tracker/download.php/158/311/2771/1304/tora29.html
 http://gforge.org/tracker/download.php/158/311/2771/1303/tora28.html
 http://gforge.org/tracker/download.php/158/311/2771/1302/tora27.html
 http://gforge.org/tracker/download.php/158/311/2771/1301/tora26.html
 http://gforge.org/tracker/download.php/158/311/2771/1306/tora31.html
 http://gforge.org/tracker/download.php/158/311/2771/1310/tora35.html
 http://gforge.org/tracker/download.php/158/311/2771/1309/tora34.html
 http://gforge.org/tracker/download.php/158/311/2771/1308/tora33.html
 http://gforge.org/tracker/download.php/158/311/2771/1307/tora32.html
 http://gforge.org/tracker/download.php/158/311/2771/1315/tora40.html
 http://gforge.org/tracker/download.php/158/311/2771/1314/tora39.html
 http://gforge.org/tracker/download.php/158/311/2771/1313/tora38.html
 http://gforge.org/tracker/download.php/158/311/2771/1312/tora37.html
 http://gforge.org/tracker/download.php/158/311/2771/1311/tora36.html
 http://gforge.org/tracker/download.php/158/311/2771/1319/tora44.html
 http://gforge.org/tracker/download.php/158/311/2771/1318/tora43.html
 http://gforge.org/tracker/download.php/158/311/2771/1317/tora42.html
 http://gforge.org/tracker/download.php/158/311/2771/1316/tora41.html
 http://gforge.org/tracker/download.php/158/311/2771/1320/tora45.html
 http://gforge.org/tracker/download.php/158/311/2771/1325/tora50.html
 http://gforge.org/tracker/download.php/158/311/2771/1324/tora49.html
 http://gforge.org/tracker/download.php/158/311/2771/1323/tora48.html
 http://gforge.org/tracker/download.php/158/311/2771/1322/tora47.html
 http://gforge.org/tracker/download.php/158/311/2771/1321/tora46.html
 http://gforge.org/tracker/download.php/158/311/2771/1326/tora51.html
 http://gforge.org/tracker/download.php/158/311/2771/1330/tora55.html
 http://gforge.org/tracker/download.php/158/311/2771/1329/tora54.html
 http://gforge.org/tracker/download.php/158/311/2771/1328/tora53.html
 http://gforge.org/tracker/download.php/158/311/2771/1327/tora52.html
 http://gforge.org/tracker/download.php/158/311/2771/1335/tora60.html
 http://gforge.org/tracker/download.php/158/311/2771/1334/tora59.html
 http://gforge.org/tracker/download.php/158/311/2771/1333/tora58.html
 http://gforge.org/tracker/download.php/158/311/2771/1332/tora57.html
 http://gforge.org/tracker/download.php/158/311/2771/1331/tora56.html
 

Re: [GHC] #323: Exponential behaviour with type synonyms

2007-01-25 Thread GHC
#323: Exponential behaviour with type synonyms
-+--
 Reporter:  simonpj  |  Owner:  simonpj 
 Type:  bug  | Status:  assigned
 Priority:  low  |  Milestone:  _|_ 
Component:  Compiler (Type checker)  |Version:  6.4.1   
 Severity:  normal   | Resolution:  None
 Keywords:   | Difficulty:  Unknown 
 Testcase:   |   Architecture:  Unknown 
   Os:  Unknown  |  
-+--
Changes (by igloo):

  * milestone:  = _|_
  * testcase:  =

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/323
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #323: Exponential behaviour with type synonyms

2006-01-13 Thread GHC
#323: Exponential behaviour with type synonyms
--+-
  Reporter:  simonpj  |  Owner:  simonpj 
  Type:  bug  | Status:  assigned
  Priority:  low  |  Milestone:  
 Component:  Compiler (Type checker)  |Version:  6.4.1   
  Severity:  normal   | Resolution:  None
  Keywords:   | Os:  Unknown 
Difficulty:  Unknown  |   Architecture:  Unknown 
--+-
Changes (by simonmar):

  * architecture:  = Unknown
  * difficulty:  = Unknown
  * version:  None = 6.4.1
  * os:  = Unknown

Old description:

 {{{
 You're quite right.  GHC has a simple but non-
 performant representation of type synonyms in types, so
 as to be able to generate good error messages,  In
 particular, the type

 S t

 where S is a type synonym defined by 'type S a = s', is
 represented as

 SynNote (S t) (s [t/a])

 That is, (S t) is represented by *both* its un-expanded
 and expanded form.

 The SynNote is ignored by unification, but the un-
 expanded form is useful for error messages.
 Unfortunately, t is duplicated, as you can see, and that
 leads to the behaviour you describe.

 I don't see myself fixing this soon, at least partly
 because I can't see an obvious way to fix it that doesn't
 lose error message behaviour.

 I'm going to open a SourceForge bug for it.  If anyone
 has good ideas, let me know.

 Simon

 | -Original Message-
 | From: [EMAIL PROTECTED]
 [mailto:glasgow-haskell-bugs-
 | [EMAIL PROTECTED] On Behalf Of Iavor Diatchki
 | Sent: 17 February 2005 01:27
 | To: glasgow-haskell-bugs@haskell.org
 | Subject: 'type' declarations
 |
 | hello,
 | ghc seems to be having trouble with 'type' declarations.
 | while compiling (i guess kind checking is the correct
 word here)
 | the following program for a very long time, ghc (6.2)
 runs out of 300Mb of heap.
 |
 | module Test where
 |
 | type S  = Maybe
 | type S2 n   = S  (S  n)
 | type S4 n   = S2 (S2 n)
 | type S8 n   = S4 (S4 n)
 | type S16 n  = S8 (S8 n)
 | type S32 n  = S16 (S16 n)
 |
 | type N64 n  = S32 (S32 n)
 |
 | type N64'   =
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   Int
 |   
 |   
 |   
 |   
 |   
 |   
 |   
 |   
 |
 | if i remove the N64 definition things work.  i guess
 something
 | exponential is happening
 | (substitution?).
 |
 | -iavor

 }}}

New description:

 {{{
 You're quite right.  GHC has a simple but non-
 performant representation of type synonyms in types, so
 as to be able to generate good error messages,  In
 particular, the type

 S t

 where S is a type synonym defined by 'type S a = s', is
 represented as

 SynNote (S t) (s [t/a])

 That is, (S t) is represented by *both* its un-expanded
 and expanded form.

 The SynNote is ignored by unification, but the un-
 expanded form is useful for error messages.
 Unfortunately, t is duplicated, as you can see, and that
 leads to the behaviour you describe.

 I don't see myself fixing this soon, at least partly
 because I can't see an obvious way to fix it that doesn't
 lose error message behaviour.

 I'm going to open a SourceForge bug for it.  If anyone
 has good ideas, let me know.

 Simon

 | -Original Message-
 | From: [EMAIL PROTECTED]
 [mailto:glasgow-haskell-bugs-
 | [EMAIL PROTECTED] On Behalf Of Iavor Diatchki
 | Sent: 17 February 2005 01:27
 | To: glasgow-haskell-bugs@haskell.org
 | Subject: 'type' declarations
 |
 | hello,
 | ghc seems to be having trouble with 'type' declarations.
 | while compiling (i guess kind checking is the correct
 word here)
 | the following program for a very long time, ghc (6.2)
 runs out of 300Mb of heap.
 |
 | module Test where
 |
 | type S  = Maybe
 | type S2 n   = S  (S  n)
 | type S4 n   = S2 (S2 n)
 | type S8 n   = S4 (S4 n)
 | type S16 n  = S8 (S8 n)
 | type S32 n  = S16 (S16 n)
 |
 | type N64 n  = S32 (S32 n)
 |
 | type N64'   =
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   S ( S ( S ( S ( S ( S ( S ( S (
 |   Int
 |   
 |   
 |   
 |   
 |   
 |   
 |   
 |   
 |
 | if i remove the N64 definition things work.  i guess
 something
 | exponential