-
-
Save hgiasac/9ccd6a6e481938a25ad32a74922460f2 to your computer and use it in GitHub Desktop.
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
dynFst :: Dynamic -> Maybe Dynamic | |
dynFst (Dyn (TrApp _ rpa rb) x) | |
= case rpa of | |
TrApp rp ra -> case eqT rp (typeRep :: TypeRep (,)) of | |
Just Refl -> Just $ Dyn ra (fst x) | |
Nothing -> Nothing | |
_ -> Nothing | |
dynFst _ = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment