Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {-# Language TypeFamilies ,MultiParamTypeClasses,FlexibleInstances,FlexibleContexts,UndecidableInstances,FunctionalDependencies#-}
  2.  
  3. newtype StateEncoding x s a = StateEncoding (s,x s a)
  4.  
  5. class Unfolding x f | x -> f where
  6.  unfolding :: StateEncoding x s a -> f a
  7.  
  8. instance (Unfolding x (StateEncoding f s),Unfolding f g) => Unfolding x g where
  9.  unfolding x = unfolding (unfolding x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement