Issue3045.agda 673 B

12345678910111213141516171819202122232425262728
  1. -- cj-xu and fredriknordvallforsberg, 2018-04-30
  2. open import Common.IO
  3. data Bool : Set where
  4. true false : Bool
  5. data MyUnit : Set where
  6. tt : MyUnit -- no eta!
  7. HiddenFunType : MyUnit -> Set
  8. HiddenFunType tt = Bool -> Bool
  9. notTooManyArgs : (x : MyUnit) -> HiddenFunType x
  10. notTooManyArgs tt b = b
  11. {- This should not happen when compiling notTooManyArgs:
  12. • Couldn't match expected type ‘GHC.Prim.Any’
  13. with actual type ‘a0 -> b0’
  14. The type variables ‘b0’, ‘a0’ are ambiguous
  15. • The equation(s) for ‘d10’ have two arguments,
  16. but its type ‘T2 -> AgdaAny’ has only one
  17. -}
  18. main : IO MyUnit
  19. main = return tt