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
importGHC.Generics.Genericallyinstance (Generica, GFlatEncode (Repa), GFlatDecode (Repa), GFlatSize (Repa)) =>Flat (Genericallya) whereencode::Genericallya->Encoding
encode (Generically a) = gencode (from a)
decode::Get (Genericallya)
decode =Generically. to <$> gget
size::Genericallya->NumBits->NumBits
size (Generically!x) !n = gsize n (from x)
This gives a type that represents the generic Flat definition. You can derive Flat via it:
{-# Language DeriveGeneric #-}
{-# Language DerivingVia #-}
importFlatimportGHC.GenericsdataDirection=North | South | Center | East | WestderivingstockGenericderivingFlatviaGenericallyDirection
Users can modify the generic behaviour by defining wrappers, via Generically (Override .. '[A `As` A', B `As` B', ..]).
The text was updated successfully, but these errors were encountered:
Can you add an instance for
Generically
(base 4.17)?Older versions are supported with the generically package:
This gives a type that represents the generic
Flat
definition. You can deriveFlat
via it:Users can modify the generic behaviour by defining wrappers,
via Generically (Override .. '[A `As` A', B `As` B', ..])
.The text was updated successfully, but these errors were encountered: