# Alias the current module with Imp

**URL:** <https://discourse.haskell.org/t/alias-the-current-module-with-imp/9211>\
**Category:** Links\
**Created:** [March 31, 2024, 11:50pm UTC](https://discourse.haskell.org/t/alias-the-current-module-with-imp/9211 "2024-03-31T23:50:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorfausak](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/taylorfausak/32/54_2.png) [@taylorfausak](https://discourse.haskell.org/u/taylorfausak)\
**Post date:** [March 31, 2024, 11:50pm UTC](https://discourse.haskell.org/t/alias-the-current-module-with-imp/9211/1 "2024-03-31T23:50:08Z")

</div>

> **[Alias the current module with Imp](https://taylor.fausak.me/2024/03/31/alias-current-module/)**
>
> Sometimes when writing a Haskell module you want to use an identifier that would be ambiguous. For example perhaps you’re writing a logger and want to call a function log. That’s a problem because ...

TL;DR Imp lets you do this:

```haskell
{-# OPTIONS_GHC
  -fplugin=Imp
  -fplugin-opt=Imp:--alias=_:This #-}
print = putStrLn . show
main = This.print ()

```

---

<div class="post-metadata">

**Author:** ![BebeSparkelSparkel](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@BebeSparkelSparkel](https://discourse.haskell.org/u/BebeSparkelSparkel)\
**Post date:** [April 3, 2024, 1:38pm UTC](https://discourse.haskell.org/t/alias-the-current-module-with-imp/9211/2 "2024-04-03T13:38:08Z")

</div>

Many times I wish I had `This`, thanks to you now I do!
