Skip to content

Allow specifying that (some) dictionary fields should be strict

The type-class dictionary is a record, there should be a way to specify the strictness of the fields.

I don't know what the syntax would look like though.

class Foo a where
  foo1 :: !a 
  foo2 :: !a   
  foo3 :: a -> a

is one idea. There can be bangs in record field definitions, so this is not completely "new". UNPACKing would make sense too. TL;DR Allow specifying data layout of dictionaries as well, they are "just" records in GHC implementation.

Edited by Oleg Grenrus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information