File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
example-structure/src/agda Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Entry = Int × List String
77
88
99--defining a datatype
10- data Tree (a : Set ) : Set where
10+ data Tree (a : Type ) : Type where
1111 Leaf : a → Tree a
1212 Branch : a → Tree a → Tree a → Tree a
1313
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ isAscending (x ∷ y ∷ xs) = if x <= y then isAscending (y ∷ xs) else False
1414{-# COMPILE AGDA2HS isAscending #-}
1515
1616-- data type defining a postulate of ascending order on lists
17- data IsAscending₂ {a : Set } ⦃ iOrdA : Ord a ⦄ : List a → Set where
17+ data IsAscending₂ {a : Type } ⦃ iOrdA : Ord a ⦄ : List a → Type where
1818 Empty : IsAscending₂ []
1919 OneElem : (x : a) → IsAscending₂ (x ∷ [])
2020 ManyElem : (x y : a) (xs : List a)
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ countBiggerThan xs b = length (filter (λ x → (x >= b)) xs)
1010{-# COMPILE AGDA2HS countBiggerThan #-}
1111
1212-- Triangle data type deinfition
13- data Triangle : Set where
13+ data Triangle : Type where
1414 MkTriangle : (alpha beta gamma : Nat)
1515 → ⦃ @0 h₁ : (((alpha + beta + gamma) == 180 ) ≡ True ) ⦄
1616 → @0 ⦃ ((countBiggerThan
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module Definition where
22
33open import Haskell.Prelude
44
5- data CountDown : Set where
5+ data CountDown : Type where
66 MkCountdown : (start : Int)
77 → {{ @0 h : ((start > 0 ) ≡ True) }}
88 → CountDown
You can’t perform that action at this time.
0 commit comments