# Question about "constant" declaration

**URL:** <https://discourse.haskell.org/t/question-about-constant-declaration/1258>\
**Category:** Learn\
**Created:** [May 22, 2020, 9:46am UTC](https://discourse.haskell.org/t/question-about-constant-declaration/1258 "2020-05-22T09:46:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhneifer](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/mhneifer/32/488_2.png) [@mhneifer](https://discourse.haskell.org/u/mhneifer)\
**Post date:** [May 22, 2020, 9:46am UTC](https://discourse.haskell.org/t/question-about-constant-declaration/1258/1 "2020-05-22T09:46:32Z")

</div>

I have a beginner question about “constant” declaration. I am not sure if “constant” is the right term here. So far, I have seen the following ways to declare some kind of fixed value.

> foo = 1

> bar :: Int  
> bar = 2

> baz = 3 :: Int

What is the recommended approach for production code?

---

<div class="post-metadata">

**Author:** ![f-a](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/f-a/32/2740_2.png) [@f-a](https://discourse.haskell.org/u/f-a)\
**Post date:** [May 22, 2020, 10:12am UTC](https://discourse.haskell.org/t/question-about-constant-declaration/1258/2 "2020-05-22T10:12:56Z")

</div>

I would say

```
bar :: Int
bar = 2

```

(top-level signature) is what you see in 99% of the cases.
