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
| {-# LANGUAGE FlexibleContexts, FlexibleInstances, KindSignatures, TypeApplications, | |
| TypeOperators, PolyKinds, ScopedTypeVariables, UndecidableInstances, DeriveGeneric #-} | |
| import GHC.Generics | |
| import Data.Proxy | |
| class GFieldNames (f :: * -> *) where | |
| gFieldNames :: proxy f -> [String] | |
| instance Selector s => GFieldNames (S1 s f) where |
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
| {-# LANGUAGE | |
| AllowAmbiguousTypes, | |
| DeriveGeneric, | |
| FlexibleInstances, | |
| QuantifiedConstraints, | |
| TypeApplications, | |
| UndecidableInstances | |
| #-} | |
| import GHC.Generics | |
| import Control.Applicative |
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
| Require Import Vector. | |
| Require Import Program. | |
| Definition fff {A} (h : Vector.t A 0) : h = Vector.nil _ := | |
| match h in Vector.t _ n return match n return Vector.t A n -> Prop with | |
| | O => fun h => h = Vector.nil _ | |
| | S _ => fun _ => True | |
| end h | |
| with | |
| | Vector.nil _ => eq_refl |
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
| {-# LANGUAGE | |
| AllowAmbiguousTypes, | |
| FlexibleContexts, | |
| FlexibleInstances, | |
| MultiParamTypeClasses, | |
| UndecidableInstances, | |
| TypeApplications | |
| #-} | |
| import Control.Category hiding ((.), id) |
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
| {-# LANGUAGE | |
| EmptyCase, | |
| DataKinds, | |
| PolyKinds, | |
| KindSignatures, | |
| GADTs, | |
| FlexibleContexts, | |
| FlexibleInstances, |
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
| {-# LANGUAGE | |
| DataKinds, | |
| PolyKinds, | |
| MultiParamTypeClasses, | |
| TypeOperators, | |
| DeriveGeneric, | |
| KindSignatures, | |
| FlexibleContexts, | |
| FlexibleInstances, | |
| TypeFamilies, |
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
| {-# LANGUAGE | |
| AllowAmbiguousTypes, | |
| TypeApplications, | |
| ScopedTypeVariables, | |
| GADTs, | |
| DataKinds, | |
| PolyKinds, | |
| FlexibleContexts, | |
| FlexibleInstances, | |
| MultiParamTypeClasses, |
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
| {-# LANGUAGE | |
| QuantifiedConstraints, | |
| AllowAmbiguousTypes, | |
| TypeApplications, | |
| ScopedTypeVariables, | |
| RankNTypes, | |
| GADTs, | |
| DataKinds, | |
| PolyKinds, | |
| FlexibleContexts, |
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
| {-# LANGUAGE | |
| BlockArguments, | |
| InstanceSigs, | |
| TypeOperators, | |
| DataKinds, | |
| PolyKinds, | |
| RankNTypes, | |
| ScopedTypeVariables, | |
| GADTs | |
| #-} |
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
| {-# LANGUAGE | |
| -- Unsurprisingly, we're going to talk about GADTs. | |
| GADTs, | |
| -- Type-level functions, data types, and polymorphism | |
| TypeFamilies, | |
| DataKinds, | |
| PolyKinds, | |
| -- Explicit type applications |