Update dotfiles

This commit is contained in:
viktorbarzin 2018-10-01 19:00:02 +03:00
parent 70e563d09f
commit 2e31900432
68 changed files with 1317 additions and 0 deletions

View file

@ -0,0 +1,14 @@
#!/bin/sh
for i in test???; do
cd $i
nvim --headless -s test.vim test.hs 2> /dev/null
diff expected.hs result.hs
if [ $? -eq 0 ]; then
echo "$(basename $PWD) succeded"
rm result.hs
else
echo "$(basename $PWD) failed"
fi
cd ..
done

View file

@ -0,0 +1,5 @@
data Foo = Foo
{ foo :: Int
-- comment
, bar :: Int
}

View file

@ -0,0 +1,5 @@
data Foo = Foo
{ foo :: Int
-- comment
, bar :: Int
}

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
-- | This is a function.
fun -- this shouldn't be indented

View file

@ -0,0 +1,2 @@
-- | This is a function.
fun -- this shouldn't be indented

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,4 @@
data Test = Test
{ x :: {-# UNPACK #-} !Int
, y :: {-# UNPACK #-} !Int
}

View file

@ -0,0 +1,4 @@
data Test = Test
{ x :: {-# UNPACK #-} !Int
, y :: Int
}

View file

@ -0,0 +1,3 @@
2jfIi{-# UNPACK #-} !
:saveas! result.hs
:q!

View file

@ -0,0 +1,4 @@
foo =
{ field = bar "("
, quux = ""
}

View file

@ -0,0 +1,3 @@
foo =
{ field = bar "("
}

View file

@ -0,0 +1,3 @@
jo, quux = ""
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
[ (NS spotify spotify (className =? "Spotify") doFullFloat )
, ]

View file

@ -0,0 +1,2 @@
[ (NS spotify spotify (className =? "Spotify") doFullFloat )
,]

View file

@ -0,0 +1,3 @@
ja 
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
foo = doSomething 123 -- Do something important.
bar

View file

@ -0,0 +1 @@
foo = doSomething 123 -- Do something important.

View file

@ -0,0 +1,3 @@
obar
:saveas! result.hs
:q!

View file

@ -0,0 +1,5 @@
data Customer = Customer
{ customerID :: CustomerID
, customerName :: String
, customerAddress :: Address
} deriving (Show)

View file

@ -0,0 +1,5 @@
data Customer = Customer
{ customerID :: CustomerID
, customerName :: String
, customerAddress :: Address
} deriving (Show)

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,6 @@
data Foo
= Foo
{ foo :: Int
, bar :: Char
, baz :: Int
} deriving (Eq, Ord)

View file

@ -0,0 +1,6 @@
data Foo
= Foo
{ foo :: Int
, bar :: Char
, baz :: Int
} deriving (Eq, Ord)

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
let x =
123

View file

@ -0,0 +1 @@
let x =

View file

@ -0,0 +1,3 @@
o123
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
SomeRecord { name = ")"
,

View file

@ -0,0 +1 @@
SomeRecord { name = ")"

View file

@ -0,0 +1,3 @@
o, 
:saveas! result.hs
:q!

View file

@ -0,0 +1,3 @@
add1 x = x + y
where
y = 1

View file

@ -0,0 +1,3 @@
add1 x = x + y
where
y = 1

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,3 @@
add2 x = let y = 1
z = 1
in = x + y + z

View file

@ -0,0 +1,3 @@
add2 x = let y = 1
z = 1
in = x + y + z

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
--
type F k = [k]

View file

@ -0,0 +1,2 @@
--
type F k = [k]

View file

@ -0,0 +1,3 @@
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,5 @@
foo :: Monad m
=> Functor m
=> MonadIO m
-> Int
foo x = x

View file

@ -0,0 +1 @@
foo :: Monad m

View file

@ -0,0 +1,3 @@
o=> Functor m => MonadIO m -> Int foo x = x
:saveas! result.hs
:q!

View file

@ -0,0 +1,3 @@
f x = y
where
y = 2 * x

View file

@ -0,0 +1,3 @@
f x = y
where
y = 2 * x

View file

@ -0,0 +1,6 @@
:set sw=4
:let g:haskell_indent_before_where=2
:let g:haskell_indent_after_bare_where=2
=G
:saveas! result.hs
:q!

View file

@ -0,0 +1,6 @@
where
foo :: Monad m
=> Functor m
=> MonadIO m
-> Int
foo x = x

View file

@ -0,0 +1,5 @@
where
foo :: Monad m
=> Functor m
=> MonadIO m
-> Int

View file

@ -0,0 +1,3 @@
Gofoo x = x
:saveas! result.hs
:q!

View file

@ -0,0 +1,2 @@
where countUntilClosed (x:xs)
| x

View file

@ -0,0 +1 @@
where countUntilClosed (x:xs)

View file

@ -0,0 +1,3 @@
o| x
:saveas! result.hs
:q!

View file

@ -0,0 +1,4 @@
let foo = 1
bar = baz
quux
in

View file

@ -0,0 +1,4 @@
let foo = 1
bar = baz
quux
in

View file

@ -0,0 +1,3 @@
G==
:saveas! result.hs
:q!

View file

@ -0,0 +1,8 @@
foo x
| x == x = True
|
,
=

View file

@ -0,0 +1,3 @@
foo x
| x == x = True

View file

@ -0,0 +1,3 @@
Go| o ,o = 
:saveas! result.hs
:q!