Skip to content

Instantly share code, notes, and snippets.

@axman6
Last active August 29, 2015 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axman6/4086c23df563262f302e to your computer and use it in GitHub Desktop.
Save axman6/4086c23df563262f302e to your computer and use it in GitHub Desktop.
Haskell double import snippet
<snippet>
<!--
Produces imports of the form:
import qualified Data.Foo as F
import Data.Foo (Foo, fun)
Foo and F in as and includes sections are determined by the last
name in the module string: Foo -> F and Foo, Data.Foo -> F and Foo
-->
<content><![CDATA[
import qualified ${1:Data.Text} as ${2:${1/(\w+\.)*(\w)\w*/$2/}}
import $1 (${3:${1/(\w+\.)*(\w+)/$2/}}${4:, fun})
$0
]]></content>
<tabTrigger>impq</tabTrigger>
<scope>source.haskell</scope>
<description>Import module qualified and unqualified</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment