diff --git a/brittany.cabal b/brittany.cabal index 89f37c7..596b474 100644 --- a/brittany.cabal +++ b/brittany.cabal @@ -24,8 +24,7 @@ extra-doc-files: README.md doc/implementation/*.md extra-source-files: - data/brittany.yaml - data/*.hs + data/*.blt source-repository head type: git @@ -144,6 +143,7 @@ test-suite brittany-test-suite build-depends: , hspec ^>= 2.8.3 + , parsec ^>= 3.1.14 hs-source-dirs: source/test-suite main-is: Main.hs type: exitcode-stdio-1.0 diff --git a/data/10-tests.blt b/data/10-tests.blt new file mode 100644 index 0000000..debf9aa --- /dev/null +++ b/data/10-tests.blt @@ -0,0 +1,1757 @@ + +############################################################################### +############################################################################### +############################################################################### +#group type signatures +############################################################################### +############################################################################### +############################################################################### + +#test simple001 +func :: a -> a + +#test long typeVar +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test keep linebreak mode +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lakjsdlkjasldkj + -> lakjsdlkjasldkj + +#test simple parens 1 +func :: ((a)) + +#test simple parens 2 +func :: (a -> a) -> a + +#test simple parens 3 +func :: a -> (a -> a) + +#test did anyone say parentheses? +func :: (((((((((()))))))))) + +-- current output is.. funny. wonder if that can/needs to be improved.. +#test give me more! +#pending nested tuples over line length +func :: ((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))) + +#test unit +func :: () + + +############################################################################### + +#test paren'd func 1 +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lakjsdlkjasldkj + -> lakjsdlkjasldkj + ) + +#test paren'd func 2 +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> (lakjsdlkjasldkj -> lakjsdlkjasldkj) + +#test paren'd func 3 +func + :: (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> lakjsdlkjasldkj) + -> lakjsdlkjasldkj + +#test paren'd func 4 +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + -> lakjsdlkjasldkj + +#test paren'd func 5 +func + :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ) + +############################################################################### + +#test type application 1 +func :: asd -> Either a b + +#test type application 2 +func + :: asd + -> Either + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application 3 +func + :: asd + -> Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application 4 +func + :: Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> asd + +#test type application 5 +func + :: Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> asd) + +#test type application 6 +func + :: Trither + asd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test type application paren 1 +func + :: asd + -> ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test type application paren 2 +func + :: asd + -> ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application paren 3 +func + :: ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> asd + +############################################################################### + +#test list simple +func :: [a -> b] + +#test list func +func + :: [ lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ] + +#test list paren +func + :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ] + +################################################################## -- ############# + +#test tuple type 1 +func :: (a, b, c) + +#test tuple type 2 +func :: ((a, b, c), (a, b, c), (a, b, c)) + +#test tuple type long +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test tuple type nested +func + :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd) + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ) + +#test tuple type function +func + :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ] +############################################################################### +#test type operator stuff +#pending HsOpTy +test050 :: a :+: b +test051 :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + :+: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd +test052 :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + :+: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +############################################################################### + +#test forall oneliner +{-# LANGUAGE ScopedTypeVariables #-} +func :: forall (a :: *) b . a -> b + +#test forall context multiline +{-# LANGUAGE ScopedTypeVariables #-} +func + :: forall m + . Foo + => ColMap2 + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> m () + +#test forall no-context multiline +{-# LANGUAGE ScopedTypeVariables #-} +func + :: forall m + . ColMap2 + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> m () + +#test forall context multiline with comments +{-# LANGUAGE RankNTypes #-} +addFlagStringParam + :: forall f out + . (Applicative f) + => String -- ^ short flag chars, i.e. "v" for -v + -> [String] -- ^ list of long names, i.e. ["verbose"] + -> String -- ^ param name + -> Flag String -- ^ properties + -> CmdParser f out String + +#test language pragma issue +{-# LANGUAGE ScopedTypeVariables #-} +func :: forall (a :: *) b . a -> b + +#test comments 1 +func :: a -> b -- comment + +#test comments 2 +funcA :: a -> b -- comment A +funcB :: a -> b -- comment B + +#test comments all +-- a +func -- b + :: -- c + a -- d + -> -- e + ( -- f + c -- g + , -- h + d -- i + ) -- j +-- k + +############################################################################### +############################################################################### +############################################################################### +#group type signatures pragmas +############################################################################### +############################################################################### +############################################################################### + +#test inline pragma 1 +func = f + where + {-# INLINE f #-} + f = id + +#test inline pragma 2 +func = ($) + where + {-# INLINE ($) #-} + ($) = id + +#test inline pragma 3 +func = f + where + {-# INLINE CONLIKE [1] f #-} + f = id + +#test noinline pragma 1 +{-# NOINLINE func #-} +func :: Int + +#test inline pragma 4 +func = f + where + {-# INLINE [~1] f #-} + f = id + + +############################################################################### +############################################################################### +############################################################################### +#group data type declarations +############################################################################### +############################################################################### +############################################################################### + +#test nullary data type +data Foo = Bar {} + +data Biz = Baz + +#test single record +data Foo = Bar + { foo :: Baz + } + +#test record multiple names +data Foo = Bar + { foo, bar :: Baz + } + +#test record multiple types +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + +#test record multiple types and names +data Foo = Bar + { foo, biz :: Baz + , bar :: Bizzz + } + +#test record multiple types deriving +data Foo = Bar + { fooz :: Baz + , bar :: Bizzz + } + deriving Show + +#test record long field names +data MyRecord = MyConstructor + { bar1, bar2 + :: Loooooooooooooooooooooooooooooooong + -> Loooooooooooooooooooooooooooooooong + , foo1, foo2 + :: Loooooooooooooooooooooooooooooooonger + -> Loooooooooooooooooooooooooooooooonger + } + +#test record with DataTypeContexts +{-# LANGUAGE DatatypeContexts #-} +data + ( LooooooooooooooooooooongConstraint a + , LooooooooooooooooooooongConstraint b + ) => + MyRecord a b + = MyConstructor + { foo1, foo2 + :: loooooooooooooooooooooooooooooooong + -> loooooooooooooooooooooooooooooooong + , bar :: a + , bazz :: b + } + +#test record single line layout +#pending config flag is disabled for now +{-# LANGUAGE ScopedTypeVariables #-} +-- brittany { lconfig_allowSinglelineRecord: true } +data MyRecord = forall a . Show a => MyCons { foo :: a -> a, i :: Int } + +#test record no matching single line layout +{-# LANGUAGE ScopedTypeVariables #-} +-- brittany { lconfig_allowSinglelineRecord: true } +data MyRecord = forall a . Show a => Bar + { foo :: abittoolongbutnotvery -> abittoolongbutnotvery + } + +#test record forall constraint multiline +{-# LANGUAGE ScopedTypeVariables #-} +data MyRecord + = forall a + . LooooooooooooooooooooongConstraint a => + LoooooooooooongConstructor + { foo :: abittoolongbutnotvery -> abittoolongbutnotvery + } + +#test record forall constraint multiline more +{-# LANGUAGE ScopedTypeVariables #-} +data MyRecord + = forall a b + . ( Loooooooooooooooooooooooooooooooong a + , Loooooooooooooooooooooooooooooooong b + ) => + MyConstructor + { a :: a + , b :: b + } + +#test plain with forall and constraint +{-# LANGUAGE ScopedTypeVariables #-} +data MyStruct + = forall a b + . ( Loooooooooooooooooooooooooooooooong a + , Loooooooooooooooooooooooooooooooong b + ) => + MyConstructor (ToBriDocM BriDocNumbered) + (ToBriDocM BriDocNumbered) + (ToBriDocM BriDocNumbered) + +#test record with many features +{-# LANGUAGE ScopedTypeVariables #-} +data MyRecord + = forall a b + . ( Loooooooooooooooooooooooooooooooong a + , Loooooooooooooooooooooooooooooooong b + ) => + MyConstructor + { foo, foo2 + :: loooooooooooooooooooooooooooooooong + -> loooooooooooooooooooooooooooooooong + , bar :: a + , bazz :: b + } + deriving Show + +#test record multiple types deriving +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + deriving (Show, Eq, Monad, Functor, Traversable, Foldable) + +#test record multiple deriving strategies +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + deriving Show + deriving (Eq, Ord) + deriving stock Show + deriving stock (Eq, Ord) + deriving anyclass Show + deriving anyclass (Show, Eq, Monad, Functor) + deriving newtype Show + deriving newtype (Traversable, Foldable) + +#test record deriving via +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + deriving ToJSON via (SomeType) + deriving (ToJSON, FromJSON) via (SomeType) + +#test single record existential +{-# LANGUAGE ExistentialQuantification #-} + +data Foo = forall a . Show a => Bar + { foo :: a + } + +#test record multiple types existential +{-# LANGUAGE ExistentialQuantification #-} + +data Foo = forall a b . (Show a, Eq b) => Bar + { foo :: a + , bars :: b + } + +#test plain comment simple +-- before +data MyData = MyData Int +-- after + +#test record newline comment +data MyRecord = MyRecord + { a :: Int + -- comment + , b :: Int + } + +#test record comments simple +data Foo = Bar -- a + { foo :: Baz -- b + , bars :: Bizzz -- c + } -- d + deriving (Show, Eq, Monad, Functor, Traversable, Foldable) -- e + +#test record comments strange inline +data Foo = Bar + { -- a + foo -- b + :: -- c + Baz -- d + , -- e + bars :: Bizzz + } + deriving (Show, Eq, Monad, Functor, Traversable, Foldable) + +#test record comments in deriving +## maybe we want to switch to a differnt layout when there are such comments. +## Don't hesitate to modify this testcase, it clearly is not the ideal layout +## for this. + +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + -- a + deriving --b + ( -- c + ToJSON -- d + , -- e + FromJSON --f + ) -- g + +#test record comments in deriving via +## maybe we want to switch to a differnt layout when there are such comments. +## Don't hesitate to modify this testcase, it clearly is not the ideal layout +## for this. + +data Foo = Bar + { foo :: Baz + , bars :: Bizzz + } + -- a + deriving --a + ToJSON --b + via -- c + ( -- d + SomeType --e + , -- f + ABC --g + ) + +#test comment before equal sign +{-# LANGUAGE ExistentialQuantification #-} +data MyRecord + -- test comment + = forall a b + . ( Loooooooooooooooooooooooooooooooong a + , Loooooooooooooooooooooooooooooooong b + ) => + MyConstructor a b + +#test normal records on multi line indent policy left +-- brittany {lconfig_indentPolicy: IndentPolicyLeft } +data EnterpriseGrantsForCompanyResponse = EnterpriseGrantsForCompanyResponse + Types.Company + [EnterpriseGrantResponse] + +#test normal records on multi line indent policy free +-- brittany {lconfig_indentPolicy: IndentPolicyFree } +data GrantsForCompanyResp = GrantsForCompanyResp Types.Company + [EnterpriseGrantResponse] + +#test normal records on multi line indent policy free 2 +-- brittany {lconfig_indentPolicy: IndentPolicyFree } +data EnterpriseGrantsForCompanyResponse = EnterpriseGrantsForCompanyResponse + Types.Company + [EnterpriseGrantResponse] + +#test normal records on multi line indent policy multiple +-- brittany {lconfig_indentPolicy: IndentPolicyMultiple } +data GrantsForCompanyResp = GrantsForCompanyResp Types.Company + [EnterpriseGrantResponse] + +#test large record with a comment +data XIILqcacwiuNiu = XIILqcacwiuNiu + { oyyFtvbepgbOge_pebzVmuftEijwuj :: Jgtoyuh HessJvNlo + , wloQsiskdoxJop_xatiKrwedOxtu :: Jgtoyuh [Inotg] + , mmmJjcqtemyIyo_ovosDoreKeeoyamvove :: Jgtoyuh Eujo + , mbiIatelofxOzr_uluxNngiiMjah :: Jgtoyuh HessJvNlo + , obxIskfcxpkIkb_uuviTuevcSkrgo :: Jgtoyuh Int + , wqrAtuvuecoHwr_ilotNxbuPleo :: Jgtoyuh Ufaxdeq + , lofAfuebdhpLuv_cnekPoyFxmg :: Jgtoyuh Ufaxdeq + , ouoFugtawzvUpk_oupiLzptugy :: Jgtoyuh Eujo + , iqiXjtziwogNsa_uiyvSunaTtgUsf3 :: Jgtoyuh Oaivn + , odbIriaqnojUlz_onotoWuunehIpuy :: Jgtoyuh Eujo + , opjUxtkxzkiKse_luqjuZazt + :: Jgtoyuh [(Eujo, Int, Int, Int, Int, Int, NELUxro)] + -- , jcqRaqznxfhIpa_ywevMezmoYkutuwa :: Jgtoyuh () + , vayOmuasyphOfd_bcsVljmvt :: Jgtoyuh Eujo + , rifArahilooRax_ufikecqdImsv :: Jgtoyuh Oaivn + , raqKtopcpszDwb_oqocubasZuqjcryoDojGkw :: Jgtoyuh Oaivn + , mluJiilpcijUtt_gaisklifVekfeyagRmfbyzz :: Jgtoyuh Oaivn + , oqhPaahjupaSmi_gamwwoovKyxznecvEayluc :: Jgtoyuh Oaivn + , mazFubimwebZpa_itidehDodiDlboz :: Jgtoyuh Vrep + , jeyOcuesexaYoy_vpqn :: Jgtoyuh () + } + +############################################################################### +############################################################################### +############################################################################### +#group equation.basic +############################################################################### +############################################################################### +############################################################################### +## some basic testing of different kinds of equations. +## some focus on column layouting for multiple-equation definitions. +## (that part probably is not implemented in any way yet.) + +#test basic 1 +func x = x + +#test infix 1 +x *** y = x + +#test symbol prefix +(***) x y = x + +#test infix more args simple +(f >=> g) k = f k >>= g + +#test infix more args alignment +(Left a <$$> Left dd) e f = True +(Left a <$$> Right d ) e f = True +(Right a <$$> Left d ) e f = False +(Right a <$$> Right dd) e f = True + + +############################################################################### +############################################################################### +############################################################################### +#group equation.patterns +############################################################################### +############################################################################### +############################################################################### + +#test wildcard +func _ = x + +#test simple long pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable = + x + +#test simple multiline pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable + = x + +#test another multiline pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable a b + = x + +#test simple constructor +func (A a) = a + +#test list constructor +func (x : xr) = x + +#test some other constructor symbol +func (x :+: xr) = x + +#test normal infix constructor +func (x `Foo` xr) = x + + +############################################################################### +############################################################################### +############################################################################### +#group equation.guards +############################################################################### +############################################################################### +############################################################################### +#test simple guard +func | True = x + +#test multiple-clauses-1 +func x | x = simple expression + | otherwise = 0 + +#test multiple-clauses-2 +func x + | a somewhat longer guard x = "and a somewhat longer expession that does not" + | otherwise = "fit without putting the guards in new lines" + +#test multiple-clauses-3 +func x + | very long guard, another rather long guard that refers to x = nontrivial + expression + foo + bar + alsdkjlasdjlasj + | otherwise = 0 + +#test multiple-clauses-4 +func x + | very long guard, another rather long guard that refers to x + = nontrivialexpression foo bar alsdkjlasdjlasj + | otherwise + = 0 + +#test multiple-clauses-5 +func x + | very loooooooooooooooooooooooooooooong guard + , another rather long guard that refers to x + = nontrivial expression foo bar alsdkjlasdjlasj + | otherwise + = 0 + + +############################################################################### +############################################################################### +############################################################################### +#group expression.basic +############################################################################### +############################################################################### +############################################################################### + +#test var +func = x + +describe "infix op" $ do +#test 1 +func = x + x + +#test long +func = + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + +#test long keep linemode 1 +func = + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksj + +#test long keep linemode 2 +func = + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + +#test literals +func = 1 +func = "abc" +func = 1.1e5 +func = 'x' +func = 981409823458910394810928414192837123987123987123 + +#test lambda +func = \x -> abc + +describe "app" $ do +#test 1 +func = klajsdas klajsdas klajsdas + +#test 2 +func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + +#test 3 +func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd lakjsdlajsdljas + lakjsdlajsdljas + lakjsdlajsdljas + +### +#group expression.basic.sections +### + +#test left +func = (1 +) + +#test right +func = (+ 1) + +#test left inf +func = (1 `abc`) + +#test right inf +func = (`abc` 1) + +### +#group tuples +### + +#test pair +func = (abc, def) + +#test pair section left +func = (abc, ) + +#test pair section right +func = (, abc) + +#test quintuple section long +myTupleSection = + ( verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargefirstelement + , + , verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargethirdelement + , + ) + +#test 2 +func = + ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + ) + +#test comment-after-then +foo = if True + then + -- iiiiii + "a " + else + "b " + +#test comment-after-if-else-do +func = if cond + then pure 42 + else do + -- test + abc + +#test nonempty-case-short +func = case x of + False -> False + True -> True + +#test nonempty-case-long +func = + case + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + of + False -> False + True -> True + +#test nonempty-case-long-do +func = do + case + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + of + False -> False + True -> True + +#test empty-case-short +func = case x of {} + +#test empty-case-long +func = + case + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + of {} + +#test empty-case-long-do +func = do + case + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + of {} + +############################################################################### +############################################################################### +############################################################################### +#group expression.do statements +############################################################################### +############################################################################### +############################################################################### + +#test simple +func = do + stmt + stmt + +#test bind +func = do + x <- stmt + stmt x + +#test let +func = do + let x = 13 + stmt x + + +############################################################################### +############################################################################### +############################################################################### +#group expression.lists +############################################################################### +############################################################################### +############################################################################### + +#test monad-comprehension-case-of +func = + foooooo + $ [ case + foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + of + _ -> True + ] + +############################################################################### +############################################################################### +############################################################################### +#group expression.let +############################################################################### +############################################################################### +############################################################################### + +#test single-bind-comment-long +testMethod foo bar baz qux = + let x = undefined foo bar baz qux qux baz bar :: String + -- some comment explaining the in expression + in undefined foo x :: String + +#test single-bind-comment-short +testMethod foo bar baz qux = + let x = undefined :: String + -- some comment explaining the in expression + in undefined :: String + +#test single-bind-comment-before +testMethod foo bar baz qux = + -- some comment explaining the in expression + let x = undefined :: String in undefined :: String + +#test multiple-binds-comment +foo foo bar baz qux = + let a = 1 + b = 2 + c = 3 + -- some comment explaining the in expression + in undefined :: String + + +############################################################################### +############################################################################### +############################################################################### +#group stylisticspecialcases +############################################################################### +############################################################################### +############################################################################### + +#test operatorprefixalignment-even-with-multiline-alignbreak +func = + foo + $ [ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + , bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + ] + ++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc] + + +############################################################################### +############################################################################### +############################################################################### +#group module +############################################################################### +############################################################################### +############################################################################### + +#test simple +module Main where + +#test no-exports +module Main () where + +#test one-export +module Main (main) where + +#test several-exports +module Main (main, test1, test2) where + +#test many-exports +module Main + ( main + , test1 + , test2 + , test3 + , test4 + , test5 + , test6 + , test7 + , test8 + , test9 + ) where + +#test exports-with-comments +module Main + ( main + -- main + , test1 + , test2 + -- Test 3 + , test3 + , test4 + -- Test 5 + , test5 + -- Test 6 + ) where + +#test simple-export-with-things +module Main (Test(..)) where + +#test simple-export-with-module-contents +module Main (module Main) where + +#test export-with-things +module Main (Test(Test, a, b)) where + +#test export-with-things-comment +-- comment1 + +module Main + ( Test(Test, a, b) + , foo -- comment2 + ) -- comment3 + where + +#test export-with-empty-thing +module Main (Test()) where + +#test empty-with-comment +-- Intentionally left empty + +############################################################################### +############################################################################### +############################################################################### +#group module.import +############################################################################### +############################################################################### +############################################################################### + +#test simple-import +import Data.List + +#test simple-import-alias +import Data.List as L + +#test simple-qualified-import +import qualified Data.List + +#test simple-qualified-import-alias +import qualified Data.List as L + +#test simple-safe +import safe Data.List as L + +#test simple-source +import {-# SOURCE #-} Data.List ( ) + +#test simple-safe-qualified +import safe qualified Data.List + +#test simple-safe-qualified-source +import {-# SOURCE #-} safe qualified Data.List + +#test simple-qualified-package +import qualified "base" Data.List + +#test qualifier-effect +import {-# SOURCE #-} safe qualified "base" Data.List as L +import {-# SOURCE #-} safe qualified "base" Data.List ( ) +import {-# SOURCE #-} safe qualified Data.List hiding ( ) + +#test instances-only +import qualified Data.List ( ) + +#test one-element +import Data.List ( nub ) + +#test several-elements +import Data.List ( foldl' + , indexElem + , nub + ) + +#test a-ridiculous-amount-of-elements +import Test ( Long + , anymore + , fit + , items + , line + , list + , not + , onA + , quite + , single + , that + , will + , with + ) + +#test with-things +import Test ( (+) + , (:!)(..) + , (:*)((:.), T7, t7) + , (:.) + , T + , T2() + , T3(..) + , T4(T4) + , T5(T5, t5) + , T6((<|>)) + ) + +#test hiding +import Test hiding ( ) +import Test as T + hiding ( ) + +#test import-hiding-many +import Prelude as X + hiding ( head + , init + , last + , maximum + , minimum + , pred + , read + , readFile + , succ + , tail + , undefined + ) + +#test long-module-name-simple +import TestJustAbitToLongModuleNameLikeThisOneIs + ( ) +import TestJustShortEnoughModuleNameLikeThisOne ( ) + +#test long-module-name-as +import TestJustAbitToLongModuleNameLikeThisOneI + as T +import TestJustShortEnoughModuleNameLikeThisOn as T + +#test long-module-name-hiding +import TestJustAbitToLongModuleNameLikeTh + hiding ( ) +import TestJustShortEnoughModuleNameLike hiding ( ) + +#test long-module-name-simple-items +import MoreThanSufficientlyLongModuleNameWithSome + ( compact + , fit + , inA + , items + , layout + , not + , that + , will + ) + +#test long-module-name-hiding-items +import TestJustAbitToLongModuleNameLikeTh + hiding ( abc + , def + , ghci + , jklm + ) +import TestJustShortEnoughModuleNameLike hiding ( abc + , def + , ghci + , jklm + ) + +#test long-module-name-other +import {-# SOURCE #-} safe qualified "qualifier" A hiding ( ) +import {-# SOURCE #-} safe qualified "qualifiers" A + hiding ( ) +import {-# SOURCE #-} safe qualified "qualifiers" AlsoAf as T +import {-# SOURCE #-} safe qualified "qualifiers" AlsoAff ( ) +import {-# SOURCE #-} safe qualified "qualifiers" AlsoAff + as T +import {-# SOURCE #-} safe qualified "qualifiers" AlsoAffe + ( ) + +#test import-with-comments +-- Test +import Data.List ( nub ) -- Test +{- Test -} +import qualified Data.List as L + ( foldl' ) {- Test -} + +-- Test +import Test ( test ) + +#test import-with-comments-2 + +import Test ( abc + , def + -- comment + ) + +#test import-with-comments-3 + +import Test ( abc + -- comment + ) + +#test import-with-comments-4 +import Test ( abc + -- comment + , def + , ghi + {- comment -} + , jkl + -- comment + ) + +#test import-with-comments-5 +import Test ( -- comment + ) + +#test long-bindings +import Test ( longbindingNameThatoverflowsColum + ) +import Test ( Long + ( List + , Of + , Things + ) + ) + +#test things-with-with-comments +import Test ( Thing + ( -- Comments + ) + ) +import Test ( Thing + ( Item + -- and Comment + ) + ) +import Test ( Thing + ( With + -- Comments + , and + -- also + , items + -- ! + ) + ) +#test prefer-dense-empty-list +import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine + ( ) + +#test preamble full-preamble +{-# LANGUAGE BangPatterns #-} + +{- + - Test module + -} +module Test + ( test1 + -- ^ test + , test2 + -- | test + , test3 + , test4 + , test5 + , test6 + , test7 + , test8 + , test9 + , test10 + -- Test 10 + ) where + +-- Test +import Data.List ( nub ) -- Test +{- Test -} +import qualified Data.List as L + ( foldl' ) {- Test -} + +-- Test +import Test ( test ) + +#test sorted-imports +import Aaa +import Baa + +#test sorted-import-groups +import Zaa +import Zab + +import Aaa +import Baa + +#test sorted-qualified-imports +import Boo +import qualified Zoo + +#test imports-groups-same-module +import Boo ( a ) + +import Boo ( b ) + +#test sorted-imports-nested +import A.B.C +import A.B.D + +############################################################################### +############################################################################### +############################################################################### +#group type synonyms +############################################################################### +############################################################################### +############################################################################### + +#test simple-synonym + +type MySynonym = String + +#test parameterised-synonym + +type MySynonym a = [a] + +#test long-function-synonym + +-- | Important comment thrown in +type MySynonym b a + = MySynonym a b -> MySynonym a b -> MyParamType a b -> MyParamType a b + +#test overflowing-function-synonym + +type MySynonym3 b a + = MySynonym a b + -> MySynonym a b + -- ^ RandomComment + -> MyParamType a b + -> MyParamType a b + -> MySynonym2 b a + +#test synonym-with-kind-sig + +{-# LANGUAGE StarIsType #-} + +type MySynonym (a :: * -> *) + = MySynonym a b + -> MySynonym a b + -> MyParamType a b + -> MyParamType a b + -> MySynonym2 b a + +#test synonym-with-constraint + +type MySynonym a = Num a => a -> Int + +#test synonym-overflowing-with-constraint + +type MySynonym a + = Num a + => AReallyLongTypeName + -> AnotherReallyLongTypeName + -> AThirdTypeNameToOverflow + +#test synonym-forall + +{-# LANGUAGE RankNTypes #-} + +type MySynonym = forall a . [a] + +#test synonym-operator + +type (:+:) a b = (a, b) + +#test synonym-infix + +type a `MySynonym` b = a -> b + +#test synonym-infix-operator + +type a :+: b = (a, b) + +#test synonym-infix-parens + +type (a `Foo` b) c = (a, b, c) + +#test synonym-comments + +type Foo a -- fancy type comment + = -- strange comment + Int + +#test synonym-type-operators +type (a :+: b) = (a, b) + +#test synonym-multi-parens +#pending loses extra parens + +type ((a :+: b) c) = (a, c) + +#test synonym-tuple-type-many-comments + +type Foo + = ( -- t1 + A -- t2 + , -- t3 + B -- t4 + ) -- t5 + +############################################################################### +############################################################################### +############################################################################### +#group class.instance +############################################################################### +############################################################################### +############################################################################### + +#test simple-instance + +instance MyClass Int where + myMethod x = x + 1 + +#test simple-method-comment + +instance MyClass Int where + myMethod x = + -- insightful comment + x + 1 + +#test simple-method-signature + +instance MyClass Int where + myMethod :: Int -> Int + myMethod x = x + 1 + +#test simple-long-method-signature + +instance MyClass Int where + myMethod + :: Int + -> Int + -> AReallyLongType + -> AReallyLongType + -> AReallyLongType + -> Int + myMethod x = x + 1 + +#test simple-two-methods + +instance MyClass Int where + myMethod x = x + 1 + myMethod2 x = x + 1 + +#test simple-two-signatures + +instance MyClass Int where + myMethod + :: Int + -> Int + -> AReallyLongType + -> AReallyLongType + -> AReallyLongType + -> Int + myMethod x = x + 1 + + myMethod2 :: Int -> Int + myMethod2 x = x + 1 + +#test simple-instance-comment + +-- | This instance should be commented on +instance MyClass Int where + + -- | This method is also comment-worthy + myMethod x = x + 1 + +#test instance-with-type-family + +instance MyClass Int where + type MyType = Int + + myMethod :: MyType -> Int + myMethod x = x + 1 + +#test instance-with-type-family-below-method + +instance MyClass Int where + + type MyType = String + + myMethod :: MyType -> Int + myMethod x = x + 1 + + type MyType = Int + +#test instance-with-data-family + +instance MyClass Int where + + -- | This data is very important + data MyData = IntData + { intData :: String + , intData2 :: Int + } + + myMethod :: MyData -> Int + myMethod = intData2 + +#test instance-with-data-family-below-method + +instance MyClass Int where + -- | This data is important + data MyData = Test Int Int + + myMethod :: MyData -> Int + myMethod = intData2 + + -- | This data is also important + data MyData2 = IntData + { intData :: String + -- ^ Interesting field + , intData2 :: Int + } + +#test instance-with-newtype-family-and-deriving + +{-# LANGUAGE TypeFamilies #-} + +module Lib where + +instance Foo () where + newtype Bar () = Baz () + deriving (Eq, Ord, Show) + bar = Baz + +#test instance-with-newtype-family-and-record + +instance Foo Int where + newtype Bar Int = BarInt + { unBarInt :: Int + } + +############################################################################### +############################################################################### +############################################################################### +#group gh-357 +############################################################################### +############################################################################### +############################################################################### + +#test type-instance-without-comment + +{-# language TypeFamilies #-} +type family F a +type instance F Int = IO Int + +#test type-instance-with-comment + +{-# language TypeFamilies #-} +type family F a +type instance F Int = IO Int -- x + +#test type-instance-with-module-header + +{-# language TypeFamilies #-} +module M where +type family F a +type instance F Int = IO Int + +#test newtype-instance-without-comment + +{-# language TypeFamilies #-} +data family F a +newtype instance F Int = N Int + +#test newtype-instance-with-comment + +{-# language TypeFamilies #-} +data family F a +newtype instance F Int = N Int -- x + +#test newtype-instance-with-module-header + +{-# language TypeFamilies #-} +module M where +data family F a +newtype instance F Int = N Int + +#test data-instance-without-comment + +{-# language TypeFamilies #-} +data family F a +data instance F Int = D Int + +#test data-instance-with-comment + +{-# language TypeFamilies #-} +data family F a +data instance F Int = D Int -- x + +#test data-instance-with-module-header + +{-# language TypeFamilies #-} +module M where +data family F a +data instance F Int = D Int + +#test instance-type-without-comment + +{-# language TypeFamilies #-} +class C a where + type family F a +instance C Int where + type F Int = IO Int + +#test instance-type-with-comment + +{-# language TypeFamilies #-} +class C a where + type family F a +instance C Int where + type F Int = IO Int -- x + +#test instance-type-with-module-header + +{-# language TypeFamilies #-} +module M where +class C a where + type family F a +instance C Int where + type F Int = IO Int + +#test instance-newtype-without-comment + +{-# language TypeFamilies #-} +class C a where + data family F a +instance C Int where + newtype F Int = N Int + +#test instance-newtype-with-comment + +{-# language TypeFamilies #-} +class C a where + data family F a +instance C Int where + newtype F Int = N Int -- x + +#test instance-newtype-with-module-header + +{-# language TypeFamilies #-} +module M where +class C a where + data family F a +instance C Int where + newtype F Int = N Int + +#test instance-data-without-comment + +{-# language TypeFamilies #-} +class C a where + data family F a +instance C Int where + data F Int = D Int + +#test instance-data-with-comment + +{-# language TypeFamilies #-} +class C a where + data family F a +instance C Int where + data F Int = D Int -- x + +#test instance-data-with-module-header + +{-# language TypeFamilies #-} +module M where +class C a where + data family F a +instance C Int where + data F Int = D Int + +############################################################################### +############################################################################### +############################################################################### +#group whitespace-newlines +############################################################################### +############################################################################### +############################################################################### + +#test module-import-newlines + +module Main where + +import Prelude + +firstDecl = True + +#test function-where-newlines + +func = do + + -- complex first step + aaa + + -- complex second step + bbb + + where + + helper :: Helper + helper = helpful + + other :: Other + other = True + + +############################################################################### +############################################################################### +############################################################################### +#group typefam.instance +############################################################################### +############################################################################### +############################################################################### + +#test simple-typefam-instance + +type instance MyFam Bool = String + +#test simple-typefam-instance-param-type + +type instance MyFam (Maybe a) = a -> Bool + +#test simple-typefam-instance-parens +#pending the parens cause problems since ghc-8.8 + +type instance (MyFam (String -> Int)) = String + +#test simple-typefam-instance-overflow + +type instance MyFam ALongishType + = AMuchLongerTypeThanThat + -> AnEvenLongerTypeThanTheLastOne + -> ShouldDefinitelyOverflow + +#test simple-typefam-instance-comments + +-- | A happy family +type instance MyFam Bool -- This is an odd one + = AnotherType -- Here's another + +#test simple-typefam-instance-parens-comment +#pending the parens cause problems since ghc-8.8 + +-- | A happy family +type instance (MyFam Bool) -- This is an odd one + = -- Here's another + AnotherType diff --git a/data/14-extensions.blt b/data/14-extensions.blt new file mode 100644 index 0000000..18fc24f --- /dev/null +++ b/data/14-extensions.blt @@ -0,0 +1,241 @@ +############################################################################### +############################################################################### +############################################################################### +#group extensions +############################################################################### +############################################################################### +############################################################################### + +############################################################################### +## MultiWayIf +#test multiwayif 1 +{-# LANGUAGE MultiWayIf #-} +func = if + | cond1 -> loooooooooooooooooooooooooooooong expr1 + | cond2 -> loooooooooooooooooooooooooooooong expr2 + +#test multiwayif 2 +{-# LANGUAGE MultiWayIf #-} +func = do + foo + bar $ if + | cond1 -> loooooooooooooooooooooooooooooong expr1 + | cond2 -> loooooooooooooooooooooooooooooong expr2 + + +############################################################################### +## LambdaCase +#test lambdacase 1 +{-# LANGUAGE LambdaCase #-} +func = \case + FooBar -> x + Baz -> y + + + +############################################################################### +## ImplicitParams +#test ImplicitParams 1 +{-# LANGUAGE ImplicitParams #-} +func :: (?asd::Int) -> () + +#test ImplicitParams 2 +{-# LANGUAGE ImplicitParams #-} +func + :: ( ?asd + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + -> () + + +############################################################################### +## RecursiveDo +#test recursivedo 1 +{-# LANGUAGE RecursiveDo #-} +foo = do + rec a <- f b + b <- g a + return (a, b) + +#test recursivedo 2 +{-# LANGUAGE RecursiveDo #-} +foo = do + rec -- comment + a <- f b + b <- g a + return (a, b) + +############################################################################### +## ExplicitNamespaces + PatternSynonyms +#test explicitnamespaces_patternsynonyms export +{-# LANGUAGE ExplicitNamespaces #-} +{-# LANGUAGE PatternSynonyms #-} +module Test (type (++), (++), pattern Foo) where + +#test explicitnamespaces_patternsynonyms import +{-# LANGUAGE ExplicitNamespaces #-} +{-# LANGUAGE PatternSynonyms #-} +import Test ( type (++) + , (++) + , pattern (:.) + , pattern Foo + ) + +############################################################################### +## PatternSynonyms +#test bidirectional pattern +{-# LANGUAGE PatternSynonyms #-} +pattern J x = Just x + +#test unidirection pattern +{-# LANGUAGE PatternSynonyms #-} +pattern F x <- (x, _) + +#test explicitly bidirectional pattern +{-# LANGUAGE PatternSynonyms #-} +pattern HeadC x <- x : xs where + HeadC x = [x] + +#test Multiple arguments +{-# LANGUAGE PatternSynonyms #-} +pattern Head2 x y <- x : y : xs where + Head2 x y = [x, y] + +#test Infix argument +{-# LANGUAGE PatternSynonyms #-} +pattern x :> y = [x, y] + +#test Record argument +{-# LANGUAGE PatternSynonyms #-} +pattern MyData { a, b, c } = [a, b, c] + +#test long pattern match +{-# LANGUAGE PatternSynonyms #-} +pattern myLongLeftVariableName `MyLongInfixPatternMatcher` myLongRightVariableName = + [myLongLeftVariableName, myLongRightVariableName] + +#test long explicitly bidirectional match +{-# LANGUAGE PatternSynonyms #-} +pattern myLeftVariableName `MyInfixPatternMatcher` myRightVariableName <- + [myLongLeftVariableName, myLongRightVariableName] where + MyInfixPatternMatcher x y = [x, x, y] + +#test Pattern synonym types +{-# LANGUAGE PatternSynonyms #-} +pattern J :: a -> Maybe a +pattern J x = Just x + +#test pattern synonym bidirectional multiple cases +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ViewPatterns #-} +pattern Signed x <- (asSigned -> x) where + Signed (Neg x) = -x + Signed Zero = 0 + Signed (Pos x) = x + +#test pattern synonym bidirectional multiple cases long +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ViewPatterns #-} +pattern Signed xxxxxxxxxxxxxxxxxxxxxxxx <- + (asSigned -> xxxxxxxxxxxxxxxxxxxxxxxx) where + Signed (Neg x) = -x + Signed Zero = 0 + Signed (Pos x) = x + +#test pattern synonym bidirectional multiple cases with comments +{-# LANGUAGE PatternSynonyms #-} +{-# LANGUAGE ViewPatterns #-} +pattern Signed x <- (asSigned -> x) where + Signed (Neg x) = -x -- negative comment + Signed Zero = 0 -- zero comment + Signed (Pos x) = x -- positive comment + +#test Pattern synonym types multiple names +{-# LANGUAGE PatternSynonyms #-} +pattern J, K :: a -> Maybe a + +#test Pattern synonym type sig wrapped +{-# LANGUAGE PatternSynonyms #-} +pattern LongMatcher + :: longlongtypevar + -> longlongtypevar + -> longlongtypevar + -> Maybe [longlongtypevar] +pattern LongMatcher x y z = Just [x, y, z] + + +############################################################################### +## UnboxedTuples + MagicHash +#test unboxed-tuple and vanilla names +{-# LANGUAGE UnboxedTuples #-} +spanKey :: (# Int, Int #) -> (# Int, Int #) +spanKey = case foo of + (# bar, baz #) -> (# baz, bar #) + +#test unboxed-tuple and hashed name +{-# LANGUAGE MagicHash, UnboxedTuples #-} +spanKey :: (# Int#, Int# #) -> (# Int#, Int# #) +spanKey = case foo of + (# bar#, baz# #) -> (# baz# +# bar#, bar# #) + + +############################################################################### +## QuasiQuotes +#test quasi-quotes simple 1 +{-# LANGUAGE QuasiQuotes #-} +func = [blub| + asd + qwe + |] + +#test quasi-quotes simple 2 +{-# LANGUAGE QuasiQuotes #-} +func = [blub| + asd + qwe|] + +#test quasi-quotes ignoring layouting +{-# LANGUAGE QuasiQuotes #-} +func = do + let body = [json| + hello + |] + pure True + +#test quasi-quotes ignoring layouting, strict mode +-- brittany { lconfig_allowHangingQuasiQuotes: False } +{-# LANGUAGE QuasiQuotes #-} +func = do + let + body = + [json| + hello + |] + pure True + +############################################################################### +## OverloadedLabels +#test bare label +{-# LANGUAGE OverloadedLabels #-} +foo = #bar + +#test applied and composed label +{-# LANGUAGE OverloadedLabels #-} +foo = #bar . #baz $ fmap #foo xs + +############################################################################### +## ImplicitParams + +#test IP usage +{-# LANGUAGE ImplicitParams #-} +foo = ?bar + +#test IP binding +{-# LANGUAGE ImplicitParams #-} +foo = let ?bar = Foo in value + +#test IP type signature +{-# LANGUAGE ImplicitParams #-} +foo :: (?bar::Bool) => () +foo = () diff --git a/data/15-regressions.blt b/data/15-regressions.blt new file mode 100644 index 0000000..9a6b623 --- /dev/null +++ b/data/15-regressions.blt @@ -0,0 +1,874 @@ +############################################################################### +############################################################################### +############################################################################### +#group regression +############################################################################### +############################################################################### +############################################################################### + +#test newlines-comment +func = do + abc <- foo + +--abc +return () + +#test parenthesis-around-unit +func = (()) + +#test let-defs indentation +func = do + let foo True = True + foo _ = False + return () + +#test record update indentation 1 +func = do + s <- mGet + mSet $ s { _lstate_indent = _lstate_indent state } + +#test record update indentation 2 +func = do + s <- mGet + mSet $ s { _lstate_indent = _lstate_indent state + , _lstate_foo = _lstate_foo state + } + +#test record update indentation 3 +func = do + s <- mGet + mSet $ s + { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test record construction 1 +func = Foo { _lstate_indent = _lstate_indent state } + +#test record construction 2 +func = Foo + { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_fooo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test record construction 3 +func = do + Foo { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test post-indent comment +func = do +-- abc + -- def + return () + +#test post-unindent comment +func = do + do + return () + -- abc + -- def + return () + +#test CPP empty comment case +#pending CPP parsing needs fixing for roundTripEqual +{-# LANGUAGE CPP #-} +module Test where +func = do +#if FOO + let x = 13 +#endif + stmt x + +## really, the following should be handled by forcing the Alt to multiline +## because there are comments. as long as this is not implemented though, +## we should ensure the trivial solution works. +#test comment inline placement (temporary) +func + :: Int -- basic indentation amount + -> Int -- currently used width in current line (after indent) + -- used to accurately calc placing of the current-line + -> LayoutDesc + -> Int + +#test some indentation thingy +func = + ( lkjadljasldjalskdjaldjalsdjkalsdjlaksdjlasjdlajsaldskj + $ abc + $ def + $ ghi + $ jkl + ) + +#test parenthesized operator +buildG bounds0 edges0 = accumArray (flip (:)) [] bounds0 (map reassoc edges0) + where reassoc (v, e, w) = (v, (e, w)) + +#test record pattern matching stuff +downloadRepoPackage = case repo of + RepoLocal {..} -> return () + RepoLocal { abc } -> return () + RepoLocal{} -> return () + +#test do let comment indentation level problem +func = do + let (primaryPkg, otherPkgs) = selectPrimaryLocalPackage pwd pkgs' + (bproblems, x) = resolveBuildTargets primaryPkg otherPkgs utargets'' + -- default local dir target if there's no given target + utargets'' = "foo" + return () + +#test list comprehension comment placement +func = + [ (thing, take 10 alts) --TODO: select best ones + | (thing, _got, alts@(_ : _)) <- nosuchFooThing + , gast <- award + ] + +#test if-then-else comment placement +func = if x + then if y -- y is important + then foo + else bar + else Nothing + +#test qualified infix pattern +wrapPatPrepend pat prepElem = do + patDocs <- layoutPat pat + case Seq.viewl patDocs of + Seq.EmptyL -> return $ Seq.empty + x1 Seq.:< xR -> do + x1' <- docSeq [prepElem, return x1] + return $ x1' Seq.<| xR + +#test type signature multiline forcing issue +layoutWriteNewlineBlock + :: ( MonadMultiWriter Text.Builder.Builder m + , MonadMultiState LayoutState m + , MonadMultiWriter (Seq String) m + ) + => m () + +#test multiwayif proper indentation +{-# LANGUAGE MultiWayIf #-} +readMergePersConfig path shouldCreate conf = do + exists <- liftIO $ System.Directory.doesFileExist path + if + | exists -> do + contents <- liftIO $ ByteString.readFile path -- no lazy IO, tyvm. + fileConf <- case Data.Yaml.decodeEither contents of + Left e -> do + liftIO + $ putStrErrLn + $ "error reading in brittany config from " + ++ path + ++ ":" + liftIO $ putStrErrLn e + mzero + Right x -> return x + return $ fileConf Semigroup.<> conf + | shouldCreate -> do + liftIO $ ByteString.writeFile path $ Data.Yaml.encode $ cMap + (Option . Just . runIdentity) + staticDefaultConfig + return $ conf + | otherwise -> do + return conf + +#test nested pattern alignment issue" +func = BuildReport + where + convertInstallOutcome = case result of + Left BR.PlanningFailed -> PlanningFailed + Left (BR.DependentFailed p) -> DependencyFailed p + Left (BR.DownloadFailed _) -> DownloadFailed + Left (BR.UnpackFailed _) -> UnpackFailed + Left (BR.ConfigureFailed _) -> ConfigureFailed + Left (BR.BuildFailed _) -> BuildFailed + Left (BR.TestsFailed _) -> TestsFailed + Left (BR.InstallFailed _) -> InstallFailed + Right (BR.BuildOk _ _ _ ) -> InstallOk + +#test nested pattern alignment issue" +func = BuildReport + where + convertInstallOutcome = case result of + Left BR.PlanningFailed -> PlanningFailed + Left (BR.DependentFailed p) -> DependencyFailed p + Left (BR.DownloadFailed _) -> DownloadFailed + Left (BR.UnpackFailed _) -> UnpackFailed + Left (BR.ConfigureFailed _) -> ConfigureFailed + Left (BR.BuildFailed _) -> BuildFailed + Left (BR.TestsFailed _) -> TestsFailed + Left (BR.InstallFailed _) -> InstallFailed + Right (BR.BuildOk _ _ _ ) -> InstallOk + +#test partially overflowing alignment issue" +showPackageDetailedInfo pkginfo = + renderStyle (style { lineLength = 80, ribbonsPerLine = 1 }) + $ char '*' + $+$ something + [ entry "Synopsis" synopsis hideIfNull reflowParagraphs + , entry "Versions available" + sourceVersions + (altText null "[ Not available from server ]") + (dispTopVersions 9 (preferredVersions pkginfo)) + , entry + "Versions installed" + installedVersions + (altText + null + (if hasLib pkginfo then "[ Not installed ]" else "[ Unknown ]") + ) + (dispTopVersions 4 (preferredVersions pkginfo)) + , entry "Homepage" homepage orNotSpecified text + , entry "Bug reports" bugReports orNotSpecified text + , entry "Description" description hideIfNull reflowParagraphs + , entry "Category" category hideIfNull text + , entry "License" license alwaysShow disp + , entry "Author" author hideIfNull reflowLines + , entry "Maintainer" maintainer hideIfNull reflowLines + , entry "Source repo" sourceRepo orNotSpecified text + , entry "Executables" executables hideIfNull (commaSep text) + , entry "Flags" flags hideIfNull (commaSep dispFlag) + , entry "Dependencies" dependencies hideIfNull (commaSep dispExtDep) + , entry "Documentation" haddockHtml showIfInstalled text + , entry "Cached" haveTarball alwaysShow dispYesNo + , if not (hasLib pkginfo) + then empty + else text "Modules:" + $+$ nest 4 (vcat (map disp . sort . modules $ pkginfo)) + ] + +#test issue 7a +isValidPosition position | validX && validY = Just position + | otherwise = Nothing + +#test issue-6-pattern-linebreak-validity +## this is ugly, but at least syntactically valid. +foo = Reflex.runSpiderHost $ ReflexHost.hostApp $ do + (inputEvent :: Reflex.Event Reflex.Spider String, inputFire :: String + -> IO Bool ) <- + ReflexHost.newExternalEvent + liftIO . forkIO . forever $ getLine >>= inputFire + ReflexHost.performEvent_ $ fmap (liftIO . putStrLn) inputEvent + +#test issue 16 +foldrDesc f z = unSwitchQueue $ \q -> + switch (Min.foldrDesc (f unTaggedF) z q) (Min.foldrAsc (f unTaggedF) z q) + +#test issue 18 +autocheckCases = + [ ("Never Deadlocks" , representative deadlocksNever) + , ("No Exceptions" , representative exceptionsNever) + , ("Consistent Result", alwaysSame) -- already representative + ] + +#test issue 18b +autocheckCases = + [ ("Never Deadlocks", representative deadlocksNever) + , ("No Exceptions" , representative exceptionsNever) + , ( "Consistent Result" + , alwaysSame -- already representative + ) + ] + +#test issue 18c +func = + [ (abc, (1111, 1111)) + , (def, (2, 2)) + , foo -- comment + ] + +#test issue 26 +foo a b = g a b -- fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + where g a b = b + b * a + +#test issue 26b +foo a b = g a b where g a b = b + b * a -- fooooooooooooooooooooooooooooooooooo + +#test aggressive alignment 1 +func = do + abc <- expr + abcccccccccccccccccc <- expr + abcccccccccccccccccccccccccccccccccccccccccc <- expr + abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr + +#test example alignment 1 +func (MyLongFoo abc def) = 1 +func (Bar a d ) = 2 +func _ = 3 + +#test listcomprehension-case-of +parserCompactLocation = + [ try + $ [ ParseRelAbs (Text.Read.read digits) _ _ + | digits <- many1 digit + , rel1 :: Maybe (Either Int (Ratio Int)) <- optionMaybe + [ case divPart of + Nothing -> Left $ Text.Read.read digits + Just ddigits -> + Right $ Text.Read.read digits % Text.Read.read ddigits + | digits <- many1 digit + , divPart <- optionMaybe (string "/" *> many1 digit) + ] + ] + ] + +#test opapp-specialcasing-1 +func = fooooooooooooooooooooooooooooooooo $ foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + +#test opapp-specialcasing-2 +func = + fooooooooooooooooooooooooooooooooo + + foooooooooooooooooooooooooooooooo foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + +#test opapp-specialcasing-3 +func = fooooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + [ foooooooooooooooooooooooooooooooo + , foooooooooooooooooooooooooooooooo + , foooooooooooooooooooooooooooooooo + ] + +#test opapp-indenting +parserPrim = + [ r + | r <- + [ SGPPrimFloat $ bool id (0 -) minus $ readGnok "parserPrim" + (d1 ++ d2 ++ d3 ++ d4) + | d2 <- string "." + , d3 <- many1 (oneOf "0123456789") + , _ <- string "f" + ] + <|> [ SGPPrimFloat $ bool id (0 -) minus $ fromIntegral + (readGnok "parserPrim" d1 :: Integer) + | _ <- string "f" + ] + <|> [ SGPPrimInt $ bool id (0 -) minus $ fromIntegral + (readGnok "parserPrim" d1 :: Integer) + | _ <- string "i" + ] + ] + +#test another-parspacing-testcase + +samples = (SV.unpackaaaaadat) <&> \f -> + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +#test recordupd-singleline-bug + +runBrittany tabSize text = do + let config' = staticDefaultConfig + config = config' + { _conf_layout = (_conf_layout config') + { _lconfig_indentAmount = coerce tabSize + } + , _conf_forward = forwardOptionsSyntaxExtsEnabled + } + parsePrintModule config text + +#test recordupd-singleline-bug-left + +-- brittany { lconfig_indentPolicy: IndentPolicyLeft } +runBrittany tabSize text = do + let + config' = staticDefaultConfig + config = config' + { _conf_layout = (_conf_layout config') + { _lconfig_indentAmount = coerce tabSize + } + , _conf_forward = forwardOptionsSyntaxExtsEnabled + } + parsePrintModule config text + +#test issue 37 + +foo = + ( a + , -- comment1 + b + -- comment2 + , c + ) + +#test issue 38 + +{-# LANGUAGE TypeApplications #-} +foo = bar @Baz + +#test comment-before-BDCols +{-# LANGUAGE TypeApplications #-} +layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do + docAlt + $ -- one-line solution + [ docCols + (ColBindingLine alignmentToken) + [ docSeq (patPartInline ++ [guardPart]) + , docSeq + [ appSep $ return binderDoc + , docForceSingleline $ return body + , wherePart + ] + ] + | not hasComments + , [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + , wherePart <- case mWhereDocs of + Nothing -> return @[] $ docEmpty + Just [w] -> return @[] $ docSeq + [ docSeparator + , appSep $ docLit $ Text.pack "where" + , docSetIndentLevel $ docForceSingleline $ return w + ] + _ -> [] + ] + ++ -- one-line solution + where in next line(s) + [ docLines + $ [ docCols + (ColBindingLine alignmentToken) + [ docSeq (patPartInline ++ [guardPart]) + , docSeq + [appSep $ return binderDoc, docForceParSpacing $ return body] + ] + ] + ++ wherePartMultiLine + | [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + , Data.Maybe.isJust mWhereDocs + ] + ++ -- two-line solution + where in next line(s) + [ docLines + $ [ docForceSingleline + $ docSeq (patPartInline ++ [guardPart, return binderDoc]) + , docEnsureIndent BrIndentRegular $ docForceSingleline $ return + body + ] + ++ wherePartMultiLine + | [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + ] + +#test comment-testcase-17 +{-# LANGUAGE MultiWayIf #-} +func = do + let foo = if + | Constuctoooooooooooooooooooooooooooooooooooor `elem` artics -- TODO + -> max + (defLen - 0.2) -- TODO + (defLen * 0.8) + | otherwise -> max (defLen - 0.05) (defLen * 0.95) -- TODO + return True + +#test issue 49 + +foo n = case n of + 1 -> True + -1 -> False + +bar n = case n of + (-2, -2) -> (-2, -2) + +#test issue 48 b + +{-# LANGUAGE TypeApplications #-} +foo = + let a = b @1 + cccc = () + in foo + +#test issue 52 a + +{-# LANGUAGE RecordWildCards #-} +v = A { a = 1, .. } where b = 2 + +#test issue 52 b + +{-# LANGUAGE RecordWildCards #-} +v = A { .. } where b = 2 + +#test issue 52 c + +{-# LANGUAGE RecordWildCards #-} +v = A { a = 1, b = 2, c = 3 } + +#test issue 63 a +test :: Proxy 'Int + +#test issue 63 b +test :: Proxy '[ 'True] + +#test issue 63 c +test :: Proxy '[Bool] + +#test issue 64 +{-# LANGUAGE RankNTypes, KindSignatures #-} +func + :: forall m str + . (Str str, Monad m) + => Int + -> Proxy (str :: [*]) + -> m (Tagged str String) + +#test issue 65 +widgetsDyn = + [ [ vBox + [ padTop Max outputLinesWidget + , padRight Max wid1 <+> flowWidget -- alignment here is strange/buggy + , padBottom (Pad 5) help + ] + ] + | wid1 <- promptDyn + , (flowWidget, _) <- flowResultD + , outputLinesWidget <- outputLinesWidgetD + , help <- suggestionHelpBox + , parser <- cmdParserD + ] + +#test issue 67 +fmapuv :: U.Unbox a => (a -> b) -> U.Vector a -> V.Vector b +fmapuv f xs = G.generate (G.length xs) (f . (xs G.!)) + + +#test parallellistcomp-workaround +cs0 = 0 : [ c / Interval n | c <- cs | n <- [1..] ] + +#test issue 70 +{-# LANGUAGE TemplateHaskell #-} +deriveFromJSON (unPrefix "assignPost") ''AssignmentPost + +#test issue 110 +main = -- a + let --b + x = 1 -- x + y = 2 -- y + in do + print x + print y + +#test issue 111 +alternatives :: Parser (Maybe Text) +alternatives = + alternativeOne -- first try this one + <|> alterantiveTwo -- then this one + <|> alternativeThree -- then this one + where + alternativeOne = purer "one" + alternativeTwo = purer "two" + alterantiveThree = purer "three" + +#test issue 116 +{-# LANGUAGE BangPatterns #-} +func = do + let !forced = some + pure () + +#test let-in-hanging +spanKey p q = case minViewWithKey q of + Just ((k, _), q') | p k -> + let (kas, q'') = spanKey p q' in ((k, a) : kas, q'') + _ -> ([], q) + +#test issue 125 +a :: () ':- () + +#test issue 128 +func = do + createDirectoryIfMissing True path + openFile fileName AppendMode + +#test hspar-comments + +alternatives :: Parser (Maybe Text) +alternatives = -- a + ( -- b + alternativeOne -- c + <|> alterantiveTwo -- d + <|> alternativeThree -- e + ) -- f + +#test issue 133 +{-# LANGUAGE ScopedTypeVariables #-} +func + :: forall a + . () + => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +func + :: () + => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +#test alignment-potential-overflow +go l [] = Right l +go l ((IRType, _a) : eqr) = go l eqr +go l ((_, IRType) : eqr) = go l eqr +go _ ((IRTypeError ps t1 t2, _) : _) = Left $ makeError ps t1 t2 +go _ ((_, IRTypeError ps t1 t2) : _) = Left $ makeError ps t1 t2 + +#test issue 89 - type-family-instance +type instance XPure StageParse = () +type Pair a = (a, a) + +#test issue 144 +-- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } +dsfnjKeekbwwbosbOfakxqRsiyix cnehokzozwbVaguvu migbnaRwutbz = + let + eyuAfrarIso' + :: (RveoexdxunuAafalm -> Axlau (Axlau (a, OinejrdCplle))) + -> Gbodoy + -> Axlau (Axlau OinejrdCplle, Gbodoy) + eyuAfrarIso' = ulcPaaekBst cnehokzozwbVaguvu + amkgoxEhalazJjxunecCuIfaw + :: Axlau (Axlau OinejrdCplle, Gbodoy) -> Axlau RqlnrluYqednbCiggxi + amkgoxEhalazJjxunecCuIfaw uKqviuBisjtn = do + (sEmo, quc) <- uKqviuBisjtn + pure (xoheccewfWoeyiagOkfodiq sEmo quc) + xoheccewfWoeyiagOkfodiq + :: Axlau OinejrdCplle -> Gbodoy -> RqlnrluYqednbCiggxi + xoheccewfWoeyiagOkfodiq sEmo quc = case migbnaRwutbz of + Afogmf -> xgeqe (OfBkkuih quc) (Ciitog quc) sEmo + in QabqyilexuiNizzhsQuxxac migbnaRwutbz (hwaTihhjt lhowvscIiozgqe) + +#test issue 159 +spec = do + it "creates a snapshot at the given level" . withGraph runDB $ do + lift $ do + studentDiagnosticReadingLevel updatedStudent `shouldBe` Just 10 -- x + elaSnapshotReadingLevel snapshot `shouldBe` 12 + +#test non-bottom-specialcase-altsearch +jaicyhHumzo btrKpeyiFej mava = do + m :: VtohxeRgpmgsu <- qloxIfiq mava + case m of + ZumnaoFujayerIswadabo kkecm chlixxag -> do + imomue <- ozisduRaqiseSBAob btrKpeyiFej $ \s -> + case MizA.pigevo kkecm (_tc_gulawulu s) of + Ebocaba -> + ( s { _tc_gulawulu = MizA.jxariu kkecm rwuRqxzhjo (_tc_gulawulu s) } + , Gtzvonm + ) + Xcde{} -> (s, Pioemav) + pure imomue + +#test issue 214 +-- brittany { lconfig_indentPolicy: IndentPolicyMultiple } +foo = bar + arg1 -- this is the first argument + arg2 -- this is the second argument + arg3 -- this is the third argument, now I'll skip one comment + arg4 + arg5 -- this is the fifth argument + arg6 -- this is the sixth argument + +#test issue 234 + +True `nand` True = False +nand _ _ = True + +nor False False = True +_ `nor` _ = False + +#test issue 256 prefix operator match + +f ((:) a as) = undefined + +#test issue 228 lambda plus lazy or bang pattern + +{-# LANGUAGE BangPatterns #-} +a = \x -> x +b = \ ~x -> x +c = \ !x -> x +d = \(~x) -> x + +#test type signature with forall and constraint +{-# LANGUAGE RankNTypes #-} +func :: forall b . Show b => b -> String + +#test issue 267 + +{-# LANGUAGE TypeFamilies #-} +f :: ((~) a b) => a -> b +f = id + +#test large record update +-- brittany { lconfig_indentPolicy: IndentPolicyLeft } +vakjkeSulxudbFokvir = Duotpo + { _ekku_gcrpbze = xgonae (1 :: Int) + , _oola_louwu = FoqsiYcuidx + { _xxagu_umea_iaztoj = xgonae False + , _tuktg_tizo_kfikacygsqf = xgonae False + , _ahzbo_xpow_otq_nzeyufq = xgonae False + , _uagpi_lzps_luy_xcjn = xgonae False + , _dxono_qjef_aqtafq_bes = xgonae False + , _yzuaf_nviy_vuhwxe_ihnbo_uhw = xgonae False + , _iwcit_fzjs_yerakt_dicox_mtryitko = xgonae False + , _ehjim_ucfe_dewarp_newrt_gso = xgonae False + , _ogtxb_ivoj_amqgai_rttui_xuwhetb = xgonae False + , _bhycb_iexz_megaug_qunoa_ohaked = xgonae False + , _nnmbe_uqgt_ewsuga_vaiis = xgonae False + , _otzil_ucvugaiyj_aosoiatunx_asir = xgonae False + } + , _iwsc_lalojz = XqspaiDainqw + { _uajznac_ugah = xgonae (80 :: Int) + , _qayziku_gazibzDejipj = xgonae DewizeCxwgyiKjig + , _auhebll_fiqjxyArfxia = xgonae (2 :: Int) + , _zubfuhq_dupiwnIoophXameeet = xgonae True + , _oavnuqg_opkreyOufuIkifiin = xgonae True + , _ufojfwy_fhuzcePeqwfu = xgonae (50 :: Int) + , _mlosikq_zajdxxSeRoelpf = xgonae (50 :: Int) + , _heemavf_fjgOfoaikh = xgonae (FyoVfvdygaZuzuvbeWarwuq 3) + , _ohxmeoq_ogtbfoPtqezVseu = xgonae (EdjotoLcbapUdiuMmytwoig 0.7) + , _omupuiu_ituamexjuLccwu = xgonae (30 :: Int) + , _xoseksf_atvwwdwaoHanofMyUvujjopoz = xgonae True + , _umuuuat_nuamezwWeqfUqzrnaxwp = xgonae False + , _uuriguz_wixhutbuKecigaFiwosret = xgonae True + , _betohxp_scixaLsvcesErtwItxrnaJmuz = xgonae False + , _lchxgee_olaetGcqzuqxVujenCzexub = xgonae True + , _egeibao_imamkuigqikhZdcbpidokVcixiqew = xgonae False + } + , _nloo_cfmrgZcisiugk = YuwodSavxwnicBekuel + { _oebew_rrtpvthUzlizjAqIwesly = xgonae False + , _blkff_Acxoid = xgonae False + , _datei_YewolAowoqOpunvpgu = xgonae BeekgUzojaPnixxaruJehyPmnnfu + , _ejfrj_eheb_justvh_pumcp_ismya = xgonae False + } + , _kena_uzeddovosoki = NyoRvshullezUpauud + { _mtfuwi_TUVEmoi = xgonae RZXKoytUtogx + , _larqam_adaxPehaylZafeqgpc = xgonae False + } + , _spob_qipaarx = KaxavsmOtoyeaq { _rusrirw_okx = Tajemkix [] } + , _vmah_uivucnfka_ikaquebxay_gzcm = xgonae False + , _qaqb_eykzuyuwi = xgonae False + -- test comment + } + +#test large record wildcard comment + +-- brittany { lconfig_indentPolicy: IndentPolicyLeft } +vakjkeSulxudbFokvir = Duotpo + { _ekku_gcrpbze = xgonae (1 :: Int) + , _spob_qipaarx = KaxavsmOtoyeaq { _rusrirw_okx = Tajemkix [] } + , _vmah_uivucnfka_ikaquebxay_gzcm = xgonae False + , _qaqb_eykzuyuwi = xgonae False + -- test comment + , -- N.B. + .. -- x + } + +#test issue 263 + +func = abc + def + -- a + -- b + + -- comment + + where + abc = 13 + def = 1 + +#test AddBaseY/EnsureIndent float in effect + +zItazySunefp twgq nlyo lwojjoBiecao = + let mhIarjyai = + ukwAausnfcn + $ XojlsTOSR.vuwOvuvdAZUOJaa + $ XojlsTOSR.vkesForanLiufjeDI + $ XojlsTOSR.vkesForanLiufjeDI + $ XojlsTOSR.popjAyijoWarueeP + $ XojlsTOSR.jpwuPmafuDqlbkt nlyo + $ XojlsTOSR.jpwuPmafuDqlbkt xxneswWhxwng + $ XojlsTOSR.jpwuPmafuDqlbkt oloCuxeDdow + $ XojlsTOSR.jpwuPmafuDqlbkt (uwurrvoNnukzefuDjeh lwojjoBiecao nlyo) + $ etOslnoz lwojjoBiecao + in kucotg $ (bbbr, Yoxe.Dwzbuzi.zrLokoTnuy piv) + +#test module initial comment +-- test +module MyModule where + +#test issue 231 + +foo = + [ ("xxx", "xx") + , -- + ("xx" , "xx") + -- + , ("xx" , "xxxxx") + , ("xx" , "xx") + ] + +#test issue 231 not + +foo = + [ ("xx", "xx") + , ( "xx" -- + , "xx" + ) + , ("xx", "xxxxx") + , ("xx", "xx") + ] + +#test issue 281 + +module Main + ( DataTypeI + , DataTypeII(DataConstructor) + -- * Haddock heading + , name + ) where + +#test type level list + +xeoeqibIaib + :: ( KqujhIsaus m + , XivuvIpoboi Droqifim m + , IgorvOtowtf m + , RyagaYaqac m + , QouruDU m + ) + => MaptAdfuxgu + -> Zcnxg NsxayqmvIjsezea -- ^ if Lvqucoo, opsip jl reyoyhk lfil qaculxgd + -> QNOZqwuzg + -> Eoattuq + '[ XkatytdWdquraosu -- test comment + , KyezKijim -- another test comment + , DjmioeePuoeg + , NinrxoiOwezc + , QATAlrijacpk + , TrutvotwIwifiqOjdtu + , CoMmuatjwr + , BoZckzqyodseZole + , VagfwoXaeChfqe + ] + m + () + +#test recordupd-overflow-bad-multiline-spacing + +createRedirectedProcess processConfig = do + let redirectedProc = (_processConfig_inner processConfig) + { std_in = CreatePipe + , std_out = CreatePipe + , std_err = CreatePipe + } + foo + +#test issue 282 + +instance HasDependencies SomeDataModel where + -- N.B. Here is a bunch of explanatory context about the relationship + -- between these data models or whatever. + type Dependencies SomeDataModel + = (SomeOtherDataModelId, SomeOtherOtherDataModelId) + +#test stupid-do-operator-combination + +func = + do + y + >>= x diff --git a/data/16-pending.blt b/data/16-pending.blt new file mode 100644 index 0000000..c8147d8 --- /dev/null +++ b/data/16-pending.blt @@ -0,0 +1,35 @@ +############################################################################### +############################################################################### +############################################################################### +#group pending +############################################################################### +############################################################################### +############################################################################### + + + +## this testcase is not about idempotency, but about _how_ the output differs +## from the input; i cannot really express this yet with the current +## test-suite. +## #test ayaz +## +## myManageHook = +## composeOne [isFullscreen -?> doFullFloat, isDialog -?> doFloat, transience] +## <+> composeAll +## [ className =? "Pidgin" --> doFloat +## , className =? "XCalc" --> doFloat +## -- plan9port's acme +## , className =? "acme" --> doFloat +## -- Acme with Vi bindings editor +## , title =? "ED" --> doFloat +## , title =? "wlc-x11" --> doFloat +## , className =? "Skype" --> doFloat +## , className =? "ffplay" --> doFloat +## , className =? "mpv" --> doFloat +## , className =? "Plugin-container" --> doFloat -- Firefox flash, etc. +## -- Firefox works well tiled, but it has dialog windows we want to float. +## , appName =? "Browser" --> doFloat +## ] +## where +## role = stringProperty "WM_WINDOW_ROLE" + diff --git a/data/30-tests-context-free.blt b/data/30-tests-context-free.blt new file mode 100644 index 0000000..d73e6d4 --- /dev/null +++ b/data/30-tests-context-free.blt @@ -0,0 +1,1461 @@ + +############################################################################### +############################################################################### +############################################################################### +#group type signatures +############################################################################### +############################################################################### +############################################################################### + +#test simple001 +func :: a -> a + +#test long typeVar +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test keep linebreak mode +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lakjsdlkjasldkj + -> lakjsdlkjasldkj + +#test simple parens 1 +func :: ((a)) + +#test simple parens 2 +func :: (a -> a) -> a + +#test simple parens 3 +func :: a -> (a -> a) + +#test did anyone say parentheses? +func :: (((((((((()))))))))) + +-- current output is.. funny. wonder if that can/needs to be improved.. +#test give me more! +#pending nested tuples over line length +func :: ((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))) + +#test unit +func :: () + + +############################################################################### + +#test paren'd func 1 +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lakjsdlkjasldkj + -> lakjsdlkjasldkj + ) + +#test paren'd func 2 +func + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> (lakjsdlkjasldkj -> lakjsdlkjasldkj) + +#test paren'd func 3 +func + :: (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> lakjsdlkjasldkj) + -> lakjsdlkjasldkj + +#test paren'd func 4 +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + -> lakjsdlkjasldkj + +#test paren'd func 5 +func + :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ) + +############################################################################### + +#test type application 1 +func :: asd -> Either a b + +#test type application 2 +func + :: asd + -> Either + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application 3 +func + :: asd + -> Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application 4 +func + :: Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> asd + +#test type application 5 +func + :: Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> asd) + +#test type application 6 +func + :: Trither + asd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test type application paren 1 +func + :: asd + -> ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test type application paren 2 +func + :: asd + -> ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +#test type application paren 3 +func + :: ( Trither + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> asd + +############################################################################### + +#test list simple +func :: [a -> b] + +#test list func +func + :: [ lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ] + +#test list paren +func + :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ] + +################################################################## -- ############# + +#test tuple type 1 +func :: (a, b, c) + +#test tuple type 2 +func :: ((a, b, c), (a, b, c), (a, b, c)) + +#test tuple type long +func + :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + +#test tuple type nested +func + :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd) + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ) + +#test tuple type function +func + :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + ] +############################################################################### +#test type operator stuff +#pending HsOpTy +test050 :: a :+: b +test051 + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + :+: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd +test052 + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + :+: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + +############################################################################### + +#test forall oneliner +{-# LANGUAGE ScopedTypeVariables #-} +func :: forall (a :: *) b . a -> b + +#test forall context multiline +{-# LANGUAGE ScopedTypeVariables #-} +func + :: forall m + . Foo + => ColMap2 + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> m () + +#test forall no-context multiline +{-# LANGUAGE ScopedTypeVariables #-} +func + :: forall m + . ColMap2 + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> ColInfo + -> m () + +#test language pragma issue +{-# LANGUAGE ScopedTypeVariables #-} +func :: forall (a :: *) b . a -> b + +#test comments 1 +func :: a -> b -- comment + +#test comments 2 +funcA :: a -> b -- comment A +funcB :: a -> b -- comment B + +#test comments all +-- a +func -- b + :: -- c + a -- d + -> -- e + ( -- f + c -- g + , -- h + d -- i + ) -- j-- k + +############################################################################### + +#test ImplicitParams 1 +{-# LANGUAGE ImplicitParams #-} +func :: (?asd::Int) -> () + +#test ImplicitParams 2 +{-# LANGUAGE ImplicitParams #-} +func + :: ( ?asd + :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + ) + -> () + + +############################################################################### +############################################################################### +############################################################################### +#group type signatures pragmas +############################################################################### +############################################################################### +############################################################################### + +#test inline pragma 1 +func = f + where + {-# INLINE f #-} + f = id + +#test inline pragma 2 +func = ($) + where + {-# INLINE ($) #-} + ($) = id + +#test inline pragma 3 +func = f + where + {-# INLINE CONLIKE [1] f #-} + f = id + +#test inline pragma 4 +func = f + where + {-# INLINE [~1] f #-} + f = id + + +############################################################################### +############################################################################### +############################################################################### +#group data type declarations +############################################################################### +############################################################################### +############################################################################### + +#test single record +data Foo = Bar + { foo :: Baz + } + +#test record multiple names +data Foo = Bar + { foo, bar :: Baz + } + +#test record multiple types +data Foo = Bar + { foo :: Baz + , bar :: Bizzz + } + +#test record multiple types and names +data Foo = Bar + { foo, biz :: Baz + , bar :: Bizzz + } + +#test record multiple types deriving +data Foo = Bar + { foo :: Baz + , bar :: Bizzz + } + deriving Show + +#test record multiple types deriving +data Foo = Bar + { foo :: Baz + , bar :: Bizzz + } + deriving (Show, Eq, Monad, Functor, Traversable, Foldable) + + +############################################################################### +############################################################################### +############################################################################### +#group equation.basic +############################################################################### +############################################################################### +############################################################################### +## some basic testing of different kinds of equations. +## some focus on column layouting for multiple-equation definitions. +## (that part probably is not implemented in any way yet.) + +#test basic 1 +func x = x + +#test infix 1 +x *** y = x + +#test symbol prefix +(***) x y = x + + +############################################################################### +############################################################################### +############################################################################### +#group equation.patterns +############################################################################### +############################################################################### +############################################################################### + +#test wildcard +func _ = x + +#test simple long pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable = + x + +#test simple multiline pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable + = x + +#test another multiline pattern +func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable a b + = x + +#test simple constructor +func (A a) = a + +#test list constructor +func (x : xr) = x + +#test some other constructor symbol +func (x :+: xr) = x + + +############################################################################### +############################################################################### +############################################################################### +#group equation.guards +############################################################################### +############################################################################### +############################################################################### +#test simple guard +func | True = x + +#test multiple-clauses-1 +func x + | x = simple expression + | otherwise = 0 + +#test multiple-clauses-2 +func x + | a somewhat longer guard x = "and a somewhat longer expession that does not" + | otherwise = "fit without putting the guards in new lines" + +#test multiple-clauses-3 +func x + | very long guard, another rather long guard that refers to x = nontrivial + expression + foo + bar + alsdkjlasdjlasj + | otherwise = 0 + +#test multiple-clauses-4 +func x + | very long guard, another rather long guard that refers to x + = nontrivialexpression foo bar alsdkjlasdjlasj + | otherwise + = 0 + +#test multiple-clauses-5 +func x + | very loooooooooooooooooooooooooooooong guard + , another rather long guard that refers to x + = nontrivial expression foo bar alsdkjlasdjlasj + | otherwise + = 0 + + +############################################################################### +############################################################################### +############################################################################### +#group expression.basic +############################################################################### +############################################################################### +############################################################################### + +#test var +func = x + +describe "infix op" $ do +#test 1 +func = x + x + +#test long +func = + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + +#test long keep linemode 1 +func = + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksj + +#test long keep linemode 2 +func = + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksj + + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + +#test literals +func = 1 +func = "abc" +func = 1.1e5 +func = 'x' +func = 981409823458910394810928414192837123987123987123 + +#test lambdacase +{-# LANGUAGE LambdaCase #-} +func = \case + FooBar -> x + Baz -> y + +#test lambda +func = \x -> abc + +describe "app" $ do +#test 1 +func = klajsdas klajsdas klajsdas + +#test 2 +func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + +#test 3 +func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + lakjsdlajsdljas + lakjsdlajsdljas + lakjsdlajsdljas + +### +#group expression.basic.sections +### + +#test left +func = (1 +) + +#test right +func = (+ 1) + +#test left inf +## TODO: this could be improved.. +func = (1 `abc`) + +#test right inf +func = (`abc` 1) + +### +#group tuples +### + +#test 1 +func = (abc, def) + +#test 2 +func = + ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd + ) + +#test let in on single line +foo = + let longIdentifierForShortValue = 1 + in longIdentifierForShortValue + longIdentifierForShortValue + + + +############################################################################### +############################################################################### +############################################################################### +#group expression.do statements +############################################################################### +############################################################################### +############################################################################### + +#test simple +func = do + stmt + stmt + +#test bind +func = do + x <- stmt + stmt x + +#test let +func = do + let x = 13 + stmt x + + +############################################################################### +############################################################################### +############################################################################### +#group expression.lists +############################################################################### +############################################################################### +############################################################################### + +#test monad-comprehension-case-of +func = + foooooo + $ [ case + foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + of + _ -> True + ] + + +############################################################################### +############################################################################### +############################################################################### +#group expression.multiwayif +############################################################################### +############################################################################### +############################################################################### + +#test simple +{-# LANGUAGE MultiWayIf #-} +func = if + | cond1 -> loooooooooooooooooooooooooooooong expr1 + | cond2 -> loooooooooooooooooooooooooooooong expr2 + +#test simplenested +{-# LANGUAGE MultiWayIf #-} +func = do + foo + bar $ if + | cond1 -> loooooooooooooooooooooooooooooong expr1 + | cond2 -> loooooooooooooooooooooooooooooong expr2 + + +############################################################################### +############################################################################### +############################################################################### +#group stylisticspecialcases +############################################################################### +############################################################################### +############################################################################### + +#test operatorprefixalignment-even-with-multiline-alignbreak +func = + foo + $ [ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + , bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + ] + ++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc] + +############################################################################### +############################################################################### +############################################################################### +#group module +############################################################################### +############################################################################### +############################################################################### + +#test simple +module Main where + +#test no-exports +module Main () where + +#test one-export +module Main (main) where + +#test several-exports +module Main (main, test1, test2) where + +#test many-exports +module Main + ( main + , test1 + , test2 + , test3 + , test4 + , test5 + , test6 + , test7 + , test8 + , test9 + ) where + +#test exports-with-comments +module Main + ( main + -- main + , test1 + , test2 + -- Test 3 + , test3 + , test4 + -- Test 5 + , test5 + -- Test 6 + ) where + +#test simple-export-with-things +module Main (Test(..)) where + +#test simple-export-with-module-contents +module Main (module Main) where + +#test export-with-things +module Main (Test(Test, a, b)) where + +#test export-with-empty-thing +module Main (Test()) where + +#test empty-with-comment +-- Intentionally left empty + +############################################################################### +############################################################################### +############################################################################### +#group import +############################################################################### +############################################################################### +############################################################################### + +#test simple-import +import Data.List + +#test simple-import-alias +import Data.List as L + +#test simple-qualified-import +import qualified Data.List + +#test simple-qualified-import-alias +import qualified Data.List as L + +#test simple-safe +import safe Data.List as L + +#test simple-source +import {-# SOURCE #-} Data.List () + +#test simple-safe-qualified +import safe qualified Data.List hiding (nub) + +#test simple-safe-qualified-source +import {-# SOURCE #-} safe qualified Data.List + +#test simple-qualified-package +import qualified "base" Data.List + +#test qualifier-effect +import {-# SOURCE #-} safe qualified "base" Data.List as L +import {-# SOURCE #-} safe qualified "base" Data.List () +import {-# SOURCE #-} safe qualified Data.List hiding () + +#test instances-only +import qualified Data.List () + +#test one-element +import Data.List (nub) + +#test several-elements +import Data.List (foldl', indexElem, nub) + +#test a-ridiculous-amount-of-elements +import Test + ( Long + , anymore + , fit + , items + , line + , list + , not + , onA + , quite + , single + , that + , will + , with + ) + +#test with-things +import Test ((+), T, T2(), T3(..), T4(T4), T5(T5, t5), T6((<|>))) + +#test hiding +import Test hiding () +import Test as T hiding () + +#test import-hiding-many +import Prelude as X + hiding + ( head + , init + , last + , maximum + , minimum + , pred + , read + , readFile + , succ + , tail + , undefined + ) + +#test long-module-name-simple +import MoreThanSufficientlyLongModuleNameWithSome + (compact, fit, inA, items, layout, not, that, will) +import TestJustAbitToLongModuleNameLikeThisOneIs () +import TestJustShortEnoughModuleNameLikeThisOne () + +#test long-module-name-as +import TestJustAbitToLongModuleNameLikeThisOneI as T +import TestJustShortEnoughModuleNameLikeThisOn as T + +#test long-module-name-hiding +import TestJustAbitToLongModuleNameLikeTh hiding () +import TestJustShortEnoughModuleNameLike hiding () + +#test long-module-name-simple-items +import MoreThanSufficientlyLongModuleNameWithSome + (compact, fit, inA, items, layout, not, that, will) + +#test long-module-name-hiding-items +import TestJustShortEnoughModuleNameLike hiding (abc, def, ghci, jklm) + +#test import-with-comments +-- Test +import Data.List (nub) -- Test +{- Test -} +import qualified Data.List as L (foldl') {- Test -} + +#test import-with-comments-2 + +import Test + ( abc + , def + -- comment + ) + +#test import-with-comments-3 + +import Test + ( abc + -- comment + ) + +#test import-with-comments-4 +import Test + ( abc + -- comment + , def + , ghi + {- comment -} + , jkl + -- comment + ) + +-- Test +import Test (test) + +#test import-with-comments-5 +import Test + ( -- comment + ) + +#test long-bindings +import Test (longbindingNameThatoverflowsColum) +import Test (Long(List, Of, Things)) + +#test things-with-with-comments +import Test + ( Thing + ( With + -- Comments + , and + -- also + , items + -- ! + ) + ) +import Test + ( Thing + ( Item + -- and Comment + ) + ) +import Test + ( Thing + ( With + -- Comments + , and + -- also + , items + -- ! + ) + ) + +#test prefer-dense-empty-list +import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine + () + +#test preamble full-preamble +{-# LANGUAGE BangPatterns #-} + +{- + - Test module + -} +module Test + ( test1 + -- ^ test + , test2 + -- | test + , test3 + , test4 + , test5 + , test6 + , test7 + , test8 + , test9 + , test10 + ) where + +-- Test +import Data.List (nub) -- Test +{- Test -} +import qualified Data.List as L (foldl') {- Test -} + +-- Test +import Test (test) + +############################################################################### +############################################################################### +############################################################################### +#group regression +############################################################################### +############################################################################### +############################################################################### + +#test newlines-comment +func = do + abc <- foo + +--abc +return () + +#test parenthesis-around-unit +func = (()) + +#test let-defs indentation +func = do + let + foo True = True + foo _ = False + return () + +#test let-defs no indent +func = do + let + foo True = True + foo _ = False + return () + +#test let-defs no indent +func = do + let + foo = True + b = False + return () + +#test let-defs no indent +func = + let + foo = True + b = False + in return () + +#test record update indentation 1 +func = do + s <- mGet + mSet $ s { _lstate_indent = _lstate_indent state } + +#test record update indentation 2 +func = do + s <- mGet + mSet $ s + { _lstate_indent = _lstate_indent state + , _lstate_foo = _lstate_foo state + } + +#test record update indentation 3 +func = do + s <- mGet + mSet $ s + { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_foo = _lstate_foo kasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test record construction 1 +func = Foo { _lstate_indent = _lstate_indent state } + +#test record construction 2 +func = Foo + { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test record construction 3 +func = do + Foo + { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd + } + +#test post-indent comment +func = do +-- abc + -- def + return () + +#test post-unindent comment +func = do + do + return () + -- abc + -- def + return () + +#test CPP empty comment case +#pending CPP parsing needs fixing for roundTripEqual +{-# LANGUAGE CPP #-} +module Test where +func = do +#if FOO + let x = 13 +#endif + stmt x + +## really, the following should be handled by forcing the Alt to multiline +## because there are comments. as long as this is not implemented though, +## we should ensure the trivial solution works. +#test comment inline placement (temporary) +func + :: Int -- basic indentation amount + -> Int -- currently used width in current line (after indent) + -- used to accurately calc placing of the current-line + -> LayoutDesc + -> Int + +#test some indentation thingy +func = + (lkjadljasldjalskdjaldjalsdjkalsdjlaksdjlasjdlajsaldskj + $ abc + $ def + $ ghi + $ jkl + ) + +#test parenthesized operator +buildG bounds0 edges0 = accumArray (flip (:)) [] bounds0 (map reassoc edges0) + where reassoc (v, e, w) = (v, (e, w)) + +#test record pattern matching stuff +downloadRepoPackage = case repo of + RepoLocal {..} -> return () + RepoLocal { abc } -> return () + RepoLocal{} -> return () + +#test do let comment indentation level problem +func = do + let + (primaryPkg, otherPkgs) = selectPrimaryLocalPackage pwd pkgs' + (bproblems, x) = resolveBuildTargets primaryPkg otherPkgs utargets'' + -- default local dir target if there's no given target + utargets'' = "foo" + return () + +#test list comprehension comment placement +func = + [ (thing, take 10 alts) --TODO: select best ones + | (thing, _got, alts@(_ : _)) <- nosuchFooThing + , gast <- award + ] + +#test if-then-else comment placement +func = if x + then if y -- y is important + then foo + else bar + else Nothing + +#test qualified infix pattern +wrapPatPrepend pat prepElem = do + patDocs <- layoutPat pat + case Seq.viewl patDocs of + Seq.EmptyL -> return $ Seq.empty + x1 Seq.:< xR -> do + x1' <- docSeq [prepElem, return x1] + return $ x1' Seq.<| xR + +#test type signature multiline forcing issue +layoutWriteNewlineBlock + :: ( MonadMultiWriter Text.Builder.Builder m + , MonadMultiState LayoutState m + , MonadMultiWriter (Seq String) m + ) + => m () + +#test multiwayif proper indentation +{-# LANGUAGE MultiWayIf #-} +readMergePersConfig path shouldCreate conf = do + exists <- liftIO $ System.Directory.doesFileExist path + if + | exists -> do + contents <- liftIO $ ByteString.readFile path -- no lazy IO, tyvm. + fileConf <- case Data.Yaml.decodeEither contents of + Left e -> do + liftIO + $ putStrErrLn + $ "error reading in brittany config from " + ++ path + ++ ":" + liftIO $ putStrErrLn e + mzero + Right x -> return x + return $ fileConf Semigroup.<> conf + | shouldCreate -> do + liftIO $ ByteString.writeFile path $ Data.Yaml.encode $ cMap + (Option . Just . runIdentity) + staticDefaultConfig + return $ conf + | otherwise -> do + return conf + +#test nested pattern alignment issue" +func = BuildReport + where + convertInstallOutcome = case result of + Left BR.PlanningFailed -> PlanningFailed + Left (BR.DependentFailed p) -> DependencyFailed p + Left (BR.DownloadFailed _) -> DownloadFailed + Left (BR.UnpackFailed _) -> UnpackFailed + Left (BR.ConfigureFailed _) -> ConfigureFailed + Left (BR.BuildFailed _) -> BuildFailed + Left (BR.TestsFailed _) -> TestsFailed + Left (BR.InstallFailed _) -> InstallFailed + Right (BR.BuildOk _ _ _) -> InstallOk + +#test nested pattern alignment issue" +func = BuildReport + where + convertInstallOutcome = case result of + Left BR.PlanningFailed -> PlanningFailed + Left (BR.DependentFailed p) -> DependencyFailed p + Left (BR.DownloadFailed _) -> DownloadFailed + Left (BR.UnpackFailed _) -> UnpackFailed + Left (BR.ConfigureFailed _) -> ConfigureFailed + Left (BR.BuildFailed _) -> BuildFailed + Left (BR.TestsFailed _) -> TestsFailed + Left (BR.InstallFailed _) -> InstallFailed + Right (BR.BuildOk _ _ _) -> InstallOk + +#test partially overflowing alignment issue" +showPackageDetailedInfo pkginfo = + renderStyle (style { lineLength = 80, ribbonsPerLine = 1 }) + $ char '*' + $+$ something + [ entry "Synopsis" synopsis hideIfNull reflowParagraphs + , entry + "Versions available" + sourceVersions + (altText null "[ Not available from server ]") + (dispTopVersions 9 (preferredVersions pkginfo)) + , entry + "Versions installed" + installedVersions + (altText + null + (if hasLib pkginfo then "[ Not installed ]" else "[ Unknown ]") + ) + (dispTopVersions 4 (preferredVersions pkginfo)) + , entry "Homepage" homepage orNotSpecified text + , entry "Bug reports" bugReports orNotSpecified text + , entry "Description" description hideIfNull reflowParagraphs + , entry "Category" category hideIfNull text + , entry "License" license alwaysShow disp + , entry "Author" author hideIfNull reflowLines + , entry "Maintainer" maintainer hideIfNull reflowLines + , entry "Source repo" sourceRepo orNotSpecified text + , entry "Executables" executables hideIfNull (commaSep text) + , entry "Flags" flags hideIfNull (commaSep dispFlag) + , entry "Dependencies" dependencies hideIfNull (commaSep dispExtDep) + , entry "Documentation" haddockHtml showIfInstalled text + , entry "Cached" haveTarball alwaysShow dispYesNo + , if not (hasLib pkginfo) + then empty + else text "Modules:" + $+$ nest 4 (vcat (map disp . sort . modules $ pkginfo)) + ] + +#test issue 7a +isValidPosition position + | validX && validY = Just position + | otherwise = Nothing + +#test issue-6-pattern-linebreak-validity +## this is ugly, but at least syntactically valid. +foo = Reflex.runSpiderHost $ ReflexHost.hostApp $ do + (inputEvent :: Reflex.Event Reflex.Spider String, inputFire :: String + -> IO Bool) <- + ReflexHost.newExternalEvent + liftIO . forkIO . forever $ getLine >>= inputFire + ReflexHost.performEvent_ $ fmap (liftIO . putStrLn) inputEvent + +#test issue 15 +-- Test.hs +module Test where + +data X = X + +#test issue 16 +foldrDesc f z = unSwitchQueue $ \q -> + switch (Min.foldrDesc (f unTaggedF) z q) (Min.foldrAsc (f unTaggedF) z q) + +#test issue 18 +autocheckCases = + [ ("Never Deadlocks", representative deadlocksNever) + , ("No Exceptions", representative exceptionsNever) + , ("Consistent Result", alwaysSame) -- already representative + ] + +#test issue 18b +autocheckCases = + [ ("Never Deadlocks", representative deadlocksNever) + , ("No Exceptions", representative exceptionsNever) + , ( "Consistent Result" + , alwaysSame -- already representative + ) + ] + +#test issue 18c +func = + [ (abc, (1111, 1111)) + , (def, (2, 2)) + , foo -- comment + ] + +#test issue 26 +foo a b = g a b -- fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo + where g a b = b + b * a + +#test issue 26b +foo a b = g a b where g a b = b + b * a -- fooooooooooooooooooooooooooooooooooo + +#test aggressive alignment 1 +func = do + abc <- expr + abcccccccccccccccccc <- expr + abcccccccccccccccccccccccccccccccccccccccccc <- expr + abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr + +#test example alignment 1 +func (MyLongFoo abc def) = 1 +func (Bar a d) = 2 +func _ = 3 + +#test listcomprehension-case-of +parserCompactLocation = + [ try + $ [ ParseRelAbs (Text.Read.read digits) _ _ + | digits <- many1 digit + , rel1 :: Maybe (Either Int (Ratio Int)) <- optionMaybe + [ case divPart of + Nothing -> Left $ Text.Read.read digits + Just ddigits -> + Right $ Text.Read.read digits % Text.Read.read ddigits + | digits <- many1 digit + , divPart <- optionMaybe (string "/" *> many1 digit) + ] + ] + ] + +#test opapp-specialcasing-1 +func = fooooooooooooooooooooooooooooooooo $ foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + +#test opapp-specialcasing-2 +func = + fooooooooooooooooooooooooooooooooo + + foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + +#test opapp-specialcasing-3 +func = fooooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo + [ foooooooooooooooooooooooooooooooo + , foooooooooooooooooooooooooooooooo + , foooooooooooooooooooooooooooooooo + ] + +#test opapp-indenting +parserPrim = + [ r + | r <- + [ SGPPrimFloat $ bool id (0 -) minus $ readGnok + "parserPrim" + (d1 ++ d2 ++ d3 ++ d4) + | d2 <- string "." + , d3 <- many1 (oneOf "0123456789") + , _ <- string "f" + ] + <|> [ SGPPrimFloat $ bool id (0 -) minus $ fromIntegral + (readGnok "parserPrim" d1 :: Integer) + | _ <- string "f" + ] + <|> [ SGPPrimInt $ bool id (0 -) minus $ fromIntegral + (readGnok "parserPrim" d1 :: Integer) + | _ <- string "i" + ] + ] + +#test another-parspacing-testcase + +samples = (SV.unpackaaaaadat) <&> \f -> + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +#test recordupd-singleline-bug + +runBrittany tabSize text = do + let + config' = staticDefaultConfig + config = config' + { _conf_layout = (_conf_layout config') + { _lconfig_indentAmount = coerce tabSize + } + , _conf_forward = forwardOptionsSyntaxExtsEnabled + } + parsePrintModule config text + +#test issue 38 + +{-# LANGUAGE TypeApplications #-} +foo = bar @Baz + +#test comment-before-BDCols +{-# LANGUAGE TypeApplications #-} +layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do + docAlt + $ -- one-line solution + [ docCols + (ColBindingLine alignmentToken) + [ docSeq (patPartInline ++ [guardPart]) + , docSeq + [ appSep $ return binderDoc + , docForceSingleline $ return body + , wherePart + ] + ] + | not hasComments + , [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + , wherePart <- case mWhereDocs of + Nothing -> return @[] $ docEmpty + Just [w] -> return @[] $ docSeq + [ docSeparator + , appSep $ docLit $ Text.pack "where" + , docSetIndentLevel $ docForceSingleline $ return w + ] + _ -> [] + ] + ++ -- one-line solution + where in next line(s) + [ docLines + $ [ docCols + (ColBindingLine alignmentToken) + [ docSeq (patPartInline ++ [guardPart]) + , docSeq + [appSep $ return binderDoc, docForceParSpacing $ return body] + ] + ] + ++ wherePartMultiLine + | [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + , Data.Maybe.isJust mWhereDocs + ] + ++ -- two-line solution + where in next line(s) + [ docLines + $ [ docForceSingleline + $ docSeq (patPartInline ++ [guardPart, return binderDoc]) + , docEnsureIndent BrIndentRegular $ docForceSingleline $ return + body + ] + ++ wherePartMultiLine + | [(guards, body, _bodyRaw)] <- [clauseDocs] + , let guardPart = singleLineGuardsDoc guards + ] + +#test comment-testcase-17 +{-# LANGUAGE MultiWayIf #-} +func = do + let + foo = if + | Constuctoooooooooooooooooooooooooooooooooooor `elem` artics -- TODO + -> max + (defLen - 0.2) -- TODO + (defLen * 0.8) + | otherwise -> max (defLen - 0.05) (defLen * 0.95) -- TODO + return True + +#test issue 49 + +foo n = case n of + 1 -> True + -1 -> False + +bar n = case n of + (-2, -2) -> (-2, -2) + +#test issue 48 b + +{-# LANGUAGE TypeApplications #-} +foo = + let + a = b @1 + cccc = () + in foo + +#test issue 176 + +record :: Record +record = Record + { rProperties = + [ "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + , "foo" .= "bar" + ] + } + + +############################################################################### +############################################################################### +############################################################################### +#group pending +############################################################################### +############################################################################### +############################################################################### + + + +## this testcase is not about idempotency, but about _how_ the output differs +## from the input; i cannot really express this yet with the current +## test-suite. +## #test ayaz +## +## myManageHook = +## composeOne [isFullscreen -?> doFullFloat, isDialog -?> doFloat, transience] +## <+> composeAll +## [ className =? "Pidgin" --> doFloat +## , className =? "XCalc" --> doFloat +## -- plan9port's acme +## , className =? "acme" --> doFloat +## -- Acme with Vi bindings editor +## , title =? "ED" --> doFloat +## , title =? "wlc-x11" --> doFloat +## , className =? "Skype" --> doFloat +## , className =? "ffplay" --> doFloat +## , className =? "mpv" --> doFloat +## , className =? "Plugin-container" --> doFloat -- Firefox flash, etc. +## -- Firefox works well tiled, but it has dialog windows we want to float. +## , appName =? "Browser" --> doFloat +## ] +## where +## role = stringProperty "WM_WINDOW_ROLE" diff --git a/data/40-indent-policy-multiple.blt b/data/40-indent-policy-multiple.blt new file mode 100644 index 0000000..b75c726 --- /dev/null +++ b/data/40-indent-policy-multiple.blt @@ -0,0 +1,42 @@ +############################################################################### +############################################################################### +############################################################################### +#group indent-policy-multiple +############################################################################### +############################################################################### +############################################################################### + +#test long +-- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } +func = + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj + +#test let indAmount=4 +-- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } +foo = do + let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + foo + +#test let indAmount=8 +-- brittany { lconfig_indentAmount: 8, lconfig_indentPolicy: IndentPolicyMultiple } +foo = do + let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + foo +foo = do + let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + foo + +#test nested do-block +-- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } +foo = asdyf8asdf + "ajsdfas" + [ asjdf asyhf $ do + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + ] diff --git a/data/Test1.hs b/data/Test1.hs deleted file mode 100644 index 44e6262..0000000 --- a/data/Test1.hs +++ /dev/null @@ -1 +0,0 @@ -func :: a -> a diff --git a/data/Test10.hs b/data/Test10.hs deleted file mode 100644 index f1b8e0d..0000000 --- a/data/Test10.hs +++ /dev/null @@ -1,3 +0,0 @@ -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> (lakjsdlkjasldkj -> lakjsdlkjasldkj) diff --git a/data/Test100.hs b/data/Test100.hs deleted file mode 100644 index f6643c0..0000000 --- a/data/Test100.hs +++ /dev/null @@ -1 +0,0 @@ -func = klajsdas klajsdas klajsdas diff --git a/data/Test101.hs b/data/Test101.hs deleted file mode 100644 index 57bac0e..0000000 --- a/data/Test101.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd diff --git a/data/Test102.hs b/data/Test102.hs deleted file mode 100644 index b361b53..0000000 --- a/data/Test102.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd lakjsdlajsdljas - lakjsdlajsdljas - lakjsdlajsdljas diff --git a/data/Test103.hs b/data/Test103.hs deleted file mode 100644 index 2b2b052..0000000 --- a/data/Test103.hs +++ /dev/null @@ -1 +0,0 @@ -func = (1 +) diff --git a/data/Test104.hs b/data/Test104.hs deleted file mode 100644 index e8f99be..0000000 --- a/data/Test104.hs +++ /dev/null @@ -1 +0,0 @@ -func = (+ 1) diff --git a/data/Test105.hs b/data/Test105.hs deleted file mode 100644 index 699ead3..0000000 --- a/data/Test105.hs +++ /dev/null @@ -1 +0,0 @@ -func = (1 `abc`) diff --git a/data/Test106.hs b/data/Test106.hs deleted file mode 100644 index ccaa551..0000000 --- a/data/Test106.hs +++ /dev/null @@ -1 +0,0 @@ -func = (`abc` 1) diff --git a/data/Test107.hs b/data/Test107.hs deleted file mode 100644 index 99b30ec..0000000 --- a/data/Test107.hs +++ /dev/null @@ -1 +0,0 @@ -func = (abc, def) diff --git a/data/Test108.hs b/data/Test108.hs deleted file mode 100644 index 90f6d90..0000000 --- a/data/Test108.hs +++ /dev/null @@ -1 +0,0 @@ -func = (abc, ) diff --git a/data/Test109.hs b/data/Test109.hs deleted file mode 100644 index 973aed0..0000000 --- a/data/Test109.hs +++ /dev/null @@ -1 +0,0 @@ -func = (, abc) diff --git a/data/Test11.hs b/data/Test11.hs deleted file mode 100644 index 25670eb..0000000 --- a/data/Test11.hs +++ /dev/null @@ -1,3 +0,0 @@ -func - :: (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> lakjsdlkjasldkj) - -> lakjsdlkjasldkj diff --git a/data/Test110.hs b/data/Test110.hs deleted file mode 100644 index 78d0c01..0000000 --- a/data/Test110.hs +++ /dev/null @@ -1,6 +0,0 @@ -myTupleSection = - ( verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargefirstelement - , - , verylaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaargethirdelement - , - ) diff --git a/data/Test111.hs b/data/Test111.hs deleted file mode 100644 index 87acbec..0000000 --- a/data/Test111.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = - ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - ) diff --git a/data/Test112.hs b/data/Test112.hs deleted file mode 100644 index daf62d6..0000000 --- a/data/Test112.hs +++ /dev/null @@ -1,6 +0,0 @@ -foo = if True - then - -- iiiiii - "a " - else - "b " diff --git a/data/Test113.hs b/data/Test113.hs deleted file mode 100644 index 26bb39d..0000000 --- a/data/Test113.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = if cond - then pure 42 - else do - -- test - abc diff --git a/data/Test114.hs b/data/Test114.hs deleted file mode 100644 index ea9f935..0000000 --- a/data/Test114.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = case x of - False -> False - True -> True diff --git a/data/Test115.hs b/data/Test115.hs deleted file mode 100644 index eb88667..0000000 --- a/data/Test115.hs +++ /dev/null @@ -1,7 +0,0 @@ -func = - case - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - of - False -> False - True -> True diff --git a/data/Test116.hs b/data/Test116.hs deleted file mode 100644 index 5d7739c..0000000 --- a/data/Test116.hs +++ /dev/null @@ -1,7 +0,0 @@ -func = do - case - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - of - False -> False - True -> True diff --git a/data/Test117.hs b/data/Test117.hs deleted file mode 100644 index 43e6130..0000000 --- a/data/Test117.hs +++ /dev/null @@ -1 +0,0 @@ -func = case x of {} diff --git a/data/Test118.hs b/data/Test118.hs deleted file mode 100644 index 85c98c6..0000000 --- a/data/Test118.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = - case - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - of {} diff --git a/data/Test119.hs b/data/Test119.hs deleted file mode 100644 index 195201e..0000000 --- a/data/Test119.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = do - case - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - of {} diff --git a/data/Test12.hs b/data/Test12.hs deleted file mode 100644 index fa012f7..0000000 --- a/data/Test12.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - -> lakjsdlkjasldkj diff --git a/data/Test120.hs b/data/Test120.hs deleted file mode 100644 index 5bbd0e6..0000000 --- a/data/Test120.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = do - stmt - stmt diff --git a/data/Test121.hs b/data/Test121.hs deleted file mode 100644 index aa47dfd..0000000 --- a/data/Test121.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = do - x <- stmt - stmt x diff --git a/data/Test122.hs b/data/Test122.hs deleted file mode 100644 index 589d354..0000000 --- a/data/Test122.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = do - let x = 13 - stmt x diff --git a/data/Test123.hs b/data/Test123.hs deleted file mode 100644 index 6319013..0000000 --- a/data/Test123.hs +++ /dev/null @@ -1,7 +0,0 @@ -func = - foooooo - $ [ case - foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo - of - _ -> True - ] diff --git a/data/Test124.hs b/data/Test124.hs deleted file mode 100644 index 1164c0f..0000000 --- a/data/Test124.hs +++ /dev/null @@ -1,4 +0,0 @@ -testMethod foo bar baz qux = - let x = undefined foo bar baz qux qux baz bar :: String - -- some comment explaining the in expression - in undefined foo x :: String diff --git a/data/Test125.hs b/data/Test125.hs deleted file mode 100644 index e711480..0000000 --- a/data/Test125.hs +++ /dev/null @@ -1,4 +0,0 @@ -testMethod foo bar baz qux = - let x = undefined :: String - -- some comment explaining the in expression - in undefined :: String diff --git a/data/Test126.hs b/data/Test126.hs deleted file mode 100644 index e0c379a..0000000 --- a/data/Test126.hs +++ /dev/null @@ -1,3 +0,0 @@ -testMethod foo bar baz qux = - -- some comment explaining the in expression - let x = undefined :: String in undefined :: String diff --git a/data/Test127.hs b/data/Test127.hs deleted file mode 100644 index e446394..0000000 --- a/data/Test127.hs +++ /dev/null @@ -1,6 +0,0 @@ -foo foo bar baz qux = - let a = 1 - b = 2 - c = 3 - -- some comment explaining the in expression - in undefined :: String diff --git a/data/Test128.hs b/data/Test128.hs deleted file mode 100644 index 8e3a783..0000000 --- a/data/Test128.hs +++ /dev/null @@ -1,6 +0,0 @@ -func = - foo - $ [ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - , bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - ] - ++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc] diff --git a/data/Test129.hs b/data/Test129.hs deleted file mode 100644 index 6ca9a1f..0000000 --- a/data/Test129.hs +++ /dev/null @@ -1 +0,0 @@ -module Main where diff --git a/data/Test13.hs b/data/Test13.hs deleted file mode 100644 index 68e8e9e..0000000 --- a/data/Test13.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ) diff --git a/data/Test130.hs b/data/Test130.hs deleted file mode 100644 index 43a1fee..0000000 --- a/data/Test130.hs +++ /dev/null @@ -1 +0,0 @@ -module Main () where diff --git a/data/Test131.hs b/data/Test131.hs deleted file mode 100644 index 0fdcb21..0000000 --- a/data/Test131.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (main) where diff --git a/data/Test132.hs b/data/Test132.hs deleted file mode 100644 index 1998fe9..0000000 --- a/data/Test132.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (main, test1, test2) where diff --git a/data/Test133.hs b/data/Test133.hs deleted file mode 100644 index 20fd443..0000000 --- a/data/Test133.hs +++ /dev/null @@ -1,12 +0,0 @@ -module Main - ( main - , test1 - , test2 - , test3 - , test4 - , test5 - , test6 - , test7 - , test8 - , test9 - ) where diff --git a/data/Test134.hs b/data/Test134.hs deleted file mode 100644 index 20ea610..0000000 --- a/data/Test134.hs +++ /dev/null @@ -1,12 +0,0 @@ -module Main - ( main - -- main - , test1 - , test2 - -- Test 3 - , test3 - , test4 - -- Test 5 - , test5 - -- Test 6 - ) where diff --git a/data/Test135.hs b/data/Test135.hs deleted file mode 100644 index 6d7b8eb..0000000 --- a/data/Test135.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (Test(..)) where diff --git a/data/Test136.hs b/data/Test136.hs deleted file mode 100644 index e06cbfc..0000000 --- a/data/Test136.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (module Main) where diff --git a/data/Test137.hs b/data/Test137.hs deleted file mode 100644 index 5f1af50..0000000 --- a/data/Test137.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (Test(Test, a, b)) where diff --git a/data/Test138.hs b/data/Test138.hs deleted file mode 100644 index b436099..0000000 --- a/data/Test138.hs +++ /dev/null @@ -1,6 +0,0 @@ --- comment1 -module Main - ( Test(Test, a, b) - , foo -- comment2 - ) -- comment3 - where diff --git a/data/Test139.hs b/data/Test139.hs deleted file mode 100644 index 6fd114e..0000000 --- a/data/Test139.hs +++ /dev/null @@ -1 +0,0 @@ -module Main (Test()) where diff --git a/data/Test14.hs b/data/Test14.hs deleted file mode 100644 index 05b4cb6..0000000 --- a/data/Test14.hs +++ /dev/null @@ -1 +0,0 @@ -func :: asd -> Either a b diff --git a/data/Test140.hs b/data/Test140.hs deleted file mode 100644 index 6d7a6ef..0000000 --- a/data/Test140.hs +++ /dev/null @@ -1 +0,0 @@ --- Intentionally left empty diff --git a/data/Test141.hs b/data/Test141.hs deleted file mode 100644 index a053bb5..0000000 --- a/data/Test141.hs +++ /dev/null @@ -1 +0,0 @@ -import Data.List diff --git a/data/Test142.hs b/data/Test142.hs deleted file mode 100644 index 1bc9f03..0000000 --- a/data/Test142.hs +++ /dev/null @@ -1 +0,0 @@ -import Data.List as L diff --git a/data/Test143.hs b/data/Test143.hs deleted file mode 100644 index 691c0c1..0000000 --- a/data/Test143.hs +++ /dev/null @@ -1 +0,0 @@ -import qualified Data.List diff --git a/data/Test144.hs b/data/Test144.hs deleted file mode 100644 index b64f22f..0000000 --- a/data/Test144.hs +++ /dev/null @@ -1 +0,0 @@ -import qualified Data.List as L diff --git a/data/Test145.hs b/data/Test145.hs deleted file mode 100644 index 020afa7..0000000 --- a/data/Test145.hs +++ /dev/null @@ -1 +0,0 @@ -import safe Data.List as L diff --git a/data/Test146.hs b/data/Test146.hs deleted file mode 100644 index cad516e..0000000 --- a/data/Test146.hs +++ /dev/null @@ -1 +0,0 @@ -import {-# SOURCE #-} Data.List ( ) diff --git a/data/Test147.hs b/data/Test147.hs deleted file mode 100644 index 42148e0..0000000 --- a/data/Test147.hs +++ /dev/null @@ -1 +0,0 @@ -import safe qualified Data.List diff --git a/data/Test148.hs b/data/Test148.hs deleted file mode 100644 index dd2c6b9..0000000 --- a/data/Test148.hs +++ /dev/null @@ -1 +0,0 @@ -import {-# SOURCE #-} safe qualified Data.List diff --git a/data/Test149.hs b/data/Test149.hs deleted file mode 100644 index 650a6ad..0000000 --- a/data/Test149.hs +++ /dev/null @@ -1 +0,0 @@ -import qualified "base" Data.List diff --git a/data/Test15.hs b/data/Test15.hs deleted file mode 100644 index 668dca4..0000000 --- a/data/Test15.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: asd - -> Either - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test150.hs b/data/Test150.hs deleted file mode 100644 index 0c30830..0000000 --- a/data/Test150.hs +++ /dev/null @@ -1,3 +0,0 @@ -import {-# SOURCE #-} safe qualified "base" Data.List as L -import {-# SOURCE #-} safe qualified "base" Data.List ( ) -import {-# SOURCE #-} safe qualified Data.List hiding ( ) diff --git a/data/Test151.hs b/data/Test151.hs deleted file mode 100644 index 992b081..0000000 --- a/data/Test151.hs +++ /dev/null @@ -1 +0,0 @@ -import qualified Data.List ( ) diff --git a/data/Test152.hs b/data/Test152.hs deleted file mode 100644 index 631bb4c..0000000 --- a/data/Test152.hs +++ /dev/null @@ -1 +0,0 @@ -import Data.List ( nub ) diff --git a/data/Test153.hs b/data/Test153.hs deleted file mode 100644 index 537fce6..0000000 --- a/data/Test153.hs +++ /dev/null @@ -1,4 +0,0 @@ -import Data.List ( foldl' - , indexElem - , nub - ) diff --git a/data/Test154.hs b/data/Test154.hs deleted file mode 100644 index 387f268..0000000 --- a/data/Test154.hs +++ /dev/null @@ -1,14 +0,0 @@ -import Test ( Long - , anymore - , fit - , items - , line - , list - , not - , onA - , quite - , single - , that - , will - , with - ) diff --git a/data/Test155.hs b/data/Test155.hs deleted file mode 100644 index 6150ff3..0000000 --- a/data/Test155.hs +++ /dev/null @@ -1,11 +0,0 @@ -import Test ( (+) - , (:!)(..) - , (:*)((:.), T7, t7) - , (:.) - , T - , T2() - , T3(..) - , T4(T4) - , T5(T5, t5) - , T6((<|>)) - ) diff --git a/data/Test156.hs b/data/Test156.hs deleted file mode 100644 index 9eb3db5..0000000 --- a/data/Test156.hs +++ /dev/null @@ -1,3 +0,0 @@ -import Test hiding ( ) -import Test as T - hiding ( ) diff --git a/data/Test157.hs b/data/Test157.hs deleted file mode 100644 index f78c007..0000000 --- a/data/Test157.hs +++ /dev/null @@ -1,13 +0,0 @@ -import Prelude as X - hiding ( head - , init - , last - , maximum - , minimum - , pred - , read - , readFile - , succ - , tail - , undefined - ) diff --git a/data/Test158.hs b/data/Test158.hs deleted file mode 100644 index 0fb60c8..0000000 --- a/data/Test158.hs +++ /dev/null @@ -1,3 +0,0 @@ -import TestJustAbitToLongModuleNameLikeThisOneIs - ( ) -import TestJustShortEnoughModuleNameLikeThisOne ( ) diff --git a/data/Test159.hs b/data/Test159.hs deleted file mode 100644 index 886dfdc..0000000 --- a/data/Test159.hs +++ /dev/null @@ -1,3 +0,0 @@ -import TestJustAbitToLongModuleNameLikeThisOneI - as T -import TestJustShortEnoughModuleNameLikeThisOn as T diff --git a/data/Test16.hs b/data/Test16.hs deleted file mode 100644 index a91f667..0000000 --- a/data/Test16.hs +++ /dev/null @@ -1,6 +0,0 @@ -func - :: asd - -> Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test160.hs b/data/Test160.hs deleted file mode 100644 index eff7fd4..0000000 --- a/data/Test160.hs +++ /dev/null @@ -1,3 +0,0 @@ -import TestJustAbitToLongModuleNameLikeTh - hiding ( ) -import TestJustShortEnoughModuleNameLike hiding ( ) diff --git a/data/Test161.hs b/data/Test161.hs deleted file mode 100644 index 14bd638..0000000 --- a/data/Test161.hs +++ /dev/null @@ -1,10 +0,0 @@ -import MoreThanSufficientlyLongModuleNameWithSome - ( compact - , fit - , inA - , items - , layout - , not - , that - , will - ) diff --git a/data/Test162.hs b/data/Test162.hs deleted file mode 100644 index f09b604..0000000 --- a/data/Test162.hs +++ /dev/null @@ -1,11 +0,0 @@ -import TestJustAbitToLongModuleNameLikeTh - hiding ( abc - , def - , ghci - , jklm - ) -import TestJustShortEnoughModuleNameLike hiding ( abc - , def - , ghci - , jklm - ) diff --git a/data/Test163.hs b/data/Test163.hs deleted file mode 100644 index c71aaba..0000000 --- a/data/Test163.hs +++ /dev/null @@ -1,9 +0,0 @@ -import {-# SOURCE #-} safe qualified "qualifier" A hiding ( ) -import {-# SOURCE #-} safe qualified "qualifiers" A - hiding ( ) -import {-# SOURCE #-} safe qualified "qualifiers" AlsoAf as T -import {-# SOURCE #-} safe qualified "qualifiers" AlsoAff ( ) -import {-# SOURCE #-} safe qualified "qualifiers" AlsoAff - as T -import {-# SOURCE #-} safe qualified "qualifiers" AlsoAffe - ( ) diff --git a/data/Test164.hs b/data/Test164.hs deleted file mode 100644 index 26469d9..0000000 --- a/data/Test164.hs +++ /dev/null @@ -1,7 +0,0 @@ --- Test -import Data.List ( nub ) -- Test -{- Test -} -import qualified Data.List as L - ( foldl' ) {- Test -} --- Test -import Test ( test ) diff --git a/data/Test165.hs b/data/Test165.hs deleted file mode 100644 index af0b6ab..0000000 --- a/data/Test165.hs +++ /dev/null @@ -1,4 +0,0 @@ -import Test ( abc - , def - -- comment - ) diff --git a/data/Test166.hs b/data/Test166.hs deleted file mode 100644 index 3f0a3ea..0000000 --- a/data/Test166.hs +++ /dev/null @@ -1,3 +0,0 @@ -import Test ( abc - -- comment - ) diff --git a/data/Test167.hs b/data/Test167.hs deleted file mode 100644 index fb8c357..0000000 --- a/data/Test167.hs +++ /dev/null @@ -1,8 +0,0 @@ -import Test ( abc - -- comment - , def - , ghi - {- comment -} - , jkl - -- comment - ) diff --git a/data/Test168.hs b/data/Test168.hs deleted file mode 100644 index 40ca190..0000000 --- a/data/Test168.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Test ( -- comment - ) diff --git a/data/Test169.hs b/data/Test169.hs deleted file mode 100644 index 12a8008..0000000 --- a/data/Test169.hs +++ /dev/null @@ -1,8 +0,0 @@ -import Test ( longbindingNameThatoverflowsColum - ) -import Test ( Long - ( List - , Of - , Things - ) - ) diff --git a/data/Test17.hs b/data/Test17.hs deleted file mode 100644 index a4bf487..0000000 --- a/data/Test17.hs +++ /dev/null @@ -1,6 +0,0 @@ -func - :: Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> asd diff --git a/data/Test170.hs b/data/Test170.hs deleted file mode 100644 index 01d0881..0000000 --- a/data/Test170.hs +++ /dev/null @@ -1,18 +0,0 @@ -import Test ( Thing - ( -- Comments - ) - ) -import Test ( Thing - ( Item - -- and Comment - ) - ) -import Test ( Thing - ( With - -- Comments - , and - -- also - , items - -- ! - ) - ) diff --git a/data/Test171.hs b/data/Test171.hs deleted file mode 100644 index 2716a8d..0000000 --- a/data/Test171.hs +++ /dev/null @@ -1,2 +0,0 @@ -import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine - ( ) diff --git a/data/Test172.hs b/data/Test172.hs deleted file mode 100644 index 190cdb1..0000000 --- a/data/Test172.hs +++ /dev/null @@ -1,26 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -{- - - Test module - -} -module Test - ( test1 - -- ^ test - , test2 - -- | test - , test3 - , test4 - , test5 - , test6 - , test7 - , test8 - , test9 - , test10 - -- Test 10 - ) where --- Test -import Data.List ( nub ) -- Test -{- Test -} -import qualified Data.List as L - ( foldl' ) {- Test -} --- Test -import Test ( test ) diff --git a/data/Test173.hs b/data/Test173.hs deleted file mode 100644 index ca49c29..0000000 --- a/data/Test173.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Aaa -import Baa diff --git a/data/Test174.hs b/data/Test174.hs deleted file mode 100644 index cb7a8f3..0000000 --- a/data/Test174.hs +++ /dev/null @@ -1,5 +0,0 @@ -import Zaa -import Zab - -import Aaa -import Baa diff --git a/data/Test175.hs b/data/Test175.hs deleted file mode 100644 index b25e13a..0000000 --- a/data/Test175.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Boo -import qualified Zoo diff --git a/data/Test176.hs b/data/Test176.hs deleted file mode 100644 index 3ed3401..0000000 --- a/data/Test176.hs +++ /dev/null @@ -1,3 +0,0 @@ -import Boo ( a ) - -import Boo ( b ) diff --git a/data/Test177.hs b/data/Test177.hs deleted file mode 100644 index 67b690d..0000000 --- a/data/Test177.hs +++ /dev/null @@ -1,2 +0,0 @@ -import A.B.C -import A.B.D diff --git a/data/Test178.hs b/data/Test178.hs deleted file mode 100644 index f4d347f..0000000 --- a/data/Test178.hs +++ /dev/null @@ -1 +0,0 @@ -type MySynonym = String diff --git a/data/Test179.hs b/data/Test179.hs deleted file mode 100644 index dff281d..0000000 --- a/data/Test179.hs +++ /dev/null @@ -1 +0,0 @@ -type MySynonym a = [a] diff --git a/data/Test18.hs b/data/Test18.hs deleted file mode 100644 index aed66fd..0000000 --- a/data/Test18.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> asd) diff --git a/data/Test180.hs b/data/Test180.hs deleted file mode 100644 index 3f41a1a..0000000 --- a/data/Test180.hs +++ /dev/null @@ -1,3 +0,0 @@ --- | Important comment thrown in -type MySynonym b a - = MySynonym a b -> MySynonym a b -> MyParamType a b -> MyParamType a b diff --git a/data/Test181.hs b/data/Test181.hs deleted file mode 100644 index 727c443..0000000 --- a/data/Test181.hs +++ /dev/null @@ -1,7 +0,0 @@ -type MySynonym3 b a - = MySynonym a b - -> MySynonym a b - -- ^ RandomComment - -> MyParamType a b - -> MyParamType a b - -> MySynonym2 b a diff --git a/data/Test182.hs b/data/Test182.hs deleted file mode 100644 index 142a73a..0000000 --- a/data/Test182.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE StarIsType #-} -type MySynonym (a :: * -> *) - = MySynonym a b - -> MySynonym a b - -> MyParamType a b - -> MyParamType a b - -> MySynonym2 b a diff --git a/data/Test183.hs b/data/Test183.hs deleted file mode 100644 index a48b11c..0000000 --- a/data/Test183.hs +++ /dev/null @@ -1 +0,0 @@ -type MySynonym a = Num a => a -> Int diff --git a/data/Test184.hs b/data/Test184.hs deleted file mode 100644 index 7b868ea..0000000 --- a/data/Test184.hs +++ /dev/null @@ -1,5 +0,0 @@ -type MySynonym a - = Num a - => AReallyLongTypeName - -> AnotherReallyLongTypeName - -> AThirdTypeNameToOverflow diff --git a/data/Test185.hs b/data/Test185.hs deleted file mode 100644 index 69107a7..0000000 --- a/data/Test185.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE RankNTypes #-} -type MySynonym = forall a . [a] diff --git a/data/Test186.hs b/data/Test186.hs deleted file mode 100644 index ed9c0e4..0000000 --- a/data/Test186.hs +++ /dev/null @@ -1 +0,0 @@ -type (:+:) a b = (a, b) diff --git a/data/Test187.hs b/data/Test187.hs deleted file mode 100644 index 3b94215..0000000 --- a/data/Test187.hs +++ /dev/null @@ -1 +0,0 @@ -type a `MySynonym` b = a -> b diff --git a/data/Test188.hs b/data/Test188.hs deleted file mode 100644 index d7ba4a9..0000000 --- a/data/Test188.hs +++ /dev/null @@ -1 +0,0 @@ -type a :+: b = (a, b) diff --git a/data/Test189.hs b/data/Test189.hs deleted file mode 100644 index 7228f6d..0000000 --- a/data/Test189.hs +++ /dev/null @@ -1 +0,0 @@ -type (a `Foo` b) c = (a, b, c) diff --git a/data/Test19.hs b/data/Test19.hs deleted file mode 100644 index 92634de..0000000 --- a/data/Test19.hs +++ /dev/null @@ -1,7 +0,0 @@ -func - :: Trither - asd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test190.hs b/data/Test190.hs deleted file mode 100644 index b686bf0..0000000 --- a/data/Test190.hs +++ /dev/null @@ -1,3 +0,0 @@ -type Foo a -- fancy type comment - = -- strange comment - Int diff --git a/data/Test191.hs b/data/Test191.hs deleted file mode 100644 index b6ce836..0000000 --- a/data/Test191.hs +++ /dev/null @@ -1 +0,0 @@ -type (a :+: b) = (a, b) diff --git a/data/Test192.hs b/data/Test192.hs deleted file mode 100644 index f08498a..0000000 --- a/data/Test192.hs +++ /dev/null @@ -1,6 +0,0 @@ -type Foo - = ( -- t1 - A -- t2 - , -- t3 - B -- t4 - ) -- t5 diff --git a/data/Test193.hs b/data/Test193.hs deleted file mode 100644 index b422133..0000000 --- a/data/Test193.hs +++ /dev/null @@ -1,2 +0,0 @@ -instance MyClass Int where - myMethod x = x + 1 diff --git a/data/Test194.hs b/data/Test194.hs deleted file mode 100644 index 69107c6..0000000 --- a/data/Test194.hs +++ /dev/null @@ -1,4 +0,0 @@ -instance MyClass Int where - myMethod x = - -- insightful comment - x + 1 diff --git a/data/Test195.hs b/data/Test195.hs deleted file mode 100644 index 3de314a..0000000 --- a/data/Test195.hs +++ /dev/null @@ -1,3 +0,0 @@ -instance MyClass Int where - myMethod :: Int -> Int - myMethod x = x + 1 diff --git a/data/Test196.hs b/data/Test196.hs deleted file mode 100644 index 63f0d95..0000000 --- a/data/Test196.hs +++ /dev/null @@ -1,9 +0,0 @@ -instance MyClass Int where - myMethod - :: Int - -> Int - -> AReallyLongType - -> AReallyLongType - -> AReallyLongType - -> Int - myMethod x = x + 1 diff --git a/data/Test197.hs b/data/Test197.hs deleted file mode 100644 index d7c7d3c..0000000 --- a/data/Test197.hs +++ /dev/null @@ -1,3 +0,0 @@ -instance MyClass Int where - myMethod x = x + 1 - myMethod2 x = x + 1 diff --git a/data/Test198.hs b/data/Test198.hs deleted file mode 100644 index 811e7c4..0000000 --- a/data/Test198.hs +++ /dev/null @@ -1,11 +0,0 @@ -instance MyClass Int where - myMethod - :: Int - -> Int - -> AReallyLongType - -> AReallyLongType - -> AReallyLongType - -> Int - myMethod x = x + 1 - myMethod2 :: Int -> Int - myMethod2 x = x + 1 diff --git a/data/Test199.hs b/data/Test199.hs deleted file mode 100644 index 9b9cf38..0000000 --- a/data/Test199.hs +++ /dev/null @@ -1,4 +0,0 @@ --- | This instance should be commented on -instance MyClass Int where - -- | This method is also comment-worthy - myMethod x = x + 1 diff --git a/data/Test2.hs b/data/Test2.hs deleted file mode 100644 index b0d734a..0000000 --- a/data/Test2.hs +++ /dev/null @@ -1,3 +0,0 @@ -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test20.hs b/data/Test20.hs deleted file mode 100644 index 4ad54b6..0000000 --- a/data/Test20.hs +++ /dev/null @@ -1,7 +0,0 @@ -func - :: asd - -> ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test200.hs b/data/Test200.hs deleted file mode 100644 index c184597..0000000 --- a/data/Test200.hs +++ /dev/null @@ -1,4 +0,0 @@ -instance MyClass Int where - type MyType = Int - myMethod :: MyType -> Int - myMethod x = x + 1 diff --git a/data/Test201.hs b/data/Test201.hs deleted file mode 100644 index 1dcbe3a..0000000 --- a/data/Test201.hs +++ /dev/null @@ -1,5 +0,0 @@ -instance MyClass Int where - type MyType = String - myMethod :: MyType -> Int - myMethod x = x + 1 - type MyType = Int diff --git a/data/Test202.hs b/data/Test202.hs deleted file mode 100644 index b2789c2..0000000 --- a/data/Test202.hs +++ /dev/null @@ -1,8 +0,0 @@ -instance MyClass Int where - -- | This data is very important - data MyData = IntData - { intData :: String - , intData2 :: Int - } - myMethod :: MyData -> Int - myMethod = intData2 diff --git a/data/Test203.hs b/data/Test203.hs deleted file mode 100644 index 04353a6..0000000 --- a/data/Test203.hs +++ /dev/null @@ -1,11 +0,0 @@ -instance MyClass Int where - -- | This data is important - data MyData = Test Int Int - myMethod :: MyData -> Int - myMethod = intData2 - -- | This data is also important - data MyData2 = IntData - { intData :: String - -- ^ Interesting field - , intData2 :: Int - } diff --git a/data/Test204.hs b/data/Test204.hs deleted file mode 100644 index 7ad4fc6..0000000 --- a/data/Test204.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -module Lib where -instance Foo () where - newtype Bar () = Baz () - deriving (Eq, Ord, Show) - bar = Baz diff --git a/data/Test205.hs b/data/Test205.hs deleted file mode 100644 index a224c18..0000000 --- a/data/Test205.hs +++ /dev/null @@ -1,4 +0,0 @@ -instance Foo Int where - newtype Bar Int = BarInt - { unBarInt :: Int - } diff --git a/data/Test206.hs b/data/Test206.hs deleted file mode 100644 index 7266b3e..0000000 --- a/data/Test206.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -type family F a -type instance F Int = IO Int diff --git a/data/Test207.hs b/data/Test207.hs deleted file mode 100644 index 9bb7ba2..0000000 --- a/data/Test207.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -type family F a -type instance F Int = IO Int -- x diff --git a/data/Test208.hs b/data/Test208.hs deleted file mode 100644 index 0e3c3f8..0000000 --- a/data/Test208.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# language TypeFamilies #-} -module M where -type family F a -type instance F Int = IO Int diff --git a/data/Test209.hs b/data/Test209.hs deleted file mode 100644 index f103480..0000000 --- a/data/Test209.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -data family F a -newtype instance F Int = N Int diff --git a/data/Test21.hs b/data/Test21.hs deleted file mode 100644 index d27183e..0000000 --- a/data/Test21.hs +++ /dev/null @@ -1,7 +0,0 @@ -func - :: asd - -> ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test210.hs b/data/Test210.hs deleted file mode 100644 index 659bd8a..0000000 --- a/data/Test210.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -data family F a -newtype instance F Int = N Int -- x diff --git a/data/Test211.hs b/data/Test211.hs deleted file mode 100644 index 9e71377..0000000 --- a/data/Test211.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# language TypeFamilies #-} -module M where -data family F a -newtype instance F Int = N Int diff --git a/data/Test212.hs b/data/Test212.hs deleted file mode 100644 index 715990f..0000000 --- a/data/Test212.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -data family F a -data instance F Int = D Int diff --git a/data/Test213.hs b/data/Test213.hs deleted file mode 100644 index 0194c4c..0000000 --- a/data/Test213.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# language TypeFamilies #-} -data family F a -data instance F Int = D Int -- x diff --git a/data/Test214.hs b/data/Test214.hs deleted file mode 100644 index 81d27db..0000000 --- a/data/Test214.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# language TypeFamilies #-} -module M where -data family F a -data instance F Int = D Int diff --git a/data/Test215.hs b/data/Test215.hs deleted file mode 100644 index feaf541..0000000 --- a/data/Test215.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - type family F a -instance C Int where - type F Int = IO Int diff --git a/data/Test216.hs b/data/Test216.hs deleted file mode 100644 index 13dcee5..0000000 --- a/data/Test216.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - type family F a -instance C Int where - type F Int = IO Int -- x diff --git a/data/Test217.hs b/data/Test217.hs deleted file mode 100644 index c14956e..0000000 --- a/data/Test217.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# language TypeFamilies #-} -module M where -class C a where - type family F a -instance C Int where - type F Int = IO Int diff --git a/data/Test218.hs b/data/Test218.hs deleted file mode 100644 index 824b034..0000000 --- a/data/Test218.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - data family F a -instance C Int where - newtype F Int = N Int diff --git a/data/Test219.hs b/data/Test219.hs deleted file mode 100644 index 1df22e4..0000000 --- a/data/Test219.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - data family F a -instance C Int where - newtype F Int = N Int -- x diff --git a/data/Test22.hs b/data/Test22.hs deleted file mode 100644 index 35b8134..0000000 --- a/data/Test22.hs +++ /dev/null @@ -1,7 +0,0 @@ -func - :: ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> asd diff --git a/data/Test220.hs b/data/Test220.hs deleted file mode 100644 index 6f6dc67..0000000 --- a/data/Test220.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# language TypeFamilies #-} -module M where -class C a where - data family F a -instance C Int where - newtype F Int = N Int diff --git a/data/Test221.hs b/data/Test221.hs deleted file mode 100644 index 1ec34f4..0000000 --- a/data/Test221.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - data family F a -instance C Int where - data F Int = D Int diff --git a/data/Test222.hs b/data/Test222.hs deleted file mode 100644 index 84a1f5f..0000000 --- a/data/Test222.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# language TypeFamilies #-} -class C a where - data family F a -instance C Int where - data F Int = D Int -- x diff --git a/data/Test223.hs b/data/Test223.hs deleted file mode 100644 index 677369b..0000000 --- a/data/Test223.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# language TypeFamilies #-} -module M where -class C a where - data family F a -instance C Int where - data F Int = D Int diff --git a/data/Test224.hs b/data/Test224.hs deleted file mode 100644 index 8798205..0000000 --- a/data/Test224.hs +++ /dev/null @@ -1,3 +0,0 @@ -module Main where -import Prelude -firstDecl = True diff --git a/data/Test225.hs b/data/Test225.hs deleted file mode 100644 index e5861f4..0000000 --- a/data/Test225.hs +++ /dev/null @@ -1,10 +0,0 @@ -func = do - -- complex first step - aaa - -- complex second step - bbb - where - helper :: Helper - helper = helpful - other :: Other - other = True diff --git a/data/Test226.hs b/data/Test226.hs deleted file mode 100644 index d999644..0000000 --- a/data/Test226.hs +++ /dev/null @@ -1 +0,0 @@ -type instance MyFam Bool = String diff --git a/data/Test227.hs b/data/Test227.hs deleted file mode 100644 index a67980b..0000000 --- a/data/Test227.hs +++ /dev/null @@ -1 +0,0 @@ -type instance MyFam (Maybe a) = a -> Bool diff --git a/data/Test228.hs b/data/Test228.hs deleted file mode 100644 index 21a82dc..0000000 --- a/data/Test228.hs +++ /dev/null @@ -1,4 +0,0 @@ -type instance MyFam ALongishType - = AMuchLongerTypeThanThat - -> AnEvenLongerTypeThanTheLastOne - -> ShouldDefinitelyOverflow diff --git a/data/Test229.hs b/data/Test229.hs deleted file mode 100644 index 9299647..0000000 --- a/data/Test229.hs +++ /dev/null @@ -1,3 +0,0 @@ --- | A happy family -type instance MyFam Bool -- This is an odd one - = AnotherType -- Here's another diff --git a/data/Test23.hs b/data/Test23.hs deleted file mode 100644 index 45b6ecc..0000000 --- a/data/Test23.hs +++ /dev/null @@ -1 +0,0 @@ -func :: [a -> b] diff --git a/data/Test230.hs b/data/Test230.hs deleted file mode 100644 index c7daa9c..0000000 --- a/data/Test230.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} -func = if - | cond1 -> loooooooooooooooooooooooooooooong expr1 - | cond2 -> loooooooooooooooooooooooooooooong expr2 diff --git a/data/Test231.hs b/data/Test231.hs deleted file mode 100644 index 4580c39..0000000 --- a/data/Test231.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} -func = do - foo - bar $ if - | cond1 -> loooooooooooooooooooooooooooooong expr1 - | cond2 -> loooooooooooooooooooooooooooooong expr2 diff --git a/data/Test232.hs b/data/Test232.hs deleted file mode 100644 index a1e09b1..0000000 --- a/data/Test232.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE LambdaCase #-} -func = \case - FooBar -> x - Baz -> y diff --git a/data/Test233.hs b/data/Test233.hs deleted file mode 100644 index c4b3a93..0000000 --- a/data/Test233.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE ImplicitParams #-} -func :: (?asd::Int) -> () diff --git a/data/Test234.hs b/data/Test234.hs deleted file mode 100644 index 55305cf..0000000 --- a/data/Test234.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE ImplicitParams #-} -func - :: ( ?asd - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - -> () diff --git a/data/Test235.hs b/data/Test235.hs deleted file mode 100644 index 41406a4..0000000 --- a/data/Test235.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE RecursiveDo #-} -foo = do - rec a <- f b - b <- g a - return (a, b) diff --git a/data/Test236.hs b/data/Test236.hs deleted file mode 100644 index ebf2076..0000000 --- a/data/Test236.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE RecursiveDo #-} -foo = do - rec -- comment - a <- f b - b <- g a - return (a, b) diff --git a/data/Test237.hs b/data/Test237.hs deleted file mode 100644 index 78ecef2..0000000 --- a/data/Test237.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE ExplicitNamespaces #-} -{-# LANGUAGE PatternSynonyms #-} -module Test (type (++), (++), pattern Foo) where diff --git a/data/Test238.hs b/data/Test238.hs deleted file mode 100644 index 61444fa..0000000 --- a/data/Test238.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE ExplicitNamespaces #-} -{-# LANGUAGE PatternSynonyms #-} -import Test ( type (++) - , (++) - , pattern (:.) - , pattern Foo - ) diff --git a/data/Test239.hs b/data/Test239.hs deleted file mode 100644 index f535c48..0000000 --- a/data/Test239.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern J x = Just x diff --git a/data/Test24.hs b/data/Test24.hs deleted file mode 100644 index 272c2b4..0000000 --- a/data/Test24.hs +++ /dev/null @@ -1,4 +0,0 @@ -func - :: [ lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ] diff --git a/data/Test240.hs b/data/Test240.hs deleted file mode 100644 index 82251e5..0000000 --- a/data/Test240.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern F x <- (x, _) diff --git a/data/Test241.hs b/data/Test241.hs deleted file mode 100644 index e00b3ca..0000000 --- a/data/Test241.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern HeadC x <- x : xs where - HeadC x = [x] diff --git a/data/Test242.hs b/data/Test242.hs deleted file mode 100644 index f6587d6..0000000 --- a/data/Test242.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern Head2 x y <- x : y : xs where - Head2 x y = [x, y] diff --git a/data/Test243.hs b/data/Test243.hs deleted file mode 100644 index 4ffaf11..0000000 --- a/data/Test243.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern x :> y = [x, y] diff --git a/data/Test244.hs b/data/Test244.hs deleted file mode 100644 index d61801f..0000000 --- a/data/Test244.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern MyData { a, b, c } = [a, b, c] diff --git a/data/Test245.hs b/data/Test245.hs deleted file mode 100644 index 78869f8..0000000 --- a/data/Test245.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern myLongLeftVariableName `MyLongInfixPatternMatcher` myLongRightVariableName = - [myLongLeftVariableName, myLongRightVariableName] diff --git a/data/Test246.hs b/data/Test246.hs deleted file mode 100644 index 811bb22..0000000 --- a/data/Test246.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern myLeftVariableName `MyInfixPatternMatcher` myRightVariableName <- - [myLongLeftVariableName, myLongRightVariableName] where - MyInfixPatternMatcher x y = [x, x, y] diff --git a/data/Test247.hs b/data/Test247.hs deleted file mode 100644 index cd38165..0000000 --- a/data/Test247.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern J :: a -> Maybe a -pattern J x = Just x diff --git a/data/Test248.hs b/data/Test248.hs deleted file mode 100644 index 823e1f4..0000000 --- a/data/Test248.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE ViewPatterns #-} -pattern Signed x <- (asSigned -> x) where - Signed (Neg x) = -x - Signed Zero = 0 - Signed (Pos x) = x diff --git a/data/Test249.hs b/data/Test249.hs deleted file mode 100644 index 9b69561..0000000 --- a/data/Test249.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE ViewPatterns #-} -pattern Signed xxxxxxxxxxxxxxxxxxxxxxxx <- - (asSigned -> xxxxxxxxxxxxxxxxxxxxxxxx) where - Signed (Neg x) = -x - Signed Zero = 0 - Signed (Pos x) = x diff --git a/data/Test25.hs b/data/Test25.hs deleted file mode 100644 index 142958b..0000000 --- a/data/Test25.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ] diff --git a/data/Test250.hs b/data/Test250.hs deleted file mode 100644 index 8493743..0000000 --- a/data/Test250.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -{-# LANGUAGE ViewPatterns #-} -pattern Signed x <- (asSigned -> x) where - Signed (Neg x) = -x -- negative comment - Signed Zero = 0 -- zero comment - Signed (Pos x) = x -- positive comment diff --git a/data/Test251.hs b/data/Test251.hs deleted file mode 100644 index 3ea9b99..0000000 --- a/data/Test251.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern J, K :: a -> Maybe a diff --git a/data/Test252.hs b/data/Test252.hs deleted file mode 100644 index 54eb4c5..0000000 --- a/data/Test252.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE PatternSynonyms #-} -pattern LongMatcher - :: longlongtypevar - -> longlongtypevar - -> longlongtypevar - -> Maybe [longlongtypevar] -pattern LongMatcher x y z = Just [x, y, z] diff --git a/data/Test253.hs b/data/Test253.hs deleted file mode 100644 index 25fc4ce..0000000 --- a/data/Test253.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE UnboxedTuples #-} -spanKey :: (# Int, Int #) -> (# Int, Int #) -spanKey = case foo of - (# bar, baz #) -> (# baz, bar #) diff --git a/data/Test254.hs b/data/Test254.hs deleted file mode 100644 index 3ceb254..0000000 --- a/data/Test254.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE MagicHash, UnboxedTuples #-} -spanKey :: (# Int#, Int# #) -> (# Int#, Int# #) -spanKey = case foo of - (# bar#, baz# #) -> (# baz# +# bar#, bar# #) diff --git a/data/Test255.hs b/data/Test255.hs deleted file mode 100644 index a644156..0000000 --- a/data/Test255.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -func = [blub| - asd - qwe - |] diff --git a/data/Test256.hs b/data/Test256.hs deleted file mode 100644 index 1624200..0000000 --- a/data/Test256.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -func = [blub| - asd - qwe|] diff --git a/data/Test257.hs b/data/Test257.hs deleted file mode 100644 index 20f877f..0000000 --- a/data/Test257.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} -func = do - let body = [json| - hello - |] - pure True diff --git a/data/Test258.hs b/data/Test258.hs deleted file mode 100644 index 29039ca..0000000 --- a/data/Test258.hs +++ /dev/null @@ -1,9 +0,0 @@ --- brittany { lconfig_allowHangingQuasiQuotes: False } -{-# LANGUAGE QuasiQuotes #-} -func = do - let - body = - [json| - hello - |] - pure True diff --git a/data/Test259.hs b/data/Test259.hs deleted file mode 100644 index 2407ef8..0000000 --- a/data/Test259.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE OverloadedLabels #-} -foo = #bar diff --git a/data/Test26.hs b/data/Test26.hs deleted file mode 100644 index cdc1e7e..0000000 --- a/data/Test26.hs +++ /dev/null @@ -1 +0,0 @@ -func :: (a, b, c) diff --git a/data/Test260.hs b/data/Test260.hs deleted file mode 100644 index d7cc187..0000000 --- a/data/Test260.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE OverloadedLabels #-} -foo = #bar . #baz $ fmap #foo xs diff --git a/data/Test261.hs b/data/Test261.hs deleted file mode 100644 index f56379d..0000000 --- a/data/Test261.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE ImplicitParams #-} -foo = ?bar diff --git a/data/Test262.hs b/data/Test262.hs deleted file mode 100644 index 0ed092e..0000000 --- a/data/Test262.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE ImplicitParams #-} -foo = let ?bar = Foo in value diff --git a/data/Test263.hs b/data/Test263.hs deleted file mode 100644 index a85a777..0000000 --- a/data/Test263.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE ImplicitParams #-} -foo :: (?bar::Bool) => () -foo = () diff --git a/data/Test264.hs b/data/Test264.hs deleted file mode 100644 index d3ebee3..0000000 --- a/data/Test264.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = do - abc <- foo ---abc -return () diff --git a/data/Test265.hs b/data/Test265.hs deleted file mode 100644 index c965c63..0000000 --- a/data/Test265.hs +++ /dev/null @@ -1 +0,0 @@ -func = (()) diff --git a/data/Test266.hs b/data/Test266.hs deleted file mode 100644 index b6a3539..0000000 --- a/data/Test266.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = do - let foo True = True - foo _ = False - return () diff --git a/data/Test267.hs b/data/Test267.hs deleted file mode 100644 index 65d2172..0000000 --- a/data/Test267.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = do - s <- mGet - mSet $ s { _lstate_indent = _lstate_indent state } diff --git a/data/Test268.hs b/data/Test268.hs deleted file mode 100644 index 6d369d8..0000000 --- a/data/Test268.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = do - s <- mGet - mSet $ s { _lstate_indent = _lstate_indent state - , _lstate_foo = _lstate_foo state - } diff --git a/data/Test269.hs b/data/Test269.hs deleted file mode 100644 index 4741485..0000000 --- a/data/Test269.hs +++ /dev/null @@ -1,6 +0,0 @@ -func = do - s <- mGet - mSet $ s - { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test27.hs b/data/Test27.hs deleted file mode 100644 index 774cc9d..0000000 --- a/data/Test27.hs +++ /dev/null @@ -1 +0,0 @@ -func :: ((a, b, c), (a, b, c), (a, b, c)) diff --git a/data/Test270.hs b/data/Test270.hs deleted file mode 100644 index cd17597..0000000 --- a/data/Test270.hs +++ /dev/null @@ -1 +0,0 @@ -func = Foo { _lstate_indent = _lstate_indent state } diff --git a/data/Test271.hs b/data/Test271.hs deleted file mode 100644 index 112af5e..0000000 --- a/data/Test271.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = Foo - { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_fooo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test272.hs b/data/Test272.hs deleted file mode 100644 index 3d0a415..0000000 --- a/data/Test272.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = do - Foo { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test273.hs b/data/Test273.hs deleted file mode 100644 index 172b344..0000000 --- a/data/Test273.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = do --- abc - -- def - return () diff --git a/data/Test274.hs b/data/Test274.hs deleted file mode 100644 index 13d9924..0000000 --- a/data/Test274.hs +++ /dev/null @@ -1,6 +0,0 @@ -func = do - do - return () - -- abc - -- def - return () diff --git a/data/Test275.hs b/data/Test275.hs deleted file mode 100644 index 45fbb05..0000000 --- a/data/Test275.hs +++ /dev/null @@ -1,6 +0,0 @@ -func - :: Int -- basic indentation amount - -> Int -- currently used width in current line (after indent) - -- used to accurately calc placing of the current-line - -> LayoutDesc - -> Int diff --git a/data/Test276.hs b/data/Test276.hs deleted file mode 100644 index 1a55b76..0000000 --- a/data/Test276.hs +++ /dev/null @@ -1,7 +0,0 @@ -func = - ( lkjadljasldjalskdjaldjalsdjkalsdjlaksdjlasjdlajsaldskj - $ abc - $ def - $ ghi - $ jkl - ) diff --git a/data/Test277.hs b/data/Test277.hs deleted file mode 100644 index 954c81d..0000000 --- a/data/Test277.hs +++ /dev/null @@ -1,2 +0,0 @@ -buildG bounds0 edges0 = accumArray (flip (:)) [] bounds0 (map reassoc edges0) - where reassoc (v, e, w) = (v, (e, w)) diff --git a/data/Test278.hs b/data/Test278.hs deleted file mode 100644 index 012222d..0000000 --- a/data/Test278.hs +++ /dev/null @@ -1,4 +0,0 @@ -downloadRepoPackage = case repo of - RepoLocal {..} -> return () - RepoLocal { abc } -> return () - RepoLocal{} -> return () diff --git a/data/Test279.hs b/data/Test279.hs deleted file mode 100644 index 2a53d37..0000000 --- a/data/Test279.hs +++ /dev/null @@ -1,6 +0,0 @@ -func = do - let (primaryPkg, otherPkgs) = selectPrimaryLocalPackage pwd pkgs' - (bproblems, x) = resolveBuildTargets primaryPkg otherPkgs utargets'' - -- default local dir target if there's no given target - utargets'' = "foo" - return () diff --git a/data/Test28.hs b/data/Test28.hs deleted file mode 100644 index 06bd705..0000000 --- a/data/Test28.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test280.hs b/data/Test280.hs deleted file mode 100644 index 0ea93d9..0000000 --- a/data/Test280.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = - [ (thing, take 10 alts) --TODO: select best ones - | (thing, _got, alts@(_ : _)) <- nosuchFooThing - , gast <- award - ] diff --git a/data/Test281.hs b/data/Test281.hs deleted file mode 100644 index 6366436..0000000 --- a/data/Test281.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = if x - then if y -- y is important - then foo - else bar - else Nothing diff --git a/data/Test282.hs b/data/Test282.hs deleted file mode 100644 index c6cba2d..0000000 --- a/data/Test282.hs +++ /dev/null @@ -1,7 +0,0 @@ -wrapPatPrepend pat prepElem = do - patDocs <- layoutPat pat - case Seq.viewl patDocs of - Seq.EmptyL -> return $ Seq.empty - x1 Seq.:< xR -> do - x1' <- docSeq [prepElem, return x1] - return $ x1' Seq.<| xR diff --git a/data/Test283.hs b/data/Test283.hs deleted file mode 100644 index 21044e6..0000000 --- a/data/Test283.hs +++ /dev/null @@ -1,6 +0,0 @@ -layoutWriteNewlineBlock - :: ( MonadMultiWriter Text.Builder.Builder m - , MonadMultiState LayoutState m - , MonadMultiWriter (Seq String) m - ) - => m () diff --git a/data/Test284.hs b/data/Test284.hs deleted file mode 100644 index f6a21c7..0000000 --- a/data/Test284.hs +++ /dev/null @@ -1,24 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} -readMergePersConfig path shouldCreate conf = do - exists <- liftIO $ System.Directory.doesFileExist path - if - | exists -> do - contents <- liftIO $ ByteString.readFile path -- no lazy IO, tyvm. - fileConf <- case Data.Yaml.decodeEither contents of - Left e -> do - liftIO - $ putStrErrLn - $ "error reading in brittany config from " - ++ path - ++ ":" - liftIO $ putStrErrLn e - mzero - Right x -> return x - return $ fileConf Semigroup.<> conf - | shouldCreate -> do - liftIO $ ByteString.writeFile path $ Data.Yaml.encode $ cMap - (Option . Just . runIdentity) - staticDefaultConfig - return $ conf - | otherwise -> do - return conf diff --git a/data/Test285.hs b/data/Test285.hs deleted file mode 100644 index 388281d..0000000 --- a/data/Test285.hs +++ /dev/null @@ -1,12 +0,0 @@ -func = BuildReport - where - convertInstallOutcome = case result of - Left BR.PlanningFailed -> PlanningFailed - Left (BR.DependentFailed p) -> DependencyFailed p - Left (BR.DownloadFailed _) -> DownloadFailed - Left (BR.UnpackFailed _) -> UnpackFailed - Left (BR.ConfigureFailed _) -> ConfigureFailed - Left (BR.BuildFailed _) -> BuildFailed - Left (BR.TestsFailed _) -> TestsFailed - Left (BR.InstallFailed _) -> InstallFailed - Right (BR.BuildOk _ _ _ ) -> InstallOk diff --git a/data/Test286.hs b/data/Test286.hs deleted file mode 100644 index 388281d..0000000 --- a/data/Test286.hs +++ /dev/null @@ -1,12 +0,0 @@ -func = BuildReport - where - convertInstallOutcome = case result of - Left BR.PlanningFailed -> PlanningFailed - Left (BR.DependentFailed p) -> DependencyFailed p - Left (BR.DownloadFailed _) -> DownloadFailed - Left (BR.UnpackFailed _) -> UnpackFailed - Left (BR.ConfigureFailed _) -> ConfigureFailed - Left (BR.BuildFailed _) -> BuildFailed - Left (BR.TestsFailed _) -> TestsFailed - Left (BR.InstallFailed _) -> InstallFailed - Right (BR.BuildOk _ _ _ ) -> InstallOk diff --git a/data/Test287.hs b/data/Test287.hs deleted file mode 100644 index a50af8b..0000000 --- a/data/Test287.hs +++ /dev/null @@ -1,35 +0,0 @@ -showPackageDetailedInfo pkginfo = - renderStyle (style { lineLength = 80, ribbonsPerLine = 1 }) - $ char '*' - $+$ something - [ entry "Synopsis" synopsis hideIfNull reflowParagraphs - , entry "Versions available" - sourceVersions - (altText null "[ Not available from server ]") - (dispTopVersions 9 (preferredVersions pkginfo)) - , entry - "Versions installed" - installedVersions - (altText - null - (if hasLib pkginfo then "[ Not installed ]" else "[ Unknown ]") - ) - (dispTopVersions 4 (preferredVersions pkginfo)) - , entry "Homepage" homepage orNotSpecified text - , entry "Bug reports" bugReports orNotSpecified text - , entry "Description" description hideIfNull reflowParagraphs - , entry "Category" category hideIfNull text - , entry "License" license alwaysShow disp - , entry "Author" author hideIfNull reflowLines - , entry "Maintainer" maintainer hideIfNull reflowLines - , entry "Source repo" sourceRepo orNotSpecified text - , entry "Executables" executables hideIfNull (commaSep text) - , entry "Flags" flags hideIfNull (commaSep dispFlag) - , entry "Dependencies" dependencies hideIfNull (commaSep dispExtDep) - , entry "Documentation" haddockHtml showIfInstalled text - , entry "Cached" haveTarball alwaysShow dispYesNo - , if not (hasLib pkginfo) - then empty - else text "Modules:" - $+$ nest 4 (vcat (map disp . sort . modules $ pkginfo)) - ] diff --git a/data/Test288.hs b/data/Test288.hs deleted file mode 100644 index 3289dd7..0000000 --- a/data/Test288.hs +++ /dev/null @@ -1,2 +0,0 @@ -isValidPosition position | validX && validY = Just position - | otherwise = Nothing diff --git a/data/Test289.hs b/data/Test289.hs deleted file mode 100644 index 023032c..0000000 --- a/data/Test289.hs +++ /dev/null @@ -1,6 +0,0 @@ -foo = Reflex.runSpiderHost $ ReflexHost.hostApp $ do - (inputEvent :: Reflex.Event Reflex.Spider String, inputFire :: String - -> IO Bool ) <- - ReflexHost.newExternalEvent - liftIO . forkIO . forever $ getLine >>= inputFire - ReflexHost.performEvent_ $ fmap (liftIO . putStrLn) inputEvent diff --git a/data/Test29.hs b/data/Test29.hs deleted file mode 100644 index fc19ba1..0000000 --- a/data/Test29.hs +++ /dev/null @@ -1,6 +0,0 @@ -func - :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd) - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ) diff --git a/data/Test290.hs b/data/Test290.hs deleted file mode 100644 index 689fa70..0000000 --- a/data/Test290.hs +++ /dev/null @@ -1,2 +0,0 @@ -foldrDesc f z = unSwitchQueue $ \q -> - switch (Min.foldrDesc (f unTaggedF) z q) (Min.foldrAsc (f unTaggedF) z q) diff --git a/data/Test291.hs b/data/Test291.hs deleted file mode 100644 index 68face0..0000000 --- a/data/Test291.hs +++ /dev/null @@ -1,5 +0,0 @@ -autocheckCases = - [ ("Never Deadlocks" , representative deadlocksNever) - , ("No Exceptions" , representative exceptionsNever) - , ("Consistent Result", alwaysSame) -- already representative - ] diff --git a/data/Test292.hs b/data/Test292.hs deleted file mode 100644 index cc6ecb2..0000000 --- a/data/Test292.hs +++ /dev/null @@ -1,7 +0,0 @@ -autocheckCases = - [ ("Never Deadlocks", representative deadlocksNever) - , ("No Exceptions" , representative exceptionsNever) - , ( "Consistent Result" - , alwaysSame -- already representative - ) - ] diff --git a/data/Test293.hs b/data/Test293.hs deleted file mode 100644 index 596f9ea..0000000 --- a/data/Test293.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = - [ (abc, (1111, 1111)) - , (def, (2, 2)) - , foo -- comment - ] diff --git a/data/Test294.hs b/data/Test294.hs deleted file mode 100644 index 927da51..0000000 --- a/data/Test294.hs +++ /dev/null @@ -1,2 +0,0 @@ -foo a b = g a b -- fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo - where g a b = b + b * a diff --git a/data/Test295.hs b/data/Test295.hs deleted file mode 100644 index 2b6fc80..0000000 --- a/data/Test295.hs +++ /dev/null @@ -1 +0,0 @@ -foo a b = g a b where g a b = b + b * a -- fooooooooooooooooooooooooooooooooooo diff --git a/data/Test296.hs b/data/Test296.hs deleted file mode 100644 index 1954213..0000000 --- a/data/Test296.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = do - abc <- expr - abcccccccccccccccccc <- expr - abcccccccccccccccccccccccccccccccccccccccccc <- expr - abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr diff --git a/data/Test297.hs b/data/Test297.hs deleted file mode 100644 index 198bd69..0000000 --- a/data/Test297.hs +++ /dev/null @@ -1,3 +0,0 @@ -func (MyLongFoo abc def) = 1 -func (Bar a d ) = 2 -func _ = 3 diff --git a/data/Test298.hs b/data/Test298.hs deleted file mode 100644 index 17013e2..0000000 --- a/data/Test298.hs +++ /dev/null @@ -1,14 +0,0 @@ -parserCompactLocation = - [ try - $ [ ParseRelAbs (Text.Read.read digits) _ _ - | digits <- many1 digit - , rel1 :: Maybe (Either Int (Ratio Int)) <- optionMaybe - [ case divPart of - Nothing -> Left $ Text.Read.read digits - Just ddigits -> - Right $ Text.Read.read digits % Text.Read.read ddigits - | digits <- many1 digit - , divPart <- optionMaybe (string "/" *> many1 digit) - ] - ] - ] diff --git a/data/Test299.hs b/data/Test299.hs deleted file mode 100644 index 26927f9..0000000 --- a/data/Test299.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = fooooooooooooooooooooooooooooooooo $ foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo diff --git a/data/Test3.hs b/data/Test3.hs deleted file mode 100644 index 98d8196..0000000 --- a/data/Test3.hs +++ /dev/null @@ -1,4 +0,0 @@ -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lakjsdlkjasldkj - -> lakjsdlkjasldkj diff --git a/data/Test30.hs b/data/Test30.hs deleted file mode 100644 index 2ed144e..0000000 --- a/data/Test30.hs +++ /dev/null @@ -1,6 +0,0 @@ -func - :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ] diff --git a/data/Test300.hs b/data/Test300.hs deleted file mode 100644 index 0338df4..0000000 --- a/data/Test300.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = - fooooooooooooooooooooooooooooooooo - + foooooooooooooooooooooooooooooooo foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo diff --git a/data/Test301.hs b/data/Test301.hs deleted file mode 100644 index bd8d21c..0000000 --- a/data/Test301.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = fooooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo - [ foooooooooooooooooooooooooooooooo - , foooooooooooooooooooooooooooooooo - , foooooooooooooooooooooooooooooooo - ] diff --git a/data/Test302.hs b/data/Test302.hs deleted file mode 100644 index 946346c..0000000 --- a/data/Test302.hs +++ /dev/null @@ -1,18 +0,0 @@ -parserPrim = - [ r - | r <- - [ SGPPrimFloat $ bool id (0 -) minus $ readGnok "parserPrim" - (d1 ++ d2 ++ d3 ++ d4) - | d2 <- string "." - , d3 <- many1 (oneOf "0123456789") - , _ <- string "f" - ] - <|> [ SGPPrimFloat $ bool id (0 -) minus $ fromIntegral - (readGnok "parserPrim" d1 :: Integer) - | _ <- string "f" - ] - <|> [ SGPPrimInt $ bool id (0 -) minus $ fromIntegral - (readGnok "parserPrim" d1 :: Integer) - | _ <- string "i" - ] - ] diff --git a/data/Test303.hs b/data/Test303.hs deleted file mode 100644 index d3f4d9e..0000000 --- a/data/Test303.hs +++ /dev/null @@ -1,2 +0,0 @@ -samples = (SV.unpackaaaaadat) <&> \f -> - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/data/Test304.hs b/data/Test304.hs deleted file mode 100644 index c62bfc0..0000000 --- a/data/Test304.hs +++ /dev/null @@ -1,9 +0,0 @@ -runBrittany tabSize text = do - let config' = staticDefaultConfig - config = config' - { _conf_layout = (_conf_layout config') - { _lconfig_indentAmount = coerce tabSize - } - , _conf_forward = forwardOptionsSyntaxExtsEnabled - } - parsePrintModule config text diff --git a/data/Test305.hs b/data/Test305.hs deleted file mode 100644 index a288c39..0000000 --- a/data/Test305.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_indentPolicy: IndentPolicyLeft } -runBrittany tabSize text = do - let - config' = staticDefaultConfig - config = config' - { _conf_layout = (_conf_layout config') - { _lconfig_indentAmount = coerce tabSize - } - , _conf_forward = forwardOptionsSyntaxExtsEnabled - } - parsePrintModule config text diff --git a/data/Test306.hs b/data/Test306.hs deleted file mode 100644 index 822d18a..0000000 --- a/data/Test306.hs +++ /dev/null @@ -1,7 +0,0 @@ -foo = - ( a - , -- comment1 - b - -- comment2 - , c - ) diff --git a/data/Test307.hs b/data/Test307.hs deleted file mode 100644 index 0d54fb5..0000000 --- a/data/Test307.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE TypeApplications #-} -foo = bar @Baz diff --git a/data/Test308.hs b/data/Test308.hs deleted file mode 100644 index ca3fd97..0000000 --- a/data/Test308.hs +++ /dev/null @@ -1,50 +0,0 @@ -{-# LANGUAGE TypeApplications #-} -layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do - docAlt - $ -- one-line solution - [ docCols - (ColBindingLine alignmentToken) - [ docSeq (patPartInline ++ [guardPart]) - , docSeq - [ appSep $ return binderDoc - , docForceSingleline $ return body - , wherePart - ] - ] - | not hasComments - , [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - , wherePart <- case mWhereDocs of - Nothing -> return @[] $ docEmpty - Just [w] -> return @[] $ docSeq - [ docSeparator - , appSep $ docLit $ Text.pack "where" - , docSetIndentLevel $ docForceSingleline $ return w - ] - _ -> [] - ] - ++ -- one-line solution + where in next line(s) - [ docLines - $ [ docCols - (ColBindingLine alignmentToken) - [ docSeq (patPartInline ++ [guardPart]) - , docSeq - [appSep $ return binderDoc, docForceParSpacing $ return body] - ] - ] - ++ wherePartMultiLine - | [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - , Data.Maybe.isJust mWhereDocs - ] - ++ -- two-line solution + where in next line(s) - [ docLines - $ [ docForceSingleline - $ docSeq (patPartInline ++ [guardPart, return binderDoc]) - , docEnsureIndent BrIndentRegular $ docForceSingleline $ return - body - ] - ++ wherePartMultiLine - | [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - ] diff --git a/data/Test309.hs b/data/Test309.hs deleted file mode 100644 index d02a8c6..0000000 --- a/data/Test309.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE MultiWayIf #-} -func = do - let foo = if - | Constuctoooooooooooooooooooooooooooooooooooor `elem` artics -- TODO - -> max - (defLen - 0.2) -- TODO - (defLen * 0.8) - | otherwise -> max (defLen - 0.05) (defLen * 0.95) -- TODO - return True diff --git a/data/Test31.hs b/data/Test31.hs deleted file mode 100644 index 7e217d5..0000000 --- a/data/Test31.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -func :: forall (a :: *) b . a -> b diff --git a/data/Test310.hs b/data/Test310.hs deleted file mode 100644 index a6f54fa..0000000 --- a/data/Test310.hs +++ /dev/null @@ -1,5 +0,0 @@ -foo n = case n of - 1 -> True - -1 -> False -bar n = case n of - (-2, -2) -> (-2, -2) diff --git a/data/Test311.hs b/data/Test311.hs deleted file mode 100644 index 99e92c5..0000000 --- a/data/Test311.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE TypeApplications #-} -foo = - let a = b @1 - cccc = () - in foo diff --git a/data/Test312.hs b/data/Test312.hs deleted file mode 100644 index 615e416..0000000 --- a/data/Test312.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE RecordWildCards #-} -v = A { a = 1, .. } where b = 2 diff --git a/data/Test313.hs b/data/Test313.hs deleted file mode 100644 index 1f5f34f..0000000 --- a/data/Test313.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE RecordWildCards #-} -v = A { .. } where b = 2 diff --git a/data/Test314.hs b/data/Test314.hs deleted file mode 100644 index e0cc55d..0000000 --- a/data/Test314.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE RecordWildCards #-} -v = A { a = 1, b = 2, c = 3 } diff --git a/data/Test315.hs b/data/Test315.hs deleted file mode 100644 index 8bd72ce..0000000 --- a/data/Test315.hs +++ /dev/null @@ -1 +0,0 @@ -test :: Proxy 'Int diff --git a/data/Test316.hs b/data/Test316.hs deleted file mode 100644 index e5a8eef..0000000 --- a/data/Test316.hs +++ /dev/null @@ -1 +0,0 @@ -test :: Proxy '[ 'True] diff --git a/data/Test317.hs b/data/Test317.hs deleted file mode 100644 index 79d5442..0000000 --- a/data/Test317.hs +++ /dev/null @@ -1 +0,0 @@ -test :: Proxy '[Bool] diff --git a/data/Test318.hs b/data/Test318.hs deleted file mode 100644 index f2c5673..0000000 --- a/data/Test318.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE RankNTypes, KindSignatures #-} -func - :: forall m str - . (Str str, Monad m) - => Int - -> Proxy (str :: [*]) - -> m (Tagged str String) diff --git a/data/Test319.hs b/data/Test319.hs deleted file mode 100644 index 1c6ce85..0000000 --- a/data/Test319.hs +++ /dev/null @@ -1,13 +0,0 @@ -widgetsDyn = - [ [ vBox - [ padTop Max outputLinesWidget - , padRight Max wid1 <+> flowWidget -- alignment here is strange/buggy - , padBottom (Pad 5) help - ] - ] - | wid1 <- promptDyn - , (flowWidget, _) <- flowResultD - , outputLinesWidget <- outputLinesWidgetD - , help <- suggestionHelpBox - , parser <- cmdParserD - ] diff --git a/data/Test32.hs b/data/Test32.hs deleted file mode 100644 index 19e72f4..0000000 --- a/data/Test32.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -func - :: forall m - . Foo - => ColMap2 - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> m () diff --git a/data/Test320.hs b/data/Test320.hs deleted file mode 100644 index c7e9eae..0000000 --- a/data/Test320.hs +++ /dev/null @@ -1,2 +0,0 @@ -fmapuv :: U.Unbox a => (a -> b) -> U.Vector a -> V.Vector b -fmapuv f xs = G.generate (G.length xs) (f . (xs G.!)) diff --git a/data/Test321.hs b/data/Test321.hs deleted file mode 100644 index 5cee20d..0000000 --- a/data/Test321.hs +++ /dev/null @@ -1 +0,0 @@ -cs0 = 0 : [ c / Interval n | c <- cs | n <- [1..] ] diff --git a/data/Test322.hs b/data/Test322.hs deleted file mode 100644 index f515f6d..0000000 --- a/data/Test322.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE TemplateHaskell #-} -deriveFromJSON (unPrefix "assignPost") ''AssignmentPost diff --git a/data/Test323.hs b/data/Test323.hs deleted file mode 100644 index ae0ee2e..0000000 --- a/data/Test323.hs +++ /dev/null @@ -1,7 +0,0 @@ -main = -- a - let --b - x = 1 -- x - y = 2 -- y - in do - print x - print y diff --git a/data/Test324.hs b/data/Test324.hs deleted file mode 100644 index fcbe491..0000000 --- a/data/Test324.hs +++ /dev/null @@ -1,9 +0,0 @@ -alternatives :: Parser (Maybe Text) -alternatives = - alternativeOne -- first try this one - <|> alterantiveTwo -- then this one - <|> alternativeThree -- then this one - where - alternativeOne = purer "one" - alternativeTwo = purer "two" - alterantiveThree = purer "three" diff --git a/data/Test325.hs b/data/Test325.hs deleted file mode 100644 index b8d67d0..0000000 --- a/data/Test325.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -func = do - let !forced = some - pure () diff --git a/data/Test326.hs b/data/Test326.hs deleted file mode 100644 index 0435d04..0000000 --- a/data/Test326.hs +++ /dev/null @@ -1,4 +0,0 @@ -spanKey p q = case minViewWithKey q of - Just ((k, _), q') | p k -> - let (kas, q'') = spanKey p q' in ((k, a) : kas, q'') - _ -> ([], q) diff --git a/data/Test327.hs b/data/Test327.hs deleted file mode 100644 index b7efa94..0000000 --- a/data/Test327.hs +++ /dev/null @@ -1 +0,0 @@ -a :: () ':- () diff --git a/data/Test328.hs b/data/Test328.hs deleted file mode 100644 index c2ace2f..0000000 --- a/data/Test328.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = do - createDirectoryIfMissing True path - openFile fileName AppendMode diff --git a/data/Test329.hs b/data/Test329.hs deleted file mode 100644 index 449cf88..0000000 --- a/data/Test329.hs +++ /dev/null @@ -1,7 +0,0 @@ -alternatives :: Parser (Maybe Text) -alternatives = -- a - ( -- b - alternativeOne -- c - <|> alterantiveTwo -- d - <|> alternativeThree -- e - ) -- f diff --git a/data/Test33.hs b/data/Test33.hs deleted file mode 100644 index 335c68e..0000000 --- a/data/Test33.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -func - :: forall m - . ColMap2 - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> m () diff --git a/data/Test330.hs b/data/Test330.hs deleted file mode 100644 index 0485ac6..0000000 --- a/data/Test330.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -func - :: forall a - . () - => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -func - :: () - => aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - -> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/data/Test331.hs b/data/Test331.hs deleted file mode 100644 index 9737285..0000000 --- a/data/Test331.hs +++ /dev/null @@ -1,5 +0,0 @@ -go l [] = Right l -go l ((IRType, _a) : eqr) = go l eqr -go l ((_, IRType) : eqr) = go l eqr -go _ ((IRTypeError ps t1 t2, _) : _) = Left $ makeError ps t1 t2 -go _ ((_, IRTypeError ps t1 t2) : _) = Left $ makeError ps t1 t2 diff --git a/data/Test332.hs b/data/Test332.hs deleted file mode 100644 index 1785320..0000000 --- a/data/Test332.hs +++ /dev/null @@ -1,2 +0,0 @@ -type instance XPure StageParse = () -type Pair a = (a, a) diff --git a/data/Test333.hs b/data/Test333.hs deleted file mode 100644 index 0b87f50..0000000 --- a/data/Test333.hs +++ /dev/null @@ -1,18 +0,0 @@ --- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } -dsfnjKeekbwwbosbOfakxqRsiyix cnehokzozwbVaguvu migbnaRwutbz = - let - eyuAfrarIso' - :: (RveoexdxunuAafalm -> Axlau (Axlau (a, OinejrdCplle))) - -> Gbodoy - -> Axlau (Axlau OinejrdCplle, Gbodoy) - eyuAfrarIso' = ulcPaaekBst cnehokzozwbVaguvu - amkgoxEhalazJjxunecCuIfaw - :: Axlau (Axlau OinejrdCplle, Gbodoy) -> Axlau RqlnrluYqednbCiggxi - amkgoxEhalazJjxunecCuIfaw uKqviuBisjtn = do - (sEmo, quc) <- uKqviuBisjtn - pure (xoheccewfWoeyiagOkfodiq sEmo quc) - xoheccewfWoeyiagOkfodiq - :: Axlau OinejrdCplle -> Gbodoy -> RqlnrluYqednbCiggxi - xoheccewfWoeyiagOkfodiq sEmo quc = case migbnaRwutbz of - Afogmf -> xgeqe (OfBkkuih quc) (Ciitog quc) sEmo - in QabqyilexuiNizzhsQuxxac migbnaRwutbz (hwaTihhjt lhowvscIiozgqe) diff --git a/data/Test334.hs b/data/Test334.hs deleted file mode 100644 index f97dfd6..0000000 --- a/data/Test334.hs +++ /dev/null @@ -1,5 +0,0 @@ -spec = do - it "creates a snapshot at the given level" . withGraph runDB $ do - lift $ do - studentDiagnosticReadingLevel updatedStudent `shouldBe` Just 10 -- x - elaSnapshotReadingLevel snapshot `shouldBe` 12 diff --git a/data/Test335.hs b/data/Test335.hs deleted file mode 100644 index 0a2a760..0000000 --- a/data/Test335.hs +++ /dev/null @@ -1,12 +0,0 @@ -jaicyhHumzo btrKpeyiFej mava = do - m :: VtohxeRgpmgsu <- qloxIfiq mava - case m of - ZumnaoFujayerIswadabo kkecm chlixxag -> do - imomue <- ozisduRaqiseSBAob btrKpeyiFej $ \s -> - case MizA.pigevo kkecm (_tc_gulawulu s) of - Ebocaba -> - ( s { _tc_gulawulu = MizA.jxariu kkecm rwuRqxzhjo (_tc_gulawulu s) } - , Gtzvonm - ) - Xcde{} -> (s, Pioemav) - pure imomue diff --git a/data/Test336.hs b/data/Test336.hs deleted file mode 100644 index 5876f85..0000000 --- a/data/Test336.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_indentPolicy: IndentPolicyMultiple } -foo = bar - arg1 -- this is the first argument - arg2 -- this is the second argument - arg3 -- this is the third argument, now I'll skip one comment - arg4 - arg5 -- this is the fifth argument - arg6 -- this is the sixth argument diff --git a/data/Test337.hs b/data/Test337.hs deleted file mode 100644 index 917af95..0000000 --- a/data/Test337.hs +++ /dev/null @@ -1,4 +0,0 @@ -True `nand` True = False -nand _ _ = True -nor False False = True -_ `nor` _ = False diff --git a/data/Test338.hs b/data/Test338.hs deleted file mode 100644 index e6df6c6..0000000 --- a/data/Test338.hs +++ /dev/null @@ -1 +0,0 @@ -f ((:) a as) = undefined diff --git a/data/Test339.hs b/data/Test339.hs deleted file mode 100644 index cfa949d..0000000 --- a/data/Test339.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE BangPatterns #-} -a = \x -> x -b = \ ~x -> x -c = \ !x -> x -d = \(~x) -> x diff --git a/data/Test34.hs b/data/Test34.hs deleted file mode 100644 index 24f6b28..0000000 --- a/data/Test34.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE RankNTypes #-} -addFlagStringParam - :: forall f out - . (Applicative f) - => String -- ^ short flag chars, i.e. "v" for -v - -> [String] -- ^ list of long names, i.e. ["verbose"] - -> String -- ^ param name - -> Flag String -- ^ properties - -> CmdParser f out String diff --git a/data/Test340.hs b/data/Test340.hs deleted file mode 100644 index fb61bc1..0000000 --- a/data/Test340.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE RankNTypes #-} -func :: forall b . Show b => b -> String diff --git a/data/Test341.hs b/data/Test341.hs deleted file mode 100644 index cea68da..0000000 --- a/data/Test341.hs +++ /dev/null @@ -1,3 +0,0 @@ -{-# LANGUAGE TypeFamilies #-} -f :: ((~) a b) => a -> b -f = id diff --git a/data/Test342.hs b/data/Test342.hs deleted file mode 100644 index c522948..0000000 --- a/data/Test342.hs +++ /dev/null @@ -1,50 +0,0 @@ --- brittany { lconfig_indentPolicy: IndentPolicyLeft } -vakjkeSulxudbFokvir = Duotpo - { _ekku_gcrpbze = xgonae (1 :: Int) - , _oola_louwu = FoqsiYcuidx - { _xxagu_umea_iaztoj = xgonae False - , _tuktg_tizo_kfikacygsqf = xgonae False - , _ahzbo_xpow_otq_nzeyufq = xgonae False - , _uagpi_lzps_luy_xcjn = xgonae False - , _dxono_qjef_aqtafq_bes = xgonae False - , _yzuaf_nviy_vuhwxe_ihnbo_uhw = xgonae False - , _iwcit_fzjs_yerakt_dicox_mtryitko = xgonae False - , _ehjim_ucfe_dewarp_newrt_gso = xgonae False - , _ogtxb_ivoj_amqgai_rttui_xuwhetb = xgonae False - , _bhycb_iexz_megaug_qunoa_ohaked = xgonae False - , _nnmbe_uqgt_ewsuga_vaiis = xgonae False - , _otzil_ucvugaiyj_aosoiatunx_asir = xgonae False - } - , _iwsc_lalojz = XqspaiDainqw - { _uajznac_ugah = xgonae (80 :: Int) - , _qayziku_gazibzDejipj = xgonae DewizeCxwgyiKjig - , _auhebll_fiqjxyArfxia = xgonae (2 :: Int) - , _zubfuhq_dupiwnIoophXameeet = xgonae True - , _oavnuqg_opkreyOufuIkifiin = xgonae True - , _ufojfwy_fhuzcePeqwfu = xgonae (50 :: Int) - , _mlosikq_zajdxxSeRoelpf = xgonae (50 :: Int) - , _heemavf_fjgOfoaikh = xgonae (FyoVfvdygaZuzuvbeWarwuq 3) - , _ohxmeoq_ogtbfoPtqezVseu = xgonae (EdjotoLcbapUdiuMmytwoig 0.7) - , _omupuiu_ituamexjuLccwu = xgonae (30 :: Int) - , _xoseksf_atvwwdwaoHanofMyUvujjopoz = xgonae True - , _umuuuat_nuamezwWeqfUqzrnaxwp = xgonae False - , _uuriguz_wixhutbuKecigaFiwosret = xgonae True - , _betohxp_scixaLsvcesErtwItxrnaJmuz = xgonae False - , _lchxgee_olaetGcqzuqxVujenCzexub = xgonae True - , _egeibao_imamkuigqikhZdcbpidokVcixiqew = xgonae False - } - , _nloo_cfmrgZcisiugk = YuwodSavxwnicBekuel - { _oebew_rrtpvthUzlizjAqIwesly = xgonae False - , _blkff_Acxoid = xgonae False - , _datei_YewolAowoqOpunvpgu = xgonae BeekgUzojaPnixxaruJehyPmnnfu - , _ejfrj_eheb_justvh_pumcp_ismya = xgonae False - } - , _kena_uzeddovosoki = NyoRvshullezUpauud - { _mtfuwi_TUVEmoi = xgonae RZXKoytUtogx - , _larqam_adaxPehaylZafeqgpc = xgonae False - } - , _spob_qipaarx = KaxavsmOtoyeaq { _rusrirw_okx = Tajemkix [] } - , _vmah_uivucnfka_ikaquebxay_gzcm = xgonae False - , _qaqb_eykzuyuwi = xgonae False - -- test comment - } diff --git a/data/Test343.hs b/data/Test343.hs deleted file mode 100644 index bb5d7d2..0000000 --- a/data/Test343.hs +++ /dev/null @@ -1,10 +0,0 @@ --- brittany { lconfig_indentPolicy: IndentPolicyLeft } -vakjkeSulxudbFokvir = Duotpo - { _ekku_gcrpbze = xgonae (1 :: Int) - , _spob_qipaarx = KaxavsmOtoyeaq { _rusrirw_okx = Tajemkix [] } - , _vmah_uivucnfka_ikaquebxay_gzcm = xgonae False - , _qaqb_eykzuyuwi = xgonae False - -- test comment - , -- N.B. - .. -- x - } diff --git a/data/Test344.hs b/data/Test344.hs deleted file mode 100644 index 53649fc..0000000 --- a/data/Test344.hs +++ /dev/null @@ -1,7 +0,0 @@ -func = abc + def - -- a - -- b - -- comment - where - abc = 13 - def = 1 diff --git a/data/Test345.hs b/data/Test345.hs deleted file mode 100644 index 613a398..0000000 --- a/data/Test345.hs +++ /dev/null @@ -1,13 +0,0 @@ -zItazySunefp twgq nlyo lwojjoBiecao = - let mhIarjyai = - ukwAausnfcn - $ XojlsTOSR.vuwOvuvdAZUOJaa - $ XojlsTOSR.vkesForanLiufjeDI - $ XojlsTOSR.vkesForanLiufjeDI - $ XojlsTOSR.popjAyijoWarueeP - $ XojlsTOSR.jpwuPmafuDqlbkt nlyo - $ XojlsTOSR.jpwuPmafuDqlbkt xxneswWhxwng - $ XojlsTOSR.jpwuPmafuDqlbkt oloCuxeDdow - $ XojlsTOSR.jpwuPmafuDqlbkt (uwurrvoNnukzefuDjeh lwojjoBiecao nlyo) - $ etOslnoz lwojjoBiecao - in kucotg $ (bbbr, Yoxe.Dwzbuzi.zrLokoTnuy piv) diff --git a/data/Test346.hs b/data/Test346.hs deleted file mode 100644 index 83ba0bc..0000000 --- a/data/Test346.hs +++ /dev/null @@ -1,2 +0,0 @@ --- test -module MyModule where diff --git a/data/Test347.hs b/data/Test347.hs deleted file mode 100644 index d01c656..0000000 --- a/data/Test347.hs +++ /dev/null @@ -1,8 +0,0 @@ -foo = - [ ("xxx", "xx") - , -- - ("xx" , "xx") - -- - , ("xx" , "xxxxx") - , ("xx" , "xx") - ] diff --git a/data/Test348.hs b/data/Test348.hs deleted file mode 100644 index d0b4eb5..0000000 --- a/data/Test348.hs +++ /dev/null @@ -1,8 +0,0 @@ -foo = - [ ("xx", "xx") - , ( "xx" -- - , "xx" - ) - , ("xx", "xxxxx") - , ("xx", "xx") - ] diff --git a/data/Test349.hs b/data/Test349.hs deleted file mode 100644 index 0d374de..0000000 --- a/data/Test349.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Main - ( DataTypeI - , DataTypeII(DataConstructor) - -- * Haddock heading - , name - ) where diff --git a/data/Test35.hs b/data/Test35.hs deleted file mode 100644 index 7e217d5..0000000 --- a/data/Test35.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -func :: forall (a :: *) b . a -> b diff --git a/data/Test350.hs b/data/Test350.hs deleted file mode 100644 index 0f5b4e9..0000000 --- a/data/Test350.hs +++ /dev/null @@ -1,23 +0,0 @@ -xeoeqibIaib - :: ( KqujhIsaus m - , XivuvIpoboi Droqifim m - , IgorvOtowtf m - , RyagaYaqac m - , QouruDU m - ) - => MaptAdfuxgu - -> Zcnxg NsxayqmvIjsezea -- ^ if Lvqucoo, opsip jl reyoyhk lfil qaculxgd - -> QNOZqwuzg - -> Eoattuq - '[ XkatytdWdquraosu -- test comment - , KyezKijim -- another test comment - , DjmioeePuoeg - , NinrxoiOwezc - , QATAlrijacpk - , TrutvotwIwifiqOjdtu - , CoMmuatjwr - , BoZckzqyodseZole - , VagfwoXaeChfqe - ] - m - () diff --git a/data/Test351.hs b/data/Test351.hs deleted file mode 100644 index fe25514..0000000 --- a/data/Test351.hs +++ /dev/null @@ -1,7 +0,0 @@ -createRedirectedProcess processConfig = do - let redirectedProc = (_processConfig_inner processConfig) - { std_in = CreatePipe - , std_out = CreatePipe - , std_err = CreatePipe - } - foo diff --git a/data/Test352.hs b/data/Test352.hs deleted file mode 100644 index 3e5d558..0000000 --- a/data/Test352.hs +++ /dev/null @@ -1,5 +0,0 @@ -instance HasDependencies SomeDataModel where - -- N.B. Here is a bunch of explanatory context about the relationship - -- between these data models or whatever. - type Dependencies SomeDataModel - = (SomeOtherDataModelId, SomeOtherOtherDataModelId) diff --git a/data/Test353.hs b/data/Test353.hs deleted file mode 100644 index cedb99d..0000000 --- a/data/Test353.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = - do - y - >>= x diff --git a/data/Test354.hs b/data/Test354.hs deleted file mode 100644 index e082c6d..0000000 --- a/data/Test354.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } -func = - mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj - + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj diff --git a/data/Test355.hs b/data/Test355.hs deleted file mode 100644 index 56cf385..0000000 --- a/data/Test355.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } -foo = do - let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - foo diff --git a/data/Test356.hs b/data/Test356.hs deleted file mode 100644 index 94a19a4..0000000 --- a/data/Test356.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_indentAmount: 8, lconfig_indentPolicy: IndentPolicyMultiple } -foo = do - let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - foo -foo = do - let aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - foo diff --git a/data/Test357.hs b/data/Test357.hs deleted file mode 100644 index 9fd454a..0000000 --- a/data/Test357.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_indentAmount: 4, lconfig_indentPolicy: IndentPolicyMultiple } -foo = asdyf8asdf - "ajsdfas" - [ asjdf asyhf $ do - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - ] diff --git a/data/Test358.hs b/data/Test358.hs deleted file mode 100644 index 7a121e7..0000000 --- a/data/Test358.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: a -> a diff --git a/data/Test359.hs b/data/Test359.hs deleted file mode 100644 index 6991c53..0000000 --- a/data/Test359.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test36.hs b/data/Test36.hs deleted file mode 100644 index 7fc70e4..0000000 --- a/data/Test36.hs +++ /dev/null @@ -1 +0,0 @@ -func :: a -> b -- comment diff --git a/data/Test360.hs b/data/Test360.hs deleted file mode 100644 index b7c0128..0000000 --- a/data/Test360.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lakjsdlkjasldkj - -> lakjsdlkjasldkj diff --git a/data/Test361.hs b/data/Test361.hs deleted file mode 100644 index ffd3ff9..0000000 --- a/data/Test361.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: ((a)) diff --git a/data/Test362.hs b/data/Test362.hs deleted file mode 100644 index df79511..0000000 --- a/data/Test362.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: (a -> a) -> a diff --git a/data/Test363.hs b/data/Test363.hs deleted file mode 100644 index 921d92d..0000000 --- a/data/Test363.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: a -> (a -> a) diff --git a/data/Test364.hs b/data/Test364.hs deleted file mode 100644 index ed845fb..0000000 --- a/data/Test364.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: (((((((((()))))))))) --- current output is.. funny. wonder if that can/needs to be improved.. diff --git a/data/Test365.hs b/data/Test365.hs deleted file mode 100644 index bf8f673..0000000 --- a/data/Test365.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: () diff --git a/data/Test366.hs b/data/Test366.hs deleted file mode 100644 index a478841..0000000 --- a/data/Test366.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lakjsdlkjasldkj - -> lakjsdlkjasldkj - ) diff --git a/data/Test367.hs b/data/Test367.hs deleted file mode 100644 index 165c111..0000000 --- a/data/Test367.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> (lakjsdlkjasldkj -> lakjsdlkjasldkj) diff --git a/data/Test368.hs b/data/Test368.hs deleted file mode 100644 index 4a1e980..0000000 --- a/data/Test368.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> lakjsdlkjasldkj) - -> lakjsdlkjasldkj diff --git a/data/Test369.hs b/data/Test369.hs deleted file mode 100644 index ed4d90c..0000000 --- a/data/Test369.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - -> lakjsdlkjasldkj diff --git a/data/Test37.hs b/data/Test37.hs deleted file mode 100644 index 70aa3c6..0000000 --- a/data/Test37.hs +++ /dev/null @@ -1,2 +0,0 @@ -funcA :: a -> b -- comment A -funcB :: a -> b -- comment B diff --git a/data/Test370.hs b/data/Test370.hs deleted file mode 100644 index 4621ea3..0000000 --- a/data/Test370.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ) diff --git a/data/Test371.hs b/data/Test371.hs deleted file mode 100644 index 0ec2ac4..0000000 --- a/data/Test371.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: asd -> Either a b diff --git a/data/Test372.hs b/data/Test372.hs deleted file mode 100644 index 2adc98c..0000000 --- a/data/Test372.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: asd - -> Either - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test373.hs b/data/Test373.hs deleted file mode 100644 index faee723..0000000 --- a/data/Test373.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: asd - -> Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test374.hs b/data/Test374.hs deleted file mode 100644 index be2766e..0000000 --- a/data/Test374.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> asd diff --git a/data/Test375.hs b/data/Test375.hs deleted file mode 100644 index 6efe43f..0000000 --- a/data/Test375.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd -> asd) diff --git a/data/Test376.hs b/data/Test376.hs deleted file mode 100644 index 8d7a7ae..0000000 --- a/data/Test376.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: Trither - asd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test377.hs b/data/Test377.hs deleted file mode 100644 index 16d6ee7..0000000 --- a/data/Test377.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: asd - -> ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test378.hs b/data/Test378.hs deleted file mode 100644 index b7a24ca..0000000 --- a/data/Test378.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: asd - -> ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd diff --git a/data/Test379.hs b/data/Test379.hs deleted file mode 100644 index 50f95b2..0000000 --- a/data/Test379.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( Trither - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> asd diff --git a/data/Test38.hs b/data/Test38.hs deleted file mode 100644 index 6978eb6..0000000 --- a/data/Test38.hs +++ /dev/null @@ -1,11 +0,0 @@ --- a -func -- b - :: -- c - a -- d - -> -- e - ( -- f - c -- g - , -- h - d -- i - ) -- j --- k diff --git a/data/Test380.hs b/data/Test380.hs deleted file mode 100644 index 4453786..0000000 --- a/data/Test380.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: [a -> b] diff --git a/data/Test381.hs b/data/Test381.hs deleted file mode 100644 index faf63f1..0000000 --- a/data/Test381.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: [ lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ] diff --git a/data/Test382.hs b/data/Test382.hs deleted file mode 100644 index fbcaa1c..0000000 --- a/data/Test382.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ] diff --git a/data/Test383.hs b/data/Test383.hs deleted file mode 100644 index edfefd8..0000000 --- a/data/Test383.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: (a, b, c) diff --git a/data/Test384.hs b/data/Test384.hs deleted file mode 100644 index cb8e4cd..0000000 --- a/data/Test384.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: ((a, b, c), (a, b, c), (a, b, c)) diff --git a/data/Test385.hs b/data/Test385.hs deleted file mode 100644 index 8177c7f..0000000 --- a/data/Test385.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) diff --git a/data/Test386.hs b/data/Test386.hs deleted file mode 100644 index e3efa79..0000000 --- a/data/Test386.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd) - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ) diff --git a/data/Test387.hs b/data/Test387.hs deleted file mode 100644 index 3a64ee9..0000000 --- a/data/Test387.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: [ ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - ] diff --git a/data/Test388.hs b/data/Test388.hs deleted file mode 100644 index 15b0b06..0000000 --- a/data/Test388.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ScopedTypeVariables #-} -func :: forall (a :: *) b . a -> b diff --git a/data/Test389.hs b/data/Test389.hs deleted file mode 100644 index 5acb0b6..0000000 --- a/data/Test389.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ScopedTypeVariables #-} -func - :: forall m - . Foo - => ColMap2 - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> m () diff --git a/data/Test39.hs b/data/Test39.hs deleted file mode 100644 index 9c9b324..0000000 --- a/data/Test39.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = f - where - {-# INLINE f #-} - f = id diff --git a/data/Test390.hs b/data/Test390.hs deleted file mode 100644 index 72f2d0a..0000000 --- a/data/Test390.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ScopedTypeVariables #-} -func - :: forall m - . ColMap2 - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> ColInfo - -> m () diff --git a/data/Test391.hs b/data/Test391.hs deleted file mode 100644 index 15b0b06..0000000 --- a/data/Test391.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ScopedTypeVariables #-} -func :: forall (a :: *) b . a -> b diff --git a/data/Test392.hs b/data/Test392.hs deleted file mode 100644 index de8ad75..0000000 --- a/data/Test392.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func :: a -> b -- comment diff --git a/data/Test393.hs b/data/Test393.hs deleted file mode 100644 index 1a15a53..0000000 --- a/data/Test393.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -funcA :: a -> b -- comment A -funcB :: a -> b -- comment B diff --git a/data/Test394.hs b/data/Test394.hs deleted file mode 100644 index 44eb854..0000000 --- a/data/Test394.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } --- a -func -- b - :: -- c - a -- d - -> -- e - ( -- f - c -- g - , -- h - d -- i - ) -- j-- k diff --git a/data/Test395.hs b/data/Test395.hs deleted file mode 100644 index 729290d..0000000 --- a/data/Test395.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ImplicitParams #-} -func :: (?asd::Int) -> () diff --git a/data/Test396.hs b/data/Test396.hs deleted file mode 100644 index f706d17..0000000 --- a/data/Test396.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE ImplicitParams #-} -func - :: ( ?asd - :: lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - ) - -> () diff --git a/data/Test397.hs b/data/Test397.hs deleted file mode 100644 index 750f3f9..0000000 --- a/data/Test397.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = f - where - {-# INLINE f #-} - f = id diff --git a/data/Test398.hs b/data/Test398.hs deleted file mode 100644 index 8770767..0000000 --- a/data/Test398.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = ($) - where - {-# INLINE ($) #-} - ($) = id diff --git a/data/Test399.hs b/data/Test399.hs deleted file mode 100644 index 996e831..0000000 --- a/data/Test399.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = f - where - {-# INLINE CONLIKE [1] f #-} - f = id diff --git a/data/Test4.hs b/data/Test4.hs deleted file mode 100644 index e517aa0..0000000 --- a/data/Test4.hs +++ /dev/null @@ -1 +0,0 @@ -func :: ((a)) diff --git a/data/Test40.hs b/data/Test40.hs deleted file mode 100644 index c182430..0000000 --- a/data/Test40.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = ($) - where - {-# INLINE ($) #-} - ($) = id diff --git a/data/Test400.hs b/data/Test400.hs deleted file mode 100644 index 8b00a95..0000000 --- a/data/Test400.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = f - where - {-# INLINE [~1] f #-} - f = id diff --git a/data/Test401.hs b/data/Test401.hs deleted file mode 100644 index 7d334ba..0000000 --- a/data/Test401.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo :: Baz - } diff --git a/data/Test402.hs b/data/Test402.hs deleted file mode 100644 index f94f463..0000000 --- a/data/Test402.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo, bar :: Baz - } diff --git a/data/Test403.hs b/data/Test403.hs deleted file mode 100644 index 3b2e688..0000000 --- a/data/Test403.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo :: Baz - , bar :: Bizzz - } diff --git a/data/Test404.hs b/data/Test404.hs deleted file mode 100644 index 9144cc0..0000000 --- a/data/Test404.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo, biz :: Baz - , bar :: Bizzz - } diff --git a/data/Test405.hs b/data/Test405.hs deleted file mode 100644 index 7d20e0d..0000000 --- a/data/Test405.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo :: Baz - , bar :: Bizzz - } - deriving Show diff --git a/data/Test406.hs b/data/Test406.hs deleted file mode 100644 index cfe7ae2..0000000 --- a/data/Test406.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -data Foo = Bar - { foo :: Baz - , bar :: Bizzz - } - deriving (Show, Eq, Monad, Functor, Traversable, Foldable) diff --git a/data/Test407.hs b/data/Test407.hs deleted file mode 100644 index b889d43..0000000 --- a/data/Test407.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x = x diff --git a/data/Test408.hs b/data/Test408.hs deleted file mode 100644 index 2764fb5..0000000 --- a/data/Test408.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -x *** y = x diff --git a/data/Test409.hs b/data/Test409.hs deleted file mode 100644 index a9a0917..0000000 --- a/data/Test409.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -(***) x y = x diff --git a/data/Test41.hs b/data/Test41.hs deleted file mode 100644 index 205a728..0000000 --- a/data/Test41.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = f - where - {-# INLINE CONLIKE [1] f #-} - f = id diff --git a/data/Test410.hs b/data/Test410.hs deleted file mode 100644 index 155d06d..0000000 --- a/data/Test410.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func _ = x diff --git a/data/Test411.hs b/data/Test411.hs deleted file mode 100644 index 73dc40a..0000000 --- a/data/Test411.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable = - x diff --git a/data/Test412.hs b/data/Test412.hs deleted file mode 100644 index 92a61f3..0000000 --- a/data/Test412.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable - = x diff --git a/data/Test413.hs b/data/Test413.hs deleted file mode 100644 index a5f08d9..0000000 --- a/data/Test413.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable a b - = x diff --git a/data/Test414.hs b/data/Test414.hs deleted file mode 100644 index c0690eb..0000000 --- a/data/Test414.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func (A a) = a diff --git a/data/Test415.hs b/data/Test415.hs deleted file mode 100644 index fb95ff8..0000000 --- a/data/Test415.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func (x : xr) = x diff --git a/data/Test416.hs b/data/Test416.hs deleted file mode 100644 index 490720c..0000000 --- a/data/Test416.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func (x :+: xr) = x diff --git a/data/Test417.hs b/data/Test417.hs deleted file mode 100644 index 8ee6b8b..0000000 --- a/data/Test417.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func | True = x diff --git a/data/Test418.hs b/data/Test418.hs deleted file mode 100644 index 506b4d1..0000000 --- a/data/Test418.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x - | x = simple expression - | otherwise = 0 diff --git a/data/Test419.hs b/data/Test419.hs deleted file mode 100644 index ee128f1..0000000 --- a/data/Test419.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x - | a somewhat longer guard x = "and a somewhat longer expession that does not" - | otherwise = "fit without putting the guards in new lines" diff --git a/data/Test42.hs b/data/Test42.hs deleted file mode 100644 index cfd38bb..0000000 --- a/data/Test42.hs +++ /dev/null @@ -1,2 +0,0 @@ -{-# NOINLINE func #-} -func :: Int diff --git a/data/Test420.hs b/data/Test420.hs deleted file mode 100644 index a8f1881..0000000 --- a/data/Test420.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x - | very long guard, another rather long guard that refers to x = nontrivial - expression - foo - bar - alsdkjlasdjlasj - | otherwise = 0 diff --git a/data/Test421.hs b/data/Test421.hs deleted file mode 100644 index 5dd669d..0000000 --- a/data/Test421.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x - | very long guard, another rather long guard that refers to x - = nontrivialexpression foo bar alsdkjlasdjlasj - | otherwise - = 0 diff --git a/data/Test422.hs b/data/Test422.hs deleted file mode 100644 index 830e3ee..0000000 --- a/data/Test422.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func x - | very loooooooooooooooooooooooooooooong guard - , another rather long guard that refers to x - = nontrivial expression foo bar alsdkjlasdjlasj - | otherwise - = 0 diff --git a/data/Test423.hs b/data/Test423.hs deleted file mode 100644 index 88d75b3..0000000 --- a/data/Test423.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = x -describe "infix op" $ do diff --git a/data/Test424.hs b/data/Test424.hs deleted file mode 100644 index 1258fc6..0000000 --- a/data/Test424.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = x + x diff --git a/data/Test425.hs b/data/Test425.hs deleted file mode 100644 index 1ed0c86..0000000 --- a/data/Test425.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj - + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj diff --git a/data/Test426.hs b/data/Test426.hs deleted file mode 100644 index e70a294..0000000 --- a/data/Test426.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj - + mweroiuxlskdfjlksj - + mweroiuxlskdfjlksj diff --git a/data/Test427.hs b/data/Test427.hs deleted file mode 100644 index 38b5fd2..0000000 --- a/data/Test427.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - mweroiuxlskdfjlksj - + mweroiuxlskdfjlksj - + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj diff --git a/data/Test428.hs b/data/Test428.hs deleted file mode 100644 index ab8bc90..0000000 --- a/data/Test428.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = 1 -func = "abc" -func = 1.1e5 -func = 'x' -func = 981409823458910394810928414192837123987123987123 diff --git a/data/Test429.hs b/data/Test429.hs deleted file mode 100644 index 6fcf5ea..0000000 --- a/data/Test429.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE LambdaCase #-} -func = \case - FooBar -> x - Baz -> y diff --git a/data/Test43.hs b/data/Test43.hs deleted file mode 100644 index 83572d8..0000000 --- a/data/Test43.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = f - where - {-# INLINE [~1] f #-} - f = id diff --git a/data/Test430.hs b/data/Test430.hs deleted file mode 100644 index 3efc267..0000000 --- a/data/Test430.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = \x -> abc -describe "app" $ do diff --git a/data/Test431.hs b/data/Test431.hs deleted file mode 100644 index c1c1c58..0000000 --- a/data/Test431.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = klajsdas klajsdas klajsdas diff --git a/data/Test432.hs b/data/Test432.hs deleted file mode 100644 index aa2b380..0000000 --- a/data/Test432.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd diff --git a/data/Test433.hs b/data/Test433.hs deleted file mode 100644 index 851e5cb..0000000 --- a/data/Test433.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - lakjsdlajsdljas - lakjsdlajsdljas - lakjsdlajsdljas diff --git a/data/Test434.hs b/data/Test434.hs deleted file mode 100644 index f52edc1..0000000 --- a/data/Test434.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (1 +) diff --git a/data/Test435.hs b/data/Test435.hs deleted file mode 100644 index 09d341e..0000000 --- a/data/Test435.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (+ 1) diff --git a/data/Test436.hs b/data/Test436.hs deleted file mode 100644 index 25a7bda..0000000 --- a/data/Test436.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (1 `abc`) diff --git a/data/Test437.hs b/data/Test437.hs deleted file mode 100644 index 3c56cf8..0000000 --- a/data/Test437.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (`abc` 1) diff --git a/data/Test438.hs b/data/Test438.hs deleted file mode 100644 index a9c30d5..0000000 --- a/data/Test438.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (abc, def) diff --git a/data/Test439.hs b/data/Test439.hs deleted file mode 100644 index 90cb29d..0000000 --- a/data/Test439.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - ( lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - , lakjsdlajsdljasdlkjasldjasldjasldjalsdjlaskjd - ) diff --git a/data/Test44.hs b/data/Test44.hs deleted file mode 100644 index 7dd43f0..0000000 --- a/data/Test44.hs +++ /dev/null @@ -1,2 +0,0 @@ -data Foo = Bar {} -data Biz = Baz diff --git a/data/Test440.hs b/data/Test440.hs deleted file mode 100644 index 0d46933..0000000 --- a/data/Test440.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foo = - let longIdentifierForShortValue = 1 - in longIdentifierForShortValue + longIdentifierForShortValue diff --git a/data/Test441.hs b/data/Test441.hs deleted file mode 100644 index 6a77a85..0000000 --- a/data/Test441.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - stmt - stmt diff --git a/data/Test442.hs b/data/Test442.hs deleted file mode 100644 index 3ab95e7..0000000 --- a/data/Test442.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - x <- stmt - stmt x diff --git a/data/Test443.hs b/data/Test443.hs deleted file mode 100644 index c832f21..0000000 --- a/data/Test443.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - let x = 13 - stmt x diff --git a/data/Test444.hs b/data/Test444.hs deleted file mode 100644 index 31b1cc7..0000000 --- a/data/Test444.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - foooooo - $ [ case - foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo - of - _ -> True - ] diff --git a/data/Test445.hs b/data/Test445.hs deleted file mode 100644 index c3f325f..0000000 --- a/data/Test445.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE MultiWayIf #-} -func = if - | cond1 -> loooooooooooooooooooooooooooooong expr1 - | cond2 -> loooooooooooooooooooooooooooooong expr2 diff --git a/data/Test446.hs b/data/Test446.hs deleted file mode 100644 index 4d8efd2..0000000 --- a/data/Test446.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE MultiWayIf #-} -func = do - foo - bar $ if - | cond1 -> loooooooooooooooooooooooooooooong expr1 - | cond2 -> loooooooooooooooooooooooooooooong expr2 diff --git a/data/Test447.hs b/data/Test447.hs deleted file mode 100644 index 6e718f0..0000000 --- a/data/Test447.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - foo - $ [ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - , bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - ] - ++ [ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc] diff --git a/data/Test448.hs b/data/Test448.hs deleted file mode 100644 index 3884989..0000000 --- a/data/Test448.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main where diff --git a/data/Test449.hs b/data/Test449.hs deleted file mode 100644 index 7a6295f..0000000 --- a/data/Test449.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main () where diff --git a/data/Test45.hs b/data/Test45.hs deleted file mode 100644 index d1c8c85..0000000 --- a/data/Test45.hs +++ /dev/null @@ -1,3 +0,0 @@ -data Foo = Bar - { foo :: Baz - } diff --git a/data/Test450.hs b/data/Test450.hs deleted file mode 100644 index 89316b0..0000000 --- a/data/Test450.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (main) where diff --git a/data/Test451.hs b/data/Test451.hs deleted file mode 100644 index a55d851..0000000 --- a/data/Test451.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (main, test1, test2) where diff --git a/data/Test452.hs b/data/Test452.hs deleted file mode 100644 index 4fe8cbf..0000000 --- a/data/Test452.hs +++ /dev/null @@ -1,13 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main - ( main - , test1 - , test2 - , test3 - , test4 - , test5 - , test6 - , test7 - , test8 - , test9 - ) where diff --git a/data/Test453.hs b/data/Test453.hs deleted file mode 100644 index eaeb665..0000000 --- a/data/Test453.hs +++ /dev/null @@ -1,13 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main - ( main - -- main - , test1 - , test2 - -- Test 3 - , test3 - , test4 - -- Test 5 - , test5 - -- Test 6 - ) where diff --git a/data/Test454.hs b/data/Test454.hs deleted file mode 100644 index c2e7a8e..0000000 --- a/data/Test454.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (Test(..)) where diff --git a/data/Test455.hs b/data/Test455.hs deleted file mode 100644 index 6191afd..0000000 --- a/data/Test455.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (module Main) where diff --git a/data/Test456.hs b/data/Test456.hs deleted file mode 100644 index 3d9694b..0000000 --- a/data/Test456.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (Test(Test, a, b)) where diff --git a/data/Test457.hs b/data/Test457.hs deleted file mode 100644 index 82a8e14..0000000 --- a/data/Test457.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -module Main (Test()) where diff --git a/data/Test458.hs b/data/Test458.hs deleted file mode 100644 index df50e76..0000000 --- a/data/Test458.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } --- Intentionally left empty diff --git a/data/Test459.hs b/data/Test459.hs deleted file mode 100644 index 0dea4be..0000000 --- a/data/Test459.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Data.List diff --git a/data/Test46.hs b/data/Test46.hs deleted file mode 100644 index 2472782..0000000 --- a/data/Test46.hs +++ /dev/null @@ -1,3 +0,0 @@ -data Foo = Bar - { foo, bar :: Baz - } diff --git a/data/Test460.hs b/data/Test460.hs deleted file mode 100644 index 50b8621..0000000 --- a/data/Test460.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Data.List as L diff --git a/data/Test461.hs b/data/Test461.hs deleted file mode 100644 index 835646b..0000000 --- a/data/Test461.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import qualified Data.List diff --git a/data/Test462.hs b/data/Test462.hs deleted file mode 100644 index 7e772a5..0000000 --- a/data/Test462.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import qualified Data.List as L diff --git a/data/Test463.hs b/data/Test463.hs deleted file mode 100644 index 1bfa264..0000000 --- a/data/Test463.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import safe Data.List as L diff --git a/data/Test464.hs b/data/Test464.hs deleted file mode 100644 index 53fad4c..0000000 --- a/data/Test464.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import {-# SOURCE #-} Data.List () diff --git a/data/Test465.hs b/data/Test465.hs deleted file mode 100644 index 8e5b381..0000000 --- a/data/Test465.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import safe qualified Data.List hiding (nub) diff --git a/data/Test466.hs b/data/Test466.hs deleted file mode 100644 index 73046d6..0000000 --- a/data/Test466.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import {-# SOURCE #-} safe qualified Data.List diff --git a/data/Test467.hs b/data/Test467.hs deleted file mode 100644 index 7745833..0000000 --- a/data/Test467.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import qualified "base" Data.List diff --git a/data/Test468.hs b/data/Test468.hs deleted file mode 100644 index 2c704b4..0000000 --- a/data/Test468.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import {-# SOURCE #-} safe qualified "base" Data.List as L -import {-# SOURCE #-} safe qualified "base" Data.List () -import {-# SOURCE #-} safe qualified Data.List hiding () diff --git a/data/Test469.hs b/data/Test469.hs deleted file mode 100644 index fa53576..0000000 --- a/data/Test469.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import qualified Data.List () diff --git a/data/Test47.hs b/data/Test47.hs deleted file mode 100644 index 2dbac94..0000000 --- a/data/Test47.hs +++ /dev/null @@ -1,4 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } diff --git a/data/Test470.hs b/data/Test470.hs deleted file mode 100644 index 97ce770..0000000 --- a/data/Test470.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Data.List (nub) diff --git a/data/Test471.hs b/data/Test471.hs deleted file mode 100644 index fb499b1..0000000 --- a/data/Test471.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Data.List (foldl', indexElem, nub) diff --git a/data/Test472.hs b/data/Test472.hs deleted file mode 100644 index 39cfd67..0000000 --- a/data/Test472.hs +++ /dev/null @@ -1,16 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( Long - , anymore - , fit - , items - , line - , list - , not - , onA - , quite - , single - , that - , will - , with - ) diff --git a/data/Test473.hs b/data/Test473.hs deleted file mode 100644 index 016a6b7..0000000 --- a/data/Test473.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test ((+), T, T2(), T3(..), T4(T4), T5(T5, t5), T6((<|>))) diff --git a/data/Test474.hs b/data/Test474.hs deleted file mode 100644 index 1716691..0000000 --- a/data/Test474.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test hiding () -import Test as T hiding () diff --git a/data/Test475.hs b/data/Test475.hs deleted file mode 100644 index adbfb6e..0000000 --- a/data/Test475.hs +++ /dev/null @@ -1,15 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Prelude as X - hiding - ( head - , init - , last - , maximum - , minimum - , pred - , read - , readFile - , succ - , tail - , undefined - ) diff --git a/data/Test476.hs b/data/Test476.hs deleted file mode 100644 index 900fb1f..0000000 --- a/data/Test476.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import MoreThanSufficientlyLongModuleNameWithSome - (compact, fit, inA, items, layout, not, that, will) -import TestJustAbitToLongModuleNameLikeThisOneIs () -import TestJustShortEnoughModuleNameLikeThisOne () diff --git a/data/Test477.hs b/data/Test477.hs deleted file mode 100644 index 0f32c77..0000000 --- a/data/Test477.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import TestJustAbitToLongModuleNameLikeThisOneI as T -import TestJustShortEnoughModuleNameLikeThisOn as T diff --git a/data/Test478.hs b/data/Test478.hs deleted file mode 100644 index 3c047b9..0000000 --- a/data/Test478.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import TestJustAbitToLongModuleNameLikeTh hiding () -import TestJustShortEnoughModuleNameLike hiding () diff --git a/data/Test479.hs b/data/Test479.hs deleted file mode 100644 index 3e8adc0..0000000 --- a/data/Test479.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import MoreThanSufficientlyLongModuleNameWithSome - (compact, fit, inA, items, layout, not, that, will) diff --git a/data/Test48.hs b/data/Test48.hs deleted file mode 100644 index 56c5cba..0000000 --- a/data/Test48.hs +++ /dev/null @@ -1,4 +0,0 @@ -data Foo = Bar - { foo, biz :: Baz - , bar :: Bizzz - } diff --git a/data/Test480.hs b/data/Test480.hs deleted file mode 100644 index 4bc1c0c..0000000 --- a/data/Test480.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import TestJustShortEnoughModuleNameLike hiding (abc, def, ghci, jklm) diff --git a/data/Test481.hs b/data/Test481.hs deleted file mode 100644 index b6f7509..0000000 --- a/data/Test481.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } --- Test -import Data.List (nub) -- Test -{- Test -} -import qualified Data.List as L (foldl') {- Test -} diff --git a/data/Test482.hs b/data/Test482.hs deleted file mode 100644 index 4fd065e..0000000 --- a/data/Test482.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( abc - , def - -- comment - ) diff --git a/data/Test483.hs b/data/Test483.hs deleted file mode 100644 index 5a03da5..0000000 --- a/data/Test483.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( abc - -- comment - ) diff --git a/data/Test484.hs b/data/Test484.hs deleted file mode 100644 index 7749c61..0000000 --- a/data/Test484.hs +++ /dev/null @@ -1,12 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( abc - -- comment - , def - , ghi - {- comment -} - , jkl - -- comment - ) --- Test -import Test (test) diff --git a/data/Test485.hs b/data/Test485.hs deleted file mode 100644 index a1879a2..0000000 --- a/data/Test485.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( -- comment - ) diff --git a/data/Test486.hs b/data/Test486.hs deleted file mode 100644 index e66d47a..0000000 --- a/data/Test486.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test (longbindingNameThatoverflowsColum) -import Test (Long(List, Of, Things)) diff --git a/data/Test487.hs b/data/Test487.hs deleted file mode 100644 index 4fa860d..0000000 --- a/data/Test487.hs +++ /dev/null @@ -1,27 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import Test - ( Thing - ( With - -- Comments - , and - -- also - , items - -- ! - ) - ) -import Test - ( Thing - ( Item - -- and Comment - ) - ) -import Test - ( Thing - ( With - -- Comments - , and - -- also - , items - -- ! - ) - ) diff --git a/data/Test488.hs b/data/Test488.hs deleted file mode 100644 index f65f0d6..0000000 --- a/data/Test488.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -import VeryLongModuleNameThatCouldEvenCauseAnEmptyBindingListToExpandIntoMultipleLine - () diff --git a/data/Test489.hs b/data/Test489.hs deleted file mode 100644 index f16fa76..0000000 --- a/data/Test489.hs +++ /dev/null @@ -1,25 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE BangPatterns #-} -{- - - Test module - -} -module Test - ( test1 - -- ^ test - , test2 - -- | test - , test3 - , test4 - , test5 - , test6 - , test7 - , test8 - , test9 - , test10 - ) where --- Test -import Data.List (nub) -- Test -{- Test -} -import qualified Data.List as L (foldl') {- Test -} --- Test -import Test (test) diff --git a/data/Test49.hs b/data/Test49.hs deleted file mode 100644 index 3b236c6..0000000 --- a/data/Test49.hs +++ /dev/null @@ -1,5 +0,0 @@ -data Foo = Bar - { fooz :: Baz - , bar :: Bizzz - } - deriving Show diff --git a/data/Test490.hs b/data/Test490.hs deleted file mode 100644 index 0cf1f73..0000000 --- a/data/Test490.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - abc <- foo ---abc -return () diff --git a/data/Test491.hs b/data/Test491.hs deleted file mode 100644 index b625fed..0000000 --- a/data/Test491.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = (()) diff --git a/data/Test492.hs b/data/Test492.hs deleted file mode 100644 index 2585e2d..0000000 --- a/data/Test492.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - let - foo True = True - foo _ = False - return () diff --git a/data/Test493.hs b/data/Test493.hs deleted file mode 100644 index 2585e2d..0000000 --- a/data/Test493.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - let - foo True = True - foo _ = False - return () diff --git a/data/Test494.hs b/data/Test494.hs deleted file mode 100644 index 872a368..0000000 --- a/data/Test494.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - let - foo = True - b = False - return () diff --git a/data/Test495.hs b/data/Test495.hs deleted file mode 100644 index 43d52fe..0000000 --- a/data/Test495.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - let - foo = True - b = False - in return () diff --git a/data/Test496.hs b/data/Test496.hs deleted file mode 100644 index d06ea75..0000000 --- a/data/Test496.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - s <- mGet - mSet $ s { _lstate_indent = _lstate_indent state } diff --git a/data/Test497.hs b/data/Test497.hs deleted file mode 100644 index f862333..0000000 --- a/data/Test497.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - s <- mGet - mSet $ s - { _lstate_indent = _lstate_indent state - , _lstate_foo = _lstate_foo state - } diff --git a/data/Test498.hs b/data/Test498.hs deleted file mode 100644 index 52505be..0000000 --- a/data/Test498.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - s <- mGet - mSet $ s - { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_foo = _lstate_foo kasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test499.hs b/data/Test499.hs deleted file mode 100644 index 7362219..0000000 --- a/data/Test499.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = Foo { _lstate_indent = _lstate_indent state } diff --git a/data/Test5.hs b/data/Test5.hs deleted file mode 100644 index 71a352d..0000000 --- a/data/Test5.hs +++ /dev/null @@ -1 +0,0 @@ -func :: (a -> a) -> a diff --git a/data/Test50.hs b/data/Test50.hs deleted file mode 100644 index f249e56..0000000 --- a/data/Test50.hs +++ /dev/null @@ -1,8 +0,0 @@ -data MyRecord = MyConstructor - { bar1, bar2 - :: Loooooooooooooooooooooooooooooooong - -> Loooooooooooooooooooooooooooooooong - , foo1, foo2 - :: Loooooooooooooooooooooooooooooooonger - -> Loooooooooooooooooooooooooooooooonger - } diff --git a/data/Test500.hs b/data/Test500.hs deleted file mode 100644 index 9b188e5..0000000 --- a/data/Test500.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = Foo - { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test501.hs b/data/Test501.hs deleted file mode 100644 index 1cac41f..0000000 --- a/data/Test501.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - Foo - { _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - , _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - } diff --git a/data/Test502.hs b/data/Test502.hs deleted file mode 100644 index 2482992..0000000 --- a/data/Test502.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do --- abc - -- def - return () diff --git a/data/Test503.hs b/data/Test503.hs deleted file mode 100644 index 36aa1f1..0000000 --- a/data/Test503.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - do - return () - -- abc - -- def - return () diff --git a/data/Test504.hs b/data/Test504.hs deleted file mode 100644 index 3c3d575..0000000 --- a/data/Test504.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func - :: Int -- basic indentation amount - -> Int -- currently used width in current line (after indent) - -- used to accurately calc placing of the current-line - -> LayoutDesc - -> Int diff --git a/data/Test505.hs b/data/Test505.hs deleted file mode 100644 index 0157f35..0000000 --- a/data/Test505.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - (lkjadljasldjalskdjaldjalsdjkalsdjlaksdjlasjdlajsaldskj - $ abc - $ def - $ ghi - $ jkl - ) diff --git a/data/Test506.hs b/data/Test506.hs deleted file mode 100644 index ed27504..0000000 --- a/data/Test506.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -buildG bounds0 edges0 = accumArray (flip (:)) [] bounds0 (map reassoc edges0) - where reassoc (v, e, w) = (v, (e, w)) diff --git a/data/Test507.hs b/data/Test507.hs deleted file mode 100644 index 1795543..0000000 --- a/data/Test507.hs +++ /dev/null @@ -1,5 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -downloadRepoPackage = case repo of - RepoLocal {..} -> return () - RepoLocal { abc } -> return () - RepoLocal{} -> return () diff --git a/data/Test508.hs b/data/Test508.hs deleted file mode 100644 index 5ecfcc9..0000000 --- a/data/Test508.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - let - (primaryPkg, otherPkgs) = selectPrimaryLocalPackage pwd pkgs' - (bproblems, x) = resolveBuildTargets primaryPkg otherPkgs utargets'' - -- default local dir target if there's no given target - utargets'' = "foo" - return () diff --git a/data/Test509.hs b/data/Test509.hs deleted file mode 100644 index f66ac30..0000000 --- a/data/Test509.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - [ (thing, take 10 alts) --TODO: select best ones - | (thing, _got, alts@(_ : _)) <- nosuchFooThing - , gast <- award - ] diff --git a/data/Test51.hs b/data/Test51.hs deleted file mode 100644 index ba064e1..0000000 --- a/data/Test51.hs +++ /dev/null @@ -1,13 +0,0 @@ -{-# LANGUAGE DatatypeContexts #-} -data - ( LooooooooooooooooooooongConstraint a - , LooooooooooooooooooooongConstraint b - ) => - MyRecord a b - = MyConstructor - { foo1, foo2 - :: loooooooooooooooooooooooooooooooong - -> loooooooooooooooooooooooooooooooong - , bar :: a - , bazz :: b - } diff --git a/data/Test510.hs b/data/Test510.hs deleted file mode 100644 index e939f8f..0000000 --- a/data/Test510.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = if x - then if y -- y is important - then foo - else bar - else Nothing diff --git a/data/Test511.hs b/data/Test511.hs deleted file mode 100644 index fcc4b7c..0000000 --- a/data/Test511.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -wrapPatPrepend pat prepElem = do - patDocs <- layoutPat pat - case Seq.viewl patDocs of - Seq.EmptyL -> return $ Seq.empty - x1 Seq.:< xR -> do - x1' <- docSeq [prepElem, return x1] - return $ x1' Seq.<| xR diff --git a/data/Test512.hs b/data/Test512.hs deleted file mode 100644 index 721607a..0000000 --- a/data/Test512.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -layoutWriteNewlineBlock - :: ( MonadMultiWriter Text.Builder.Builder m - , MonadMultiState LayoutState m - , MonadMultiWriter (Seq String) m - ) - => m () diff --git a/data/Test513.hs b/data/Test513.hs deleted file mode 100644 index 19308aa..0000000 --- a/data/Test513.hs +++ /dev/null @@ -1,25 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE MultiWayIf #-} -readMergePersConfig path shouldCreate conf = do - exists <- liftIO $ System.Directory.doesFileExist path - if - | exists -> do - contents <- liftIO $ ByteString.readFile path -- no lazy IO, tyvm. - fileConf <- case Data.Yaml.decodeEither contents of - Left e -> do - liftIO - $ putStrErrLn - $ "error reading in brittany config from " - ++ path - ++ ":" - liftIO $ putStrErrLn e - mzero - Right x -> return x - return $ fileConf Semigroup.<> conf - | shouldCreate -> do - liftIO $ ByteString.writeFile path $ Data.Yaml.encode $ cMap - (Option . Just . runIdentity) - staticDefaultConfig - return $ conf - | otherwise -> do - return conf diff --git a/data/Test514.hs b/data/Test514.hs deleted file mode 100644 index 8dcc5a1..0000000 --- a/data/Test514.hs +++ /dev/null @@ -1,13 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = BuildReport - where - convertInstallOutcome = case result of - Left BR.PlanningFailed -> PlanningFailed - Left (BR.DependentFailed p) -> DependencyFailed p - Left (BR.DownloadFailed _) -> DownloadFailed - Left (BR.UnpackFailed _) -> UnpackFailed - Left (BR.ConfigureFailed _) -> ConfigureFailed - Left (BR.BuildFailed _) -> BuildFailed - Left (BR.TestsFailed _) -> TestsFailed - Left (BR.InstallFailed _) -> InstallFailed - Right (BR.BuildOk _ _ _) -> InstallOk diff --git a/data/Test515.hs b/data/Test515.hs deleted file mode 100644 index 8dcc5a1..0000000 --- a/data/Test515.hs +++ /dev/null @@ -1,13 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = BuildReport - where - convertInstallOutcome = case result of - Left BR.PlanningFailed -> PlanningFailed - Left (BR.DependentFailed p) -> DependencyFailed p - Left (BR.DownloadFailed _) -> DownloadFailed - Left (BR.UnpackFailed _) -> UnpackFailed - Left (BR.ConfigureFailed _) -> ConfigureFailed - Left (BR.BuildFailed _) -> BuildFailed - Left (BR.TestsFailed _) -> TestsFailed - Left (BR.InstallFailed _) -> InstallFailed - Right (BR.BuildOk _ _ _) -> InstallOk diff --git a/data/Test516.hs b/data/Test516.hs deleted file mode 100644 index ccf86e7..0000000 --- a/data/Test516.hs +++ /dev/null @@ -1,37 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -showPackageDetailedInfo pkginfo = - renderStyle (style { lineLength = 80, ribbonsPerLine = 1 }) - $ char '*' - $+$ something - [ entry "Synopsis" synopsis hideIfNull reflowParagraphs - , entry - "Versions available" - sourceVersions - (altText null "[ Not available from server ]") - (dispTopVersions 9 (preferredVersions pkginfo)) - , entry - "Versions installed" - installedVersions - (altText - null - (if hasLib pkginfo then "[ Not installed ]" else "[ Unknown ]") - ) - (dispTopVersions 4 (preferredVersions pkginfo)) - , entry "Homepage" homepage orNotSpecified text - , entry "Bug reports" bugReports orNotSpecified text - , entry "Description" description hideIfNull reflowParagraphs - , entry "Category" category hideIfNull text - , entry "License" license alwaysShow disp - , entry "Author" author hideIfNull reflowLines - , entry "Maintainer" maintainer hideIfNull reflowLines - , entry "Source repo" sourceRepo orNotSpecified text - , entry "Executables" executables hideIfNull (commaSep text) - , entry "Flags" flags hideIfNull (commaSep dispFlag) - , entry "Dependencies" dependencies hideIfNull (commaSep dispExtDep) - , entry "Documentation" haddockHtml showIfInstalled text - , entry "Cached" haveTarball alwaysShow dispYesNo - , if not (hasLib pkginfo) - then empty - else text "Modules:" - $+$ nest 4 (vcat (map disp . sort . modules $ pkginfo)) - ] diff --git a/data/Test517.hs b/data/Test517.hs deleted file mode 100644 index 5b5926c..0000000 --- a/data/Test517.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -isValidPosition position - | validX && validY = Just position - | otherwise = Nothing diff --git a/data/Test518.hs b/data/Test518.hs deleted file mode 100644 index 5583847..0000000 --- a/data/Test518.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foo = Reflex.runSpiderHost $ ReflexHost.hostApp $ do - (inputEvent :: Reflex.Event Reflex.Spider String, inputFire :: String - -> IO Bool) <- - ReflexHost.newExternalEvent - liftIO . forkIO . forever $ getLine >>= inputFire - ReflexHost.performEvent_ $ fmap (liftIO . putStrLn) inputEvent diff --git a/data/Test519.hs b/data/Test519.hs deleted file mode 100644 index 88cd872..0000000 --- a/data/Test519.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } --- Test.hs -module Test where -data X = X diff --git a/data/Test52.hs b/data/Test52.hs deleted file mode 100644 index a8b49da..0000000 --- a/data/Test52.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} --- brittany { lconfig_allowSinglelineRecord: true } -data MyRecord = forall a . Show a => Bar - { foo :: abittoolongbutnotvery -> abittoolongbutnotvery - } diff --git a/data/Test520.hs b/data/Test520.hs deleted file mode 100644 index d9dac4b..0000000 --- a/data/Test520.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foldrDesc f z = unSwitchQueue $ \q -> - switch (Min.foldrDesc (f unTaggedF) z q) (Min.foldrAsc (f unTaggedF) z q) diff --git a/data/Test521.hs b/data/Test521.hs deleted file mode 100644 index ff6208b..0000000 --- a/data/Test521.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -autocheckCases = - [ ("Never Deadlocks", representative deadlocksNever) - , ("No Exceptions", representative exceptionsNever) - , ("Consistent Result", alwaysSame) -- already representative - ] diff --git a/data/Test522.hs b/data/Test522.hs deleted file mode 100644 index d3c2fb0..0000000 --- a/data/Test522.hs +++ /dev/null @@ -1,8 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -autocheckCases = - [ ("Never Deadlocks", representative deadlocksNever) - , ("No Exceptions", representative exceptionsNever) - , ( "Consistent Result" - , alwaysSame -- already representative - ) - ] diff --git a/data/Test523.hs b/data/Test523.hs deleted file mode 100644 index 78897cd..0000000 --- a/data/Test523.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - [ (abc, (1111, 1111)) - , (def, (2, 2)) - , foo -- comment - ] diff --git a/data/Test524.hs b/data/Test524.hs deleted file mode 100644 index 0aeb4a8..0000000 --- a/data/Test524.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foo a b = g a b -- fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo - where g a b = b + b * a diff --git a/data/Test525.hs b/data/Test525.hs deleted file mode 100644 index 74d9df7..0000000 --- a/data/Test525.hs +++ /dev/null @@ -1,2 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foo a b = g a b where g a b = b + b * a -- fooooooooooooooooooooooooooooooooooo diff --git a/data/Test526.hs b/data/Test526.hs deleted file mode 100644 index ae6bb6a..0000000 --- a/data/Test526.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = do - abc <- expr - abcccccccccccccccccc <- expr - abcccccccccccccccccccccccccccccccccccccccccc <- expr - abccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc <- expr diff --git a/data/Test527.hs b/data/Test527.hs deleted file mode 100644 index f3664cd..0000000 --- a/data/Test527.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func (MyLongFoo abc def) = 1 -func (Bar a d) = 2 -func _ = 3 diff --git a/data/Test528.hs b/data/Test528.hs deleted file mode 100644 index 2867ab4..0000000 --- a/data/Test528.hs +++ /dev/null @@ -1,15 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -parserCompactLocation = - [ try - $ [ ParseRelAbs (Text.Read.read digits) _ _ - | digits <- many1 digit - , rel1 :: Maybe (Either Int (Ratio Int)) <- optionMaybe - [ case divPart of - Nothing -> Left $ Text.Read.read digits - Just ddigits -> - Right $ Text.Read.read digits % Text.Read.read ddigits - | digits <- many1 digit - , divPart <- optionMaybe (string "/" *> many1 digit) - ] - ] - ] diff --git a/data/Test529.hs b/data/Test529.hs deleted file mode 100644 index f2b42a8..0000000 --- a/data/Test529.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = fooooooooooooooooooooooooooooooooo $ foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo diff --git a/data/Test53.hs b/data/Test53.hs deleted file mode 100644 index 82be3f3..0000000 --- a/data/Test53.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -data MyRecord - = forall a - . LooooooooooooooooooooongConstraint a => - LoooooooooooongConstructor - { foo :: abittoolongbutnotvery -> abittoolongbutnotvery - } diff --git a/data/Test530.hs b/data/Test530.hs deleted file mode 100644 index ae12740..0000000 --- a/data/Test530.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = - fooooooooooooooooooooooooooooooooo - + foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo - foooooooooooooooooooooooooooooooo diff --git a/data/Test531.hs b/data/Test531.hs deleted file mode 100644 index fc1335c..0000000 --- a/data/Test531.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -func = fooooooooooooooooooooooooooooooooo + foooooooooooooooooooooooooooooooo - [ foooooooooooooooooooooooooooooooo - , foooooooooooooooooooooooooooooooo - , foooooooooooooooooooooooooooooooo - ] diff --git a/data/Test532.hs b/data/Test532.hs deleted file mode 100644 index fcda0ed..0000000 --- a/data/Test532.hs +++ /dev/null @@ -1,20 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -parserPrim = - [ r - | r <- - [ SGPPrimFloat $ bool id (0 -) minus $ readGnok - "parserPrim" - (d1 ++ d2 ++ d3 ++ d4) - | d2 <- string "." - , d3 <- many1 (oneOf "0123456789") - , _ <- string "f" - ] - <|> [ SGPPrimFloat $ bool id (0 -) minus $ fromIntegral - (readGnok "parserPrim" d1 :: Integer) - | _ <- string "f" - ] - <|> [ SGPPrimInt $ bool id (0 -) minus $ fromIntegral - (readGnok "parserPrim" d1 :: Integer) - | _ <- string "i" - ] - ] diff --git a/data/Test533.hs b/data/Test533.hs deleted file mode 100644 index 3f54efe..0000000 --- a/data/Test533.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -samples = (SV.unpackaaaaadat) <&> \f -> - aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/data/Test534.hs b/data/Test534.hs deleted file mode 100644 index 33c5182..0000000 --- a/data/Test534.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -runBrittany tabSize text = do - let - config' = staticDefaultConfig - config = config' - { _conf_layout = (_conf_layout config') - { _lconfig_indentAmount = coerce tabSize - } - , _conf_forward = forwardOptionsSyntaxExtsEnabled - } - parsePrintModule config text diff --git a/data/Test535.hs b/data/Test535.hs deleted file mode 100644 index cb2da37..0000000 --- a/data/Test535.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE TypeApplications #-} -foo = bar @Baz diff --git a/data/Test536.hs b/data/Test536.hs deleted file mode 100644 index 8674ebf..0000000 --- a/data/Test536.hs +++ /dev/null @@ -1,51 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE TypeApplications #-} -layoutPatternBindFinal alignmentToken binderDoc mPatDoc clauseDocs = do - docAlt - $ -- one-line solution - [ docCols - (ColBindingLine alignmentToken) - [ docSeq (patPartInline ++ [guardPart]) - , docSeq - [ appSep $ return binderDoc - , docForceSingleline $ return body - , wherePart - ] - ] - | not hasComments - , [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - , wherePart <- case mWhereDocs of - Nothing -> return @[] $ docEmpty - Just [w] -> return @[] $ docSeq - [ docSeparator - , appSep $ docLit $ Text.pack "where" - , docSetIndentLevel $ docForceSingleline $ return w - ] - _ -> [] - ] - ++ -- one-line solution + where in next line(s) - [ docLines - $ [ docCols - (ColBindingLine alignmentToken) - [ docSeq (patPartInline ++ [guardPart]) - , docSeq - [appSep $ return binderDoc, docForceParSpacing $ return body] - ] - ] - ++ wherePartMultiLine - | [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - , Data.Maybe.isJust mWhereDocs - ] - ++ -- two-line solution + where in next line(s) - [ docLines - $ [ docForceSingleline - $ docSeq (patPartInline ++ [guardPart, return binderDoc]) - , docEnsureIndent BrIndentRegular $ docForceSingleline $ return - body - ] - ++ wherePartMultiLine - | [(guards, body, _bodyRaw)] <- [clauseDocs] - , let guardPart = singleLineGuardsDoc guards - ] diff --git a/data/Test537.hs b/data/Test537.hs deleted file mode 100644 index 12526a2..0000000 --- a/data/Test537.hs +++ /dev/null @@ -1,11 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE MultiWayIf #-} -func = do - let - foo = if - | Constuctoooooooooooooooooooooooooooooooooooor `elem` artics -- TODO - -> max - (defLen - 0.2) -- TODO - (defLen * 0.8) - | otherwise -> max (defLen - 0.05) (defLen * 0.95) -- TODO - return True diff --git a/data/Test538.hs b/data/Test538.hs deleted file mode 100644 index a527909..0000000 --- a/data/Test538.hs +++ /dev/null @@ -1,6 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -foo n = case n of - 1 -> True - -1 -> False -bar n = case n of - (-2, -2) -> (-2, -2) diff --git a/data/Test539.hs b/data/Test539.hs deleted file mode 100644 index 7da39e1..0000000 --- a/data/Test539.hs +++ /dev/null @@ -1,7 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -{-# LANGUAGE TypeApplications #-} -foo = - let - a = b @1 - cccc = () - in foo diff --git a/data/Test54.hs b/data/Test54.hs deleted file mode 100644 index 7d2cb1b..0000000 --- a/data/Test54.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -data MyRecord - = forall a b - . ( Loooooooooooooooooooooooooooooooong a - , Loooooooooooooooooooooooooooooooong b - ) => - MyConstructor - { a :: a - , b :: b - } diff --git a/data/Test540.hs b/data/Test540.hs deleted file mode 100644 index 936c1cd..0000000 --- a/data/Test540.hs +++ /dev/null @@ -1,14 +0,0 @@ --- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } -record :: Record -record = Record - { rProperties = - [ "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - , "foo" .= "bar" - ] - } diff --git a/data/Test55.hs b/data/Test55.hs deleted file mode 100644 index e49c0da..0000000 --- a/data/Test55.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -data MyStruct - = forall a b - . ( Loooooooooooooooooooooooooooooooong a - , Loooooooooooooooooooooooooooooooong b - ) => - MyConstructor (ToBriDocM BriDocNumbered) - (ToBriDocM BriDocNumbered) - (ToBriDocM BriDocNumbered) diff --git a/data/Test56.hs b/data/Test56.hs deleted file mode 100644 index 941107b..0000000 --- a/data/Test56.hs +++ /dev/null @@ -1,14 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -data MyRecord - = forall a b - . ( Loooooooooooooooooooooooooooooooong a - , Loooooooooooooooooooooooooooooooong b - ) => - MyConstructor - { foo, foo2 - :: loooooooooooooooooooooooooooooooong - -> loooooooooooooooooooooooooooooooong - , bar :: a - , bazz :: b - } - deriving Show diff --git a/data/Test57.hs b/data/Test57.hs deleted file mode 100644 index 6bcfc1b..0000000 --- a/data/Test57.hs +++ /dev/null @@ -1,5 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } - deriving (Show, Eq, Monad, Functor, Traversable, Foldable) diff --git a/data/Test58.hs b/data/Test58.hs deleted file mode 100644 index 6b228a2..0000000 --- a/data/Test58.hs +++ /dev/null @@ -1,12 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } - deriving Show - deriving (Eq, Ord) - deriving stock Show - deriving stock (Eq, Ord) - deriving anyclass Show - deriving anyclass (Show, Eq, Monad, Functor) - deriving newtype Show - deriving newtype (Traversable, Foldable) diff --git a/data/Test59.hs b/data/Test59.hs deleted file mode 100644 index 5721ef0..0000000 --- a/data/Test59.hs +++ /dev/null @@ -1,6 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } - deriving ToJSON via (SomeType) - deriving (ToJSON, FromJSON) via (SomeType) diff --git a/data/Test6.hs b/data/Test6.hs deleted file mode 100644 index 9bf7bb6..0000000 --- a/data/Test6.hs +++ /dev/null @@ -1 +0,0 @@ -func :: a -> (a -> a) diff --git a/data/Test60.hs b/data/Test60.hs deleted file mode 100644 index 79ccc7a..0000000 --- a/data/Test60.hs +++ /dev/null @@ -1,4 +0,0 @@ -{-# LANGUAGE ExistentialQuantification #-} -data Foo = forall a . Show a => Bar - { foo :: a - } diff --git a/data/Test61.hs b/data/Test61.hs deleted file mode 100644 index 81d41bf..0000000 --- a/data/Test61.hs +++ /dev/null @@ -1,5 +0,0 @@ -{-# LANGUAGE ExistentialQuantification #-} -data Foo = forall a b . (Show a, Eq b) => Bar - { foo :: a - , bars :: b - } diff --git a/data/Test62.hs b/data/Test62.hs deleted file mode 100644 index 8762559..0000000 --- a/data/Test62.hs +++ /dev/null @@ -1,3 +0,0 @@ --- before -data MyData = MyData Int --- after diff --git a/data/Test63.hs b/data/Test63.hs deleted file mode 100644 index 5532f33..0000000 --- a/data/Test63.hs +++ /dev/null @@ -1,5 +0,0 @@ -data MyRecord = MyRecord - { a :: Int - -- comment - , b :: Int - } diff --git a/data/Test64.hs b/data/Test64.hs deleted file mode 100644 index 0d37152..0000000 --- a/data/Test64.hs +++ /dev/null @@ -1,5 +0,0 @@ -data Foo = Bar -- a - { foo :: Baz -- b - , bars :: Bizzz -- c - } -- d - deriving (Show, Eq, Monad, Functor, Traversable, Foldable) -- e diff --git a/data/Test65.hs b/data/Test65.hs deleted file mode 100644 index dd2506f..0000000 --- a/data/Test65.hs +++ /dev/null @@ -1,9 +0,0 @@ -data Foo = Bar - { -- a - foo -- b - :: -- c - Baz -- d - , -- e - bars :: Bizzz - } - deriving (Show, Eq, Monad, Functor, Traversable, Foldable) diff --git a/data/Test66.hs b/data/Test66.hs deleted file mode 100644 index 3c7aeaa..0000000 --- a/data/Test66.hs +++ /dev/null @@ -1,11 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } - -- a - deriving --b - ( -- c - ToJSON -- d - , -- e - FromJSON --f - ) -- g diff --git a/data/Test67.hs b/data/Test67.hs deleted file mode 100644 index a3a915b..0000000 --- a/data/Test67.hs +++ /dev/null @@ -1,13 +0,0 @@ -data Foo = Bar - { foo :: Baz - , bars :: Bizzz - } - -- a - deriving --a - ToJSON --b - via -- c - ( -- d - SomeType --e - , -- f - ABC --g - ) diff --git a/data/Test68.hs b/data/Test68.hs deleted file mode 100644 index 0375bbb..0000000 --- a/data/Test68.hs +++ /dev/null @@ -1,8 +0,0 @@ -{-# LANGUAGE ExistentialQuantification #-} -data MyRecord - -- test comment - = forall a b - . ( Loooooooooooooooooooooooooooooooong a - , Loooooooooooooooooooooooooooooooong b - ) => - MyConstructor a b diff --git a/data/Test69.hs b/data/Test69.hs deleted file mode 100644 index a1759f1..0000000 --- a/data/Test69.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany {lconfig_indentPolicy: IndentPolicyLeft } -data EnterpriseGrantsForCompanyResponse = EnterpriseGrantsForCompanyResponse - Types.Company - [EnterpriseGrantResponse] diff --git a/data/Test7.hs b/data/Test7.hs deleted file mode 100644 index 6fd2b47..0000000 --- a/data/Test7.hs +++ /dev/null @@ -1,2 +0,0 @@ -func :: (((((((((()))))))))) --- current output is.. funny. wonder if that can/needs to be improved.. diff --git a/data/Test70.hs b/data/Test70.hs deleted file mode 100644 index a2147f6..0000000 --- a/data/Test70.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany {lconfig_indentPolicy: IndentPolicyFree } -data GrantsForCompanyResp = GrantsForCompanyResp Types.Company - [EnterpriseGrantResponse] diff --git a/data/Test71.hs b/data/Test71.hs deleted file mode 100644 index 5de2318..0000000 --- a/data/Test71.hs +++ /dev/null @@ -1,4 +0,0 @@ --- brittany {lconfig_indentPolicy: IndentPolicyFree } -data EnterpriseGrantsForCompanyResponse = EnterpriseGrantsForCompanyResponse - Types.Company - [EnterpriseGrantResponse] diff --git a/data/Test72.hs b/data/Test72.hs deleted file mode 100644 index af66351..0000000 --- a/data/Test72.hs +++ /dev/null @@ -1,3 +0,0 @@ --- brittany {lconfig_indentPolicy: IndentPolicyMultiple } -data GrantsForCompanyResp = GrantsForCompanyResp Types.Company - [EnterpriseGrantResponse] diff --git a/data/Test73.hs b/data/Test73.hs deleted file mode 100644 index 260d671..0000000 --- a/data/Test73.hs +++ /dev/null @@ -1,22 +0,0 @@ -data XIILqcacwiuNiu = XIILqcacwiuNiu - { oyyFtvbepgbOge_pebzVmuftEijwuj :: Jgtoyuh HessJvNlo - , wloQsiskdoxJop_xatiKrwedOxtu :: Jgtoyuh [Inotg] - , mmmJjcqtemyIyo_ovosDoreKeeoyamvove :: Jgtoyuh Eujo - , mbiIatelofxOzr_uluxNngiiMjah :: Jgtoyuh HessJvNlo - , obxIskfcxpkIkb_uuviTuevcSkrgo :: Jgtoyuh Int - , wqrAtuvuecoHwr_ilotNxbuPleo :: Jgtoyuh Ufaxdeq - , lofAfuebdhpLuv_cnekPoyFxmg :: Jgtoyuh Ufaxdeq - , ouoFugtawzvUpk_oupiLzptugy :: Jgtoyuh Eujo - , iqiXjtziwogNsa_uiyvSunaTtgUsf3 :: Jgtoyuh Oaivn - , odbIriaqnojUlz_onotoWuunehIpuy :: Jgtoyuh Eujo - , opjUxtkxzkiKse_luqjuZazt - :: Jgtoyuh [(Eujo, Int, Int, Int, Int, Int, NELUxro)] - -- , jcqRaqznxfhIpa_ywevMezmoYkutuwa :: Jgtoyuh () - , vayOmuasyphOfd_bcsVljmvt :: Jgtoyuh Eujo - , rifArahilooRax_ufikecqdImsv :: Jgtoyuh Oaivn - , raqKtopcpszDwb_oqocubasZuqjcryoDojGkw :: Jgtoyuh Oaivn - , mluJiilpcijUtt_gaisklifVekfeyagRmfbyzz :: Jgtoyuh Oaivn - , oqhPaahjupaSmi_gamwwoovKyxznecvEayluc :: Jgtoyuh Oaivn - , mazFubimwebZpa_itidehDodiDlboz :: Jgtoyuh Vrep - , jeyOcuesexaYoy_vpqn :: Jgtoyuh () - } diff --git a/data/Test74.hs b/data/Test74.hs deleted file mode 100644 index e9e6d4f..0000000 --- a/data/Test74.hs +++ /dev/null @@ -1 +0,0 @@ -func x = x diff --git a/data/Test75.hs b/data/Test75.hs deleted file mode 100644 index 2e7361d..0000000 --- a/data/Test75.hs +++ /dev/null @@ -1 +0,0 @@ -x *** y = x diff --git a/data/Test76.hs b/data/Test76.hs deleted file mode 100644 index 877399e..0000000 --- a/data/Test76.hs +++ /dev/null @@ -1 +0,0 @@ -(***) x y = x diff --git a/data/Test77.hs b/data/Test77.hs deleted file mode 100644 index b0795a1..0000000 --- a/data/Test77.hs +++ /dev/null @@ -1 +0,0 @@ -(f >=> g) k = f k >>= g diff --git a/data/Test78.hs b/data/Test78.hs deleted file mode 100644 index 1f3d4e7..0000000 --- a/data/Test78.hs +++ /dev/null @@ -1,4 +0,0 @@ -(Left a <$$> Left dd) e f = True -(Left a <$$> Right d ) e f = True -(Right a <$$> Left d ) e f = False -(Right a <$$> Right dd) e f = True diff --git a/data/Test79.hs b/data/Test79.hs deleted file mode 100644 index bc6cbe5..0000000 --- a/data/Test79.hs +++ /dev/null @@ -1 +0,0 @@ -func _ = x diff --git a/data/Test8.hs b/data/Test8.hs deleted file mode 100644 index 9b1b57b..0000000 --- a/data/Test8.hs +++ /dev/null @@ -1 +0,0 @@ -func :: () diff --git a/data/Test80.hs b/data/Test80.hs deleted file mode 100644 index 5c29c83..0000000 --- a/data/Test80.hs +++ /dev/null @@ -1,2 +0,0 @@ -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable = - x diff --git a/data/Test81.hs b/data/Test81.hs deleted file mode 100644 index 7649b18..0000000 --- a/data/Test81.hs +++ /dev/null @@ -1,2 +0,0 @@ -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable - = x diff --git a/data/Test82.hs b/data/Test82.hs deleted file mode 100644 index dcb58cf..0000000 --- a/data/Test82.hs +++ /dev/null @@ -1,2 +0,0 @@ -func reallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongvariable a b - = x diff --git a/data/Test83.hs b/data/Test83.hs deleted file mode 100644 index 2e709c1..0000000 --- a/data/Test83.hs +++ /dev/null @@ -1 +0,0 @@ -func (A a) = a diff --git a/data/Test84.hs b/data/Test84.hs deleted file mode 100644 index 58f9aca..0000000 --- a/data/Test84.hs +++ /dev/null @@ -1 +0,0 @@ -func (x : xr) = x diff --git a/data/Test85.hs b/data/Test85.hs deleted file mode 100644 index f097653..0000000 --- a/data/Test85.hs +++ /dev/null @@ -1 +0,0 @@ -func (x :+: xr) = x diff --git a/data/Test86.hs b/data/Test86.hs deleted file mode 100644 index f5eccc0..0000000 --- a/data/Test86.hs +++ /dev/null @@ -1 +0,0 @@ -func (x `Foo` xr) = x diff --git a/data/Test87.hs b/data/Test87.hs deleted file mode 100644 index 5a64709..0000000 --- a/data/Test87.hs +++ /dev/null @@ -1 +0,0 @@ -func | True = x diff --git a/data/Test88.hs b/data/Test88.hs deleted file mode 100644 index ca71136..0000000 --- a/data/Test88.hs +++ /dev/null @@ -1,2 +0,0 @@ -func x | x = simple expression - | otherwise = 0 diff --git a/data/Test89.hs b/data/Test89.hs deleted file mode 100644 index c18a534..0000000 --- a/data/Test89.hs +++ /dev/null @@ -1,3 +0,0 @@ -func x - | a somewhat longer guard x = "and a somewhat longer expession that does not" - | otherwise = "fit without putting the guards in new lines" diff --git a/data/Test9.hs b/data/Test9.hs deleted file mode 100644 index 1b64914..0000000 --- a/data/Test9.hs +++ /dev/null @@ -1,5 +0,0 @@ -func - :: ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd - -> lakjsdlkjasldkj - -> lakjsdlkjasldkj - ) diff --git a/data/Test90.hs b/data/Test90.hs deleted file mode 100644 index 6f9ef8f..0000000 --- a/data/Test90.hs +++ /dev/null @@ -1,7 +0,0 @@ -func x - | very long guard, another rather long guard that refers to x = nontrivial - expression - foo - bar - alsdkjlasdjlasj - | otherwise = 0 diff --git a/data/Test91.hs b/data/Test91.hs deleted file mode 100644 index 9256c3f..0000000 --- a/data/Test91.hs +++ /dev/null @@ -1,5 +0,0 @@ -func x - | very long guard, another rather long guard that refers to x - = nontrivialexpression foo bar alsdkjlasdjlasj - | otherwise - = 0 diff --git a/data/Test92.hs b/data/Test92.hs deleted file mode 100644 index 289aa8b..0000000 --- a/data/Test92.hs +++ /dev/null @@ -1,6 +0,0 @@ -func x - | very loooooooooooooooooooooooooooooong guard - , another rather long guard that refers to x - = nontrivial expression foo bar alsdkjlasdjlasj - | otherwise - = 0 diff --git a/data/Test93.hs b/data/Test93.hs deleted file mode 100644 index 48053a4..0000000 --- a/data/Test93.hs +++ /dev/null @@ -1,2 +0,0 @@ -func = x -describe "infix op" $ do diff --git a/data/Test94.hs b/data/Test94.hs deleted file mode 100644 index aa1fd8f..0000000 --- a/data/Test94.hs +++ /dev/null @@ -1 +0,0 @@ -func = x + x diff --git a/data/Test95.hs b/data/Test95.hs deleted file mode 100644 index 2d99eaf..0000000 --- a/data/Test95.hs +++ /dev/null @@ -1,3 +0,0 @@ -func = - mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj - + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj diff --git a/data/Test96.hs b/data/Test96.hs deleted file mode 100644 index d9a2015..0000000 --- a/data/Test96.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = - mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj - + mweroiuxlskdfjlksj - + mweroiuxlskdfjlksj diff --git a/data/Test97.hs b/data/Test97.hs deleted file mode 100644 index 094383e..0000000 --- a/data/Test97.hs +++ /dev/null @@ -1,4 +0,0 @@ -func = - mweroiuxlskdfjlksj - + mweroiuxlskdfjlksj - + mweroiuxlskdfjlksjdflkjsdfljksldkjflkjsdflkj diff --git a/data/Test98.hs b/data/Test98.hs deleted file mode 100644 index cc29546..0000000 --- a/data/Test98.hs +++ /dev/null @@ -1,5 +0,0 @@ -func = 1 -func = "abc" -func = 1.1e5 -func = 'x' -func = 981409823458910394810928414192837123987123987123 diff --git a/data/Test99.hs b/data/Test99.hs deleted file mode 100644 index efcec60..0000000 --- a/data/Test99.hs +++ /dev/null @@ -1,2 +0,0 @@ -func = \x -> abc -describe "app" $ do diff --git a/data/brittany.yaml b/data/brittany.yaml deleted file mode 100644 index b9b9aab..0000000 --- a/data/brittany.yaml +++ /dev/null @@ -1,4 +0,0 @@ -conf_layout: - lconfig_allowSingleLineExportList: true - lconfig_importAsColumn: 60 - lconfig_importColumn: 60 diff --git a/source/test-suite/Main.hs b/source/test-suite/Main.hs index c8324df..36e79ef 100644 --- a/source/test-suite/Main.hs +++ b/source/test-suite/Main.hs @@ -1,50 +1,256 @@ -import qualified Control.Exception as Exception -import qualified Control.Monad as Monad -import qualified Data.List as List -import qualified Language.Haskell.Brittany.Main as Brittany -import qualified System.Directory as Directory -import qualified System.FilePath as FilePath -import qualified System.IO as IO -import qualified Test.Hspec as Hspec +{-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MonadComprehensions #-} +{-# LANGUAGE ScopedTypeVariables #-} + +import Data.Coerce (coerce) +import Data.List (groupBy) +import qualified Data.Maybe +import qualified Data.Semigroup as Semigroup +import qualified Data.Text as Text +import qualified Data.Text.IO as Text.IO +import qualified GHC.OldList as List +import Language.Haskell.Brittany.Internal +import Language.Haskell.Brittany.Internal.Config +import Language.Haskell.Brittany.Internal.Config.Types +import Language.Haskell.Brittany.Internal.Prelude +import Language.Haskell.Brittany.Internal.PreludeUtils +import qualified System.Directory +import System.FilePath (()) +import System.Timeout (timeout) +import Test.Hspec +import qualified Text.Parsec as Parsec +import Text.Parsec.Text (Parser) + +hush :: Either a b -> Maybe b +hush = either (const Nothing) Just + + + +asymptoticPerfTest :: Spec +asymptoticPerfTest = do + it "10 do statements" + $ roundTripEqualWithTimeout 1500000 + $ (Text.pack "func = do\n") + <> Text.replicate 10 (Text.pack " statement\n") + it "10 do nestings" + $ roundTripEqualWithTimeout 4000000 + $ (Text.pack "func = ") + <> mconcat + ( [1 .. 10] + <&> \(i :: Int) -> + (Text.replicate (2 * i) (Text.pack " ") <> Text.pack "do\n") + ) + <> Text.replicate 2000 (Text.pack " ") + <> Text.pack "return\n" + <> Text.replicate 2002 (Text.pack " ") + <> Text.pack "()" + it "10 AppOps" + $ roundTripEqualWithTimeout 1000000 + $ (Text.pack "func = expr") + <> Text.replicate 10 (Text.pack "\n . expr") --TODO + +roundTripEqualWithTimeout :: Int -> Text -> Expectation +roundTripEqualWithTimeout time t = + timeout time (action >>= evaluate) >>= (`shouldSatisfy`Data.Maybe.isJust) + where + action = fmap (fmap PPTextWrapper) + (parsePrintModuleTests defaultTestConfig "TestFakeFileName.hs" t) + + +data InputLine + = GroupLine Text + | HeaderLine Text + | PendingLine + | NormalLine Text + | CommentLine + deriving Show + +data TestCase = TestCase + { testName :: Text + , isPending :: Bool + , content :: Text + } main :: IO () -main = Hspec.hspec . Hspec.parallel $ do - let directory = "data" - entries <- Hspec.runIO $ Directory.listDirectory directory - Monad.forM_ (List.sort entries) $ \entry -> - case FilePath.stripExtension "hs" entry of - Nothing -> pure () - Just slug -> Hspec.it slug $ do - let input = FilePath.combine directory entry - expected <- readFile input - actual <- withTemporaryFile $ \output handle -> do - IO.hClose handle - Directory.copyFile input output - Brittany.mainWith - "brittany" - [ "--config-file" - , FilePath.combine directory "brittany.yaml" - , "--no-user-config" - , "--write-mode" - , "inplace" - , output - ] - readFile output - Literal actual `Hspec.shouldBe` Literal expected +main = do + files <- System.Directory.listDirectory "data/" + let blts = + List.sort + $ filter (\x -> not ("tests-context-free.blt" `isSuffixOf` x)) + $ filter (".blt" `isSuffixOf`) files + inputs <- blts `forM` \blt -> Text.IO.readFile ("data" blt) + let groups = createChunks =<< inputs + inputCtxFree <- Text.IO.readFile "data/30-tests-context-free.blt" + let groupsCtxFree = createChunks inputCtxFree + hspec $ do + describe "asymptotic perf roundtrips" $ asymptoticPerfTest + describe "library interface basic functionality" $ do + it "gives properly formatted result for valid input" $ do + let + input = Text.pack $ unlines + ["func = [00000000000000000000000, 00000000000000000000000, 00000000000000000000000, 00000000000000000000000]"] + let expected = Text.pack $ unlines + [ "func =" + , " [ 00000000000000000000000" + , " , 00000000000000000000000" + , " , 00000000000000000000000" + , " , 00000000000000000000000" + , " ]" + ] + output <- liftIO $ parsePrintModule staticDefaultConfig input + hush output `shouldBe` Just expected + groups `forM_` \(groupname, tests) -> do + describe (Text.unpack groupname) $ do + tests `forM_` \test -> do + (if isPending test then before_ pending else id) + $ it (Text.unpack $ testName test) + $ roundTripEqual defaultTestConfig + $ content test + groupsCtxFree `forM_` \(groupname, tests) -> do + describe ("context free: " ++ Text.unpack groupname) $ do + tests `forM_` \test -> do + (if isPending test then before_ pending else id) + $ it (Text.unpack $ testName test) + $ roundTripEqual contextFreeTestConfig + $ content test + where + -- this function might be implemented in a weirdly complex fashion; the + -- reason being that it was copied from a somewhat more complex variant. + createChunks :: Text -> [(Text, [TestCase])] + createChunks input = +-- fmap (\case +-- HeaderLine n:PendingLine:rest | Just rlines <- mapM extractNormal rest -> (n, True, Text.unlines rlines) +-- HeaderLine n:rest | Just rlines <- mapM extractNormal rest -> (n, False, Text.unlines rlines) +-- l -> error $ "first non-empty line must start with #test footest\n" ++ show l +-- ) +-- $ fmap (groupBy grouperT) + fmap groupProcessor + $ groupBy grouperG + $ filter (not . lineIsSpace) + $ lineMapper + <$> Text.lines input + where + groupProcessor :: [InputLine] -> (Text, [TestCase]) + groupProcessor = \case + GroupLine g : grouprest -> + (,) g + $ fmap testProcessor + $ groupBy grouperT + $ filter (not . lineIsSpace) + $ grouprest + l -> error $ "first non-empty line must be a #group\n" ++ show l + testProcessor :: [InputLine] -> TestCase + testProcessor = \case + HeaderLine n : rest -> + let normalLines = Data.Maybe.mapMaybe extractNormal rest + in TestCase + { testName = n + , isPending = any isPendingLine rest + , content = Text.unlines normalLines + } + l -> + error $ "first non-empty line must start with #test footest\n" ++ show l + extractNormal (NormalLine l) = Just l + extractNormal _ = Nothing + isPendingLine PendingLine{} = True + isPendingLine _ = False + specialLineParser :: Parser InputLine + specialLineParser = Parsec.choice + [ [ GroupLine $ Text.pack name + | _ <- Parsec.try $ Parsec.string "#group" + , _ <- Parsec.many1 $ Parsec.oneOf " \t" + , name <- Parsec.many1 $ Parsec.noneOf "\r\n:" + , _ <- Parsec.eof + ] + , [ HeaderLine $ Text.pack name + | _ <- Parsec.try $ Parsec.string "#test" + , _ <- Parsec.many1 $ Parsec.oneOf " \t" + , name <- Parsec.many1 $ Parsec.noneOf "\r\n:" + , _ <- Parsec.eof + ] + , [ PendingLine + | _ <- Parsec.try $ Parsec.string "#pending" + , _ <- Parsec.optional $ many (Parsec.noneOf "\r\n") + , _ <- Parsec.eof + ] + , [ CommentLine + | _ <- Parsec.many $ Parsec.oneOf " \t" + , _ <- Parsec.optional $ Parsec.string "##" <* many + (Parsec.noneOf "\r\n") + , _ <- Parsec.eof + ] + , [ NormalLine mempty + | _ <- Parsec.try $ Parsec.string "" + , _ <- Parsec.eof + ] + ] + lineMapper :: Text -> InputLine + lineMapper line = case Parsec.runParser specialLineParser () "" line of + Left _e -> NormalLine line + Right l -> l + lineIsSpace :: InputLine -> Bool + lineIsSpace CommentLine = True + lineIsSpace _ = False + grouperG :: InputLine -> InputLine -> Bool + grouperG _ GroupLine{} = False + grouperG _ _ = True + grouperT :: InputLine -> InputLine -> Bool + grouperT _ HeaderLine{} = False + grouperT _ _ = True -withTemporaryFile :: (FilePath -> IO.Handle -> IO a) -> IO a -withTemporaryFile callback = do - directory <- Directory.getTemporaryDirectory - let - acquire = IO.openTempFile directory "brittany-.hs" - release filePath handle = do - IO.hClose handle - Directory.removeFile filePath - Exception.bracket acquire (uncurry release) (uncurry callback) -newtype Literal - = Literal String +-------------------- +-- past this line: copy-pasta from other test (meh..) +-------------------- +roundTripEqual :: Config -> Text -> Expectation +roundTripEqual c t = + fmap (fmap PPTextWrapper) (parsePrintModuleTests c "TestFakeFileName.hs" t) + `shouldReturn` Right (PPTextWrapper t) + +newtype PPTextWrapper = PPTextWrapper Text deriving Eq -instance Show Literal where - show (Literal x) = x +instance Show PPTextWrapper where + show (PPTextWrapper t) = "\n" ++ Text.unpack t + +-- brittany-next-binding --columns 160 +-- brittany-next-binding { lconfig_indentPolicy: IndentPolicyLeft } +defaultTestConfig :: Config +defaultTestConfig = Config + { _conf_version = _conf_version staticDefaultConfig + , _conf_debug = _conf_debug staticDefaultConfig + , _conf_layout = LayoutConfig + { _lconfig_cols = coerce (80 :: Int) + , _lconfig_indentPolicy = coerce IndentPolicyFree + , _lconfig_indentAmount = coerce (2 :: Int) + , _lconfig_indentWhereSpecial = coerce True + , _lconfig_indentListSpecial = coerce True + , _lconfig_importColumn = coerce (60 :: Int) + , _lconfig_importAsColumn = coerce (60 :: Int) + , _lconfig_altChooser = coerce $ AltChooserBoundedSearch 3 + , _lconfig_columnAlignMode = coerce (ColumnAlignModeMajority 0.7) + , _lconfig_alignmentLimit = coerce (30 :: Int) + , _lconfig_alignmentBreakOnMultiline = coerce True + , _lconfig_hangingTypeSignature = coerce False + , _lconfig_reformatModulePreamble = coerce True + , _lconfig_allowSingleLineExportList = coerce True + , _lconfig_allowHangingQuasiQuotes = coerce True + , _lconfig_experimentalSemicolonNewlines = coerce False + -- , _lconfig_allowSinglelineRecord = coerce False + } + , _conf_errorHandling = (_conf_errorHandling staticDefaultConfig) { _econf_omit_output_valid_check = coerce True } + , _conf_preprocessor = _conf_preprocessor staticDefaultConfig + , _conf_forward = ForwardOptions { _options_ghc = Identity [] } + , _conf_roundtrip_exactprint_only = coerce False + , _conf_disable_formatting = coerce False + , _conf_obfuscate = coerce False + } + +contextFreeTestConfig :: Config +contextFreeTestConfig = defaultTestConfig + { _conf_layout = (_conf_layout defaultTestConfig) + { _lconfig_indentPolicy = coerce IndentPolicyLeft + , _lconfig_alignmentLimit = coerce (1 :: Int) + , _lconfig_columnAlignMode = coerce ColumnAlignModeDisabled + } + }