Last active
June 2, 2020 10:44
-
-
Save MarcelineVQ/69f11ead89b01ce32b3d11a25b0c779c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- given (%pi RigW Explicit Nothing %type (%pi RigW Explicit Nothing %type %type)) | |
-- only | |
-- getArity' (IPi _ _ _ _ _ retTy) = ... | |
-- matches. None of the other PiInfo cases match, ExplicitArg/ImplicitArg etc | |
getArity' : TTImp -> Nat | |
getArity' (IPi _ M0 _ _ _ retTy) = getArity' retTy | |
getArity' (IPi _ _ ExplicitArg _ _ retTy) = S (getArity' retTy) | |
getArity' (IPi _ _ ImplicitArg _ _ retTy) = S (getArity' retTy) | |
getArity' (IPi _ _ (DefImplicit _) _ _ retTy) = S (getArity' retTy) | |
getArity' (IPi _ _ AutoImplicit _ _ retTy) = S (getArity' retTy) | |
getArity' (IPi _ _ _ _ _ retTy) = 5 + getArity' retTy | |
getArity' (IType _) = Z | |
getArity' _ = 12 -- just some testing number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment