I have trouble understanding this syntax. I didn't find the answer to my quesion in the Agda tutorial manual. The only thing I found was that (x : A) -> (y : A) -> B sugars to (x : A)(y : A) -> B which sugars into (x y : A) -> B, but this isn't the whole story.
What troubles me is that type declaration:
map : {A B : Set} -> (A -> B) -> List A -> List B
is fine, while
map : {A B : Set} (A -> B) -> List A -> List B
is not.
Version with arrow between arguments
singleton : {A : Set} -> (x : A) → List A
is fine, while the same expression without arrow
singleton : {A : Set}(x : A) → List A
is still fine.
The version with ':' between arguments
data _≡_ {a}{P : Set a} (x : P) : P → Set a where
refl : x ≡ x
is fine, while
data _≡_ : ∀{a}{P : Set a} (x : P) → P → Set a where
refl : x ≡ x
is not.
In Haskell there is just regular braces, each separated with arrows. In Agda there is a lot more syntactic sugar, which isn't covered that much.