View on GitHub
File Changes

                      
import           Build (LibraryName (LibraryName), Optimizations (Standard),
                     ShouldUploadCoverage (ShouldUploadCoverage),
-
                     StackExtraTestArgs (StackExtraTestArgs), TestRun (TestRun), doBuild)
+
                     StackExtraTestArgs (StackExtraTestArgs), TestRun (TestRun), Timeout (Timeout),
+
                     doBuild)
import           BuildArgs (BuildArgs (BuildArgs, command, options),
                     Command (Build, CleanupCache, PurgeCache),
                     RebuildOpts (RebuildOpts, optBuildDirectory, optCacheDirectory, optDryRun),
       (ExtraShcArgs [])
       (ExtraTixFilesDirectory ".")
    )
+
    (Timeout 45)
    (case Map.lookup an avs of
      Nothing -> True
      Just (x, _, _) -> av == x + 1
-
    ) && (an `Set.notMember` dom avs ==> av == ApVer 1)
+
    ) && (an `Set.notMember` dom avs ==> (av == ApVer 0 || av == ApVer 1))
  where

                      
------------------------------------------------------------------------
        let SwVer an av = up ^. upSwVer
        apNameValid an ?! InvalidApplicationName
        svCanFollow avs (an,av) ?! CannotFollowSv
-
        (an, av) `notElem` fmap fstSnd (Map.elems raus) ?! AlreadyProposedSv
+
        an `notElem` fmap fst' (Map.elems raus) ?! AlreadyProposedSv
        all sTagValid (up ^. upSTags) ?! InvalidSystemTags
        return $! raus ⨃ [(up ^. upId, (an, av, up ^. upMdt))]
    ]
    where
+
      fst' (x, _, _) = x
+

                      
      apNameValid (ApName n) = all isAscii n && length n <= 12

                      
      sTagValid tag = all isAscii tag && length tag <= 10

                      
-
fstSnd :: (a, b, c) -> (a, b)
-
fstSnd (x, y, _) = (x, y)
-

                      
-

                      
data UPPVV deriving (Generic, Data, Typeable)

                      
instance STS UPPVV where
          else do
            (an, av) <- Gen.element registeredVersions
            pure $! uprop & upSwVer .~ SwVer { _svName = an, _svVer = av }
+
      where
+
        fstSnd :: (a, b, c) -> (a, b)
+
        fstSnd (x, y, _) = (x, y)
+

                      

                      
    invalidSoftwareVersion :: Gen UProp
    invalidSoftwareVersion =

                      
Also note that, unlike the rules of \cref{fig:rules:upi-ec}, we need not remove
other update proposals that refer to the software names whose versions were
-
changed in $\var{avs_{new}}$. The reason for this is that the map $\var{raus}$
-
can contain only one pair of the form $(\var{an}, \wcard)$ for any given
-
application name $\var{an}$: in Rule~\ref{eq:rule:up-av-validity} function
-
$\fun{svCanFollow}$ ensures that there is only one allowed version for any
-
given application name $\var{an}$.
+
changed in $\var{avs_{new}}$. The reason for this is that the range of $\var{raus}$
+
can contain only one pair of the form $(\var{an}, \wcard, \wcard)$ for any given
+
application name $\var{an}$ (see Rule~\ref{eq:rule:up-av-validity}).

                      

                      
\begin{figure}[htb]
      \fun{svCanFollow}~\var{avs}~(\var{an}, \var{av}) & =
      & (\var{an} \mapsto (\var{av_c}, \wcard, \wcard) \in \var{avs}
        \Rightarrow \var{av} = \var{av_c} + 1)\\
-
      & \wedge & (\var{an} \notin \dom~\var{avs} \Rightarrow \var{av} = 1)
+
      & \wedge & (\var{an} \notin \dom~\var{avs} \Rightarrow \var{av} = 0 \vee \var{av} = 1)
    \end{array}
  \end{equation}
  \caption{Update validity functions}
      (\var{an}, \var{av}) \leteq \upSwVer{up}
      & \fun{apNameValid}~\var{an}\\
      & \fun{svCanFollow}~\var{avs}~(\var{an}, \var{av})
-
      & (\var{an}, \var{av}, \wcard) \notin \range~\var{raus}\\
+
      & (\var{an}, \wcard, \wcard) \notin \range~\var{raus}\\
      \forall \var{t} \in \fun{upSTags}~\var{up} \cdot \fun{sTagValid}~t
    }
    {
{
  "url": "https://github.com/input-output-hk/iohk-nix",
-
  "rev": "f6b04c40eb2fc3473f440c1e8bce5f0cb6be1435",
-
  "date": "2019-11-08T10:16:35+00:00",
-
  "sha256": "0b0clvc57d8llgh62y7r1f9j01h4qacrv5mh9d5q3bfmlk7zy1n0",
+
  "rev": "34750860998054b83f1f5b966b879d60347b3f7a",
+
  "date": "2020-01-14T13:40:36+00:00",
+
  "sha256": "1kba2wd517wwxfpbdf4dya1pyvf7mjj2i76s0p310s948b0pcbda",
  "fetchSubmodules": false
}