ecl -> DerivDecl -> EDeriv' Variable
getVarInSpec v spc derDecl = getVarInSpec' v (spc ^. specArgs)
    where getVarInSpec' v' [] = Left ([InvalidVariable v'],derDecl)
          getVarInSpec' v' (w:ws) = if v' == w
                                    then return w
                                    else getVarInSpec' v' ws


firstExpr :: SpecDecl ->  PE.P
getVarInSpec :: Variable -> SpecDecl -> DerivDecl -> EDeriv' Variable
getVarInSpec v spc derDecl = getVarInSpec' v (spc ^. specArgs)
    where getVarInSpec' v' [] = Left ([InvalidVariable v'],derDecl)
          getVarInSpec' v' (w:ws) = if v' == w
                                    then return w
                                    else getVarInSpec' v' ws
getVarInSpec v spc derDecl = getVarInSpec' v (spc ^. specArgs)
    where getVarInSpec' v' [] = Left ([InvalidVariable v'],derDecl)
          getVarInSpec' v' (w:ws) = if v' == w
                                    then return w
                                    else getVarInSpec' v' ws