RE: Re: Bring down the house (was Re: GHC cannot compilemy code)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE: Re: Bring down the house (was Re: GHC cannot compilemy code)

Simon Peyton Jones
Turns out this is to do with the way that type synonyms are represented.
Somewhere there is

        type a :*: b = HCons a b

If you simply use HCons instead of :*: the problem goes away.  (Use
`HCons` if you want it infix.)

This is a bug; using HCons instead is a workaround, but it might reduce
your compilation times.

Meanwhile I'll look into fixing it.

Simoin

| -----Original Message-----
| From: [hidden email]
[mailto:[hidden email]] On Behalf Of Joel
| Reymont
| Sent: 09 November 2005 19:27
| To: Haskell Cafe
| Subject: [Haskell-cafe] Re: Bring down the house (was Re: GHC cannot
compilemy code)
|
| Shae (#haskell) figured out that this is called for and that GHC has
| trouble deriving for large tuples. I have no idea what type of a
| performance hit this is gonna be but I hope it's resolved at compile-
| time and there's no impact afterwards.
|
| type TableInfo = TableInfo1 :*: TableInfo2
|
| type TableInfo1 =
|      AvgPot :*:
|      NumPlayers :*:
|      Waiting :*:
|      PlayersFlop :*:
|      TableName :*:
|      TableID :*:
|      GameType :*:
|      InfoMaxPlayers :*:
|      RealMoneyTable :*:
|      LowBet :*:
|      HighBet :*:
|      HNil
|
| type TableInfo2 =
|      MinStartMoney :*:
|      MaxStartMoney :*:
|      GamesPerHour :*:
|      TourType :*:
|      TourID :*:
|      BetType :*:
|      CantReturnLess :*:
|      AffiliateID :*:
|      NIsResurrecting :*:
|      MinutesForTimeout :*:
|      SeatsToResurrect :*:
|      LangID :*:
|      HNil
|
| Thanks, Joel
|
| --
| http://wagerlabs.com/
|
|
|
|
|
| _______________________________________________
| Haskell-Cafe mailing list
| [hidden email]
| http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

RE: Re: Bring down the house (was Re: GHC cannot compilemy code)

Simon Peyton Jones
I've fixed the HEAD so that it behaves decently on this now. Thanks for
reporting it.  It's in the test suite!

S

| -----Original Message-----
| From: [hidden email]
[mailto:[hidden email]] On Behalf Of Joel
| Reymont
| Sent: 09 November 2005 19:27
| To: Haskell Cafe
| Subject: [Haskell-cafe] Re: Bring down the house (was Re: GHC cannot
compilemy code)
|
| Shae (#haskell) figured out that this is called for and that GHC has
| trouble deriving for large tuples. I have no idea what type of a
| performance hit this is gonna be but I hope it's resolved at compile-
| time and there's no impact afterwards.
|
| type TableInfo = TableInfo1 :*: TableInfo2
|
| type TableInfo1 =
|      AvgPot :*:
|      NumPlayers :*:
|      Waiting :*:
|      PlayersFlop :*:
|      TableName :*:
|      TableID :*:
|      GameType :*:
|      InfoMaxPlayers :*:
|      RealMoneyTable :*:
|      LowBet :*:
|      HighBet :*:
|      HNil
|
| type TableInfo2 =
|      MinStartMoney :*:
|      MaxStartMoney :*:
|      GamesPerHour :*:
|      TourType :*:
|      TourID :*:
|      BetType :*:
|      CantReturnLess :*:
|      AffiliateID :*:
|      NIsResurrecting :*:
|      MinutesForTimeout :*:
|      SeatsToResurrect :*:
|      LangID :*:
|      HNil
|
| Thanks, Joel
|
| --
| http://wagerlabs.com/
|
|
|
|
|
| _______________________________________________
| Haskell-Cafe mailing list
| [hidden email]
| http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe