module Spinterp(interpSP) where import SP interpSP :: (t -> t -> t) -> ((a -> t) -> t) -> t -> SP a t -> t interpSP t -> t -> t put (a -> t) -> t get t null' SP a t sp = case SP a t sp of PutSP t x SP a t sp' -> t -> t -> t put t x ((t -> t -> t) -> ((a -> t) -> t) -> t -> SP a t -> t interpSP t -> t -> t put (a -> t) -> t get t null' SP a t sp') GetSP a -> SP a t xsp -> (a -> t) -> t get (\a x -> (t -> t -> t) -> ((a -> t) -> t) -> t -> SP a t -> t interpSP t -> t -> t put (a -> t) -> t get t null' (a -> SP a t xsp a x)) SP a t NullSP -> t null'