pecDecl] -> [FunDecl] -> [EDeriv] -> (DeclPos,DerivDecl) -> [EDeriv]
createDeriv pSpecs pFuncs prevDerivs (derPos,der) = der':prevDerivs
    where  der' = alreadyDefined der (rights prevDerivs) >>
                  maybe (Left ([NotSpecification],der)) newDer 
                        (L.find (sameDecl der) pSpecs)
           newDer sp = Right $ Derivation der derPos sp 
                              $ L.find (sameDecl der) pFuncs

-- | Verifica que no haya derivaciones duplicadas.
alreadyDefined :
createDeriv :: [SpecDecl] -> [FunDecl] -> [EDeriv] -> (DeclPos,DerivDecl) -> [EDeriv]
createDeriv pSpecs pFuncs prevDerivs (derPos,der) = der':prevDerivs
    where  der' = alreadyDefined der (rights prevDerivs) >>
                  maybe (Left ([NotSpecification],der)) newDer 
                        (L.find (sameDecl der) pSpecs)
           newDer sp = Right $ Derivation der derPos sp 
                              $ L.find (sameDecl der) pFuncs

-- | Verifica que no haya derivaciones duplicadas.
createDeriv pSpecs pFuncs prevDerivs (derPos,der) = der':prevDerivs
    where  der' = alreadyDefined der (rights prevDerivs) >>
                  maybe (Left ([NotSpecification],der)) newDer 
                        (L.find (sameDecl der) pSpecs)
           newDer sp = Right $ Derivation der derPos sp 
                              $ L.find (sameDecl der) pFuncs

-- | Verifica que no haya derivaciones duplicadas.