Skip to content

Instantly share code, notes, and snippets.

@CarstenKoenig
Created July 27, 2016 04:44
Show Gist options
  • Select an option

  • Save CarstenKoenig/c6ed79f8c57eae2d1af55525ee089c88 to your computer and use it in GitHub Desktop.

Select an option

Save CarstenKoenig/c6ed79f8c57eae2d1af55525ee089c88 to your computer and use it in GitHub Desktop.
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