File: Roundtrip.hs

package info (click to toggle)
haskell-generics-sop 0.5.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: haskell: 1,846; sh: 22; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module SOPBench.Roundtrip where

import qualified Generics.SOP as SOP
import qualified GHC.Generics as GHC

class Roundtrip a where
  roundtrip :: a -> a

soproundtrip :: SOP.Generic a => a -> a
soproundtrip = SOP.to . SOP.from

ghcroundtrip :: GHC.Generic a => a -> a
ghcroundtrip = GHC.to . GHC.from