PageRenderTime 25ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Typeable/Internal/Defaults.hs

http://github.com/lpeterse/typeable
Haskell | 100 lines | 76 code | 22 blank | 2 comment | 0 complexity | 729dbcc3055aceda9b0b112fc911c332 MD5 | raw file
  1. {-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
  2. {-# OPTIONS -XExistentialQuantification -XNoMonomorphismRestriction #-}
  3. module Typeable.Internal.Defaults where
  4. import Typeable.T9e2e1e478e094a8abe5507f8574ac91f --Succ
  5. import Typeable.T421496848904471ea3197f25e2a02b72 --Zero
  6. import Typeable.T0174bd2264004820bfe34e211cb35a7d --DataType
  7. import Typeable.T1660b01f08dc4aedbe4c0941584541cb --Kind
  8. import Typeable.T451f847e1cb642d0b7c5dbdfa03f41b5 --Definition
  9. import Typeable.T606f253533d3420da3465afae341d598 --Time
  10. import qualified Typeable.T3819884685d34bf19b3469304e15983d as Person
  11. import qualified Typeable.T4e0b8f8ea2b145228fa4ec74b559bf6a as Class --Class
  12. import qualified Typeable.T3e81531118e14888be21de7921b15bb5 as Type --Type
  13. import qualified Typeable.T205895c8d2df475b8d5ead5ee33d9f63 as Field --Field
  14. import qualified Typeable.T37c8a341f0b34cc6bbbc9f2403f09be3 as Constructor
  15. import qualified Data.Set as S
  16. import qualified Data.Map as M
  17. import Typeable.Internal.Misc
  18. list x = Application (DataType "0ba85f3f10099c75d4b696d0cf944e09") x
  19. set x = Application (DataType "7af30cce93724981a16a80f3f193dc33") x
  20. maybe x = Application (DataType "f8f49ef6bbe874a42926fa23d5b3bc19") x
  21. function x y = Application (Application (DataType "50eae3e85d2d42c88754b026cc360981") x) y
  22. v0 :: Type.Type Zero -> Type.Type Zero
  23. v0 = id
  24. v1 :: Type.Type (Succ Zero) -> Type.Type Zero
  25. v1 x = Type.Quantification KindStar x
  26. v2 :: Type.Type (Succ (Succ Zero)) -> Type.Type Zero
  27. v2 x = Type.Quantification KindStar (Type.Quantification KindStar x)
  28. v3 :: Type.Type (Succ (Succ (Succ Zero))) -> Type.Type Zero
  29. v3 x = Type.Quantification KindStar (Type.Quantification KindStar (Type.Quantification KindStar x))
  30. v1' :: Kind -> Type.Type (Succ Zero) -> Type.Type Zero
  31. v1' a x = Type.Quantification a x
  32. v2' :: Kind -> Kind -> Type.Type (Succ (Succ Zero)) -> Type.Type Zero
  33. v2' a b x = Type.Quantification a (Type.Quantification b x)
  34. v3' :: Kind -> Kind -> Kind -> Type.Type (Succ (Succ (Succ Zero))) -> Type.Type Zero
  35. v3' a b c x = Type.Quantification a (Type.Quantification b (Type.Quantification c x))
  36. c1 :: Class.Class (Succ Zero) -> Class.Class Zero
  37. c1 x = Class.Quantification KindStar x
  38. defaultPerson = Person.Person { Person.name = "typeable.org", Person.contacts = S.empty }
  39. personLars = defaultPerson { Person.name = "Lars Petersen" }
  40. personMikael = defaultPerson { Person.name = "Mikael Voss" }
  41. personClemens = defaultPerson { Person.name = "Clemens Kornd\x00F6rfer" }
  42. personStefan = defaultPerson { Person.name = "Prof. Dr. Stefan Evert" }
  43. dt :: Definition Type.Type
  44. dt = Definition
  45. { identifier = undefined
  46. , antecedent = Nothing
  47. , creationTime = Time 3499718400
  48. , modificationTime = Time 3499718400
  49. , author = Nothing
  50. , maintainer = defaultPerson
  51. , name = undefined
  52. , structure = dt'
  53. }
  54. dt' = Type.Type { Type.semantics = "", Type.constructors = Nothing }
  55. defaultConstructor :: forall a. PeanoNumber a => Constructor.Constructor a
  56. defaultConstructor = Constructor.Constructor {
  57. Constructor.name = undefined
  58. , Constructor.semantics = ""
  59. , Constructor.fields = [] :: [Field.Field a]
  60. }
  61. defaultField :: (PeanoNumber a) => Field.Field a
  62. defaultField = Field.Field {
  63. Field.name = undefined
  64. , Field.semantics = ""
  65. , Field.type_ = undefined
  66. }
  67. defaultConstructor' :: Constructor.Constructor (Succ Zero)
  68. defaultConstructor' = defaultConstructor
  69. defaultConstructor'' :: Constructor.Constructor (Succ (Succ Zero))
  70. defaultConstructor'' = defaultConstructor
  71. defaultConstructor''' :: Constructor.Constructor (Succ (Succ (Succ Zero)))
  72. defaultConstructor''' = defaultConstructor
  73. defaultField' :: Field.Field (Succ Zero)
  74. defaultField' = defaultField
  75. defaultField'' :: Field.Field (Succ (Succ Zero))
  76. defaultField'' = defaultField
  77. defaultField''' :: Field.Field (Succ (Succ (Succ Zero)))
  78. defaultField''' = defaultField