Created
July 27, 2016 04:44
-
-
Save CarstenKoenig/c6ed79f8c57eae2d1af55525ee089c88 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
| module Poly | |
| fT : (img:Type->Type) -> Type | |
| fT img = (a:Type) -> (a -> img a) | |
| g : {a:Type} -> {b:Type} -> (img : Type -> Type) -> (fT img) -> a -> b -> (img a, img b) | |
| g {a} {b} _ f x y = ((f a) x, (f b) y) | |
| f1 : a -> List a | |
| f1 x = [x] | |
| x1 : Int | |
| x1 = 42 | |
| c1 : Char | |
| c1 = 'c' | |
| f2 : Int -> Int | |
| f2 x = 3*x | |
| x2 : Int | |
| x2 = 5 | |
| t1 : (List Int, List Char) | |
| t1 = g List f1 x1 c1 -- SCOPE ERROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment