brittany/data/10-structured/module-imports.blt

272 lines
11 KiB
Plaintext

#group module/imports
#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 TestA ( longbindingNameThatoverflowsColum
)
import TestB ( 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
<BLANKLINE>
import Aaa
import Baa
#test sorted-qualified-imports
import Boo
import qualified Zoo
#test imports-groups-same-module
import Boo ( a )
<BLANKLINE>
import Boo ( b )
#test sorted-imports-nested
import A.B.C
import A.B.D