generics-sop
generics-sop copied to clipboard
[feat] add initial support for unlifted types
Note This is a draft for adding support for
unliftedtypes forgenerics-sop, according to #155
Status
- [x] unlifted representations
- [x] th generation for unlifted
Generic - [x] levity polymorphic
Generic - [x] example
- [x] compiles on
ghc927,ghc944,ghc961 - [x] more polymorphic
BasicFunctors (something likedata family I :: forall levin levout. TYPE ('BoxedRep levin) -> TYPE ('BoxedRep levout) data instance I @'Unlifted @'Lifted a = ULI a ... - [ ] make both the unlifted and the lifted repr derivable for an unlifted type (in the moment, only the unlifted is derivable by the TH code.)
- [ ] a whole lot of CPP to exclude these changes on ghc <92
Warning Due to a bug in GHC, this only works on GHC 9.4 >= 9.4.6 it hasn't been backported to GHC 9.6 but should exist in GHC 9.8 I would also expect that it will get soon backported to GHC 9.6
update: the PR to GHC that fixes the issue sometimes doesn't actually seem to fix this issue here as it is not only related to the interpreter but also segfaults after building normally
https://gitlab.haskell.org/ghc/ghc/-/issues/23146#note_488309
the root of the issues have been found and a fix exists <3