Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
horizon-platform
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
package-sets
horizon-platform
Commits
6615eaaa
Commit
6615eaaa
authored
2 years ago
by
Daniel Firth
Browse files
Options
Downloads
Patches
Plain Diff
ShellRC: fix spec errors
parent
18a9bc7e
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shell/ShellRC.hs
+9
-5
9 additions, 5 deletions
shell/ShellRC.hs
with
9 additions
and
5 deletions
shell/ShellRC.hs
+
9
−
5
View file @
6615eaaa
...
@@ -266,7 +266,11 @@ callHackageApp :: HackageSource -> Expr s a
...
@@ -266,7 +266,11 @@ callHackageApp :: HackageSource -> Expr s a
callHackageApp
(
MkHackageSource
(
MkName
x
)
(
MkVersion
v
))
=
App
(
App
callHackageLit
(
TextLit
$
Chunks
[]
x
))
(
TextLit
$
Chunks
[]
v
)
callHackageApp
(
MkHackageSource
(
MkName
x
)
(
MkVersion
v
))
=
App
(
App
callHackageLit
(
TextLit
$
Chunks
[]
x
))
(
TextLit
$
Chunks
[]
v
)
callGitApp
::
GitSource
->
Expr
s
a
callGitApp
::
GitSource
->
Expr
s
a
callGitApp
(
MkGitSource
(
MkRepo
(
MkUrl
x
))
(
MkRevision
v
)
_
)
=
App
(
App
callGitLit
(
TextLit
$
Chunks
[]
x
))
(
TextLit
$
Chunks
[]
v
)
callGitApp
(
MkGitSource
(
MkRepo
(
MkUrl
x
))
(
MkRevision
v
)
d
)
=
let
z
=
case
d
of
Nothing
->
App
None
$
horizonField
"Subdir"
Just
(
MkSubdir
k
)
->
Some
$
TextLit
$
Chunks
[]
$
T
.
pack
$
toFilePath
k
in
App
(
App
(
App
callGitLit
(
TextLit
$
Chunks
[]
x
))
(
TextLit
$
Chunks
[]
v
))
z
callTarballApp
::
TarballSource
->
Expr
s
a
callTarballApp
::
TarballSource
->
Expr
s
a
callTarballApp
(
MkTarballSource
(
MkUrl
x
))
=
App
callTarballLit
(
TextLit
$
Chunks
[]
x
)
callTarballApp
(
MkTarballSource
(
MkUrl
x
))
=
App
callTarballLit
(
TextLit
$
Chunks
[]
x
)
...
@@ -282,7 +286,7 @@ cabalFlagToExpr (MkCabalFlag x) =
...
@@ -282,7 +286,7 @@ cabalFlagToExpr (MkCabalFlag x) =
let
(
z
,
t
)
=
case
x
of
let
(
z
,
t
)
=
case
x
of
Disable
a
->
(
makeFieldSelection
"Disable"
,
a
)
Disable
a
->
(
makeFieldSelection
"Disable"
,
a
)
Enable
a
->
(
makeFieldSelection
"Enable"
,
a
)
Enable
a
->
(
makeFieldSelection
"Enable"
,
a
)
in
App
(
Field
(
horizonField
"CabalF
ield
"
)
z
)
(
TextLit
$
Chunks
[]
t
)
in
App
(
Field
(
horizonField
"CabalF
lag
"
)
z
)
(
TextLit
$
Chunks
[]
t
)
haskellPackageToExpr
::
HaskellPackage
->
Expr
s
a
haskellPackageToExpr
::
HaskellPackage
->
Expr
s
a
haskellPackageToExpr
(
MkHaskellPackage
s
xs
ys
)
=
haskellPackageToExpr
(
MkHaskellPackage
s
xs
ys
)
=
...
@@ -297,10 +301,10 @@ horizonExportToExpr :: HorizonExport -> Expr s Import
...
@@ -297,10 +301,10 @@ horizonExportToExpr :: HorizonExport -> Expr s Import
horizonExportToExpr
(
MakePackageSet
x
)
=
packageSetExportSettingsToExpr
x
horizonExportToExpr
(
MakePackageSet
x
)
=
packageSetExportSettingsToExpr
x
packageSetExportSettingsToExpr
::
PackageSetExportSettings
->
Expr
s
Import
packageSetExportSettingsToExpr
::
PackageSetExportSettings
->
Expr
s
Import
packageSetExportSettingsToExpr
(
MkPackageSetExportSettings
(
MkPackagesDir
d
)
(
MkPackageSetFile
f
)
(
MkPackageSet
(
MkCompiler
c
)
xs
))
=
letHorizonSpecIn
$
letPackagesBindingIn
xs
$
RecordLit
.
DMap
.
fromList
$
[
packageSetExportSettingsToExpr
(
MkPackageSetExportSettings
(
MkPackagesDir
d
)
(
MkPackageSetFile
f
)
(
MkPackageSet
(
MkCompiler
c
)
xs
))
=
letHorizonSpecIn
$
letPackagesBindingIn
xs
$
App
(
Field
(
horizonField
"HorizonExport"
)
(
makeFieldSelection
"MakePackageSet"
))
$
RecordLit
.
DMap
.
fromList
$
[
(
"packageSetFile"
,
makeRecordField
$
TextLit
$
Chunks
[]
(
T
.
pack
$
toFilePath
f
)),
(
"packageSetFile"
,
makeRecordField
$
TextLit
$
Chunks
[]
(
T
.
pack
$
toFilePath
f
)),
(
"packagesDir"
,
makeRecordField
$
TextLit
$
Chunks
[]
$
T
.
pack
$
toFilePath
d
),
(
"packagesDir"
,
makeRecordField
$
TextLit
$
Chunks
[]
$
T
.
pack
$
toFilePath
d
),
(
"package
s
Set"
,
makeRecordField
$
RecordLit
$
DMap
.
fromList
[(
"compiler"
,
makeRecordField
$
TextLit
$
Chunks
[]
c
),
(
"packages"
,
makeRecordField
$
ToMap
"packages"
Nothing
)])]
(
"packageSet"
,
makeRecordField
$
RecordLit
$
DMap
.
fromList
[(
"compiler"
,
makeRecordField
$
TextLit
$
Chunks
[]
c
),
(
"packages"
,
makeRecordField
$
ToMap
"packages"
Nothing
)])]
prettyHorizonExport
::
HorizonExport
->
Text
prettyHorizonExport
::
HorizonExport
->
Text
...
@@ -313,7 +317,7 @@ loadHorizon :: IO HorizonExport
...
@@ -313,7 +317,7 @@ loadHorizon :: IO HorizonExport
loadHorizon
=
Dhall
.
inputFile
@
HorizonExport
Dhall
.
auto
"horizon.dhall"
loadHorizon
=
Dhall
.
inputFile
@
HorizonExport
Dhall
.
auto
"horizon.dhall"
horizonSpecUrl
::
Dhall
.
Core
.
URL
horizonSpecUrl
::
Dhall
.
Core
.
URL
horizonSpecUrl
=
Dhall
.
Core
.
URL
HTTPS
""
(
Dhall
.
Core
.
File
(
Dhall
.
Core
.
Directory
[
"dhall"
,
"0.6"
,
"raw"
,
"-"
,
"horizon-spec"
,
"horizon"
,
"gitlab.homotopic.tech"
])
"package.dhall"
)
Nothing
Nothing
horizonSpecUrl
=
Dhall
.
Core
.
URL
HTTPS
"
gitlab.homotopic.tech
"
(
Dhall
.
Core
.
File
(
Dhall
.
Core
.
Directory
[
"dhall"
,
"0.6"
,
"raw"
,
"-"
,
"horizon-spec"
,
"horizon"
])
"package.dhall"
)
Nothing
Nothing
horizonSpecImportHashed
::
ImportHashed
horizonSpecImportHashed
::
ImportHashed
horizonSpecImportHashed
=
ImportHashed
Nothing
(
Remote
horizonSpecUrl
)
horizonSpecImportHashed
=
ImportHashed
Nothing
(
Remote
horizonSpecUrl
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment