Internal.hs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {-# LANGUAGE TemplateHaskell #-}
  2. module Internal.Syntax.Internal ( tests ) where
  3. import Agda.Syntax.Internal
  4. import Agda.TypeChecking.Substitute ()
  5. import Internal.Helpers
  6. import Internal.Syntax.Common ()
  7. ------------------------------------------------------------------------
  8. -- Instances
  9. instance Arbitrary NotBlocked where
  10. arbitrary = elements [ Underapplied
  11. , AbsurdMatch
  12. , MissingClauses
  13. , ReallyNotBlocked
  14. -- , StuckOn Elim -- TODO
  15. ]
  16. instance Arbitrary (Blocked ()) where
  17. arbitrary = do
  18. m <- arbitrary
  19. bs <- arbitrary
  20. elements [ blocked_ m, NotBlocked bs () ]
  21. ------------------------------------------------------------------------------
  22. -- Properties
  23. -- | 'NotBlocked' is a monoid.
  24. prop_monoid_NotBlocked :: Property3 NotBlocked
  25. prop_monoid_NotBlocked = isMonoid
  26. -- | 'Blocked_' is a monoid.
  27. prop_monoid_Blocked_ :: Property3 Blocked_
  28. prop_monoid_Blocked_ = isMonoid
  29. ------------------------------------------------------------------------
  30. -- * All tests
  31. ------------------------------------------------------------------------
  32. -- Template Haskell hack to make the following $allProperties work
  33. -- under ghc-7.8.
  34. return [] -- KEEP!
  35. -- | All tests as collected by 'allProperties'.
  36. --
  37. -- Using 'allProperties' is convenient and superior to the manual
  38. -- enumeration of tests, since the name of the property is added
  39. -- automatically.
  40. tests :: TestTree
  41. tests = testProperties "Internal.Syntax.Internal" $allProperties