mirror of
https://github.com/anoma/juvix.git
synced 2024-07-14 19:30:34 +03:00
get a bigger lens
This commit is contained in:
parent
20318f6742
commit
270a287f88
@ -78,7 +78,7 @@ dependencies:
|
|||||||
- megaparsec == 9.6.*
|
- megaparsec == 9.6.*
|
||||||
- commonmark == 0.2.*
|
- commonmark == 0.2.*
|
||||||
- parsec == 3.1.*
|
- parsec == 3.1.*
|
||||||
- microlens-platform == 0.4.*
|
- lens == 5.2.*
|
||||||
- parser-combinators == 1.3.*
|
- parser-combinators == 1.3.*
|
||||||
- path == 0.9.*
|
- path == 0.9.*
|
||||||
- path-io == 1.8.*
|
- path-io == 1.8.*
|
||||||
|
@ -6,7 +6,6 @@ import Data.Aeson.TH
|
|||||||
import Juvix.Data.Emacs
|
import Juvix.Data.Emacs
|
||||||
import Juvix.Extra.Strings qualified as Str
|
import Juvix.Extra.Strings qualified as Str
|
||||||
import Juvix.Prelude
|
import Juvix.Prelude
|
||||||
import Lens.Micro.Platform qualified as Lens
|
|
||||||
|
|
||||||
data GenericProperty = GenericProperty
|
data GenericProperty = GenericProperty
|
||||||
{ _gpropProperty :: Text,
|
{ _gpropProperty :: Text,
|
||||||
@ -111,7 +110,7 @@ type RawType = Text
|
|||||||
|
|
||||||
$( deriveToJSON
|
$( deriveToJSON
|
||||||
defaultOptions
|
defaultOptions
|
||||||
{ fieldLabelModifier = over Lens._head toLower . dropPrefix "_rawProperties",
|
{ fieldLabelModifier = over _head toLower . dropPrefix "_rawProperties",
|
||||||
constructorTagModifier = map toLower
|
constructorTagModifier = map toLower
|
||||||
}
|
}
|
||||||
''RawProperties
|
''RawProperties
|
||||||
|
@ -15,7 +15,6 @@ import Juvix.Extra.Strings qualified as Str
|
|||||||
import Juvix.Extra.Version
|
import Juvix.Extra.Version
|
||||||
import Juvix.Prelude hiding ((.=))
|
import Juvix.Prelude hiding ((.=))
|
||||||
import Juvix.Prelude.Aeson
|
import Juvix.Prelude.Aeson
|
||||||
import Lens.Micro.Platform qualified as Lens
|
|
||||||
|
|
||||||
data LockfileDependency = LockfileDependency
|
data LockfileDependency = LockfileDependency
|
||||||
{ _lockfileDependencyDependency :: Dependency,
|
{ _lockfileDependencyDependency :: Dependency,
|
||||||
@ -110,7 +109,7 @@ instance FromJSON LockfileDependency where
|
|||||||
lockfileV2Options :: Options
|
lockfileV2Options :: Options
|
||||||
lockfileV2Options =
|
lockfileV2Options =
|
||||||
defaultOptions
|
defaultOptions
|
||||||
{ fieldLabelModifier = over Lens._head toLower . dropPrefix "_lockfileV2",
|
{ fieldLabelModifier = over _head toLower . dropPrefix "_lockfileV2",
|
||||||
rejectUnknownFields = True,
|
rejectUnknownFields = True,
|
||||||
omitNothingFields = True
|
omitNothingFields = True
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ import Juvix.Compiler.Pipeline.Lockfile
|
|||||||
import Juvix.Compiler.Pipeline.Package.Dependency
|
import Juvix.Compiler.Pipeline.Package.Dependency
|
||||||
import Juvix.Extra.Paths
|
import Juvix.Extra.Paths
|
||||||
import Juvix.Prelude
|
import Juvix.Prelude
|
||||||
import Lens.Micro.Platform qualified as Lens
|
|
||||||
|
|
||||||
data BuildDir
|
data BuildDir
|
||||||
= DefaultBuildDir
|
= DefaultBuildDir
|
||||||
@ -72,7 +71,7 @@ deriving stock instance Show Package
|
|||||||
rawPackageOptions :: Options
|
rawPackageOptions :: Options
|
||||||
rawPackageOptions =
|
rawPackageOptions =
|
||||||
defaultOptions
|
defaultOptions
|
||||||
{ fieldLabelModifier = over Lens._head toLower . dropPrefix "_package",
|
{ fieldLabelModifier = over _head toLower . dropPrefix "_package",
|
||||||
rejectUnknownFields = True,
|
rejectUnknownFields = True,
|
||||||
omitNothingFields = True
|
omitNothingFields = True
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ import Data.Yaml hiding ((.=))
|
|||||||
import Juvix.Extra.Strings qualified as Str
|
import Juvix.Extra.Strings qualified as Str
|
||||||
import Juvix.Prelude hiding ((.=))
|
import Juvix.Prelude hiding ((.=))
|
||||||
import Juvix.Prelude.Pretty
|
import Juvix.Prelude.Pretty
|
||||||
import Lens.Micro.Platform qualified as Lens
|
|
||||||
|
|
||||||
data Dependency
|
data Dependency
|
||||||
= DependencyPath PathDependency
|
= DependencyPath PathDependency
|
||||||
@ -90,7 +89,7 @@ instance FromJSON PathDependency where
|
|||||||
gitDependencyOptions :: Options
|
gitDependencyOptions :: Options
|
||||||
gitDependencyOptions =
|
gitDependencyOptions =
|
||||||
defaultOptions
|
defaultOptions
|
||||||
{ fieldLabelModifier = over Lens._head toLower . dropPrefix "_gitDependency",
|
{ fieldLabelModifier = over _head toLower . dropPrefix "_gitDependency",
|
||||||
rejectUnknownFields = True,
|
rejectUnknownFields = True,
|
||||||
omitNothingFields = True
|
omitNothingFields = True
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ module Juvix.Prelude.Base.Foundation
|
|||||||
module GHC.Generics,
|
module GHC.Generics,
|
||||||
module GHC.Num,
|
module GHC.Num,
|
||||||
module GHC.Real,
|
module GHC.Real,
|
||||||
module Lens.Micro.Platform,
|
module Control.Lens,
|
||||||
module Language.Haskell.TH.Syntax,
|
module Language.Haskell.TH.Syntax,
|
||||||
module Prettyprinter,
|
module Prettyprinter,
|
||||||
module Numeric,
|
module Numeric,
|
||||||
@ -80,6 +80,40 @@ where
|
|||||||
|
|
||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Control.DeepSeq
|
import Control.DeepSeq
|
||||||
|
import Control.Lens hiding
|
||||||
|
( Context,
|
||||||
|
Index,
|
||||||
|
Indexed,
|
||||||
|
Level,
|
||||||
|
List,
|
||||||
|
argument,
|
||||||
|
au,
|
||||||
|
below,
|
||||||
|
children,
|
||||||
|
cons,
|
||||||
|
cosmos,
|
||||||
|
enum,
|
||||||
|
from,
|
||||||
|
holes,
|
||||||
|
ignored,
|
||||||
|
imapM,
|
||||||
|
indexed,
|
||||||
|
indices,
|
||||||
|
inside,
|
||||||
|
op,
|
||||||
|
para,
|
||||||
|
parts,
|
||||||
|
pre,
|
||||||
|
re,
|
||||||
|
repeated,
|
||||||
|
rmap,
|
||||||
|
snoc,
|
||||||
|
uncons,
|
||||||
|
universe,
|
||||||
|
unsnoc,
|
||||||
|
(#),
|
||||||
|
(<.>),
|
||||||
|
)
|
||||||
import Control.Monad.Catch (ExitCase (..), MonadMask, MonadThrow, generalBracket, throwM)
|
import Control.Monad.Catch (ExitCase (..), MonadMask, MonadThrow, generalBracket, throwM)
|
||||||
import Control.Monad.Extra hiding (fail, forM, mconcatMapM, whileJustM)
|
import Control.Monad.Extra hiding (fail, forM, mconcatMapM, whileJustM)
|
||||||
import Control.Monad.Extra qualified as Monad
|
import Control.Monad.Extra qualified as Monad
|
||||||
@ -161,7 +195,6 @@ import GHC.Num
|
|||||||
import GHC.Real
|
import GHC.Real
|
||||||
import GHC.Stack.Types
|
import GHC.Stack.Types
|
||||||
import Language.Haskell.TH.Syntax (Exp, Lift, Q)
|
import Language.Haskell.TH.Syntax (Exp, Lift, Q)
|
||||||
import Lens.Micro.Platform
|
|
||||||
import Numeric hiding (exp, log, pi)
|
import Numeric hiding (exp, log, pi)
|
||||||
import Path (Abs, Dir, File, Path, Rel, SomeBase (..))
|
import Path (Abs, Dir, File, Path, Rel, SomeBase (..))
|
||||||
import Path qualified as PPath
|
import Path qualified as PPath
|
||||||
@ -206,6 +239,10 @@ type GHCConstraint = GHC.Constraint
|
|||||||
|
|
||||||
type LazyHashMap = LazyHashMap.HashMap
|
type LazyHashMap = LazyHashMap.HashMap
|
||||||
|
|
||||||
|
type SimpleFold s a = forall r. (Monoid r) => Getting r s a
|
||||||
|
|
||||||
|
type SimpleGetter s a = forall r. Getting r s a
|
||||||
|
|
||||||
type ImpliesK :: Bool -> GHCConstraint -> GHCConstraint
|
type ImpliesK :: Bool -> GHCConstraint -> GHCConstraint
|
||||||
type family ImpliesK cond k = res where
|
type family ImpliesK cond k = res where
|
||||||
ImpliesK 'True k = k
|
ImpliesK 'True k = k
|
||||||
|
Loading…
Reference in New Issue
Block a user