-
-
Save hgiasac/d2dc0d7e926a5fd7c561b2fe1c171441 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
pattern App :: forall k2 (t :: k2). () | |
=> forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b) | |
=> TypeRep a -> TypeRep b -> TypeRep t | |
pattern App f x <- TrApp _ f x | |
where App f x = mkTrApp f x | |
dynFst :: Dynamic -> Maybe Dynamic | |
dynFst (Dyn (App (App rp ra) rb) x) = do | |
Refl <- eqT rp (typeRep :: TypeRep (,)) | |
return $ Dyn ra (fst x) | |
dynFst _ = Nothing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment