module Gradual.Trivial (simplify) where

import Language.Fixpoint.Types  hiding (simplify)
import qualified Data.HashMap.Strict       as M


simplify :: SInfo a -> SInfo a 
simplify :: SInfo a -> SInfo a
simplify SInfo a
sinfo = SInfo a
sinfo {cm :: HashMap SubcId (SimpC a)
cm = (SimpC a -> SimpC a)
-> HashMap SubcId (SimpC a) -> HashMap SubcId (SimpC a)
forall v1 v2 k. (v1 -> v2) -> HashMap k v1 -> HashMap k v2
M.map SimpC a -> SimpC a
forall a. SimpC a -> SimpC a
f (SInfo a -> HashMap SubcId (SimpC a)
forall (c :: * -> *) a. GInfo c a -> HashMap SubcId (c a)
cm SInfo a
sinfo)}
  where
    f :: SimpC a -> SimpC a
f SimpC a
c | PGrad KVar
_ Subst
_ GradInfo
_ Expr
e <- SimpC a -> Expr
forall a. SimpC a -> Expr
_crhs SimpC a
c 
      = SimpC a
c { _crhs :: Expr
_crhs = Expr
e} 
    f SimpC a
c = SimpC a
c