Skip to content

Commit 9bccd0f

Browse files
(#1027) mk mod Prelude NoImplicitPrelude, mv mod Prelude (->Nix.)
1 parent 27e357d commit 9bccd0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+102
-69
lines changed

benchmarks/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module Main where
22

3+
import Nix.Prelude
34
import Criterion.Main
45

56
import qualified ParserBench

benchmarks/ParserBench.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module ParserBench (benchmarks) where
22

3+
import Nix.Prelude
34
import Nix.Parser
45

56
import Criterion

hnix.cabal

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ flag profiling
341341

342342
library
343343
exposed-modules:
344-
Prelude
345344
Nix
345+
Nix.Prelude
346346
Nix.Utils
347347
Nix.Atoms
348348
Nix.Builtins
@@ -398,9 +398,6 @@ library
398398
Paths_hnix
399399
hs-source-dirs:
400400
src
401-
mixins:
402-
base hiding (Prelude)
403-
, relude
404401
ghc-options:
405402
-Wall
406403
-fprint-potential-instances
@@ -469,7 +466,8 @@ library
469466
, vector >= 0.12.0 && < 0.13
470467
, xml >= 1.3.14 && < 1.4
471468
default-extensions:
472-
OverloadedStrings
469+
NoImplicitPrelude
470+
, OverloadedStrings
473471
, DeriveGeneric
474472
, DeriveDataTypeable
475473
, DeriveFunctor
@@ -532,11 +530,9 @@ executable hnix
532530
, serialise
533531
, template-haskell
534532
, time
535-
mixins:
536-
base hiding (Prelude)
537-
, relude
538533
default-extensions:
539-
OverloadedStrings
534+
NoImplicitPrelude
535+
, OverloadedStrings
540536
, DeriveGeneric
541537
, DeriveDataTypeable
542538
, DeriveFunctor
@@ -579,9 +575,6 @@ test-suite hnix-tests
579575
PrettyTests
580576
ReduceExprTests
581577
TestCommon
582-
mixins:
583-
base hiding (Prelude)
584-
, relude
585578
hs-source-dirs:
586579
tests
587580
ghc-options:
@@ -615,7 +608,8 @@ test-suite hnix-tests
615608
, time
616609
, unix-compat
617610
default-extensions:
618-
OverloadedStrings
611+
NoImplicitPrelude
612+
, OverloadedStrings
619613
, DeriveGeneric
620614
, DeriveDataTypeable
621615
, DeriveFunctor
@@ -650,9 +644,6 @@ benchmark hnix-benchmarks
650644
ParserBench
651645
hs-source-dirs:
652646
benchmarks
653-
mixins:
654-
base hiding (Prelude)
655-
, relude
656647
ghc-options:
657648
-Wall
658649
build-depends:
@@ -668,7 +659,8 @@ benchmark hnix-benchmarks
668659
, template-haskell
669660
, time
670661
default-extensions:
671-
OverloadedStrings
662+
NoImplicitPrelude
663+
, OverloadedStrings
672664
, DeriveGeneric
673665
, DeriveDataTypeable
674666
, DeriveFunctor

main/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
module Main ( main ) where
66

7+
import Nix.Prelude
78
import Relude as Prelude ( force )
89
import Control.Comonad ( extract )
910
import qualified Control.Exception as Exception

main/Repl.hs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ module Repl
1414
, main'
1515
) where
1616

17-
import Prelude hiding ( state )
17+
import Nix.Prelude hiding ( state )
1818
import Nix hiding ( exec )
1919
import Nix.Scope
2020
import Nix.Value.Monad ( demand )
2121

22-
import qualified Data.HashMap.Lazy as M
22+
import qualified Data.HashMap.Lazy as M
2323
import Data.Char ( isSpace )
2424
import Data.List ( dropWhileEnd )
25-
import qualified Data.Text as Text
26-
import qualified Data.Text.IO as Text
25+
import qualified Data.Text as Text
26+
import qualified Data.Text.IO as Text
2727
import Data.Version ( showVersion )
2828
import Paths_hnix ( version )
2929

@@ -33,7 +33,7 @@ import Prettyprinter ( Doc
3333
, space
3434
)
3535
import qualified Prettyprinter
36-
import qualified Prettyprinter.Render.Text as Prettyprinter
36+
import qualified Prettyprinter.Render.Text as Prettyprinter
3737

3838
import System.Console.Haskeline.Completion
3939
( Completion(isFinished)
@@ -49,9 +49,9 @@ import System.Console.Repline ( Cmd
4949
, HaskelineT
5050
, evalRepl
5151
)
52-
import qualified System.Console.Repline as Console
53-
import qualified System.Exit as Exit
54-
import qualified System.IO.Error as Error
52+
import qualified System.Console.Repline as Console
53+
import qualified System.Exit as Exit
54+
import qualified System.IO.Error as Error
5555

5656
-- | Repl entry point
5757
main :: (MonadNix e t f m, MonadIO m, MonadMask m) => m ()

src/Nix.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
module Nix
32
( module Nix.Cache
43
, module Nix.Exec
@@ -25,6 +24,7 @@ module Nix
2524
)
2625
where
2726

27+
import Nix.Prelude
2828
import Relude.Unsafe ( (!!) )
2929
import GHC.Err ( errorWithoutStackTrace )
3030
import Data.Fix ( Fix )

src/Nix/Atoms.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
{-# language CPP #-}
2-
{-# language DeriveAnyClass #-}
1+
{-# language CPP #-}
2+
{-# language DeriveAnyClass #-}
33

44
module Nix.Atoms where
55

6+
import Nix.Prelude
67
import Codec.Serialise ( Serialise )
78

89
import Data.Data ( Data)

src/Nix/Builtins.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313

1414
{-# options_ghc -fno-warn-name-shadowing #-}
1515

16+
1617
-- | Code that implements Nix builtins. Lists the functions that are built into the Nix expression evaluator. Some built-ins (aka `derivation`), are always in the scope, so they can be accessed by the name. To keap the namespace clean, most built-ins are inside the `builtins` scope - a set that contains all what is a built-in.
1718
module Nix.Builtins
1819
( withNixContext
1920
, builtins
2021
)
2122
where
2223

23-
24+
import Nix.Prelude
2425
import GHC.Exception ( ErrorCall(ErrorCall) )
2526
import Control.Comonad ( Comonad )
2627
import Control.Monad ( foldM )

src/Nix/Cache.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
-- | Reading and writing Nix cache files
44
module Nix.Cache where
55

6+
import Nix.Prelude
67
import qualified Data.ByteString.Lazy as BSL
78
import Nix.Expr.Types.Annotated
89

src/Nix/Cited.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
module Nix.Cited where
77

8+
import Nix.Prelude
89
import Control.Comonad
910
import Control.Comonad.Env
1011
import Lens.Family2.TH

0 commit comments

Comments
 (0)