Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. type Couple a = forall z. (a -> z) -> z
  2.  
  3. consCouple :: a -> Couple a
  4. consCouple = a -> p -> p a
  5.  
  6. type Test = forall x. x -> x
  7.  
  8. t :: Test
  9. t = x -> x
  10.  
  11. c :: Couple Test
  12. c = consCouple (t :: Test)
  13.  
  14. main :: IO ()
  15. main = do{
  16. print "test"
  17. }
  18.  
  19. Couldn't match type `x0 -> x0' with `forall x. x -> x'
  20. Expected type: Test
  21. Actual type: x0 -> x0
  22. In the first argument of `consCouple', namely `(t :: Test)'
  23. In the expression: consCouple (t :: Test)
  24. In an equation for `c': c = consCouple (t :: Test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement