|
8 | 8 | {-# LANGUAGE FlexibleContexts #-} |
9 | 9 | {-# LANGUAGE FlexibleInstances #-} |
10 | 10 | {-# LANGUAGE FunctionalDependencies #-} |
11 | | -{-# LANGUAGE GADTs #-} |
12 | 11 | {-# LANGUAGE LambdaCase #-} |
13 | 12 | {-# LANGUAGE OverloadedStrings #-} |
14 | 13 | {-# LANGUAGE RankNTypes #-} |
15 | 14 | {-# LANGUAGE StandaloneDeriving #-} |
16 | 15 | {-# LANGUAGE TemplateHaskell #-} |
17 | 16 | {-# LANGUAGE TypeApplications #-} |
18 | 17 | {-# LANGUAGE TypeFamilies #-} |
| 18 | +{-# LANGUAGE InstanceSigs #-} |
19 | 19 |
|
20 | 20 | {-# OPTIONS_GHC -Wno-orphans #-} |
21 | 21 | {-# OPTIONS_GHC -Wno-missing-signatures #-} |
|
27 | 27 | module Nix.Expr.Types where |
28 | 28 |
|
29 | 29 | #ifdef MIN_VERSION_serialise |
| 30 | +import qualified Codec.Serialise ( Serialise(decode, encode) ) -- For instance implementation function disamburgation |
30 | 31 | import Codec.Serialise ( Serialise ) |
31 | | -import qualified Codec.Serialise as Ser |
32 | 32 | #endif |
33 | 33 | import Control.Applicative |
34 | 34 | import Control.DeepSeq |
@@ -348,12 +348,12 @@ data NKeyName r |
348 | 348 | instance Serialise r => Serialise (NKeyName r) |
349 | 349 |
|
350 | 350 | instance Serialise Pos where |
351 | | - encode x = Ser.encode (unPos x) |
352 | | - decode = mkPos <$> Ser.decode |
| 351 | + encode x = Codec.Serialise.encode (unPos x) |
| 352 | + decode = mkPos <$> Codec.Serialise.decode |
353 | 353 |
|
354 | 354 | instance Serialise SourcePos where |
355 | | - encode (SourcePos f l c) = Ser.encode f <> Ser.encode l <> Ser.encode c |
356 | | - decode = SourcePos <$> Ser.decode <*> Ser.decode <*> Ser.decode |
| 355 | + encode (SourcePos f l c) = Codec.Serialise.encode f <> Codec.Serialise.encode l <> Codec.Serialise.encode c |
| 356 | + decode = SourcePos <$> Codec.Serialise.decode <*> Codec.Serialise.decode <*> Codec.Serialise.decode |
357 | 357 | #endif |
358 | 358 |
|
359 | 359 | instance Hashable Pos where |
|
0 commit comments