this builds. not sure if the instances are as intended


{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
module SetClass where

data TimeFacts t = Bef (t, t, TimeFacts t) | New

class SetClass t  where
class SetClass t => Time l t  where
class Time l t => TimeE l t where
class Time l t => TimeTO l t where


instance SetClass (TimeFacts t) where -- OK
instance (SetClass t) => Time (TimeFacts t) t where
instance (SetClass t) => TimeE (TimeFacts t) t where
instance (SetClass t) => TimeTO (TimeFacts t) t where