You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
GHC is shipped with UnliftedDatatypes extension, but base library has similar issue like with LinearTypes extension i.e. doesn't support it well. Even basic standard classes (Show/Eq/Ord/Num) are not supported. Unlifted and Linear types are both extensions are driven by performance ghost.
There is no much action around making better support of Unlifted types.
I spot 1 semi stale discussion ghc-proposals/ghc-proposals#30 and conclusion to reimplement a library of standard classes with levity polymorphic support in 3rd party library.
Both Unlifted and Linear features are elephants. It is logical they started in separated sandboxes, but eventually they should merge gradually. I would start with redefining basic classes such Show, Ord etc one by one in linear-base or reimporting from Unboxed.
Is your feature request related to a problem? Please describe.
GHC is shipped with UnliftedDatatypes extension, but base library has similar issue like with LinearTypes extension i.e. doesn't support it well. Even basic standard classes (Show/Eq/Ord/Num) are not supported. Unlifted and Linear types are both extensions are driven by performance ghost.
There is no much action around making better support of Unlifted types.
I spot 1 semi stale discussion ghc-proposals/ghc-proposals#30 and conclusion to reimplement a library of standard classes with levity polymorphic support in 3rd party library.
https://github.com/ekmett/unboxed
I looked at linear-base it just reexports Show from Prelude.
I curious why Unlifted extension is not used in linear-base - the library already has different class hierarchy - so (e.g. how Num is defined)
Performance gain from Unlifted extension is noticable, but combining code with different levity without common classes is hard:
https://github.com/yaitskov/lifted-vs-unlifted-benchmark/tree/6354d13bf4e36fd1aa93ec70bf19c2b8cb583608
The text was updated successfully, but these errors were encountered: