Skip to content

Commit 86a7d28

Browse files
committed
Move from elm mentions to guida
1 parent 0746183 commit 86a7d28

File tree

24 files changed

+636
-217
lines changed

24 files changed

+636
-217
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v23.10.0
1+
v24.9.0

CHANGELOG.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- WIP: Allow running the `make` command in the browser ([#94](https://github.com/guida-lang/compiler/issues/94))
13-
- Initial REPL tests for basic arithmetic evaluation
14-
- New `test` command ([#98](https://github.com/guida-lang/compiler/issues/98))
15-
- Add `elm-explorations/test` dependency as part of `init` ([#65](https://github.com/guida-lang/compiler/issues/65))
16-
- Extend record referred by another record’s field ([#79](https://github.com/guida-lang/compiler/issues/79))
17-
- Add a `CONTRIBUTING.md` file ([#103](https://github.com/guida-lang/compiler/issues/103))
18-
- `guida format` command ([#100](https://github.com/guida-lang/compiler/issues/100))
19-
- Numeric separators ([#109](https://github.com/guida-lang/compiler/issues/109))
20-
- Binary literals support ([#2248](https://github.com/elm/compiler/issues/2248))
12+
- WIP: Allow running the `make` command in the browser ([#94](https://github.com/guida-lang/compiler/issues/94)).
13+
- Initial REPL tests for basic arithmetic evaluation.
14+
- New `test` command ([#98](https://github.com/guida-lang/compiler/issues/98)).
15+
- Add `elm-explorations/test` dependency as part of `init` ([#65](https://github.com/guida-lang/compiler/issues/65)).
16+
- Extend record referred by another record’s field ([#79](https://github.com/guida-lang/compiler/issues/79)).
17+
- Add a `CONTRIBUTING.md` file ([#103](https://github.com/guida-lang/compiler/issues/103)).
18+
- `guida format` command ([#100](https://github.com/guida-lang/compiler/issues/100)).
19+
- Numeric separators ([#109](https://github.com/guida-lang/compiler/issues/109)).
20+
- Binary literals support ([#2248](https://github.com/elm/compiler/issues/2248)).
2121
- Bool type support in WebGL shader interface ([#2120](https://github.com/elm/compiler/issues/2120)).
2222

2323
### Fixed
2424

25-
- Correct reporting of multiple errors ([#99](https://github.com/guida-lang/compiler/issues/99))
26-
- Replaced infinite looping `Crash.crash` with log and exit ([#120](https://github.com/guida-lang/compiler/issues/120))
25+
- Correct reporting of multiple errors ([#99](https://github.com/guida-lang/compiler/issues/99)).
26+
- Replaced infinite looping `Crash.crash` with log and exit ([#120](https://github.com/guida-lang/compiler/issues/120)).
2727

2828
### Changed
2929

30-
- Refactored project structure to support both Node and Browser environments
31-
- Refactoring of `Task` aliases for a more unified approach across the codebase ([#108](https://github.com/guida-lang/compiler/issues/108))
30+
- Refactored project structure to support both Node and Browser environments.
31+
- Refactoring of `Task` aliases for a more unified approach across the codebase ([#108](https://github.com/guida-lang/compiler/issues/108)).
3232

3333
---
3434

@@ -37,17 +37,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3737
### Added
3838

3939
- Initial stable release.
40-
- Allow tuples with 3+ elements ([#75](https://github.com/guida-lang/compiler/issues/75).
40+
- Allow tuples with 3+ elements ([#75](https://github.com/guida-lang/compiler/issues/75)).
4141
- Support for `GUIDA_REGISTRY` environment variable.
4242
- New `--yes` flag for `init` command ([#80](https://github.com/guida-lang/compiler/issues/80)).
4343
* Support modifying records via qualified names ([#78](https://github.com/guida-lang/compiler/issues/78)).
4444
- New `--package` flag for `init` command ([#43](https://github.com/guida-lang/compiler/issues/43)).
4545
- New `--test` flag for `install` command ([#64](https://github.com/guida-lang/compiler/issues/64)).
46-
- `uninstall` command ([#60](https://github.com/guida-lang/compiler/issues/60).
47-
- Source maps support ([#63](https://github.com/guida-lang/compiler/issues/63).
48-
- Guida-specific syntax for underscore wildcard variables ([#59](https://github.com/guida-lang/compiler/issues/59).
46+
- `uninstall` command ([#60](https://github.com/guida-lang/compiler/issues/60)).
47+
- Source maps support ([#63](https://github.com/guida-lang/compiler/issues/63)).
48+
- Guida-specific syntax for underscore wildcard variables ([#59](https://github.com/guida-lang/compiler/issues/59)).
4949
- Format command (`guida format`) ([#58](https://github.com/guida-lang/compiler/issues/58), fixes [#42](https://github.com/guida-lang/compiler/issues/42)).
50-
- Self-hosted environment ([#9](https://github.com/guida-lang/compiler/issues/9)
50+
- Self-hosted environment ([#9](https://github.com/guida-lang/compiler/issues/9)).
5151
- `--optimize` flag for `build` command ([#36](https://github.com/guida-lang/compiler/issues/36)).
5252

5353
### Changed

src/Browser/Install.elm

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ run pkg =
4242
(\oldOutline ->
4343
case oldOutline of
4444
Outline.App outline ->
45-
makeAppPlan env pkg outline
45+
makeAppPlan root env pkg outline
4646
|> Task.bind (\changes -> attemptChanges root env oldOutline V.toChars changes)
4747

4848
Outline.Pkg outline ->
49-
makePkgPlan env pkg outline
49+
makePkgPlan root env pkg outline
5050
|> Task.bind (\changes -> attemptChanges root env oldOutline C.toChars changes)
5151
)
5252
)
@@ -107,8 +107,8 @@ attemptChangesHelp root env oldOutline newOutline =
107107
-- MAKE APP PLAN
108108

109109

110-
makeAppPlan : Solver.Env -> Pkg.Name -> Outline.AppOutline -> Task Exit.Install (Changes V.Version)
111-
makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
110+
makeAppPlan : Stuff.Root -> Solver.Env -> Pkg.Name -> Outline.AppOutline -> Task Exit.Install (Changes V.Version)
111+
makeAppPlan root (Solver.Env cache _ connection registry) pkg outline =
112112
case outline of
113113
Outline.GuidaAppOutline guidaVersion sourceDirs direct indirect testDirect testIndirect ->
114114
if Dict.member identity pkg direct then
@@ -162,10 +162,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
162162
Err suggestions ->
163163
case connection of
164164
Solver.Online _ ->
165-
Task.throw (Exit.InstallUnknownPackageOnline pkg suggestions)
165+
Task.throw (Exit.InstallUnknownPackageOnline (Stuff.rootPath root) pkg suggestions)
166166

167167
Solver.Offline ->
168-
Task.throw (Exit.InstallUnknownPackageOffline pkg suggestions)
168+
Task.throw (Exit.InstallUnknownPackageOffline (Stuff.rootPath root) pkg suggestions)
169169

170170
Ok _ ->
171171
Task.io (Solver.addToApp cache connection registry pkg outline False)
@@ -176,10 +176,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
176176
Task.pure (Changes (Outline.App app))
177177

178178
Solver.NoSolution ->
179-
Task.throw (Exit.InstallNoOnlineAppSolution pkg)
179+
Task.throw (Exit.InstallGuidaNoOnlineAppSolution pkg)
180180

181181
Solver.NoOfflineSolution ->
182-
Task.throw (Exit.InstallNoOfflineAppSolution pkg)
182+
Task.throw (Exit.InstallGuidaNoOfflineAppSolution (Stuff.rootPath root) pkg)
183183

184184
Solver.SolverErr exit ->
185185
Task.throw (Exit.InstallHadSolverTrouble exit)
@@ -237,10 +237,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
237237
Err suggestions ->
238238
case connection of
239239
Solver.Online _ ->
240-
Task.throw (Exit.InstallUnknownPackageOnline pkg suggestions)
240+
Task.throw (Exit.InstallUnknownPackageOnline (Stuff.rootPath root) pkg suggestions)
241241

242242
Solver.Offline ->
243-
Task.throw (Exit.InstallUnknownPackageOffline pkg suggestions)
243+
Task.throw (Exit.InstallUnknownPackageOffline (Stuff.rootPath root) pkg suggestions)
244244

245245
Ok _ ->
246246
Task.io (Solver.addToApp cache connection registry pkg outline False)
@@ -251,10 +251,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
251251
Task.pure (Changes (Outline.App app))
252252

253253
Solver.NoSolution ->
254-
Task.throw (Exit.InstallNoOnlineAppSolution pkg)
254+
Task.throw (Exit.InstallElmNoOnlineAppSolution pkg)
255255

256256
Solver.NoOfflineSolution ->
257-
Task.throw (Exit.InstallNoOfflineAppSolution pkg)
257+
Task.throw (Exit.InstallGuidaNoOfflineAppSolution (Stuff.rootPath root) pkg)
258258

259259
Solver.SolverErr exit ->
260260
Task.throw (Exit.InstallHadSolverTrouble exit)
@@ -265,8 +265,8 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
265265
-- MAKE PACKAGE PLAN
266266

267267

268-
makePkgPlan : Solver.Env -> Pkg.Name -> Outline.PkgOutline -> Task Exit.Install (Changes C.Constraint)
269-
makePkgPlan (Solver.Env cache _ connection registry) pkg outline =
268+
makePkgPlan : Stuff.Root -> Solver.Env -> Pkg.Name -> Outline.PkgOutline -> Task Exit.Install (Changes C.Constraint)
269+
makePkgPlan root (Solver.Env cache _ connection registry) pkg outline =
270270
case outline of
271271
Outline.GuidaPkgOutline name summary license version exposed deps test guidaVersion ->
272272
if Dict.member identity pkg deps then
@@ -294,10 +294,10 @@ makePkgPlan (Solver.Env cache _ connection registry) pkg outline =
294294
Err suggestions ->
295295
case connection of
296296
Solver.Online _ ->
297-
Task.throw (Exit.InstallUnknownPackageOnline pkg suggestions)
297+
Task.throw (Exit.InstallUnknownPackageOnline (Stuff.rootPath root) pkg suggestions)
298298

299299
Solver.Offline ->
300-
Task.throw (Exit.InstallUnknownPackageOffline pkg suggestions)
300+
Task.throw (Exit.InstallUnknownPackageOffline (Stuff.rootPath root) pkg suggestions)
301301

302302
Ok (Registry.KnownVersions _ _) ->
303303
let
@@ -347,10 +347,10 @@ makePkgPlan (Solver.Env cache _ connection registry) pkg outline =
347347
guidaVersion
348348

349349
Solver.NoSolution ->
350-
Task.throw (Exit.InstallNoOnlinePkgSolution pkg)
350+
Task.throw (Exit.InstallGuidaNoOnlinePkgSolution pkg)
351351

352352
Solver.NoOfflineSolution ->
353-
Task.throw (Exit.InstallNoOfflinePkgSolution pkg)
353+
Task.throw (Exit.InstallGuidaNoOfflinePkgSolution (Stuff.rootPath root) pkg)
354354

355355
Solver.SolverErr exit ->
356356
Task.throw (Exit.InstallHadSolverTrouble exit)
@@ -382,10 +382,10 @@ makePkgPlan (Solver.Env cache _ connection registry) pkg outline =
382382
Err suggestions ->
383383
case connection of
384384
Solver.Online _ ->
385-
Task.throw (Exit.InstallUnknownPackageOnline pkg suggestions)
385+
Task.throw (Exit.InstallUnknownPackageOnline (Stuff.rootPath root) pkg suggestions)
386386

387387
Solver.Offline ->
388-
Task.throw (Exit.InstallUnknownPackageOffline pkg suggestions)
388+
Task.throw (Exit.InstallUnknownPackageOffline (Stuff.rootPath root) pkg suggestions)
389389

390390
Ok (Registry.KnownVersions _ _) ->
391391
let
@@ -435,10 +435,10 @@ makePkgPlan (Solver.Env cache _ connection registry) pkg outline =
435435
elmVersion
436436

437437
Solver.NoSolution ->
438-
Task.throw (Exit.InstallNoOnlinePkgSolution pkg)
438+
Task.throw (Exit.InstallElmNoOnlinePkgSolution pkg)
439439

440440
Solver.NoOfflineSolution ->
441-
Task.throw (Exit.InstallNoOfflinePkgSolution pkg)
441+
Task.throw (Exit.InstallElmNoOfflinePkgSolution (Stuff.rootPath root) pkg)
442442

443443
Solver.SolverErr exit ->
444444
Task.throw (Exit.InstallHadSolverTrouble exit)

src/Browser/Make.elm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ module Browser.Make exposing
1313

1414
import Builder.BackgroundWriter as BW
1515
import Builder.Build as Build
16-
import Builder.Guida.Details as Details
1716
import Builder.Generate as Generate
17+
import Builder.Guida.Details as Details
1818
import Builder.Reporting as Reporting
1919
import Builder.Reporting.Exit as Exit
2020
import Builder.Stuff as Stuff
2121
import Compiler.AST.Optimized as Opt
2222
import Compiler.Data.NonEmptyList as NE
23-
import Compiler.Guida.ModuleName as ModuleName
2423
import Compiler.Generate.Html as Html
24+
import Compiler.Guida.ModuleName as ModuleName
2525
import Maybe.Extra as Maybe
2626
import Task exposing (Task)
2727
import Terminal.Terminal.Internal exposing (Parser(..))

src/Browser/Uninstall.elm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ run pkg =
4040
(\oldOutline ->
4141
case oldOutline of
4242
Outline.App outline ->
43-
makeAppPlan env pkg outline
43+
makeAppPlan root env pkg outline
4444
|> Task.bind (\changes -> attemptChanges root env oldOutline changes)
4545

4646
Outline.Pkg outline ->
@@ -97,8 +97,8 @@ attemptChangesHelp root env oldOutline newOutline =
9797
-- MAKE APP PLAN
9898

9999

100-
makeAppPlan : Solver.Env -> Pkg.Name -> Outline.AppOutline -> Task Exit.Uninstall (Changes V.Version)
101-
makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
100+
makeAppPlan : Stuff.Root -> Solver.Env -> Pkg.Name -> Outline.AppOutline -> Task Exit.Uninstall (Changes V.Version)
101+
makeAppPlan root (Solver.Env cache _ connection registry) pkg outline =
102102
case outline of
103103
Outline.GuidaAppOutline _ _ direct _ testDirect _ ->
104104
case Dict.get identity pkg (Dict.union direct testDirect) of
@@ -111,10 +111,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
111111
Task.pure (Changes (Outline.App app))
112112

113113
Solver.NoSolution ->
114-
Task.throw (Exit.UninstallNoOnlineAppSolution pkg)
114+
Task.throw (Exit.UninstallGuidaNoOnlineAppSolution pkg)
115115

116116
Solver.NoOfflineSolution ->
117-
Task.throw (Exit.UninstallNoOfflineAppSolution pkg)
117+
Task.throw (Exit.UninstallGuidaNoOfflineAppSolution (Stuff.rootPath root) pkg)
118118

119119
Solver.SolverErr exit ->
120120
Task.throw (Exit.UninstallHadSolverTrouble exit)
@@ -134,10 +134,10 @@ makeAppPlan (Solver.Env cache _ connection registry) pkg outline =
134134
Task.pure (Changes (Outline.App app))
135135

136136
Solver.NoSolution ->
137-
Task.throw (Exit.UninstallNoOnlineAppSolution pkg)
137+
Task.throw (Exit.UninstallElmNoOnlineAppSolution pkg)
138138

139139
Solver.NoOfflineSolution ->
140-
Task.throw (Exit.UninstallNoOfflineAppSolution pkg)
140+
Task.throw (Exit.UninstallElmNoOfflineAppSolution (Stuff.rootPath root) pkg)
141141

142142
Solver.SolverErr exit ->
143143
Task.throw (Exit.UninstallHadSolverTrouble exit)

src/Builder/Generate.elm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ module Builder.Generate exposing
66
)
77

88
import Builder.Build as Build
9+
import Builder.File as File
910
import Builder.Guida.Details as Details
1011
import Builder.Guida.Outline as Outline
11-
import Builder.File as File
1212
import Builder.Reporting.Exit as Exit
1313
import Builder.Stuff as Stuff
1414
import Compiler.AST.Optimized as Opt
1515
import Compiler.Data.Name as N
1616
import Compiler.Data.NonEmptyList as NE
17+
import Compiler.Generate.JavaScript as JS
18+
import Compiler.Generate.Mode as Mode
1719
import Compiler.Guida.Compiler.Type.Extract as Extract
1820
import Compiler.Guida.Interface as I
1921
import Compiler.Guida.ModuleName as ModuleName
2022
import Compiler.Guida.Package as Pkg
21-
import Compiler.Generate.JavaScript as JS
22-
import Compiler.Generate.Mode as Mode
2323
import Compiler.Nitpick.Debug as Nitpick
2424
import Data.Map as Dict exposing (Dict)
2525
import System.TypeCheck.IO as TypeCheck

0 commit comments

Comments
 (0)