typecheckDomain :: DomainU -> TypeM DomainT
typecheckDomain d@(Domain types procs funcs) = 
    Domain <$> pure types 
           <*> mapM (typecheckProc d) procs
           <*> mapM (typecheckProc d) funcs
typecheckDomain :: DomainU -> TypeM DomainT
typecheckDomain d@(Domain types procs funcs) = 
    Domain <$> pure types 
           <*> mapM (typecheckProc d) procs
           <*> mapM (typecheckProc d) funcs
typecheckDomain d@(Domain types procs funcs) = 
    Domain <$> pure types 
           <*> mapM (typecheckProc d) procs
           <*> mapM (typecheckProc d) funcs