UNPACK supports regular data types, as shown below:
data T = T {-# UNPACK #-} ! Int
But is there a way to use UNPACK Pragma with GADT?
Tried this and found that it really works with the constructor arguments.
data BinHeap a where Empty :: (Ord a) => BinHeap a HeapNode :: (Ord a) => a -> {-# UNPACK #-} !Int -> BinHeap a -> BinHeap a -> BinHeap a
Nice.
Source: https://habr.com/ru/post/1244948/More articles:why is my vfl not working? - autolayoutVertical SVG alignment in CSS - htmlWhat is the purpose of clojure.core.reducers / reduce? - clojureWhy does the t function return t.test for objects with a class set to "test"? - rIs DrawerLayout or TabLayout null after resuming activity from the background? - javaHow to disable font scaling in RN for Android? - androidjsx responds to a debugger that does not match, despite the original webpack cards - debuggingHow to git clone a specific tag only without getting the whole repo? - gitOverlay rotated Images on plot with Matplotlib - pythonAdding info.plist entries to Meteor? - cordovaAll Articles