diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-07 16:36:36 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-07 16:36:36 -0400 |
| commit | 16a95afa2fe22a4df9c371489c4ee7ffdef8e07b (patch) | |
| tree | 6e0869e78aba03be2591569369e1e099bb86568e /doc/forum/Understanding_changesFile_equation.mdwn | |
| parent | 9bbc292b3f903a1476e3524bb9198e58ce300401 (diff) | |
| parent | 822694e790102efa2a5bb4a0c3d62c6fce1d4e87 (diff) | |
Merge remote-tracking branch 'remotes/misandrist/FreeBSD' into wip
Diffstat (limited to 'doc/forum/Understanding_changesFile_equation.mdwn')
| -rw-r--r-- | doc/forum/Understanding_changesFile_equation.mdwn | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/forum/Understanding_changesFile_equation.mdwn b/doc/forum/Understanding_changesFile_equation.mdwn new file mode 100644 index 00000000..5e360097 --- /dev/null +++ b/doc/forum/Understanding_changesFile_equation.mdwn @@ -0,0 +1,15 @@ +Hi, I'm trying to understand a part of the `changesFile` equation, specifically `oldstat`. + +``` +changesFile :: Checkable p i => p i -> FilePath -> Property i +changesFile p f = checkResult getstat comparestat p + where + getstat = catchMaybeIO $ getSymbolicLinkStatus f + comparestat oldstat = do + newstat <- getstat + return $ if samestat oldstat newstat then NoChange else MadeChange +``` + +As we see, we catch `getstat` given `f`, but what I don't understand or see, is how is `oldstat` been passed/generated? + +Thanks for the help. |
