Created
November 29, 2018 19:28
-
-
Save emmanueldenloye/23c40e291ed2b98a61fc03ccc6d3f7d2 to your computer and use it in GitHub Desktop.
Code golfing??
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guardTable :: Show n => FunApp -> Term n -> Eval e () | |
guardTable i TTable {..} = do | |
r <- uses evalCallStack (alaf Last foldMap (firstOf (sfApp . _Just . _1 . faModule . _Just))) | |
case r of | |
(Just mn) | mn == _tModule -> enforceBlessedHashes i _tModule _tHash | |
_ -> do | |
m <- getModule (_faInfo i) _tModule | |
enforceKeySetName (_faInfo i) (_mKeySet m) | |
guardTable i t = evalError' i $ "Internal error: guardTable called with non-table term: " ++ show t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment