hindent 4.3.9 → 4.3.10
raw patch · 139 files changed
+3659/−13 lines, 139 filesdep +transformersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: transformers
API changes (from Hackage documentation)
+ HIndent.Types: instance Alternative (Printer s)
+ HIndent.Types: instance MonadPlus (Printer s)
- HIndent.Types: Printer :: State (PrintState s) a -> Printer s a
+ HIndent.Types: Printer :: StateT (PrintState s) (MaybeT Identity) a -> Printer s a
- HIndent.Types: runPrinter :: Printer s a -> State (PrintState s) a
+ HIndent.Types: runPrinter :: Printer s a -> StateT (PrintState s) (MaybeT Identity) a
Files
- hindent.cabal +10/−1
- src/HIndent.hs +7/−2
- src/HIndent/Pretty.hs +6/−1
- src/HIndent/Styles/Gibiansky.hs +15/−6
- src/HIndent/Types.hs +6/−3
- test/chris-done/expected/1.exp +11/−0
- test/chris-done/expected/10.exp +40/−0
- test/chris-done/expected/11.exp +56/−0
- test/chris-done/expected/12.exp +37/−0
- test/chris-done/expected/13.exp +27/−0
- test/chris-done/expected/14.exp +10/−0
- test/chris-done/expected/15.exp +42/−0
- test/chris-done/expected/16.exp +3/−0
- test/chris-done/expected/17.exp +3/−0
- test/chris-done/expected/18.exp +19/−0
- test/chris-done/expected/19.exp +15/−0
- test/chris-done/expected/2.exp +27/−0
- test/chris-done/expected/3.exp +45/−0
- test/chris-done/expected/4.exp +51/−0
- test/chris-done/expected/5.exp +45/−0
- test/chris-done/expected/6.exp +45/−0
- test/chris-done/expected/7.exp +23/−0
- test/chris-done/expected/8.exp +29/−0
- test/chris-done/expected/9.exp +16/−0
- test/chris-done/tests/1.test +11/−0
- test/chris-done/tests/10.test +41/−0
- test/chris-done/tests/11.test +46/−0
- test/chris-done/tests/12.test +86/−0
- test/chris-done/tests/13.test +29/−0
- test/chris-done/tests/14.test +10/−0
- test/chris-done/tests/15.test +21/−0
- test/chris-done/tests/16.test +3/−0
- test/chris-done/tests/17.test +4/−0
- test/chris-done/tests/18.test +11/−0
- test/chris-done/tests/19.test +16/−0
- test/chris-done/tests/2.test +32/−0
- test/chris-done/tests/3.test +38/−0
- test/chris-done/tests/4.test +36/−0
- test/chris-done/tests/5.test +27/−0
- test/chris-done/tests/6.test +41/−0
- test/chris-done/tests/7.test +30/−0
- test/chris-done/tests/8.test +24/−0
- test/chris-done/tests/9.test +19/−0
- test/fundamental/expected/1.exp +11/−0
- test/fundamental/expected/10.exp +63/−0
- test/fundamental/expected/11.exp +71/−0
- test/fundamental/expected/12.exp +37/−0
- test/fundamental/expected/13.exp +39/−0
- test/fundamental/expected/14.exp +17/−0
- test/fundamental/expected/15.exp +63/−0
- test/fundamental/expected/16.exp +5/−0
- test/fundamental/expected/17.exp +3/−0
- test/fundamental/expected/18.exp +31/−0
- test/fundamental/expected/19.exp +23/−0
- test/fundamental/expected/2.exp +22/−0
- test/fundamental/expected/3.exp +62/−0
- test/fundamental/expected/4.exp +51/−0
- test/fundamental/expected/5.exp +45/−0
- test/fundamental/expected/6.exp +79/−0
- test/fundamental/expected/7.exp +43/−0
- test/fundamental/expected/8.exp +50/−0
- test/fundamental/expected/9.exp +22/−0
- test/fundamental/tests/1.test +11/−0
- test/fundamental/tests/10.test +41/−0
- test/fundamental/tests/11.test +46/−0
- test/fundamental/tests/12.test +86/−0
- test/fundamental/tests/13.test +29/−0
- test/fundamental/tests/14.test +10/−0
- test/fundamental/tests/15.test +21/−0
- test/fundamental/tests/16.test +3/−0
- test/fundamental/tests/17.test +4/−0
- test/fundamental/tests/18.test +11/−0
- test/fundamental/tests/19.test +16/−0
- test/fundamental/tests/2.test +32/−0
- test/fundamental/tests/3.test +38/−0
- test/fundamental/tests/4.test +36/−0
- test/fundamental/tests/5.test +27/−0
- test/fundamental/tests/6.test +41/−0
- test/fundamental/tests/7.test +30/−0
- test/fundamental/tests/8.test +24/−0
- test/fundamental/tests/9.test +19/−0
- test/gibiansky/expected/1.exp +11/−0
- test/gibiansky/expected/10.exp +44/−0
- test/gibiansky/expected/11.exp +52/−0
- test/gibiansky/expected/12.exp +93/−0
- test/gibiansky/expected/13.exp +31/−0
- test/gibiansky/expected/14.exp +10/−0
- test/gibiansky/expected/15.exp +39/−0
- test/gibiansky/expected/16.exp +3/−0
- test/gibiansky/expected/17.exp +3/−0
- test/gibiansky/expected/18.exp +15/−0
- test/gibiansky/expected/19.exp +18/−0
- test/gibiansky/expected/2.exp +37/−0
- test/gibiansky/expected/20.exp +3/−0
- test/gibiansky/expected/21.exp +4/−0
- test/gibiansky/expected/22.exp +4/−0
- test/gibiansky/expected/23.exp +11/−0
- test/gibiansky/expected/24.exp +19/−0
- test/gibiansky/expected/25.exp +8/−0
- test/gibiansky/expected/3.exp +45/−0
- test/gibiansky/expected/4.exp +39/−0
- test/gibiansky/expected/5.exp +43/−0
- test/gibiansky/expected/6.exp +48/−0
- test/gibiansky/expected/7.exp +34/−0
- test/gibiansky/expected/8.exp +29/−0
- test/gibiansky/expected/9.exp +20/−0
- test/gibiansky/tests/1.test +11/−0
- test/gibiansky/tests/10.test +41/−0
- test/gibiansky/tests/11.test +46/−0
- test/gibiansky/tests/12.test +86/−0
- test/gibiansky/tests/13.test +29/−0
- test/gibiansky/tests/14.test +10/−0
- test/gibiansky/tests/15.test +21/−0
- test/gibiansky/tests/16.test +3/−0
- test/gibiansky/tests/17.test +4/−0
- test/gibiansky/tests/18.test +11/−0
- test/gibiansky/tests/19.test +16/−0
- test/gibiansky/tests/2.test +32/−0
- test/gibiansky/tests/20.test +3/−0
- test/gibiansky/tests/21.test +4/−0
- test/gibiansky/tests/22.test +4/−0
- test/gibiansky/tests/23.test +11/−0
- test/gibiansky/tests/24.test +18/−0
- test/gibiansky/tests/25.test +8/−0
- test/gibiansky/tests/3.test +38/−0
- test/gibiansky/tests/4.test +36/−0
- test/gibiansky/tests/5.test +27/−0
- test/gibiansky/tests/6.test +41/−0
- test/gibiansky/tests/7.test +30/−0
- test/gibiansky/tests/8.test +24/−0
- test/gibiansky/tests/9.test +19/−0
- test/johan-tibell/expected/1.exp +5/−0
- test/johan-tibell/expected/2.exp +5/−0
- test/johan-tibell/expected/3.exp +6/−0
- test/johan-tibell/expected/4.exp +8/−0
- test/johan-tibell/tests/1.test +6/−0
- test/johan-tibell/tests/2.test +5/−0
- test/johan-tibell/tests/3.test +6/−0
- test/johan-tibell/tests/4.test +7/−0
hindent.cabal view
@@ -1,5 +1,5 @@ name: hindent-version: 4.3.9+version: 4.3.10 synopsis: Extensible Haskell pretty printer description: Extensible Haskell pretty printer. Both a library and an executable. .@@ -15,6 +15,14 @@ cabal-version: >=1.8 data-files: elisp/hindent.el vim/hindent.vim extra-source-files: README.md+ test/chris-done/expected/*.exp+ test/chris-done/tests/*.test+ test/gibiansky/expected/*.exp+ test/gibiansky/tests/*.test+ test/fundamental/expected/*.exp+ test/fundamental/tests/*.test+ test/johan-tibell/expected/*.exp+ test/johan-tibell/tests/*.test library hs-source-dirs: src/@@ -32,6 +40,7 @@ , monad-loops , mtl , text+ , transformers executable hindent hs-source-dirs: src/main
src/HIndent.hs view
@@ -22,6 +22,8 @@ ) where +import Control.Monad.Trans.Maybe+import Data.Functor.Identity import HIndent.Pretty import HIndent.Styles.ChrisDone (chrisDone) import HIndent.Styles.Fundamental (fundamental)@@ -67,8 +69,11 @@ prettyPrint style m = case style of Style _name _author _desc st extenders config ->- psOutput (execState (runPrinter m)- (PrintState 0 mempty False 0 1 st extenders config False False))+ maybe (error "Printer failed with mzero call.")+ psOutput+ (runIdentity+ (runMaybeT (execStateT (runPrinter m)+ (PrintState 0 mempty False 0 1 st extenders config False False)))) -- | Parse mode, includes all extensions, doesn't assume any fixities. parseMode :: ParseMode
src/HIndent/Pretty.hs view
@@ -59,6 +59,8 @@ ) where +import Control.Monad.Trans.Maybe+import Data.Functor.Identity import HIndent.Types import Language.Haskell.Exts.Comments@@ -97,7 +99,10 @@ printComments Before a depend (case listToMaybe (mapMaybe (makePrinter s) es) of- Just (Printer m) -> modify (execState m)+ Just (Printer m) ->+ modify (\s ->+ fromMaybe s+ (runIdentity (runMaybeT (execStateT m s)))) Nothing -> prettyNoExt a) (printComments After a) where makePrinter s (Extender f) =
src/HIndent/Styles/Gibiansky.hs view
@@ -458,13 +458,21 @@ writeCaseAlts :: [Alt NodeInfo] -> Printer State () writeCaseAlts alts = do allSingle <- and <$> mapM isSingle alts- withCaseContext True $ indented indentSpaces $- if allSingle- then do- maxPatLen <- maximum <$> mapM (patternLen . altPattern) alts- lined $ map (prettyCase $ Just maxPatLen) alts- else lined $ map (prettyCase Nothing) alts+ withCaseContext True $ indented indentSpaces $ do+ prettyPr <- if allSingle+ then do+ maxPatLen <- maximum <$> mapM (patternLen . altPattern) alts+ return $ prettyCase (Just maxPatLen)+ else return $ prettyCase Nothing + case alts of + [] -> return ()+ first:rest -> do+ prettyPr first+ forM_ (zip alts rest) $ \(prev, cur) -> do+ replicateM_ (max 1 $ lineDelta cur prev) newline+ prettyPr cur+ where isSingle :: Alt NodeInfo -> Printer State Bool isSingle alt' = fst <$> sandbox@@ -635,6 +643,7 @@ onSeparateLines binds writeWhereBinds binds = prettyNoExt binds +-- Print all the ASTs on separate lines, respecting user spacing. onSeparateLines :: (Pretty ast, Annotated ast) => [ast NodeInfo] -> Printer State () onSeparateLines vals@(first:rest) = do pretty first
src/HIndent/Types.hs view
@@ -19,9 +19,12 @@ ) where import Control.Applicative-import Control.Monad.State.Strict (MonadState(..),State)+import Control.Monad+import Control.Monad.State.Strict (MonadState(..),StateT)+import Control.Monad.Trans.Maybe import Data.Data import Data.Default+import Data.Functor.Identity import Data.Int (Int64) import Data.Text (Text) import Data.Text.Lazy.Builder (Builder)@@ -30,8 +33,8 @@ -- | A pretty printing monad. newtype Printer s a =- Printer {runPrinter :: State (PrintState s) a}- deriving (Applicative,Monad,Functor,MonadState (PrintState s))+ Printer {runPrinter :: StateT (PrintState s) (MaybeT Identity) a}+ deriving (Applicative,Monad,Functor,MonadState (PrintState s),MonadPlus,Alternative) -- | The state of the pretty printer. data PrintState s =
+ test/chris-done/expected/1.exp view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/chris-done/expected/10.exp view
@@ -0,0 +1,40 @@+unless hello $+case thing of+ Left a -> 3+ Right b -> 5++when hello $+case thing of+ Left a -> 3+ Right b -> 5++a = + \line -> + case a of+ Left a -> a+ Right b -> b++map (\x -> x)+ [1,2,3]++forM_ lst $+\x -> do putStrLn x++forM_ lst $ \x -> putStrLn x++Value <$> thing <*> secondThing++Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*>+Just thisissolong <*>+Just stilllonger++f e = 5+ where a = b++a = b+ where c = d+ e = f++a = b+ where c = d+ e = f
+ test/chris-done/expected/11.exp view
@@ -0,0 +1,56 @@+data A+ = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float+ Float -- ^ hi++data A+ = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float+ Float -- ^ hi+ -- continuing the comment++a = + case x of+ Nothing -> 2+ Just something -> 3++a = + case x of+ Nothing -> do putStrLn "hi"+ Just something -> 3++a = + case x of+ Nothing -> + case y of+ 1 -> 2+ 3 -> 4+ Just something -> 3++a = + case x of+ Nothing -> 2+ Just x -> 10+ Just something -> 3++a = + case x of+ Nothing -> 2+ Just x -> 10+ Just something -> do putStrLn "hello"++data X =+ X {a :: Int -- ^ hi+ ,b :: String -- ^ hi+ }++data X =+ X {a :: Int -- ^ hi+ ,b :: String -- ^ hi+ -- continued+ }
+ test/chris-done/expected/12.exp view
@@ -0,0 +1,37 @@+module Main where++module Main where++module Main () where++module Main () where++module Main (main) where++module Main (main, main2) where++module Main (main, main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main, main2, main3, main4) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5, main6) where++module Main (main, main2, main3, main4, main5, main6) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5) where++module Main (main) where+import Text.Hello++module Main (main, main2, main3, main4, main5) where+import Text.Hello
+ test/chris-done/expected/13.exp view
@@ -0,0 +1,27 @@+a = b+ where blah = blah+ -- hello+ -- bye+ hello = hello++a = b+ where blah = blah+ -- bye+ hello = hello++foo = x -- test+ where x = blah++foo = x+ where + -- another test+ x = blah++f = + case undefined of+ Just p+ -- If it's the potato.+ | zot -> undefined+ |+ -- The geriatric concumbine.+ otherwise -> hael
+ test/chris-done/expected/14.exp view
@@ -0,0 +1,10 @@+x = \y -> y++(1,2)++f x = 3+f x = 3++f x+ | x == y = 3+ | x == y = 3
+ test/chris-done/expected/15.exp view
@@ -0,0 +1,42 @@+a = + veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = + veryLongLongLongName veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++tests = + hello [name "space space space space space space space space space space space" thing+ ,name "space space space space space space space space space space space" thing+ ,name "space space space space space space space space space space space" thing]++tests = + hello goodbye+ [name "space space space space space space space space space space space" thing+ ,name "space space space space space space space space space space space" thing+ ,name "space space space space space space space space space space space" thing]
+ test/chris-done/expected/16.exp view
@@ -0,0 +1,3 @@+instance A B where+ f x = 3+ f y = 3
+ test/chris-done/expected/17.exp view
@@ -0,0 +1,3 @@+type EventSource a = (AddHandler a,a -> IO ())++type EventSource a = (AddHandler a,a -> IO ())
+ test/chris-done/expected/18.exp view
@@ -0,0 +1,19 @@+a = b {c = "d"}++a = + b {c = "d"+ ,e = "f"}++longLines = + longLines {longLines = "word word word word"+ ,wordWordWordWord = "long lines long long long"}++a = B {c = "d"}++a = + B {c = "d"+ ,e = "f"}++longLines = + LongLines {longLines = "word word word word"+ ,wordWordWordWord = "long lines long long long"}
+ test/chris-done/expected/19.exp view
@@ -0,0 +1,15 @@+value = value+ where b = + case x of+ x -> x+ y -> y+ a :: b+ a = 3++value = value+ where b = + case x of+ x -> x+ y -> y+ a :: b+ a = 3
+ test/chris-done/expected/2.exp view
@@ -0,0 +1,27 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a+ => a -> b -> c++fun :: (Class a,Class b)+ => a -> b -> c++fun :: a -> b -> c++fun :: a -> b -> c++fun :: a -> b -> c++fun :: a+ -> b -- ^ Hello+ -> c++fun :: a -> b -> c -- ^ Hello++fun :: (Class a,Class b)+ => a -> b -> c -- ^ Hello++fun :: (Class a,Class b)+ => a -> b -> c -- ^ Hello
+ test/chris-done/expected/3.exp view
@@ -0,0 +1,45 @@+let x = y+ z = w+in x++let x = y+ z = w+in x++a = + let x = y+ z = w+ in x++a = + let x = y+ z = w+ in x++let x = y+ z = w+in x++let z = w+in x++a = + let z = w+ in x++a = + let z = w+ in x++f x = + let g x = 5+ g x = 5+ in 3++f = + let y = z+ in z++f x = + let y = z+ in z
+ test/chris-done/expected/4.exp view
@@ -0,0 +1,51 @@+data A =+ B ++data A =+ B -- ^ Hello++data A =+ B -- ^ Hello++data A =+ B -- ^ Hello++data A+ = B + | C ++data A+ = B + | C + | D ++data A+ = B + | C + | D ++data A+ = B + | C + | D ++data A+ = B + | C + | D + deriving (Show)++data A+ = B + | C + | D + deriving (Show,Eq)++data A =+ B Int+ deriving (Show,Eq)++data A+ = B Int+ | C String+ deriving (Show,Eq)
+ test/chris-done/expected/5.exp view
@@ -0,0 +1,45 @@+data A =+ B {field :: Int}++data A =+ B {field :: Int+ ,field2 :: Char}++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show,Eq)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show,Eq)++data A =+ B {field :: Int -- ^ Field 1+ }++data A =+ B {field :: Int -- ^ Field 1+ ,field2 :: Char -- ^ field 2+ ,field3 :: String}+ deriving (Show)
+ test/chris-done/expected/6.exp view
@@ -0,0 +1,45 @@+a = + case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = + case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = + case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = + case f x of+ Nothing -> 1+ Just x -> 3++a = + case f x of+ Nothing -> 1+ Just x -> 3++a = + case f x of+ Nothing -> 1+ Just x -> 3++a = + case f x of+ Nothing -> do return 3+ Just x -> return ()++a = + case f x of+ Nothing -> do return 3+ Just x -> do return 5
+ test/chris-done/expected/7.exp view
@@ -0,0 +1,23 @@+a = b+ where value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a = do return ()+ where value = 3+ value' = 5++a = do return ()+ where value = 3+ value' = 5
+ test/chris-done/expected/8.exp view
@@ -0,0 +1,29 @@+a = [1,2,3]++a = [1,2,3]++a = [1,2,3]++a = + [Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Just theRightAnswerWithAVeryLongLine+ ,Nothing]
+ test/chris-done/expected/9.exp view
@@ -0,0 +1,16 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = return ()++main :: IO ()+main = return ()++main :: a -> b -> c+main = return ()
+ test/chris-done/tests/1.test view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/chris-done/tests/10.test view
@@ -0,0 +1,41 @@+unless hello $+ case thing of+ Left a -> 3+ Right b -> 5++when hello $+ case thing of+ Left a -> 3+ Right b -> 5++a = \line ->+ case a of+ Left a -> a+ Right b -> b++map (\x -> x) [1, 2, 3]++forM_ lst $ \x -> do+ putStrLn x++forM_ lst $ \x ->+ putStrLn x++Value <$> thing <*> secondThing++Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger++f e = 5+ where+ a = b++a = b+ where+ c = d+ e = f++a = b+ where+ c = d++ e = f
+ test/chris-done/tests/11.test view
@@ -0,0 +1,46 @@+data A = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi++data A = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi+ -- continuing the comment++a = case x of+ Nothing -> 2+ Just something -> 3++a = case x of+ Nothing -> do+ putStrLn "hi"+ Just something -> 3++a = case x of+ Nothing -> case y of+ 1 -> 2+ 3 -> 4+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> do+ putStrLn "hello"++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ }++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ -- continued+ }
+ test/chris-done/tests/12.test view
@@ -0,0 +1,86 @@+module Main where++module Main+ where++module Main () where++module Main (+ ) where++module Main (main) where++module Main (main, main2) where++module Main (main,+ main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main,+ main2, main3,+ main4) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where++module Main ( main, main2, main3, main4,+ main5,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ main6,+ ) where++module Main (+ main, main2, main3, main4, main5, main6,+ ) where++module Main (+ -- * A thing+ main,+ main2,++ -- * Another thing+ main3,+ main4,++ -- ** Another thing+ main5,+ ) where++module Main (+ -- * A thing+ main, main2,++ -- * Another thing+ main3, main4,++ -- ** Another thing+ main5,) where++module Main (main) where+>+import Text.Hello++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where+>+import Text.Hello
+ test/chris-done/tests/13.test view
@@ -0,0 +1,29 @@+a = b+ where+ blah = blah++ -- hello+ -- bye+ hello = hello++a = b+ where+ blah = blah++ -- bye+ hello = hello++foo = x -- test+ where+ x = blah++foo = x+ where -- another test+ x = blah++f = case undefined of+ Just p+ -- If it's the potato.+ | zot -> undefined+ -- The geriatric concumbine.+ | otherwise -> hael
+ test/chris-done/tests/14.test view
@@ -0,0 +1,10 @@+x = \y -> y++(1, 2)++f x = 3+f x = 3++f x+ | x == y = 3+ | x == y = 3
+ test/chris-done/tests/15.test view
@@ -0,0 +1,21 @@+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++tests = hello+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]++tests = hello goodbye+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]
+ test/chris-done/tests/16.test view
@@ -0,0 +1,3 @@+instance A B where+ f x = 3+ f y = 3
+ test/chris-done/tests/17.test view
@@ -0,0 +1,4 @@+type EventSource a = (AddHandler a, a -> IO ())++type EventSource a = (AddHandler a,+ a -> IO ())
+ test/chris-done/tests/18.test view
@@ -0,0 +1,11 @@+a = b { c = "d" }++a = b { c = "d", e = "f" }++longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }++a = B { c = "d" }++a = B { c = "d", e = "f" }++longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+ test/chris-done/tests/19.test view
@@ -0,0 +1,16 @@+value = value+ where+ b = case x of+ x -> x+ y -> y+ a :: b+ a = 3++value = value+ where+ b = case x of+ x -> x+ y -> y++ a :: b+ a = 3
+ test/chris-done/tests/2.test view
@@ -0,0 +1,32 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a => a -> b -> c++fun :: (Class a, Class b) => a -> b -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a -> b -- ^ Hello+ -> c++fun :: a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) => a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) =>+ a -> b+ -> c -- ^ Hello
+ test/chris-done/tests/3.test view
@@ -0,0 +1,38 @@+let x = y+ z = w in x++let x = y+ z = w+ in x++a = let x = y+ z = w+ in x++a = let+ x = y+ z = w+ in x++let+ x = y+ z = w in x++let+ z = w in x++a = let+ z = w+ in x++a = let z = w+ in x++f x =+ let g x = 5+ g x = 5+ in 3++f = let y = z in z++f x = let y = z in z
+ test/chris-done/tests/4.test view
@@ -0,0 +1,36 @@+data A = B++data A = B -- ^ Hello++data A = + B -- ^ Hello++data A+ = B -- ^ Hello++data A = B | C++data A = B | C | D++data A = B | C + | D++data A = B + | C + | D++data A = B + | C + | D+ deriving Show++data A = B + | C + | D+ deriving (Show, Eq)++data A = B Int+ deriving (Show, Eq)++data A = B Int | C String+ deriving (Show, Eq)
+ test/chris-done/tests/5.test view
@@ -0,0 +1,27 @@+data A = B { field :: Int }++data A = B { field :: Int, field2 :: Char }++data A = B { field :: Int, field2 :: Char, field3 :: String }++data A = B { field :: Int,+ field2 :: Char, field3 :: String } deriving Show++data A = B { field :: Int,+ field2 :: Char,+ field3 :: String } deriving Show++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int -- ^ Field 1+ }++data A = B { field :: Int, -- ^ Field 1+ field2 :: Char, -- ^ field 2+ field3 :: String } deriving Show
+ test/chris-done/tests/6.test view
@@ -0,0 +1,41 @@+a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case + f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> do+ return 3+ Just x -> return ()++a = case f x of+ Nothing -> do+ return 3+ Just x -> do+ return 5
+ test/chris-done/tests/7.test view
@@ -0,0 +1,30 @@+a = b+ where+ value = 3+ value' = 5++a = b where+ value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a =+ b where+ value = 3+ value' = 5++a = do+ return ()++ where+ value = 3+ value' = 5++a = do+ return ()+ where+ value = 3+ value' = 5
+ test/chris-done/tests/8.test view
@@ -0,0 +1,24 @@+a = [1, 2, 3]++a = [1, 2+ , 3]++a = [ 1+ , 2+ , 3]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing]
+ test/chris-done/tests/9.test view
@@ -0,0 +1,19 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = return ()++main :: IO ()+main =+ return ()++main :: a -> b+ -> c+main =+ return ()
+ test/fundamental/expected/1.exp view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/fundamental/expected/10.exp view
@@ -0,0 +1,63 @@+unless+ hello $ case thing of+ Left a -> + 3+ Right b -> + 5++when+ hello $ case thing of+ Left a -> + 3+ Right b -> + 5++a = + \line -> + case a of+ Left a -> + a+ Right b -> + b++map+ (\x -> + x)+ [1+ ,2+ ,3]++forM_+ lst $ \x -> + do putStrLn+ x++forM_+ lst $ \x -> + putStrLn+ x++Value <$> thing <*> secondThing++Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just+ thisissolong <*> Just+ stilllonger++f e = + 5+ where a = + b++a = + b+ where c = + d+ e = + f++a = + b+ where c = + d+ e = + f
+ test/fundamental/expected/11.exp view
@@ -0,0 +1,71 @@+data A+ = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float+ Float -- ^ hi++data A+ = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float+ Float -- ^ hi+ -- continuing the comment++a = + case x of+ Nothing -> + 2+ Just something -> + 3++a = + case x of+ Nothing -> + do putStrLn+ "hi"+ Just something -> + 3++a = + case x of+ Nothing -> + case y of+ 1 -> + 2+ 3 -> + 4+ Just something -> + 3++a = + case x of+ Nothing -> + 2+ Just x -> + 10+ Just something -> + 3++a = + case x of+ Nothing -> + 2+ Just x -> + 10+ Just something -> + do putStrLn+ "hello"++data X =+ X {a :: Int -- ^ hi+ ,b :: String -- ^ hi+ }++data X =+ X {a :: Int -- ^ hi+ ,b :: String -- ^ hi+ -- continued+ }
+ test/fundamental/expected/12.exp view
@@ -0,0 +1,37 @@+module Main where++module Main where++module Main () where++module Main () where++module Main (main) where++module Main (main, main2) where++module Main (main, main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main, main2, main3, main4) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5, main6) where++module Main (main, main2, main3, main4, main5, main6) where++module Main (main, main2, main3, main4, main5) where++module Main (main, main2, main3, main4, main5) where++module Main (main) where+import Text.Hello++module Main (main, main2, main3, main4, main5) where+import Text.Hello
+ test/fundamental/expected/13.exp view
@@ -0,0 +1,39 @@+a = + b+ where blah = + blah+ -- hello+ -- bye+ hello = + hello++a = + b+ where blah = + blah+ -- bye+ hello = + hello++foo = + x -- test+ where x = + blah++foo = + x+ where + -- another test+ x = + blah++f = + case undefined of+ Just p+ -- If it's the potato.+ | zot -> + undefined+ |+ -- The geriatric concumbine.+ otherwise -> + hael
+ test/fundamental/expected/14.exp view
@@ -0,0 +1,17 @@+x = + \y -> + y++(1+,2)++f x = + 3+f x = + 3++f x+ | x == y = + 3+ | x == y = + 3
+ test/fundamental/expected/15.exp view
@@ -0,0 +1,63 @@+a = + veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = + veryLongLongLongName+ veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++tests = + hello+ [name+ "space space space space space space space space space space space"+ thing+ ,name+ "space space space space space space space space space space space"+ thing+ ,name+ "space space space space space space space space space space space"+ thing]++tests = + hello+ goodbye+ [name+ "space space space space space space space space space space space"+ thing+ ,name+ "space space space space space space space space space space space"+ thing+ ,name+ "space space space space space space space space space space space"+ thing]
+ test/fundamental/expected/16.exp view
@@ -0,0 +1,5 @@+instance A B where+ f x = + 3+ f y = + 3
+ test/fundamental/expected/17.exp view
@@ -0,0 +1,3 @@+type EventSource a = (AddHandler a,a -> IO ())++type EventSource a = (AddHandler a,a -> IO ())
+ test/fundamental/expected/18.exp view
@@ -0,0 +1,31 @@+a = + b {c = + "d"}++a = + b {c = + "d"+ ,e = + "f"}++longLines = + longLines {longLines = + "word word word word"+ ,wordWordWordWord = + "long lines long long long"}++a = + B {c = + "d"}++a = + B {c = + "d"+ ,e = + "f"}++longLines = + LongLines {longLines = + "word word word word"+ ,wordWordWordWord = + "long lines long long long"}
+ test/fundamental/expected/19.exp view
@@ -0,0 +1,23 @@+value = + value+ where b = + case x of+ x -> + x+ y -> + y+ a :: b+ a = + 3++value = + value+ where b = + case x of+ x -> + x+ y -> + y+ a :: b+ a = + 3
+ test/fundamental/expected/2.exp view
@@ -0,0 +1,22 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a => a -> b -> c++fun :: (Class a,Class b) => a -> b -> c++fun :: a -> b -> c++fun :: a -> b -> c++fun :: a -> b -> c++fun :: a -> b -- ^ Hello+ -> c++fun :: a -> b -> c -- ^ Hello++fun :: (Class a,Class b) => a -> b -> c -- ^ Hello++fun :: (Class a,Class b) => a -> b -> c -- ^ Hello
+ test/fundamental/expected/3.exp view
@@ -0,0 +1,62 @@+let x = + y+ z = + w+in x++let x = + y+ z = + w+in x++a = + let x = + y+ z = + w+ in x++a = + let x = + y+ z = + w+ in x++let x = + y+ z = + w+in x++let z = + w+in x++a = + let z = + w+ in x++a = + let z = + w+ in x++f x = + let g x = + 5+ g x = + 5+ in 3++f = + let y = + z+ in z++f x = + let y = + z+ in z
+ test/fundamental/expected/4.exp view
@@ -0,0 +1,51 @@+data A =+ B ++data A =+ B -- ^ Hello++data A =+ B -- ^ Hello++data A =+ B -- ^ Hello++data A+ = B + | C ++data A+ = B + | C + | D ++data A+ = B + | C + | D ++data A+ = B + | C + | D ++data A+ = B + | C + | D + deriving (Show)++data A+ = B + | C + | D + deriving (Show,Eq)++data A =+ B Int+ deriving (Show,Eq)++data A+ = B Int+ | C String+ deriving (Show,Eq)
+ test/fundamental/expected/5.exp view
@@ -0,0 +1,45 @@+data A =+ B {field :: Int}++data A =+ B {field :: Int+ ,field2 :: Char}++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show,Eq)++data A =+ B {field :: Int+ ,field2 :: Char+ ,field3 :: String}+ deriving (Show,Eq)++data A =+ B {field :: Int -- ^ Field 1+ }++data A =+ B {field :: Int -- ^ Field 1+ ,field2 :: Char -- ^ field 2+ ,field3 :: String}+ deriving (Show)
+ test/fundamental/expected/6.exp view
@@ -0,0 +1,79 @@+a = + case f+ x of+ 1 -> + 1+ 2 -> + 3+ 3 -> + 4+ _ -> + 100++a = + case f+ x of+ 1 -> + 1+ 2 -> + 3+ 3 -> + 4+ _ -> + 100++a = + case f+ x of+ 1 -> + 1+ 2 -> + 3+ 3 -> + 4+ _ -> + 100++a = + case f+ x of+ Nothing -> + 1+ Just x -> + 3++a = + case f+ x of+ Nothing -> + 1+ Just x -> + 3++a = + case f+ x of+ Nothing -> + 1+ Just x -> + 3++a = + case f+ x of+ Nothing -> + do return+ 3+ Just x -> + return+ ()++a = + case f+ x of+ Nothing -> + do return+ 3+ Just x -> + do return+ 5
+ test/fundamental/expected/7.exp view
@@ -0,0 +1,43 @@+a = + b+ where value = + 3+ value' = + 5++a = + b+ where value = + 3+ value' = + 5++a = + b+ where value = + 3+ value' = + 5++a = + b+ where value = + 3+ value' = + 5++a = + do return+ ()+ where value = + 3+ value' = + 5++a = + do return+ ()+ where value = + 3+ value' = + 5
+ test/fundamental/expected/8.exp view
@@ -0,0 +1,50 @@+a = + [1+ ,2+ ,3]++a = + [1+ ,2+ ,3]++a = + [1+ ,2+ ,3]++a = + [Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Nothing]++a = + [Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Just+ theRightAnswerWithAVeryLongLine+ ,Nothing]
+ test/fundamental/expected/9.exp view
@@ -0,0 +1,22 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = + return+ ()++main :: IO ()+main = + return+ ()++main :: a -> b -> c+main = + return+ ()
+ test/fundamental/tests/1.test view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/fundamental/tests/10.test view
@@ -0,0 +1,41 @@+unless hello $+ case thing of+ Left a -> 3+ Right b -> 5++when hello $+ case thing of+ Left a -> 3+ Right b -> 5++a = \line ->+ case a of+ Left a -> a+ Right b -> b++map (\x -> x) [1, 2, 3]++forM_ lst $ \x -> do+ putStrLn x++forM_ lst $ \x ->+ putStrLn x++Value <$> thing <*> secondThing++Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger++f e = 5+ where+ a = b++a = b+ where+ c = d+ e = f++a = b+ where+ c = d++ e = f
+ test/fundamental/tests/11.test view
@@ -0,0 +1,46 @@+data A = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi++data A = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi+ -- continuing the comment++a = case x of+ Nothing -> 2+ Just something -> 3++a = case x of+ Nothing -> do+ putStrLn "hi"+ Just something -> 3++a = case x of+ Nothing -> case y of+ 1 -> 2+ 3 -> 4+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> do+ putStrLn "hello"++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ }++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ -- continued+ }
+ test/fundamental/tests/12.test view
@@ -0,0 +1,86 @@+module Main where++module Main+ where++module Main () where++module Main (+ ) where++module Main (main) where++module Main (main, main2) where++module Main (main,+ main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main,+ main2, main3,+ main4) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where++module Main ( main, main2, main3, main4,+ main5,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ main6,+ ) where++module Main (+ main, main2, main3, main4, main5, main6,+ ) where++module Main (+ -- * A thing+ main,+ main2,++ -- * Another thing+ main3,+ main4,++ -- ** Another thing+ main5,+ ) where++module Main (+ -- * A thing+ main, main2,++ -- * Another thing+ main3, main4,++ -- ** Another thing+ main5,) where++module Main (main) where+>+import Text.Hello++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where+>+import Text.Hello
+ test/fundamental/tests/13.test view
@@ -0,0 +1,29 @@+a = b+ where+ blah = blah++ -- hello+ -- bye+ hello = hello++a = b+ where+ blah = blah++ -- bye+ hello = hello++foo = x -- test+ where+ x = blah++foo = x+ where -- another test+ x = blah++f = case undefined of+ Just p+ -- If it's the potato.+ | zot -> undefined+ -- The geriatric concumbine.+ | otherwise -> hael
+ test/fundamental/tests/14.test view
@@ -0,0 +1,10 @@+x = \y -> y++(1, 2)++f x = 3+f x = 3++f x+ | x == y = 3+ | x == y = 3
+ test/fundamental/tests/15.test view
@@ -0,0 +1,21 @@+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++tests = hello+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]++tests = hello goodbye+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]
+ test/fundamental/tests/16.test view
@@ -0,0 +1,3 @@+instance A B where+ f x = 3+ f y = 3
+ test/fundamental/tests/17.test view
@@ -0,0 +1,4 @@+type EventSource a = (AddHandler a, a -> IO ())++type EventSource a = (AddHandler a,+ a -> IO ())
+ test/fundamental/tests/18.test view
@@ -0,0 +1,11 @@+a = b { c = "d" }++a = b { c = "d", e = "f" }++longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }++a = B { c = "d" }++a = B { c = "d", e = "f" }++longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+ test/fundamental/tests/19.test view
@@ -0,0 +1,16 @@+value = value+ where+ b = case x of+ x -> x+ y -> y+ a :: b+ a = 3++value = value+ where+ b = case x of+ x -> x+ y -> y++ a :: b+ a = 3
+ test/fundamental/tests/2.test view
@@ -0,0 +1,32 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a => a -> b -> c++fun :: (Class a, Class b) => a -> b -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a -> b -- ^ Hello+ -> c++fun :: a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) => a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) =>+ a -> b+ -> c -- ^ Hello
+ test/fundamental/tests/3.test view
@@ -0,0 +1,38 @@+let x = y+ z = w in x++let x = y+ z = w+ in x++a = let x = y+ z = w+ in x++a = let+ x = y+ z = w+ in x++let+ x = y+ z = w in x++let+ z = w in x++a = let+ z = w+ in x++a = let z = w+ in x++f x =+ let g x = 5+ g x = 5+ in 3++f = let y = z in z++f x = let y = z in z
+ test/fundamental/tests/4.test view
@@ -0,0 +1,36 @@+data A = B++data A = B -- ^ Hello++data A = + B -- ^ Hello++data A+ = B -- ^ Hello++data A = B | C++data A = B | C | D++data A = B | C + | D++data A = B + | C + | D++data A = B + | C + | D+ deriving Show++data A = B + | C + | D+ deriving (Show, Eq)++data A = B Int+ deriving (Show, Eq)++data A = B Int | C String+ deriving (Show, Eq)
+ test/fundamental/tests/5.test view
@@ -0,0 +1,27 @@+data A = B { field :: Int }++data A = B { field :: Int, field2 :: Char }++data A = B { field :: Int, field2 :: Char, field3 :: String }++data A = B { field :: Int,+ field2 :: Char, field3 :: String } deriving Show++data A = B { field :: Int,+ field2 :: Char,+ field3 :: String } deriving Show++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int -- ^ Field 1+ }++data A = B { field :: Int, -- ^ Field 1+ field2 :: Char, -- ^ field 2+ field3 :: String } deriving Show
+ test/fundamental/tests/6.test view
@@ -0,0 +1,41 @@+a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case + f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> do+ return 3+ Just x -> return ()++a = case f x of+ Nothing -> do+ return 3+ Just x -> do+ return 5
+ test/fundamental/tests/7.test view
@@ -0,0 +1,30 @@+a = b+ where+ value = 3+ value' = 5++a = b where+ value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a =+ b where+ value = 3+ value' = 5++a = do+ return ()++ where+ value = 3+ value' = 5++a = do+ return ()+ where+ value = 3+ value' = 5
+ test/fundamental/tests/8.test view
@@ -0,0 +1,24 @@+a = [1, 2, 3]++a = [1, 2+ , 3]++a = [ 1+ , 2+ , 3]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing]
+ test/fundamental/tests/9.test view
@@ -0,0 +1,19 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = return ()++main :: IO ()+main =+ return ()++main :: a -> b+ -> c+main =+ return ()
+ test/gibiansky/expected/1.exp view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/gibiansky/expected/10.exp view
@@ -0,0 +1,44 @@+unless hello $+ case thing of+ Left a -> 3+ Right b -> 5++when hello $+ case thing of+ Left a -> 3+ Right b -> 5++a = \line -> case a of+ Left a -> a+ Right b -> b++map (\x -> x) [1, 2, 3]++forM_ lst $ \x -> do+ putStrLn x++forM_ lst $ \x -> putStrLn x++Value <$> thing <*> secondThing++Value <$> thing+ <*> secondThing+ <*> thirdThing+ <*> fourthThing+ <*> Just thisissolong+ <*> Just stilllonger++f e = 5+ where+ a = b++a = b+ where+ c = d+ e = f++a = b+ where+ c = d++ e = f
+ test/gibiansky/expected/11.exp view
@@ -0,0 +1,52 @@+data A = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi++data A = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi+ -- continuing the comment++a =+ case x of+ Nothing -> 2+ Just something -> 3++a =+ case x of+ Nothing -> do+ putStrLn "hi"+ Just something -> 3++a =+ case x of+ Nothing ->+ case y of+ 1 -> 2+ 3 -> 4+ Just something -> 3++a =+ case x of+ Nothing -> 2+ Just x -> 10+ Just something -> 3++a =+ case x of+ Nothing -> 2+ Just x -> 10+ Just something -> do+ putStrLn "hello"++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ }++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ -- continued+ }
+ test/gibiansky/expected/12.exp view
@@ -0,0 +1,93 @@+module Main where++module Main where++module Main () where++module Main () where++module Main (main) where++module Main (main, main2) where++module Main (main, main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main, main2, main3, main4) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ main6,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ main6,+ ) where++module Main (+ -- * A thing+ main,+ main2,++ -- * Another thing+ main3,+ main4,++ -- ** Another thing+ main5,+ ) where++module Main (+ -- * A thing+ main,+ main2,++ -- * Another thing+ main3,+ main4,++ -- ** Another thing+ main5,+ ) where++module Main (main) where+>+import Text.Hello++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where+>+import Text.Hello
+ test/gibiansky/expected/13.exp view
@@ -0,0 +1,31 @@+a = b+ where+ blah = blah++ -- hello+ -- bye+ hello = hello++a = b+ where+ blah = blah++ -- bye+ hello = hello++foo = x -- test+ where+ x = blah++foo = x+ where+ -- another test+ x = blah++f =+ case undefined of+ Just p+ -- If it's the potato.+ | zot -> undefined+ -- The geriatric concumbine.+ | otherwise -> hael
+ test/gibiansky/expected/14.exp view
@@ -0,0 +1,10 @@+x = \y -> y++(1, 2)++f x = 3+f x = 3++f x+ | x == y = 3+ | x == y = 3
+ test/gibiansky/expected/15.exp view
@@ -0,0 +1,39 @@+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg+ veryLongLongLongArg++a = veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = veryLongLongLongName+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++a = veryLongLongLongName+ veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg+ veryLongLongLongArg++tests = hello+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]++tests = hello goodbye+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]
+ test/gibiansky/expected/16.exp view
@@ -0,0 +1,3 @@+instance A B where+ f x = 3+ f y = 3
+ test/gibiansky/expected/17.exp view
@@ -0,0 +1,3 @@+type EventSource a = (AddHandler a, a -> IO ())++type EventSource a = (AddHandler a, a -> IO ())
+ test/gibiansky/expected/18.exp view
@@ -0,0 +1,15 @@+a = b { c = "d" }++a = b { c = "d", e = "f" }++longLines = longLines { longLines = "word word word word"+ , wordWordWordWord = "long lines long long long"+ }++a = B { c = "d" }++a = B { c = "d", e = "f" }++longLines = LongLines { longLines = "word word word word"+ , wordWordWordWord = "long lines long long long"+ }
+ test/gibiansky/expected/19.exp view
@@ -0,0 +1,18 @@+value = value+ where+ b =+ case x of+ x -> x+ y -> y+ a :: b+ a = 3++value = value+ where+ b =+ case x of+ x -> x+ y -> y++ a :: b+ a = 3
+ test/gibiansky/expected/2.exp view
@@ -0,0 +1,37 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a => a -> b -> c++fun :: (Class a, Class b) => a -> b -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b -- ^ Hello+ -> c++fun :: a+ -> b+ -> c -- ^ Hello++fun :: (Class a, Class b)+ => a+ -> b+ -> c -- ^ Hello++fun :: (Class a, Class b)+ => a+ -> b+ -> c -- ^ Hello
+ test/gibiansky/expected/20.exp view
@@ -0,0 +1,3 @@+-- Comment 1+-- Comment 2+f x = x
+ test/gibiansky/expected/21.exp view
@@ -0,0 +1,4 @@+a = A { reallyLongName = reallyLongName+ , reallyLongName = reallyLongName+ , aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaa+ }
+ test/gibiansky/expected/22.exp view
@@ -0,0 +1,4 @@+a = do+ a <- b++ print a
+ test/gibiansky/expected/23.exp view
@@ -0,0 +1,11 @@+a = b ~.+ c++a = b+ ~.+ c++a = b+ ~. c++a = b ~. c
+ test/gibiansky/expected/24.exp view
@@ -0,0 +1,19 @@+import A+>+import B++{-# LANGUAGE FlexibleContexts, OverloadedStrings, RecordWildCards, RankNTypes #-}++blah x+ | x = do+ putStrLn a++unless x $+ unless y $+ putStrLn "Hello"++a =+ let (x, y) = z+ in z++a = (x ++)
+ test/gibiansky/expected/25.exp view
@@ -0,0 +1,8 @@+main = do+ case foo of+ Something -> do+ x+>+ Else -> x+>+ Bar -> x
+ test/gibiansky/expected/3.exp view
@@ -0,0 +1,45 @@+let x = y+ z = w+in x++let x = y+ z = w+in x++a =+ let x = y+ z = w+ in x++a =+ let x = y+ z = w+ in x++let x = y+ z = w+in x++let z = w+in x++a =+ let z = w+ in x++a =+ let z = w+ in x++f x =+ let g x = 5+ g x = 5+ in 3++f =+ let y = z+ in z++f x =+ let y = z+ in z
+ test/gibiansky/expected/4.exp view
@@ -0,0 +1,39 @@+data A = B++data A = B -- ^ Hello++data A = B -- ^ Hello++data A = B -- ^ Hello++data A = B+ | C++data A = B+ | C+ | D++data A = B+ | C+ | D++data A = B+ | C+ | D++data A = B+ | C+ | D+ deriving Show++data A = B+ | C+ | D+ deriving (Show, Eq)++data A = B Int+ deriving (Show, Eq)++data A = B Int+ | C String+ deriving (Show, Eq)
+ test/gibiansky/expected/5.exp view
@@ -0,0 +1,43 @@+data A = B { field :: Int }++data A = B { field :: Int+ , field2 :: Char+ }++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String+ }++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String+ }+ deriving Show++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String+ }+ deriving Show++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String+ }+ deriving (Show, Eq)++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String+ }+ deriving (Show, Eq)++data A = B { field :: Int -- ^ Field 1+ }++data A = B { field :: Int -- ^ Field 1+ , field2 :: Char -- ^ field 2+ , field3 :: String+ }+ deriving Show
+ test/gibiansky/expected/6.exp view
@@ -0,0 +1,48 @@+a =+ case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a =+ case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a =+ case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a =+ case f x of+ Nothing -> 1+ Just x -> 3++a =+ case f x of+ Nothing -> 1+ Just x -> 3++a =+ case f x of+ Nothing -> 1+ Just x -> 3++a =+ case f x of+ Nothing -> do+ return 3+ Just x -> return ()++a =+ case f x of+ Nothing -> do+ return 3+ Just x -> do+ return 5
+ test/gibiansky/expected/7.exp view
@@ -0,0 +1,34 @@+a = b+ where+ value = 3+ value' = 5++a = b+ where+ value = 3+ value' = 5++a = b+ where+ value = 3+ value' = 5++a =+ b+ where+ value = 3+ value' = 5++a = do+ return ()++ where+ value = 3+ value' = 5++a = do+ return ()++ where+ value = 3+ value' = 5
+ test/gibiansky/expected/8.exp view
@@ -0,0 +1,29 @@+a = [1, 2, 3]++a = [1, 2, 3]++a = [1, 2, 3]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]
+ test/gibiansky/expected/9.exp view
@@ -0,0 +1,20 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = return ()++main :: IO ()+main =+ return ()++main :: a+ -> b+ -> c+main =+ return ()
+ test/gibiansky/tests/1.test view
@@ -0,0 +1,11 @@+import Data.Text++import Data.Text++import qualified Data.Text as T++import qualified Data.Text (a, b, c)++import Data.Text (a, b, c)++import Data.Text hiding (a, b, c)
+ test/gibiansky/tests/10.test view
@@ -0,0 +1,41 @@+unless hello $+ case thing of+ Left a -> 3+ Right b -> 5++when hello $+ case thing of+ Left a -> 3+ Right b -> 5++a = \line ->+ case a of+ Left a -> a+ Right b -> b++map (\x -> x) [1, 2, 3]++forM_ lst $ \x -> do+ putStrLn x++forM_ lst $ \x ->+ putStrLn x++Value <$> thing <*> secondThing++Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger++f e = 5+ where+ a = b++a = b+ where+ c = d+ e = f++a = b+ where+ c = d++ e = f
+ test/gibiansky/tests/11.test view
@@ -0,0 +1,46 @@+data A = B -- ^ hi+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi++data A = B -- ^ hi+ -- continuing the comment+ | C Int -- ^ hi+ | D Float -- ^ hi+ | E Float Float -- ^ hi+ -- continuing the comment++a = case x of+ Nothing -> 2+ Just something -> 3++a = case x of+ Nothing -> do+ putStrLn "hi"+ Just something -> 3++a = case x of+ Nothing -> case y of+ 1 -> 2+ 3 -> 4+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> 3++a = case x of+ Nothing -> 2+ Just x -> 10+ Just something -> do+ putStrLn "hello"++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ }++data X = X { a :: Int -- ^ hi+ , b :: String -- ^ hi+ -- continued+ }
+ test/gibiansky/tests/12.test view
@@ -0,0 +1,86 @@+module Main where++module Main+ where++module Main () where++module Main (+ ) where++module Main (main) where++module Main (main, main2) where++module Main (main,+ main2) where++module Main (main, main2, main3) where++module Main (main, main2, main3, main4) where++module Main (main,+ main2, main3,+ main4) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where++module Main ( main, main2, main3, main4,+ main5,+ ) where++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ main6,+ ) where++module Main (+ main, main2, main3, main4, main5, main6,+ ) where++module Main (+ -- * A thing+ main,+ main2,++ -- * Another thing+ main3,+ main4,++ -- ** Another thing+ main5,+ ) where++module Main (+ -- * A thing+ main, main2,++ -- * Another thing+ main3, main4,++ -- ** Another thing+ main5,) where++module Main (main) where+>+import Text.Hello++module Main (+ main,+ main2,+ main3,+ main4,+ main5,+ ) where+>+import Text.Hello
+ test/gibiansky/tests/13.test view
@@ -0,0 +1,29 @@+a = b+ where+ blah = blah++ -- hello+ -- bye+ hello = hello++a = b+ where+ blah = blah++ -- bye+ hello = hello++foo = x -- test+ where+ x = blah++foo = x+ where -- another test+ x = blah++f = case undefined of+ Just p+ -- If it's the potato.+ | zot -> undefined+ -- The geriatric concumbine.+ | otherwise -> hael
+ test/gibiansky/tests/14.test view
@@ -0,0 +1,10 @@+x = \y -> y++(1, 2)++f x = 3+f x = 3++f x+ | x == y = 3+ | x == y = 3
+ test/gibiansky/tests/15.test view
@@ -0,0 +1,21 @@+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg++tests = hello+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]++tests = hello goodbye+ [ name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ , name "space space space space space space space space space space space" thing+ ]
+ test/gibiansky/tests/16.test view
@@ -0,0 +1,3 @@+instance A B where+ f x = 3+ f y = 3
+ test/gibiansky/tests/17.test view
@@ -0,0 +1,4 @@+type EventSource a = (AddHandler a, a -> IO ())++type EventSource a = (AddHandler a,+ a -> IO ())
+ test/gibiansky/tests/18.test view
@@ -0,0 +1,11 @@+a = b { c = "d" }++a = b { c = "d", e = "f" }++longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }++a = B { c = "d" }++a = B { c = "d", e = "f" }++longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+ test/gibiansky/tests/19.test view
@@ -0,0 +1,16 @@+value = value+ where+ b = case x of+ x -> x+ y -> y+ a :: b+ a = 3++value = value+ where+ b = case x of+ x -> x+ y -> y++ a :: b+ a = 3
+ test/gibiansky/tests/2.test view
@@ -0,0 +1,32 @@+fun :: a -> b++fun :: a -> f b -> g c d++fun :: Class a => a -> b -> c++fun :: (Class a, Class b) => a -> b -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a+ -> b+ -> c++fun :: a -> b -- ^ Hello+ -> c++fun :: a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) => a -> b+ -> c -- ^ Hello++fun :: (Class a, Class b) =>+ a -> b+ -> c -- ^ Hello
+ test/gibiansky/tests/20.test view
@@ -0,0 +1,3 @@+-- Comment 1+-- Comment 2+f x = x
+ test/gibiansky/tests/21.test view
@@ -0,0 +1,4 @@+a = A { reallyLongName = reallyLongName+ , reallyLongName = reallyLongName+ , aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaa+ }
+ test/gibiansky/tests/22.test view
@@ -0,0 +1,4 @@+a = do+ a <- b++ print a
+ test/gibiansky/tests/23.test view
@@ -0,0 +1,11 @@+a = b ~.+ c++a = b+ ~.+ c++a = b+ ~. c++a = b ~. c
+ test/gibiansky/tests/24.test view
@@ -0,0 +1,18 @@+import A+>+import B++{-# LANGUAGE FlexibleContexts, OverloadedStrings, RecordWildCards, RankNTypes #-}+>++blah x+ | x = do+ putStrLn a++unless x $+ unless y $+ putStrLn "Hello"++a = let (x, y) = z in z++a = (x ++)
+ test/gibiansky/tests/25.test view
@@ -0,0 +1,8 @@+main = do+ case foo of+ Something -> do+ x+>+ Else -> x+>+ Bar -> x
+ test/gibiansky/tests/3.test view
@@ -0,0 +1,38 @@+let x = y+ z = w in x++let x = y+ z = w+ in x++a = let x = y+ z = w+ in x++a = let+ x = y+ z = w+ in x++let+ x = y+ z = w in x++let+ z = w in x++a = let+ z = w+ in x++a = let z = w+ in x++f x =+ let g x = 5+ g x = 5+ in 3++f = let y = z in z++f x = let y = z in z
+ test/gibiansky/tests/4.test view
@@ -0,0 +1,36 @@+data A = B++data A = B -- ^ Hello++data A = + B -- ^ Hello++data A+ = B -- ^ Hello++data A = B | C++data A = B | C | D++data A = B | C + | D++data A = B + | C + | D++data A = B + | C + | D+ deriving Show++data A = B + | C + | D+ deriving (Show, Eq)++data A = B Int+ deriving (Show, Eq)++data A = B Int | C String+ deriving (Show, Eq)
+ test/gibiansky/tests/5.test view
@@ -0,0 +1,27 @@+data A = B { field :: Int }++data A = B { field :: Int, field2 :: Char }++data A = B { field :: Int, field2 :: Char, field3 :: String }++data A = B { field :: Int,+ field2 :: Char, field3 :: String } deriving Show++data A = B { field :: Int,+ field2 :: Char,+ field3 :: String } deriving Show++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int+ , field2 :: Char+ , field3 :: String } deriving (Show, Eq)++data A = B { field :: Int -- ^ Field 1+ }++data A = B { field :: Int, -- ^ Field 1+ field2 :: Char, -- ^ field 2+ field3 :: String } deriving Show
+ test/gibiansky/tests/6.test view
@@ -0,0 +1,41 @@+a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case + f x of+ 1 -> 1+ 2 -> 3+ 3 -> 4+ _ -> 100++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> 1+ Just x -> 3++a = case f x of+ Nothing -> do+ return 3+ Just x -> return ()++a = case f x of+ Nothing -> do+ return 3+ Just x -> do+ return 5
+ test/gibiansky/tests/7.test view
@@ -0,0 +1,30 @@+a = b+ where+ value = 3+ value' = 5++a = b where+ value = 3+ value' = 5++a = b+ where value = 3+ value' = 5++a =+ b where+ value = 3+ value' = 5++a = do+ return ()++ where+ value = 3+ value' = 5++a = do+ return ()+ where+ value = 3+ value' = 5
+ test/gibiansky/tests/8.test view
@@ -0,0 +1,24 @@+a = [1, 2, 3]++a = [1, 2+ , 3]++a = [ 1+ , 2+ , 3]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing+ ]++a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine, Nothing]++a = [ Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Just theRightAnswerWithAVeryLongLine+ , Nothing]
+ test/gibiansky/tests/9.test view
@@ -0,0 +1,19 @@+import Data.Attoparsec.ByteString+import Data.Attoparsec.Expr+import Data.ByteString (split)++import Data.Attoparsec.ByteString+import qualified Data.Attoparsec.Expr as X+import Data.ByteString (split)++main :: IO ()+main = return ()++main :: IO ()+main =+ return ()++main :: a -> b+ -> c+main =+ return ()
+ test/johan-tibell/expected/1.exp view
@@ -0,0 +1,5 @@+getGitProvider :: EventProvider GitRecord ()+getGitProvider = EventProvider+ { getModuleName = "Git"+ , getEvents = getRepoCommits+ }
+ test/johan-tibell/expected/2.exp view
@@ -0,0 +1,5 @@+strToMonth :: String -> Int+strToMonth month = case month of+ "Jan" -> 1+ "Feb" -> 2+ _ -> error $ "Unknown month " ++ month
+ test/johan-tibell/expected/3.exp view
@@ -0,0 +1,6 @@+sayHello :: IO ()+sayHello = do+ name <- getLine+ putStrLn $ greeting name+ where+ greeting name = "Hello, " ++ name ++ "!"
+ test/johan-tibell/expected/4.exp view
@@ -0,0 +1,8 @@+commitToEvent :: FolderPath -> TimeZone -> Commit -> Event.Event+commitToEvent gitFolderPath timezone commit = Event.Event+ { pluginName = getModuleName getGitProvider+ , eventIcon = "glyphicon-cog"+ , eventDate = localTimeToUTC + timezone+ (commitDate commit)+ }
+ test/johan-tibell/tests/1.test view
@@ -0,0 +1,6 @@+getGitProvider :: EventProvider GitRecord ()+getGitProvider = EventProvider+ {+ getModuleName = "Git",+ getEvents = getRepoCommits+ }
+ test/johan-tibell/tests/2.test view
@@ -0,0 +1,5 @@+strToMonth :: String -> Int+strToMonth month = case month of+ "Jan" -> 1+ "Feb" -> 2+ _ -> error $ "Unknown month " ++ month
+ test/johan-tibell/tests/3.test view
@@ -0,0 +1,6 @@+sayHello :: IO ()+sayHello = do+ name <- getLine+ putStrLn $ greeting name+ where+ greeting name = "Hello, " ++ name ++ "!"
+ test/johan-tibell/tests/4.test view
@@ -0,0 +1,7 @@+commitToEvent :: FolderPath -> TimeZone -> Commit -> Event.Event+commitToEvent gitFolderPath timezone commit = Event.Event+ {+ pluginName = getModuleName getGitProvider,+ eventIcon = "glyphicon-cog",+ eventDate = localTimeToUTC timezone (commitDate commit)+ }