kit 445 B

123456789101112131415161718192021
  1. By making dictionaries explicit we might be able to unify instantiate,
  2. instantiateFull, reduce and normalise.
  3. class HasKit a where
  4. applyKit :: Kit m -> a -> m a
  5. data Kit m = Kit { termKit :: TermKit m
  6. , typeKit :: TypeKit m
  7. , listKit :: ListKit m
  8. ...
  9. }
  10. type ListKit m = forall a. HasKit a => Kit -> [a] -> m [a]
  11. data TermKit m = TermKit
  12. { varKit :: Nat -> Args -> m Term
  13. , lamKit :: Hiding -> Abs Term -> m Term
  14. ...
  15. }