<p>I'm trying to figure out if Haskell uses dynamic or static scoping.
I realize that, for example, if you define:</p>

<pre><code>let x = 10
</code></pre>

<p>then define the function</p>

<pre><code>let square x = x*x
</code></pre>

<p>You have 2 different "x's", and does that mean it is dynamically scoped?  If not, what scoping does it use, and why?</p>

<p>Also, can Haskell variables have aliases (a different name for the same memory location/value)?</p>

<p>Thanks.</p>

Haskell use (broadly speaking) exactly the same lexical scoping as most other languages.
eg.
```
```
x = 10
```
```
Results in a value referenced through
```
x
```
in the global scope, whereas
```
```
square x = x * x
```
```
will result in
```
x
```
being lexically scoped to the function square.  It may help if you think of the above form being a syntactic nicety for:
```
```
square = \ x -> x * x
```
```
As to your other question i'm not sure what you mean by aliasing