File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,24 @@ module Nix.String
3030 )
3131where
3232
33- import Control.Monad.Writer
34- import Data.Functor.Identity
33+
34+
35+
36+ import Control.Monad.Writer ( WriterT (.. ), MonadWriter (tell ), MonadTrans , (<=<) )
37+ import Data.Functor.Identity ( Identity (runIdentity ) )
3538import qualified Data.HashMap.Lazy as M
3639import qualified Data.HashSet as S
37- import Data.Hashable
40+ import Data.Hashable ( Hashable )
3841import Data.Text ( Text )
3942import qualified Data.Text as Text
40- import GHC.Generics
43+ import GHC.Generics ( Generic )
4144
4245
4346-- * Types
4447
4548-- ** Context
4649
47- -- | A 'StringContext' ...
50+ -- | A Nix 'StringContext' ...
4851data StringContext =
4952 StringContext { scPath :: ! Text
5053 , scFlavor :: ! ContextFlavor
@@ -139,7 +142,7 @@ getContext = nsContext
139142
140143fromNixLikeContext :: NixLikeContext -> S. HashSet StringContext
141144fromNixLikeContext =
142- S. fromList . join . fmap toStringContexts . M. toList . getNixLikeContext
145+ S. fromList . ( toStringContexts <=< ( M. toList . getNixLikeContext))
143146
144147-- | Extract the string contents from a NixString that has no context
145148getStringNoContext :: NixString -> Maybe Text
You can’t perform that action at this time.
0 commit comments