1 {-# LANGUAGE ConstraintKinds #-}
2 module Hcompta.Data where
4 import Data.Tuple (fst, snd)
7 type Has ty a = (Get ty a, Set ty a)
12 instance Get a (a, b) where get = fst
13 instance Get b (a, b) where get = snd
18 instance Set a (a, b) where set a (_, b) = (a, b)
19 instance Set b (a, b) where set b (a, _) = (a, b)
22 type Iso ty a = (To ty a, To a ty)