-
-
Save hgiasac/4ccc1515665ab455267461dc8410ae82 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
fromDynamic :: forall d. Typeable d => Dynamic -> Maybe d | |
fromDynamic (Dyn trx x) | |
| typeRep (Proxy :: Proxy d) == trx = Just (unsafeCoerce x) | |
| otherwise = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment