@explorable-viz/fluid 0.12.2 → 0.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fluid/shared/fluid.mjs +478 -438
- package/dist/fluid/shared/load-figure.js +3193 -2969
- package/output-es/Affjax/foreign.js +52 -0
- package/output-es/Affjax/index.js +387 -0
- package/output-es/Affjax.RequestBody/index.js +22 -0
- package/output-es/Affjax.RequestHeader/index.js +58 -0
- package/output-es/Affjax.ResponseFormat/index.js +47 -0
- package/output-es/Affjax.ResponseHeader/index.js +19 -0
- package/output-es/Affjax.StatusCode/index.js +8 -0
- package/output-es/Affjax.Web/foreign.js +8 -0
- package/output-es/Affjax.Web/index.js +14 -0
- package/output-es/App.CodeMirror/foreign.js +69 -0
- package/output-es/App.CodeMirror/index.js +3 -0
- package/output-es/App.Fig/index.js +713 -0
- package/output-es/App.LoadFigure/index.js +131 -0
- package/output-es/App.Util/index.js +773 -0
- package/output-es/App.Util.Selector/index.js +273 -0
- package/output-es/App.View/index.js +310 -0
- package/output-es/App.View.BarChart/index.js +153 -0
- package/output-es/App.View.DocView/index.js +40 -0
- package/output-es/App.View.LineChart/index.js +437 -0
- package/output-es/App.View.MatrixView/foreign.js +182 -0
- package/output-es/App.View.MatrixView/index.js +232 -0
- package/output-es/App.View.MultiView/index.js +30 -0
- package/output-es/App.View.Paragraph/index.js +44 -0
- package/output-es/App.View.ScatterPlot/foreign.js +110 -0
- package/output-es/App.View.ScatterPlot/index.js +122 -0
- package/output-es/App.View.Segment/index.js +92 -0
- package/output-es/App.View.StackedBar/index.js +54 -0
- package/output-es/App.View.TableView/index.js +397 -0
- package/output-es/App.View.Text/index.js +157 -0
- package/output-es/App.View.Util/index.js +222 -0
- package/output-es/App.View.Util.Axes/index.js +79 -0
- package/output-es/App.View.Util.D3/foreign.js +263 -0
- package/output-es/App.View.Util.D3/index.js +678 -0
- package/output-es/App.View.Util.Point/index.js +3 -0
- package/output-es/Benchmark/index.js +63 -0
- package/output-es/Bind/index.js +24 -0
- package/output-es/Control.Alt/index.js +5 -0
- package/output-es/Control.Alternative/index.js +11 -0
- package/output-es/Control.Applicative/index.js +18 -0
- package/output-es/Control.Apply/foreign.js +15 -0
- package/output-es/Control.Apply/index.js +17 -0
- package/output-es/Control.Biapplicative/index.js +5 -0
- package/output-es/Control.Biapply/index.js +11 -0
- package/output-es/Control.Bind/foreign.js +9 -0
- package/output-es/Control.Bind/index.js +21 -0
- package/output-es/Control.Category/index.js +4 -0
- package/output-es/Control.Comonad/index.js +2 -0
- package/output-es/Control.Comonad.Cofree/index.js +255 -0
- package/output-es/Control.Comonad.Cofree.Class/index.js +43 -0
- package/output-es/Control.Comonad.Env/index.js +8 -0
- package/output-es/Control.Comonad.Env.Class/index.js +17 -0
- package/output-es/Control.Comonad.Env.Trans/index.js +113 -0
- package/output-es/Control.Comonad.Store/index.js +5 -0
- package/output-es/Control.Comonad.Store.Class/index.js +56 -0
- package/output-es/Control.Comonad.Store.Trans/index.js +27 -0
- package/output-es/Control.Comonad.Traced/index.js +4 -0
- package/output-es/Control.Comonad.Traced.Class/index.js +16 -0
- package/output-es/Control.Comonad.Traced.Trans/index.js +28 -0
- package/output-es/Control.Comonad.Trans.Class/index.js +3 -0
- package/output-es/Control.Extend/foreign.js +7 -0
- package/output-es/Control.Extend/index.js +12 -0
- package/output-es/Control.Lazy/index.js +10 -0
- package/output-es/Control.Monad/index.js +27 -0
- package/output-es/Control.Monad.Cont/index.js +6 -0
- package/output-es/Control.Monad.Cont.Class/index.js +3 -0
- package/output-es/Control.Monad.Cont.Trans/index.js +122 -0
- package/output-es/Control.Monad.Error.Class/index.js +83 -0
- package/output-es/Control.Monad.Except/index.js +10 -0
- package/output-es/Control.Monad.Except.Trans/index.js +241 -0
- package/output-es/Control.Monad.Free/index.js +423 -0
- package/output-es/Control.Monad.Free.Class/index.js +45 -0
- package/output-es/Control.Monad.Gen/index.js +132 -0
- package/output-es/Control.Monad.Gen.Class/index.js +6 -0
- package/output-es/Control.Monad.Gen.Common/index.js +44 -0
- package/output-es/Control.Monad.Identity.Trans/index.js +88 -0
- package/output-es/Control.Monad.List.Trans/index.js +536 -0
- package/output-es/Control.Monad.Maybe.Trans/index.js +217 -0
- package/output-es/Control.Monad.RWS/index.js +16 -0
- package/output-es/Control.Monad.RWS.Trans/index.js +260 -0
- package/output-es/Control.Monad.Reader/index.js +6 -0
- package/output-es/Control.Monad.Reader.Class/index.js +11 -0
- package/output-es/Control.Monad.Reader.Trans/index.js +320 -0
- package/output-es/Control.Monad.Rec.Class/index.js +265 -0
- package/output-es/Control.Monad.ST/index.js +1 -0
- package/output-es/Control.Monad.ST.Class/index.js +7 -0
- package/output-es/Control.Monad.ST.Global/index.js +3 -0
- package/output-es/Control.Monad.ST.Internal/foreign.js +90 -0
- package/output-es/Control.Monad.ST.Internal/index.js +75 -0
- package/output-es/Control.Monad.ST.Ref/index.js +1 -0
- package/output-es/Control.Monad.ST.Uncurried/foreign.js +229 -0
- package/output-es/Control.Monad.ST.Uncurried/index.js +39 -0
- package/output-es/Control.Monad.State/index.js +8 -0
- package/output-es/Control.Monad.State.Class/index.js +12 -0
- package/output-es/Control.Monad.State.Trans/index.js +209 -0
- package/output-es/Control.Monad.Trampoline/index.js +9 -0
- package/output-es/Control.Monad.Trans.Class/index.js +3 -0
- package/output-es/Control.Monad.Writer/index.js +6 -0
- package/output-es/Control.Monad.Writer.Class/index.js +14 -0
- package/output-es/Control.Monad.Writer.Trans/index.js +256 -0
- package/output-es/Control.MonadPlus/index.js +4 -0
- package/output-es/Control.Parallel/index.js +49 -0
- package/output-es/Control.Parallel.Class/index.js +191 -0
- package/output-es/Control.Plus/index.js +4 -0
- package/output-es/Control.Promise/foreign.js +24 -0
- package/output-es/Control.Promise/index.js +40 -0
- package/output-es/Control.Semigroupoid/index.js +4 -0
- package/output-es/Data.Argonaut.Core/foreign.js +102 -0
- package/output-es/Data.Argonaut.Core/index.js +72 -0
- package/output-es/Data.Argonaut.Decode/index.js +10 -0
- package/output-es/Data.Argonaut.Decode.Class/index.js +173 -0
- package/output-es/Data.Argonaut.Decode.Combinators/index.js +21 -0
- package/output-es/Data.Argonaut.Decode.Decoders/index.js +463 -0
- package/output-es/Data.Argonaut.Decode.Error/index.js +151 -0
- package/output-es/Data.Argonaut.Decode.Parser/index.js +11 -0
- package/output-es/Data.Argonaut.Encode/index.js +3 -0
- package/output-es/Data.Argonaut.Encode.Class/index.js +114 -0
- package/output-es/Data.Argonaut.Encode.Combinators/index.js +15 -0
- package/output-es/Data.Argonaut.Encode.Encoders/index.js +222 -0
- package/output-es/Data.Argonaut.Gen/index.js +68 -0
- package/output-es/Data.Argonaut.Parser/foreign.js +8 -0
- package/output-es/Data.Argonaut.Parser/index.js +5 -0
- package/output-es/Data.Array/foreign.js +298 -0
- package/output-es/Data.Array/index.js +555 -0
- package/output-es/Data.Array.NonEmpty/index.js +317 -0
- package/output-es/Data.Array.NonEmpty.Internal/foreign.js +77 -0
- package/output-es/Data.Array.NonEmpty.Internal/index.js +90 -0
- package/output-es/Data.Array.Partial/index.js +7 -0
- package/output-es/Data.Array.ST/foreign.js +107 -0
- package/output-es/Data.Array.ST/index.js +82 -0
- package/output-es/Data.Array.ST.Iterator/index.js +83 -0
- package/output-es/Data.Array.ST.Partial/foreign.js +7 -0
- package/output-es/Data.Array.ST.Partial/index.js +9 -0
- package/output-es/Data.ArrayBuffer.Types/index.js +1 -0
- package/output-es/Data.Bifoldable/index.js +149 -0
- package/output-es/Data.Bifunctor/index.js +17 -0
- package/output-es/Data.Bifunctor.Join/index.js +21 -0
- package/output-es/Data.Bitraversable/index.js +195 -0
- package/output-es/Data.Boolean/index.js +2 -0
- package/output-es/Data.BooleanAlgebra/index.js +42 -0
- package/output-es/Data.Bounded/foreign.js +8 -0
- package/output-es/Data.Bounded/index.js +76 -0
- package/output-es/Data.Bounded.Generic/index.js +37 -0
- package/output-es/Data.CatList/index.js +326 -0
- package/output-es/Data.CatQueue/index.js +364 -0
- package/output-es/Data.Char/index.js +5 -0
- package/output-es/Data.Char.Gen/index.js +21 -0
- package/output-es/Data.CodePoint.Unicode/index.js +382 -0
- package/output-es/Data.CodePoint.Unicode.Internal/index.js +5476 -0
- package/output-es/Data.CodePoint.Unicode.Internal.Casing/index.js +1636 -0
- package/output-es/Data.CommutativeRing/index.js +49 -0
- package/output-es/Data.Compactable/index.js +228 -0
- package/output-es/Data.Comparison/index.js +22 -0
- package/output-es/Data.Const/index.js +56 -0
- package/output-es/Data.Coyoneda/index.js +212 -0
- package/output-es/Data.Date/foreign.js +22 -0
- package/output-es/Data.Date/index.js +370 -0
- package/output-es/Data.Date.Component/index.js +451 -0
- package/output-es/Data.Date.Component.Gen/index.js +11 -0
- package/output-es/Data.Date.Gen/index.js +25 -0
- package/output-es/Data.DateTime/foreign.js +33 -0
- package/output-es/Data.DateTime/index.js +131 -0
- package/output-es/Data.DateTime.Gen/index.js +8 -0
- package/output-es/Data.DateTime.Instant/foreign.js +18 -0
- package/output-es/Data.DateTime.Instant/index.js +86 -0
- package/output-es/Data.Decidable/index.js +70 -0
- package/output-es/Data.Decide/index.js +64 -0
- package/output-es/Data.Distributive/index.js +55 -0
- package/output-es/Data.Divide/index.js +47 -0
- package/output-es/Data.Divisible/index.js +17 -0
- package/output-es/Data.DivisionRing/index.js +6 -0
- package/output-es/Data.Either/index.js +242 -0
- package/output-es/Data.Either.Inject/index.js +25 -0
- package/output-es/Data.Either.Nested/index.js +450 -0
- package/output-es/Data.Enum/foreign.js +7 -0
- package/output-es/Data.Enum/index.js +441 -0
- package/output-es/Data.Enum.Gen/index.js +19 -0
- package/output-es/Data.Enum.Generic/index.js +211 -0
- package/output-es/Data.Eq/foreign.js +23 -0
- package/output-es/Data.Eq/index.js +33 -0
- package/output-es/Data.Eq.Generic/index.js +16 -0
- package/output-es/Data.Equivalence/index.js +8 -0
- package/output-es/Data.EuclideanRing/foreign.js +26 -0
- package/output-es/Data.EuclideanRing/index.js +25 -0
- package/output-es/Data.Exists/index.js +4 -0
- package/output-es/Data.Field/index.js +2 -0
- package/output-es/Data.Filterable/index.js +317 -0
- package/output-es/Data.Foldable/foreign.js +25 -0
- package/output-es/Data.Foldable/index.js +394 -0
- package/output-es/Data.FoldableWithIndex/index.js +431 -0
- package/output-es/Data.FormURLEncoded/index.js +110 -0
- package/output-es/Data.Function/index.js +23 -0
- package/output-es/Data.Function.Memoize/index.js +242 -0
- package/output-es/Data.Function.Uncurried/foreign.js +218 -0
- package/output-es/Data.Function.Uncurried/index.js +5 -0
- package/output-es/Data.Functor/foreign.js +10 -0
- package/output-es/Data.Functor/index.js +14 -0
- package/output-es/Data.Functor.App/index.js +87 -0
- package/output-es/Data.Functor.Clown/index.js +24 -0
- package/output-es/Data.Functor.Compose/index.js +131 -0
- package/output-es/Data.Functor.Contravariant/index.js +7 -0
- package/output-es/Data.Functor.Coproduct/index.js +171 -0
- package/output-es/Data.Functor.Coproduct.Inject/index.js +25 -0
- package/output-es/Data.Functor.Coproduct.Nested/index.js +433 -0
- package/output-es/Data.Functor.Costar/index.js +82 -0
- package/output-es/Data.Functor.Flip/index.js +31 -0
- package/output-es/Data.Functor.Invariant/index.js +14 -0
- package/output-es/Data.Functor.Joker/index.js +88 -0
- package/output-es/Data.Functor.Product/index.js +127 -0
- package/output-es/Data.Functor.Product.Nested/index.js +46 -0
- package/output-es/Data.Functor.Product2/index.js +46 -0
- package/output-es/Data.FunctorWithIndex/foreign.js +10 -0
- package/output-es/Data.FunctorWithIndex/index.js +147 -0
- package/output-es/Data.Generic.Rep/index.js +31 -0
- package/output-es/Data.Graph/index.js +370 -0
- package/output-es/Data.HTTP.Method/index.js +223 -0
- package/output-es/Data.HeytingAlgebra/foreign.js +15 -0
- package/output-es/Data.HeytingAlgebra/index.js +104 -0
- package/output-es/Data.HeytingAlgebra.Generic/index.js +76 -0
- package/output-es/Data.Identity/index.js +54 -0
- package/output-es/Data.Int/foreign.js +65 -0
- package/output-es/Data.Int/index.js +122 -0
- package/output-es/Data.Int.Bits/foreign.js +48 -0
- package/output-es/Data.Int.Bits/index.js +4 -0
- package/output-es/Data.Interval/index.js +331 -0
- package/output-es/Data.Interval.Duration/index.js +124 -0
- package/output-es/Data.Interval.Duration.Iso/index.js +423 -0
- package/output-es/Data.JSDate/foreign.js +83 -0
- package/output-es/Data.JSDate/index.js +123 -0
- package/output-es/Data.Lazy/foreign.js +14 -0
- package/output-es/Data.Lazy/index.js +143 -0
- package/output-es/Data.List/index.js +1505 -0
- package/output-es/Data.List.Internal/index.js +155 -0
- package/output-es/Data.List.Lazy/index.js +658 -0
- package/output-es/Data.List.Lazy.NonEmpty/index.js +77 -0
- package/output-es/Data.List.Lazy.Types/index.js +511 -0
- package/output-es/Data.List.NonEmpty/index.js +540 -0
- package/output-es/Data.List.Partial/index.js +37 -0
- package/output-es/Data.List.Types/index.js +841 -0
- package/output-es/Data.List.ZipList/index.js +43 -0
- package/output-es/Data.Map/index.js +80 -0
- package/output-es/Data.Map.Gen/index.js +15 -0
- package/output-es/Data.Map.Internal/index.js +1216 -0
- package/output-es/Data.Maybe/index.js +253 -0
- package/output-es/Data.Maybe.First/index.js +85 -0
- package/output-es/Data.Maybe.Last/index.js +86 -0
- package/output-es/Data.MediaType/index.js +8 -0
- package/output-es/Data.MediaType.Common/index.js +30 -0
- package/output-es/Data.Monoid/index.js +66 -0
- package/output-es/Data.Monoid.Additive/index.js +33 -0
- package/output-es/Data.Monoid.Alternate/index.js +46 -0
- package/output-es/Data.Monoid.Conj/index.js +21 -0
- package/output-es/Data.Monoid.Disj/index.js +21 -0
- package/output-es/Data.Monoid.Dual/index.js +19 -0
- package/output-es/Data.Monoid.Endo/index.js +12 -0
- package/output-es/Data.Monoid.Generic/index.js +11 -0
- package/output-es/Data.Monoid.Multiplicative/index.js +33 -0
- package/output-es/Data.NaturalTransformation/index.js +1 -0
- package/output-es/Data.Newtype/index.js +51 -0
- package/output-es/Data.NonEmpty/index.js +217 -0
- package/output-es/Data.Nullable/foreign.js +12 -0
- package/output-es/Data.Nullable/index.js +53 -0
- package/output-es/Data.Number/foreign.js +80 -0
- package/output-es/Data.Number/index.js +15 -0
- package/output-es/Data.Number.Approximate/index.js +13 -0
- package/output-es/Data.Number.Format/foreign.js +12 -0
- package/output-es/Data.Number.Format/index.js +53 -0
- package/output-es/Data.Op/index.js +13 -0
- package/output-es/Data.Ord/foreign.js +43 -0
- package/output-es/Data.Ord/index.js +161 -0
- package/output-es/Data.Ord.Down/index.js +35 -0
- package/output-es/Data.Ord.Generic/index.js +34 -0
- package/output-es/Data.Ord.Max/index.js +34 -0
- package/output-es/Data.Ord.Min/index.js +34 -0
- package/output-es/Data.Ordering/index.js +35 -0
- package/output-es/Data.Posix/index.js +19 -0
- package/output-es/Data.Posix.Signal/index.js +405 -0
- package/output-es/Data.Predicate/index.js +14 -0
- package/output-es/Data.Profunctor/index.js +13 -0
- package/output-es/Data.Profunctor.Choice/index.js +32 -0
- package/output-es/Data.Profunctor.Closed/index.js +5 -0
- package/output-es/Data.Profunctor.Cochoice/index.js +3 -0
- package/output-es/Data.Profunctor.Costrong/index.js +3 -0
- package/output-es/Data.Profunctor.Join/index.js +13 -0
- package/output-es/Data.Profunctor.Split/index.js +11 -0
- package/output-es/Data.Profunctor.Star/index.js +250 -0
- package/output-es/Data.Profunctor.Strong/index.js +19 -0
- package/output-es/Data.Reflectable/foreign.js +5 -0
- package/output-es/Data.Reflectable/index.js +10 -0
- package/output-es/Data.Ring/foreign.js +12 -0
- package/output-es/Data.Ring/index.js +50 -0
- package/output-es/Data.Ring.Generic/index.js +10 -0
- package/output-es/Data.Semigroup/foreign.js +13 -0
- package/output-es/Data.Semigroup/index.js +25 -0
- package/output-es/Data.Semigroup.First/index.js +14 -0
- package/output-es/Data.Semigroup.Foldable/index.js +143 -0
- package/output-es/Data.Semigroup.Generic/index.js +11 -0
- package/output-es/Data.Semigroup.Last/index.js +14 -0
- package/output-es/Data.Semigroup.Traversable/index.js +39 -0
- package/output-es/Data.Semiring/foreign.js +25 -0
- package/output-es/Data.Semiring/index.js +66 -0
- package/output-es/Data.Semiring.Generic/index.js +52 -0
- package/output-es/Data.Set/index.js +310 -0
- package/output-es/Data.Set.NonEmpty/index.js +198 -0
- package/output-es/Data.Show/foreign.js +59 -0
- package/output-es/Data.Show/index.js +56 -0
- package/output-es/Data.Show.Generic/foreign.js +5 -0
- package/output-es/Data.Show.Generic/index.js +43 -0
- package/output-es/Data.String/index.js +1 -0
- package/output-es/Data.String.CaseInsensitive/index.js +12 -0
- package/output-es/Data.String.CodePoints/foreign.js +107 -0
- package/output-es/Data.String.CodePoints/index.js +201 -0
- package/output-es/Data.String.CodeUnits/foreign.js +116 -0
- package/output-es/Data.String.CodeUnits/index.js +55 -0
- package/output-es/Data.String.Common/foreign.js +52 -0
- package/output-es/Data.String.Common/index.js +6 -0
- package/output-es/Data.String.Gen/index.js +26 -0
- package/output-es/Data.String.NonEmpty/index.js +1 -0
- package/output-es/Data.String.NonEmpty.CaseInsensitive/index.js +12 -0
- package/output-es/Data.String.NonEmpty.CodePoints/index.js +89 -0
- package/output-es/Data.String.NonEmpty.CodeUnits/index.js +98 -0
- package/output-es/Data.String.NonEmpty.Internal/index.js +119 -0
- package/output-es/Data.String.Pattern/index.js +13 -0
- package/output-es/Data.String.Regex/foreign.js +103 -0
- package/output-es/Data.String.Regex/index.js +28 -0
- package/output-es/Data.String.Regex.Flags/index.js +44 -0
- package/output-es/Data.String.Regex.Unsafe/index.js +10 -0
- package/output-es/Data.String.Unicode/index.js +18 -0
- package/output-es/Data.String.Unsafe/foreign.js +11 -0
- package/output-es/Data.String.Unsafe/index.js +4 -0
- package/output-es/Data.Symbol/foreign.js +6 -0
- package/output-es/Data.Symbol/index.js +6 -0
- package/output-es/Data.Time/index.js +119 -0
- package/output-es/Data.Time.Component/index.js +138 -0
- package/output-es/Data.Time.Component.Gen/index.js +7 -0
- package/output-es/Data.Time.Duration/index.js +95 -0
- package/output-es/Data.Time.Duration.Gen/index.js +7 -0
- package/output-es/Data.Time.Gen/index.js +8 -0
- package/output-es/Data.Traversable/foreign.js +52 -0
- package/output-es/Data.Traversable/index.js +303 -0
- package/output-es/Data.Traversable.Accum/index.js +1 -0
- package/output-es/Data.Traversable.Accum.Internal/index.js +35 -0
- package/output-es/Data.TraversableWithIndex/index.js +280 -0
- package/output-es/Data.Tuple/index.js +194 -0
- package/output-es/Data.Tuple.Nested/index.js +290 -0
- package/output-es/Data.Unfoldable/foreign.js +21 -0
- package/output-es/Data.Unfoldable/index.js +45 -0
- package/output-es/Data.Unfoldable1/foreign.js +21 -0
- package/output-es/Data.Unfoldable1/index.js +39 -0
- package/output-es/Data.Unit/foreign.js +1 -0
- package/output-es/Data.Unit/index.js +3 -0
- package/output-es/Data.Void/index.js +12 -0
- package/output-es/Data.Witherable/index.js +371 -0
- package/output-es/Data.Yoneda/index.js +85 -0
- package/output-es/DataType/index.js +276 -0
- package/output-es/Debug/foreign.js +57 -0
- package/output-es/Debug/index.js +13 -0
- package/output-es/Desug/index.js +17 -0
- package/output-es/Desugarable/index.js +3 -0
- package/output-es/Dict/index.js +118 -0
- package/output-es/Effect/foreign.js +51 -0
- package/output-es/Effect/index.js +49 -0
- package/output-es/Effect.Aff/foreign.js +1154 -0
- package/output-es/Effect.Aff/index.js +268 -0
- package/output-es/Effect.Aff.Class/index.js +114 -0
- package/output-es/Effect.Aff.Compat/index.js +14 -0
- package/output-es/Effect.Class/index.js +4 -0
- package/output-es/Effect.Class.Console/index.js +25 -0
- package/output-es/Effect.Console/foreign.js +67 -0
- package/output-es/Effect.Console/index.js +17 -0
- package/output-es/Effect.Exception/foreign.js +45 -0
- package/output-es/Effect.Exception/index.js +14 -0
- package/output-es/Effect.Exception.Unsafe/index.js +4 -0
- package/output-es/Effect.Now/foreign.js +8 -0
- package/output-es/Effect.Now/index.js +16 -0
- package/output-es/Effect.Random/foreign.js +1 -0
- package/output-es/Effect.Random/index.js +17 -0
- package/output-es/Effect.Ref/foreign.js +37 -0
- package/output-es/Effect.Ref/index.js +34 -0
- package/output-es/Effect.Uncurried/foreign.js +229 -0
- package/output-es/Effect.Uncurried/index.js +386 -0
- package/output-es/Effect.Unsafe/foreign.js +3 -0
- package/output-es/Effect.Unsafe/index.js +3 -0
- package/output-es/Eval/index.js +951 -0
- package/output-es/ExitCodes/index.js +461 -0
- package/output-es/Expr/index.js +1732 -0
- package/output-es/File/index.js +125 -0
- package/output-es/Fluid/index.js +229 -0
- package/output-es/Foreign/foreign.js +19 -0
- package/output-es/Foreign/index.js +171 -0
- package/output-es/Foreign.Index/foreign.js +11 -0
- package/output-es/Foreign.Index/index.js +80 -0
- package/output-es/Foreign.Keys/foreign.js +9 -0
- package/output-es/Foreign.Keys/index.js +28 -0
- package/output-es/Foreign.Object/foreign.js +116 -0
- package/output-es/Foreign.Object/index.js +304 -0
- package/output-es/Foreign.Object.Gen/index.js +13 -0
- package/output-es/Foreign.Object.ST/foreign.js +37 -0
- package/output-es/Foreign.Object.ST/index.js +9 -0
- package/output-es/Foreign.Object.ST.Unsafe/foreign.js +5 -0
- package/output-es/Foreign.Object.ST.Unsafe/index.js +3 -0
- package/output-es/Foreign.Object.Unsafe/foreign.js +5 -0
- package/output-es/Foreign.Object.Unsafe/index.js +3 -0
- package/output-es/GaloisConnection/index.js +72 -0
- package/output-es/Graph/index.js +279 -0
- package/output-es/Graph.GraphImpl/index.js +296 -0
- package/output-es/Graph.Slice/index.js +125 -0
- package/output-es/Graph.WithGraph/index.js +190 -0
- package/output-es/JSURI/foreign.js +61 -0
- package/output-es/JSURI/index.js +10 -0
- package/output-es/Lattice/index.js +397 -0
- package/output-es/Link/index.js +84 -0
- package/output-es/Module/index.js +317 -0
- package/output-es/Module.Node/index.js +95 -0
- package/output-es/Module.Web/index.js +79 -0
- package/output-es/ModuleGraph/index.js +1 -0
- package/output-es/Node.Buffer/foreign.js +33 -0
- package/output-es/Node.Buffer/index.js +191 -0
- package/output-es/Node.Buffer.Class/index.js +48 -0
- package/output-es/Node.Buffer.Constants/foreign.js +5 -0
- package/output-es/Node.Buffer.Constants/index.js +3 -0
- package/output-es/Node.Buffer.Immutable/foreign.js +45 -0
- package/output-es/Node.Buffer.Immutable/index.js +121 -0
- package/output-es/Node.Buffer.ST/index.js +98 -0
- package/output-es/Node.Buffer.Types/index.js +36 -0
- package/output-es/Node.Encoding/foreign.js +3 -0
- package/output-es/Node.Encoding/index.js +55 -0
- package/output-es/Node.EventEmitter/foreign.js +24 -0
- package/output-es/Node.EventEmitter/index.js +142 -0
- package/output-es/Node.EventEmitter.UtilTypes/index.js +1 -0
- package/output-es/Node.FS/index.js +27 -0
- package/output-es/Node.FS.Aff/index.js +132 -0
- package/output-es/Node.FS.Async/foreign.js +28 -0
- package/output-es/Node.FS.Async/index.js +241 -0
- package/output-es/Node.FS.Constants/foreign.js +17 -0
- package/output-es/Node.FS.Constants/index.js +103 -0
- package/output-es/Node.FS.Perms/index.js +125 -0
- package/output-es/Node.FS.Stats/foreign.js +27 -0
- package/output-es/Node.FS.Stats/index.js +102 -0
- package/output-es/Node.FS.Stream/foreign.js +11 -0
- package/output-es/Node.FS.Stream/index.js +20 -0
- package/output-es/Node.FS.Sync/foreign.js +30 -0
- package/output-es/Node.FS.Sync/index.js +258 -0
- package/output-es/Node.Path/foreign.js +30 -0
- package/output-es/Node.Path/index.js +3 -0
- package/output-es/Node.Platform/index.js +104 -0
- package/output-es/Node.Process/foreign.js +65 -0
- package/output-es/Node.Process/index.js +180 -0
- package/output-es/Node.Stream/foreign.js +97 -0
- package/output-es/Node.Stream/index.js +310 -0
- package/output-es/Node.Stream.Aff/index.js +445 -0
- package/output-es/Node.Symbol/foreign.js +3 -0
- package/output-es/Node.Symbol/index.js +12 -0
- package/output-es/Options.Applicative/index.js +1 -0
- package/output-es/Options.Applicative.BashCompletion/index.js +417 -0
- package/output-es/Options.Applicative.Builder/index.js +505 -0
- package/output-es/Options.Applicative.Builder.Completer/foreign.js +8 -0
- package/output-es/Options.Applicative.Builder.Completer/index.js +133 -0
- package/output-es/Options.Applicative.Builder.Internal/index.js +122 -0
- package/output-es/Options.Applicative.Common/index.js +497 -0
- package/output-es/Options.Applicative.Extra/index.js +273 -0
- package/output-es/Options.Applicative.Help/index.js +3 -0
- package/output-es/Options.Applicative.Help.Chunk/index.js +229 -0
- package/output-es/Options.Applicative.Help.Core/index.js +450 -0
- package/output-es/Options.Applicative.Help.Levenshtein/index.js +22 -0
- package/output-es/Options.Applicative.Help.Pretty/index.js +1 -0
- package/output-es/Options.Applicative.Help.Types/index.js +112 -0
- package/output-es/Options.Applicative.Internal/index.js +447 -0
- package/output-es/Options.Applicative.Internal.Utils/index.js +36 -0
- package/output-es/Options.Applicative.Types/index.js +979 -0
- package/output-es/PSCI.Support/index.js +15 -0
- package/output-es/Parse/index.js +2003 -0
- package/output-es/Parse.Number/index.js +390 -0
- package/output-es/Parse.Parser/index.js +428 -0
- package/output-es/Parsing/index.js +342 -0
- package/output-es/Parsing.Combinators/index.js +901 -0
- package/output-es/Parsing.Combinators.Array/index.js +131 -0
- package/output-es/Parsing.Expr/index.js +317 -0
- package/output-es/Parsing.Indent/index.js +492 -0
- package/output-es/Parsing.Language/index.js +224 -0
- package/output-es/Parsing.String/index.js +378 -0
- package/output-es/Parsing.String.Basic/index.js +236 -0
- package/output-es/Parsing.String.Replace/index.js +342 -0
- package/output-es/Parsing.Token/index.js +1980 -0
- package/output-es/Partial/foreign.js +5 -0
- package/output-es/Partial/index.js +6 -0
- package/output-es/Partial.Unsafe/foreign.js +5 -0
- package/output-es/Partial.Unsafe/index.js +8 -0
- package/output-es/Prelude/index.js +13 -0
- package/output-es/Pretty/index.js +1334 -0
- package/output-es/Pretty.Doc/index.js +139 -0
- package/output-es/Pretty.Util/index.js +90 -0
- package/output-es/Primitive/index.js +304 -0
- package/output-es/Primitive.Defs/index.js +872 -0
- package/output-es/Primitive.Parse/index.js +93 -0
- package/output-es/Random.LCG/index.js +35 -0
- package/output-es/Record/index.js +23 -0
- package/output-es/Record.Builder/foreign.js +44 -0
- package/output-es/Record.Builder/index.js +20 -0
- package/output-es/Record.Unsafe/foreign.js +38 -0
- package/output-es/Record.Unsafe/index.js +9 -0
- package/output-es/Record.Unsafe.Union/foreign.js +14 -0
- package/output-es/Record.Unsafe.Union/index.js +4 -0
- package/output-es/SExpr/index.js +3972 -0
- package/output-es/Safe.Coerce/index.js +3 -0
- package/output-es/Test.Assert/foreign.js +21 -0
- package/output-es/Test.Assert/index.js +37 -0
- package/output-es/Test.Benchmark.Util/foreign.js +3 -0
- package/output-es/Test.Benchmark.Util/index.js +273 -0
- package/output-es/Test.QuickCheck/index.js +297 -0
- package/output-es/Test.QuickCheck.Arbitrary/index.js +482 -0
- package/output-es/Test.QuickCheck.Gen/foreign.js +10 -0
- package/output-es/Test.QuickCheck.Gen/index.js +270 -0
- package/output-es/Test.Specs.Bwd/index.js +220 -0
- package/output-es/Test.Specs.Comments/index.js +25 -0
- package/output-es/Test.Specs.Desugar/index.js +17 -0
- package/output-es/Test.Specs.Graphics/index.js +7 -0
- package/output-es/Test.Specs.LinkedInputs/index.js +52 -0
- package/output-es/Test.Specs.LinkedOutputs/index.js +61 -0
- package/output-es/Test.Specs.Misc/index.js +35 -0
- package/output-es/Test.Specs.Paragraph/index.js +5 -0
- package/output-es/Test.Test/index.js +106 -0
- package/output-es/Test.Util/index.js +239 -0
- package/output-es/Test.Util.Debug/index.js +6 -0
- package/output-es/Test.Util.Debug.Defaults/index.js +16 -0
- package/output-es/Test.Util.Mocha/foreign.js +55 -0
- package/output-es/Test.Util.Mocha/index.js +21 -0
- package/output-es/Test.Util.Puppeteer/index.js +83 -0
- package/output-es/Test.Util.Suite/index.js +197 -0
- package/output-es/Text.PrettyPrint.Leijen/index.js +700 -0
- package/output-es/Toppokki/foreign.js +170 -0
- package/output-es/Toppokki/index.js +122 -0
- package/output-es/Type.Data.Boolean/index.js +21 -0
- package/output-es/Type.Data.Ordering/index.js +56 -0
- package/output-es/Type.Data.Symbol/index.js +7 -0
- package/output-es/Type.Equality/index.js +5 -0
- package/output-es/Type.Function/index.js +1 -0
- package/output-es/Type.Prelude/index.js +1 -0
- package/output-es/Type.Proxy/index.js +51 -0
- package/output-es/Type.Row/index.js +1 -0
- package/output-es/Type.Row.Homogeneous/index.js +4 -0
- package/output-es/Type.RowList/index.js +10 -0
- package/output-es/Unsafe.Coerce/foreign.js +5 -0
- package/output-es/Unsafe.Coerce/index.js +3 -0
- package/output-es/Util/index.js +340 -0
- package/output-es/Util.Map/foreign.js +13 -0
- package/output-es/Util.Map/index.js +129 -0
- package/output-es/Util.Pair/index.js +90 -0
- package/output-es/Util.Set/index.js +75 -0
- package/output-es/Val/index.js +1771 -0
- package/output-es/Web.DOM/index.js +1 -0
- package/output-es/Web.DOM.CharacterData/foreign.js +61 -0
- package/output-es/Web.DOM.CharacterData/index.js +13 -0
- package/output-es/Web.DOM.ChildNode/foreign.js +5 -0
- package/output-es/Web.DOM.ChildNode/index.js +3 -0
- package/output-es/Web.DOM.Comment/index.js +13 -0
- package/output-es/Web.DOM.DOMTokenList/foreign.js +49 -0
- package/output-es/Web.DOM.DOMTokenList/index.js +15 -0
- package/output-es/Web.DOM.Document/foreign.js +112 -0
- package/output-es/Web.DOM.Document/index.js +75 -0
- package/output-es/Web.DOM.DocumentFragment/index.js +13 -0
- package/output-es/Web.DOM.DocumentType/foreign.js +9 -0
- package/output-es/Web.DOM.DocumentType/index.js +11 -0
- package/output-es/Web.DOM.Element/foreign.js +210 -0
- package/output-es/Web.DOM.Element/index.js +101 -0
- package/output-es/Web.DOM.HTMLCollection/foreign.js +27 -0
- package/output-es/Web.DOM.HTMLCollection/index.js +25 -0
- package/output-es/Web.DOM.Internal.Types/index.js +1 -0
- package/output-es/Web.DOM.MutationObserver/foreign.js +29 -0
- package/output-es/Web.DOM.MutationObserver/index.js +4 -0
- package/output-es/Web.DOM.MutationRecord/foreign.js +53 -0
- package/output-es/Web.DOM.MutationRecord/index.js +66 -0
- package/output-es/Web.DOM.Node/foreign.js +153 -0
- package/output-es/Web.DOM.Node/index.js +147 -0
- package/output-es/Web.DOM.NodeList/foreign.js +19 -0
- package/output-es/Web.DOM.NodeList/index.js +15 -0
- package/output-es/Web.DOM.NodeType/index.js +199 -0
- package/output-es/Web.DOM.NonDocumentTypeChildNode/foreign.js +11 -0
- package/output-es/Web.DOM.NonDocumentTypeChildNode/index.js +19 -0
- package/output-es/Web.DOM.NonElementParentNode/foreign.js +7 -0
- package/output-es/Web.DOM.NonElementParentNode/index.js +15 -0
- package/output-es/Web.DOM.ParentNode/foreign.js +28 -0
- package/output-es/Web.DOM.ParentNode/index.js +35 -0
- package/output-es/Web.DOM.ProcessingInstruction/foreign.js +5 -0
- package/output-es/Web.DOM.ProcessingInstruction/index.js +15 -0
- package/output-es/Web.DOM.ShadowRoot/foreign.js +9 -0
- package/output-es/Web.DOM.ShadowRoot/index.js +23 -0
- package/output-es/Web.DOM.Text/foreign.js +13 -0
- package/output-es/Web.DOM.Text/index.js +15 -0
- package/output-es/Web.Event.CustomEvent/foreign.js +18 -0
- package/output-es/Web.Event.CustomEvent/index.js +20 -0
- package/output-es/Web.Event.Event/foreign.js +51 -0
- package/output-es/Web.Event.Event/index.js +23 -0
- package/output-es/Web.Event.EventPhase/index.js +99 -0
- package/output-es/Web.Event.EventTarget/foreign.js +51 -0
- package/output-es/Web.Event.EventTarget/index.js +3 -0
- package/output-es/Web.Event.Internal.Types/index.js +1 -0
- package/output-es/Web.File.Blob/foreign.js +19 -0
- package/output-es/Web.File.Blob/index.js +18 -0
- package/output-es/Web.File.File/foreign.js +2 -0
- package/output-es/Web.File.File/index.js +13 -0
- package/output-es/Web.File.FileList/foreign.js +7 -0
- package/output-es/Web.File.FileList/index.js +16 -0
- package/output-es/Web.File.FileReader/foreign.js +51 -0
- package/output-es/Web.File.FileReader/index.js +19 -0
- package/output-es/Web.File.FileReader.ReadyState/index.js +94 -0
- package/output-es/Web.File.Url/foreign.js +11 -0
- package/output-es/Web.File.Url/index.js +3 -0
- package/output-es/Web.HTML/foreign.js +4 -0
- package/output-es/Web.HTML/index.js +3 -0
- package/output-es/Web.HTML.Common/index.js +15 -0
- package/output-es/Web.HTML.Event.BeforeUnloadEvent/foreign.js +13 -0
- package/output-es/Web.HTML.Event.BeforeUnloadEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.BeforeUnloadEvent.EventTypes/index.js +2 -0
- package/output-es/Web.HTML.Event.DataTransfer/foreign.js +55 -0
- package/output-es/Web.HTML.Event.DataTransfer/index.js +63 -0
- package/output-es/Web.HTML.Event.DataTransfer.DataTransferItem/foreign.js +23 -0
- package/output-es/Web.HTML.Event.DataTransfer.DataTransferItem/index.js +41 -0
- package/output-es/Web.HTML.Event.DragEvent/foreign.js +3 -0
- package/output-es/Web.HTML.Event.DragEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.DragEvent.EventTypes/index.js +9 -0
- package/output-es/Web.HTML.Event.ErrorEvent/foreign.js +15 -0
- package/output-es/Web.HTML.Event.ErrorEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.EventTypes/index.js +68 -0
- package/output-es/Web.HTML.Event.HashChangeEvent/foreign.js +7 -0
- package/output-es/Web.HTML.Event.HashChangeEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.HashChangeEvent.EventTypes/index.js +2 -0
- package/output-es/Web.HTML.Event.PageTransitionEvent/foreign.js +3 -0
- package/output-es/Web.HTML.Event.PageTransitionEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.PageTransitionEvent.EventTypes/index.js +3 -0
- package/output-es/Web.HTML.Event.PopStateEvent/foreign.js +3 -0
- package/output-es/Web.HTML.Event.PopStateEvent/index.js +7 -0
- package/output-es/Web.HTML.Event.PopStateEvent.EventTypes/index.js +2 -0
- package/output-es/Web.HTML.Event.TrackEvent/index.js +5 -0
- package/output-es/Web.HTML.Event.TrackEvent.EventTypes/index.js +3 -0
- package/output-es/Web.HTML.HTMLAnchorElement/foreign.js +117 -0
- package/output-es/Web.HTML.HTMLAnchorElement/index.js +36 -0
- package/output-es/Web.HTML.HTMLAreaElement/foreign.js +133 -0
- package/output-es/Web.HTML.HTMLAreaElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLAudioElement/foreign.js +9 -0
- package/output-es/Web.HTML.HTMLAudioElement/index.js +40 -0
- package/output-es/Web.HTML.HTMLBRElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLBaseElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLBaseElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLBodyElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLButtonElement/foreign.js +223 -0
- package/output-es/Web.HTML.HTMLButtonElement/index.js +73 -0
- package/output-es/Web.HTML.HTMLCanvasElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLCanvasElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLDListElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLDataElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLDataElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLDataListElement/foreign.js +5 -0
- package/output-es/Web.HTML.HTMLDataListElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLDivElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLDocument/foreign.js +39 -0
- package/output-es/Web.HTML.HTMLDocument/index.js +76 -0
- package/output-es/Web.HTML.HTMLDocument.ReadyState/index.js +52 -0
- package/output-es/Web.HTML.HTMLDocument.VisibilityState/index.js +42 -0
- package/output-es/Web.HTML.HTMLElement/foreign.js +194 -0
- package/output-es/Web.HTML.HTMLElement/index.js +66 -0
- package/output-es/Web.HTML.HTMLEmbedElement/foreign.js +61 -0
- package/output-es/Web.HTML.HTMLEmbedElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLFieldSetElement/foreign.js +103 -0
- package/output-es/Web.HTML.HTMLFieldSetElement/index.js +44 -0
- package/output-es/Web.HTML.HTMLFormElement/foreign.js +181 -0
- package/output-es/Web.HTML.HTMLFormElement/index.js +58 -0
- package/output-es/Web.HTML.HTMLHRElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLHeadElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLHeadingElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLHtmlElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLHyperlinkElementUtils/foreign.js +165 -0
- package/output-es/Web.HTML.HTMLHyperlinkElementUtils/index.js +26 -0
- package/output-es/Web.HTML.HTMLIFrameElement/foreign.js +91 -0
- package/output-es/Web.HTML.HTMLIFrameElement/index.js +52 -0
- package/output-es/Web.HTML.HTMLImageElement/foreign.js +215 -0
- package/output-es/Web.HTML.HTMLImageElement/index.js +140 -0
- package/output-es/Web.HTML.HTMLImageElement.CORSMode/index.js +43 -0
- package/output-es/Web.HTML.HTMLImageElement.DecodingHint/index.js +53 -0
- package/output-es/Web.HTML.HTMLImageElement.Laziness/index.js +43 -0
- package/output-es/Web.HTML.HTMLInputElement/foreign.js +727 -0
- package/output-es/Web.HTML.HTMLInputElement/index.js +171 -0
- package/output-es/Web.HTML.HTMLKeygenElement/foreign.js +151 -0
- package/output-es/Web.HTML.HTMLKeygenElement/index.js +64 -0
- package/output-es/Web.HTML.HTMLLIElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLLIElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLLabelElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLLabelElement/index.js +52 -0
- package/output-es/Web.HTML.HTMLLegendElement/foreign.js +5 -0
- package/output-es/Web.HTML.HTMLLegendElement/index.js +44 -0
- package/output-es/Web.HTML.HTMLLinkElement/foreign.js +133 -0
- package/output-es/Web.HTML.HTMLLinkElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLMapElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLMapElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLMediaElement/foreign.js +295 -0
- package/output-es/Web.HTML.HTMLMediaElement/index.js +103 -0
- package/output-es/Web.HTML.HTMLMediaElement.CanPlayType/index.js +52 -0
- package/output-es/Web.HTML.HTMLMediaElement.NetworkState/index.js +109 -0
- package/output-es/Web.HTML.HTMLMediaElement.ReadyState/index.js +124 -0
- package/output-es/Web.HTML.HTMLMetaElement/foreign.js +45 -0
- package/output-es/Web.HTML.HTMLMetaElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLMeterElement/foreign.js +101 -0
- package/output-es/Web.HTML.HTMLMeterElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLModElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLModElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLOListElement/foreign.js +45 -0
- package/output-es/Web.HTML.HTMLOListElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLObjectElement/foreign.js +167 -0
- package/output-es/Web.HTML.HTMLObjectElement/index.js +74 -0
- package/output-es/Web.HTML.HTMLOptGroupElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLOptGroupElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLOptionElement/foreign.js +109 -0
- package/output-es/Web.HTML.HTMLOptionElement/index.js +44 -0
- package/output-es/Web.HTML.HTMLOutputElement/foreign.js +119 -0
- package/output-es/Web.HTML.HTMLOutputElement/index.js +60 -0
- package/output-es/Web.HTML.HTMLParagraphElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLParamElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLParamElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLPreElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLProgressElement/foreign.js +45 -0
- package/output-es/Web.HTML.HTMLProgressElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLQuoteElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLQuoteElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLScriptElement/foreign.js +109 -0
- package/output-es/Web.HTML.HTMLScriptElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLSelectElement/foreign.js +223 -0
- package/output-es/Web.HTML.HTMLSelectElement/index.js +73 -0
- package/output-es/Web.HTML.HTMLSourceElement/foreign.js +45 -0
- package/output-es/Web.HTML.HTMLSourceElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLSpanElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLStyleElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLStyleElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTableCaptionElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLTableCellElement/foreign.js +37 -0
- package/output-es/Web.HTML.HTMLTableCellElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTableColElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLTableColElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTableDataCellElement/index.js +36 -0
- package/output-es/Web.HTML.HTMLTableElement/foreign.js +153 -0
- package/output-es/Web.HTML.HTMLTableElement/index.js +103 -0
- package/output-es/Web.HTML.HTMLTableHeaderCellElement/foreign.js +29 -0
- package/output-es/Web.HTML.HTMLTableHeaderCellElement/index.js +38 -0
- package/output-es/Web.HTML.HTMLTableRowElement/foreign.js +41 -0
- package/output-es/Web.HTML.HTMLTableRowElement/index.js +38 -0
- package/output-es/Web.HTML.HTMLTableSectionElement/foreign.js +25 -0
- package/output-es/Web.HTML.HTMLTableSectionElement/index.js +38 -0
- package/output-es/Web.HTML.HTMLTemplateElement/foreign.js +5 -0
- package/output-es/Web.HTML.HTMLTemplateElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTextAreaElement/foreign.js +403 -0
- package/output-es/Web.HTML.HTMLTextAreaElement/index.js +107 -0
- package/output-es/Web.HTML.HTMLTimeElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLTimeElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTitleElement/foreign.js +13 -0
- package/output-es/Web.HTML.HTMLTitleElement/index.js +34 -0
- package/output-es/Web.HTML.HTMLTrackElement/foreign.js +84 -0
- package/output-es/Web.HTML.HTMLTrackElement/index.js +44 -0
- package/output-es/Web.HTML.HTMLTrackElement.ReadyState/index.js +109 -0
- package/output-es/Web.HTML.HTMLUListElement/index.js +32 -0
- package/output-es/Web.HTML.HTMLVideoElement/foreign.js +63 -0
- package/output-es/Web.HTML.HTMLVideoElement/index.js +38 -0
- package/output-es/Web.HTML.History/foreign.js +49 -0
- package/output-es/Web.HTML.History/index.js +16 -0
- package/output-es/Web.HTML.Location/foreign.js +169 -0
- package/output-es/Web.HTML.Location/index.js +25 -0
- package/output-es/Web.HTML.Navigator/foreign.js +29 -0
- package/output-es/Web.HTML.Navigator/index.js +3 -0
- package/output-es/Web.HTML.SelectionMode/index.js +62 -0
- package/output-es/Web.HTML.ValidityState/foreign.js +3 -0
- package/output-es/Web.HTML.ValidityState/index.js +15 -0
- package/output-es/Web.HTML.Window/foreign.js +239 -0
- package/output-es/Web.HTML.Window/index.js +86 -0
- package/output-es/Web.Internal.FFI/foreign.js +20 -0
- package/output-es/Web.Internal.FFI/index.js +5 -0
- package/output-es/Web.Storage.Event.StorageEvent/foreign.js +19 -0
- package/output-es/Web.Storage.Event.StorageEvent/index.js +13 -0
- package/output-es/Web.Storage.Storage/foreign.js +45 -0
- package/output-es/Web.Storage.Storage/index.js +52 -0
- package/output-es/Web.XHR.EventTypes/index.js +8 -0
- package/output-es/Web.XHR.FormData/foreign.js +32 -0
- package/output-es/Web.XHR.FormData/index.js +52 -0
- package/output-es/Web.XHR.ProgressEvent/foreign.js +11 -0
- package/output-es/Web.XHR.ProgressEvent/index.js +7 -0
- package/output-es/Web.XHR.ReadyState/index.js +99 -0
- package/output-es/Web.XHR.ResponseType/index.js +5 -0
- package/output-es/Web.XHR.XMLHttpRequest/foreign.js +41 -0
- package/output-es/Web.XHR.XMLHttpRequest/index.js +95 -0
- package/output-es/Web.XHR.XMLHttpRequestUpload/index.js +3 -0
- package/output-es/Website.Test.Article.EnergyScatter/index.js +12 -0
- package/output-es/Website.Test.Article.RenewablesLinked/index.js +14 -0
- package/output-es/package.json +1 -0
- package/output-es/runtime.js +33 -0
- package/package.json +13 -26
- package/script/install-website.sh +34 -9
- package/web/lib/CodeMirror.svelte +19 -0
- package/web/lib/DataPane.svelte +46 -0
- package/web/lib/Figure.svelte +38 -0
- package/web/lib/FigureSrc.svelte +35 -0
- package/web/lib/Grid.svelte +32 -0
- package/web/lib/index.js +5 -0
- package/web/lib/view-styles.css +262 -0
- package/website/article/eslint.config.js +45 -0
- package/website/article/package.json +46 -0
- package/website/article/src/app.d.ts +13 -0
- package/website/article/src/app.html +12 -0
- package/website/article/src/lib/assets/css/styles.css +245 -0
- package/website/article/src/lib/assets/image/bristol.png +0 -0
- package/website/article/src/lib/assets/image/fluid.png +0 -0
- package/website/article/src/lib/assets/image/iccs.png +0 -0
- package/website/article/src/lib/assets/image/schmidt.png +0 -0
- package/website/article/src/lib/assets/image/turing.jpg +0 -0
- package/website/article/src/lib/config/nav.ts +7 -0
- package/website/article/src/lib/config/supporters.ts +27 -0
- package/website/article/src/routes/+layout.svelte +15 -0
- package/website/article/src/routes/+layout.ts +1 -0
- package/website/article/src/routes/+page.svelte +31 -0
- package/website/article/src/routes/convolution/+page.svelte +62 -0
- package/website/article/src/routes/energy-scatter/+page.svelte +34 -0
- package/website/article/src/routes/methane/+page.svelte +35 -0
- package/website/article/src/routes/moving-average/+page.svelte +57 -0
- package/website/article/src/routes/non-renewables/+page.svelte +40 -0
- package/website/article/src/routes/renewables-linked/+page.svelte +34 -0
- package/website/article/src/routes/scigen-1805.02474v1-10/+page.svelte +40 -0
- package/website/article/static/fluid/lib/graphics.fld +274 -0
- package/website/article/static/fluid/lib/matrix.fld +40 -0
- package/website/article/static/fluid/lib/prelude.fld +348 -0
- package/website/article/static/fluid/lib/stats.fld +83 -0
- package/website/article/svelte.config.js +13 -0
- package/website/article/test.mjs +66 -11
- package/website/article/tsconfig.json +20 -0
- package/website/article/vite.config.ts +6 -0
- package/.spago/aff/v7.1.0/.editorconfig +0 -13
- package/.spago/aff/v7.1.0/.eslintrc.json +0 -28
- package/.spago/aff/v7.1.0/.gitignore +0 -14
- package/.spago/aff/v7.1.0/.tidyrc.json +0 -10
- package/.spago/affjax/v13.0.0/.editorconfig +0 -13
- package/.spago/affjax/v13.0.0/.eslintrc.json +0 -28
- package/.spago/affjax/v13.0.0/.gitignore +0 -14
- package/.spago/affjax/v13.0.0/.tidyrc.json +0 -10
- package/.spago/affjax-web/v1.0.0/.editorconfig +0 -13
- package/.spago/affjax-web/v1.0.0/.eslintrc.json +0 -30
- package/.spago/affjax-web/v1.0.0/.gitignore +0 -14
- package/.spago/affjax-web/v1.0.0/.tidyrc.json +0 -10
- package/.spago/argonaut-codecs/v9.1.0/.editorconfig +0 -13
- package/.spago/argonaut-codecs/v9.1.0/.gitignore +0 -9
- package/.spago/argonaut-codecs/v9.1.0/.tidyrc.json +0 -10
- package/.spago/argonaut-core/v7.0.0/.editorconfig +0 -13
- package/.spago/argonaut-core/v7.0.0/.eslintrc.json +0 -29
- package/.spago/argonaut-core/v7.0.0/.gitignore +0 -14
- package/.spago/argonaut-core/v7.0.0/.tidyrc.json +0 -10
- package/.spago/arraybuffer-types/v3.0.2/.editorconfig +0 -13
- package/.spago/arraybuffer-types/v3.0.2/.gitignore +0 -9
- package/.spago/arraybuffer-types/v3.0.2/.tidyrc.json +0 -10
- package/.spago/arrays/v7.2.1/.eslintrc.json +0 -26
- package/.spago/arrays/v7.2.1/.gitignore +0 -9
- package/.spago/assert/v6.0.0/.eslintrc.json +0 -26
- package/.spago/assert/v6.0.0/.gitignore +0 -8
- package/.spago/bifunctors/v6.0.0/.gitignore +0 -7
- package/.spago/catenable-lists/v7.0.0/.gitignore +0 -7
- package/.spago/console/v6.1.0/.eslintrc.json +0 -30
- package/.spago/console/v6.1.0/.gitignore +0 -9
- package/.spago/const/v6.0.0/.gitignore +0 -7
- package/.spago/contravariant/v6.0.0/.gitignore +0 -7
- package/.spago/control/v6.0.0/.gitignore +0 -7
- package/.spago/datetime/v6.1.0/.eslintrc.json +0 -26
- package/.spago/datetime/v6.1.0/.gitignore +0 -8
- package/.spago/debug/v6.0.2/.eslintrc.json +0 -36
- package/.spago/debug/v6.0.2/.gitignore +0 -8
- package/.spago/distributive/v6.0.0/.gitignore +0 -7
- package/.spago/effect/v4.0.0/.eslintrc.json +0 -26
- package/.spago/effect/v4.0.0/.gitignore +0 -8
- package/.spago/either/v6.1.0/.gitignore +0 -7
- package/.spago/enums/v6.0.1/.gitignore +0 -7
- package/.spago/exceptions/v6.0.0/.eslintrc.json +0 -26
- package/.spago/exceptions/v6.0.0/.gitignore +0 -8
- package/.spago/exists/v6.0.0/.gitignore +0 -7
- package/.spago/filterable/v5.0.0/.gitignore +0 -11
- package/.spago/foldable-traversable/v6.0.0/.eslintrc.json +0 -26
- package/.spago/foldable-traversable/v6.0.0/.gitignore +0 -8
- package/.spago/foreign/v7.0.0/.eslintrc.json +0 -26
- package/.spago/foreign/v7.0.0/.gitignore +0 -8
- package/.spago/foreign-object/v4.1.0/.eslintrc.json +0 -26
- package/.spago/foreign-object/v4.1.0/.gitignore +0 -8
- package/.spago/form-urlencoded/v7.0.0/.editorconfig +0 -13
- package/.spago/form-urlencoded/v7.0.0/.gitignore +0 -9
- package/.spago/form-urlencoded/v7.0.0/.tidyrc.json +0 -10
- package/.spago/free/v7.1.0/.gitignore +0 -8
- package/.spago/functions/v6.0.0/.eslintrc.json +0 -26
- package/.spago/functions/v6.0.0/.gitignore +0 -8
- package/.spago/functors/v5.0.0/.gitignore +0 -7
- package/.spago/gen/v4.0.0/.gitignore +0 -8
- package/.spago/graphs/v8.1.0/.gitignore +0 -7
- package/.spago/http-methods/v6.0.0/.editorconfig +0 -13
- package/.spago/http-methods/v6.0.0/.gitignore +0 -9
- package/.spago/http-methods/v6.0.0/.tidyrc.json +0 -10
- package/.spago/identity/v6.0.0/.gitignore +0 -7
- package/.spago/integers/v6.0.0/.eslintrc.json +0 -26
- package/.spago/integers/v6.0.0/.gitignore +0 -8
- package/.spago/invariant/v6.0.0/.gitignore +0 -7
- package/.spago/js-date/v8.0.0/.editorconfig +0 -13
- package/.spago/js-date/v8.0.0/.eslintrc.json +0 -29
- package/.spago/js-date/v8.0.0/.gitignore +0 -14
- package/.spago/js-date/v8.0.0/.tidyrc.json +0 -10
- package/.spago/js-uri/v3.1.0/.eslintrc.json +0 -30
- package/.spago/js-uri/v3.1.0/.gitignore +0 -14
- package/.spago/js-uri/v3.1.0/.tidyrc.json +0 -10
- package/.spago/lazy/v6.0.0/.eslintrc.json +0 -26
- package/.spago/lazy/v6.0.0/.gitignore +0 -8
- package/.spago/lcg/v4.0.0/.gitignore +0 -8
- package/.spago/lists/v7.0.0/.gitignore +0 -7
- package/.spago/maybe/v6.0.0/.gitignore +0 -7
- package/.spago/media-types/v6.0.0/.editorconfig +0 -13
- package/.spago/media-types/v6.0.0/.gitignore +0 -9
- package/.spago/media-types/v6.0.0/.tidyrc.json +0 -10
- package/.spago/newtype/v5.0.0/.gitignore +0 -7
- package/.spago/node-buffer/v9.0.0/.eslintrc.json +0 -26
- package/.spago/node-buffer/v9.0.0/.gitignore +0 -8
- package/.spago/node-fs/v9.1.0/.eslintrc.json +0 -29
- package/.spago/node-fs/v9.1.0/.gitignore +0 -9
- package/.spago/node-path/v5.0.0/.eslintrc.json +0 -26
- package/.spago/node-path/v5.0.0/.gitignore +0 -8
- package/.spago/node-process/v11.2.0/.eslintrc.json +0 -29
- package/.spago/node-process/v11.2.0/.gitignore +0 -8
- package/.spago/node-streams/v9.0.0/.eslintrc.json +0 -29
- package/.spago/node-streams/v9.0.0/.gitignore +0 -8
- package/.spago/nonempty/v7.0.0/.gitignore +0 -7
- package/.spago/now/v6.0.0/.editorconfig +0 -13
- package/.spago/now/v6.0.0/.eslintrc.json +0 -29
- package/.spago/now/v6.0.0/.gitignore +0 -14
- package/.spago/now/v6.0.0/.tidyrc.json +0 -10
- package/.spago/nullable/v6.0.0/.editorconfig +0 -13
- package/.spago/nullable/v6.0.0/.eslintrc.json +0 -29
- package/.spago/nullable/v6.0.0/.gitignore +0 -14
- package/.spago/nullable/v6.0.0/.tidyrc.json +0 -10
- package/.spago/optparse/v6.0.0/.gitignore +0 -8
- package/.spago/optparse/v6.0.0/.npmrc +0 -1
- package/.spago/ordered-collections/v3.1.1/.gitignore +0 -8
- package/.spago/orders/v6.0.0/.gitignore +0 -7
- package/.spago/parallel/v7.0.0/.gitignore +0 -7
- package/.spago/parsing/v10.3.1/.editorconfig +0 -13
- package/.spago/parsing/v10.3.1/.gitignore +0 -12
- package/.spago/parsing/v10.3.1/.tidyoperators +0 -231
- package/.spago/parsing/v10.3.1/.tidyrc.json +0 -10
- package/.spago/partial/v4.0.0/.eslintrc.json +0 -26
- package/.spago/partial/v4.0.0/.gitignore +0 -8
- package/.spago/posix-types/v6.0.0/.gitignore +0 -7
- package/.spago/prelude/v6.0.1/.eslintrc.json +0 -26
- package/.spago/prelude/v6.0.1/.gitignore +0 -8
- package/.spago/profunctor/v6.0.0/.gitignore +0 -7
- package/.spago/psci-support/v6.0.0/.eslintrc.json +0 -28
- package/.spago/psci-support/v6.0.0/.gitignore +0 -8
- package/.spago/quickcheck/v8.0.1/.eslintrc.json +0 -26
- package/.spago/quickcheck/v8.0.1/.gitignore +0 -8
- package/.spago/random/v6.0.0/.eslintrc.json +0 -26
- package/.spago/random/v6.0.0/.gitignore +0 -8
- package/.spago/record/v4.0.0/.eslintrc.json +0 -26
- package/.spago/record/v4.0.0/.gitignore +0 -8
- package/.spago/refs/v6.0.0/.eslintrc.json +0 -26
- package/.spago/refs/v6.0.0/.gitignore +0 -8
- package/.spago/st/v6.2.0/.eslintrc.json +0 -26
- package/.spago/st/v6.2.0/.gitignore +0 -8
- package/.spago/strings/v6.0.1/.eslintrc.json +0 -26
- package/.spago/strings/v6.0.1/.gitignore +0 -8
- package/.spago/tailrec/v6.1.0/.gitignore +0 -7
- package/.spago/transformers/v6.0.0/.gitignore +0 -7
- package/.spago/tuples/v7.0.0/.gitignore +0 -7
- package/.spago/type-equality/v4.0.1/.gitignore +0 -7
- package/.spago/typelevel-prelude/v7.0.0/.gitignore +0 -8
- package/.spago/unfoldable/v6.0.0/.eslintrc.json +0 -26
- package/.spago/unfoldable/v6.0.0/.gitignore +0 -8
- package/.spago/unicode/v6.0.0/.editorconfig +0 -13
- package/.spago/unicode/v6.0.0/.gitattributes +0 -2
- package/.spago/unicode/v6.0.0/.gitignore +0 -19
- package/.spago/unicode/v6.0.0/.tidyrc.json +0 -10
- package/.spago/unsafe-coerce/v6.0.0/.eslintrc.json +0 -26
- package/.spago/unsafe-coerce/v6.0.0/.gitignore +0 -8
- package/.spago/web-dom/v6.0.0/.eslintrc.json +0 -29
- package/.spago/web-dom/v6.0.0/.gitignore +0 -9
- package/.spago/web-events/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-events/v4.0.0/.gitignore +0 -8
- package/.spago/web-file/v4.0.0/.eslintrc.json +0 -29
- package/.spago/web-file/v4.0.0/.gitignore +0 -8
- package/.spago/web-html/v4.1.0/.eslintrc.json +0 -29
- package/.spago/web-html/v4.1.0/.gitignore +0 -8
- package/.spago/web-storage/v5.0.0/.eslintrc.json +0 -29
- package/.spago/web-storage/v5.0.0/.gitignore +0 -8
- package/.spago/web-xhr/v5.0.1/.eslintrc.json +0 -29
- package/.spago/web-xhr/v5.0.1/.gitignore +0 -8
- package/LICENSE +0 -21
- package/README.md +0 -95
- package/dist/fluid/shared/website-test.js +0 -41
- package/dist/fluid/shared/webtest-lib.js +0 -300023
- package/script/bundle-website.sh +0 -52
- package/script/util/clean.sh +0 -5
- package/script/util/lisp-case.sh +0 -10
- package/website/article/convolution/index.html +0 -97
- package/website/article/css/styles.css +0 -325
- package/website/article/css/view-styles.css +0 -205
- package/website/article/energy-scatter/index.html +0 -47
- package/website/article/index.html +0 -40
- package/website/article/methane/index.html +0 -46
- package/website/article/moving-average/index.html +0 -64
- package/website/article/non-renewables/index.html +0 -52
- package/website/article/renewables-linked/index.html +0 -46
- package/website/article/scigen-1805.02474v1-10/index.html +0 -54
- package/website/article/shared/util.js +0 -15
- /package/website/article/{favicon.ico → src/lib/assets/image/favicon.ico} +0 -0
- /package/website/article/{dataset → static/dataset}/SciGen/1805.02474v1-10.json +0 -0
- /package/website/article/{dataset → static/dataset}/methane-emissions.json +0 -0
- /package/website/article/{dataset → static/dataset}/non-renewables.json +0 -0
- /package/website/article/{dataset → static/dataset}/renewable-new.json +0 -0
- /package/website/article/{dataset → static/dataset}/renewable.json +0 -0
- /package/website/article/{fluid → static/fluid}/1805.02474v1-10.fld +0 -0
- /package/website/article/{fluid → static/fluid}/bar-chart-line-chart.fld +0 -0
- /package/website/article/{fluid → static/fluid}/convolution/emboss.fld +0 -0
- /package/website/article/{fluid → static/fluid}/convolution/testImage.fld +0 -0
- /package/website/article/{fluid → static/fluid}/convolution.fld +0 -0
- /package/website/article/{fluid → static/fluid}/dataset/scigen/_1805_02474v1_10.fld +0 -0
- /package/website/article/{fluid → static/fluid}/energyscatter.fld +0 -0
- /package/website/article/{fluid → static/fluid}/methane.fld +0 -0
- /package/website/article/{fluid → static/fluid}/methane_data.fld +0 -0
- /package/website/article/{fluid → static/fluid}/moving-average.fld +0 -0
- /package/website/article/{fluid → static/fluid}/non-renewables.fld +0 -0
- /package/website/article/{fluid → static/fluid}/nonRenewables.fld +0 -0
- /package/website/article/{fluid → static/fluid}/renewables.fld +0 -0
- /package/website/article/{fluid → static/fluid}/scigen.fld +0 -0
- /package/website/article/{fluid → static/fluid}/util.fld +0 -0
|
@@ -0,0 +1,3972 @@
|
|
|
1
|
+
import * as $runtime from "../runtime.js";
|
|
2
|
+
import * as Bind from "../Bind/index.js";
|
|
3
|
+
import * as Control$dBind from "../Control.Bind/index.js";
|
|
4
|
+
import * as Control$dMonad$dExcept$dTrans from "../Control.Monad.Except.Trans/index.js";
|
|
5
|
+
import * as Data$dBitraversable from "../Data.Bitraversable/index.js";
|
|
6
|
+
import * as Data$dEither from "../Data.Either/index.js";
|
|
7
|
+
import * as Data$dEq from "../Data.Eq/index.js";
|
|
8
|
+
import * as Data$dFoldable from "../Data.Foldable/index.js";
|
|
9
|
+
import * as Data$dGeneric$dRep from "../Data.Generic.Rep/index.js";
|
|
10
|
+
import * as Data$dIdentity from "../Data.Identity/index.js";
|
|
11
|
+
import * as Data$dList from "../Data.List/index.js";
|
|
12
|
+
import * as Data$dList$dNonEmpty from "../Data.List.NonEmpty/index.js";
|
|
13
|
+
import * as Data$dList$dTypes from "../Data.List.Types/index.js";
|
|
14
|
+
import * as Data$dMaybe from "../Data.Maybe/index.js";
|
|
15
|
+
import * as Data$dNonEmpty from "../Data.NonEmpty/index.js";
|
|
16
|
+
import * as Data$dShow from "../Data.Show/index.js";
|
|
17
|
+
import * as Data$dShow$dGeneric from "../Data.Show.Generic/index.js";
|
|
18
|
+
import * as Data$dTuple from "../Data.Tuple/index.js";
|
|
19
|
+
import * as DataType from "../DataType/index.js";
|
|
20
|
+
import * as Dict from "../Dict/index.js";
|
|
21
|
+
import * as Effect$dException from "../Effect.Exception/index.js";
|
|
22
|
+
import * as Expr from "../Expr/index.js";
|
|
23
|
+
import * as Foreign$dObject from "../Foreign.Object/index.js";
|
|
24
|
+
import * as Util from "../Util/index.js";
|
|
25
|
+
import * as Util$dMap from "../Util.Map/index.js";
|
|
26
|
+
import * as Util$dPair from "../Util.Pair/index.js";
|
|
27
|
+
const $DictEntry = (tag, _1, _2) => ({tag, _1, _2});
|
|
28
|
+
const $Expr = (tag, _1, _2, _3, _4) => ({tag, _1, _2, _3, _4});
|
|
29
|
+
const $ListRest = (tag, _1, _2, _3) => ({tag, _1, _2, _3});
|
|
30
|
+
const $ListRestPattern = (tag, _1, _2) => ({tag, _1, _2});
|
|
31
|
+
const $Module = _1 => ({tag: "Module", _1});
|
|
32
|
+
const $ParagraphElem = (tag, _1) => ({tag, _1});
|
|
33
|
+
const $Pattern = (tag, _1, _2) => ({tag, _1, _2});
|
|
34
|
+
const $Qualifier = (tag, _1, _2) => ({tag, _1, _2});
|
|
35
|
+
const $VarDef = (_1, _2) => ({tag: "VarDef", _1, _2});
|
|
36
|
+
const genericShowArgsArgument = {genericShowArgs: v => [Data$dShow.showStringImpl(v)]};
|
|
37
|
+
const genericShowSum = /* #__PURE__ */ (() => {
|
|
38
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "PVar"});
|
|
39
|
+
return dictGenericShow1 => (
|
|
40
|
+
{
|
|
41
|
+
"genericShow'": v => {
|
|
42
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
43
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
44
|
+
$runtime.fail();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
})();
|
|
49
|
+
const PConstrIsSymbol = {reflectSymbol: () => "PConstr"};
|
|
50
|
+
const showTuple = dictShow1 => ({show: v => "(Tuple " + Data$dShow.showStringImpl(v._1) + " " + dictShow1.show(v._2) + ")"});
|
|
51
|
+
const PRecordIsSymbol = {reflectSymbol: () => "PRecord"};
|
|
52
|
+
const genericShowSum1 = /* #__PURE__ */ (() => {
|
|
53
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "PListEmpty"});
|
|
54
|
+
return dictGenericShow1 => (
|
|
55
|
+
{
|
|
56
|
+
"genericShow'": v => {
|
|
57
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
58
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
59
|
+
$runtime.fail();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
})();
|
|
64
|
+
const PListNonEmptyIsSymbol = {reflectSymbol: () => "PListNonEmpty"};
|
|
65
|
+
const genericShowSum2 = /* #__PURE__ */ (() => {
|
|
66
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "PListVar"});
|
|
67
|
+
return dictGenericShow1 => (
|
|
68
|
+
{
|
|
69
|
+
"genericShow'": v => {
|
|
70
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
71
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
72
|
+
$runtime.fail();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
})();
|
|
77
|
+
const genericShowSum3 = /* #__PURE__ */ (() => {
|
|
78
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsNoArguments)({reflectSymbol: () => "PListEnd"});
|
|
79
|
+
return dictGenericShow1 => (
|
|
80
|
+
{
|
|
81
|
+
"genericShow'": v => {
|
|
82
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
83
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
84
|
+
$runtime.fail();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
})();
|
|
89
|
+
const PListNextIsSymbol = {reflectSymbol: () => "PListNext"};
|
|
90
|
+
const VarDefIsSymbol = {reflectSymbol: () => "VarDef"};
|
|
91
|
+
const ListCompGuardIsSymbol = {reflectSymbol: () => "ListCompGuard"};
|
|
92
|
+
const ListCompGenIsSymbol = {reflectSymbol: () => "ListCompGen"};
|
|
93
|
+
const ListCompDeclIsSymbol = {reflectSymbol: () => "ListCompDecl"};
|
|
94
|
+
const genericShowSum4 = /* #__PURE__ */ (() => {
|
|
95
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Token"});
|
|
96
|
+
return dictGenericShow1 => (
|
|
97
|
+
{
|
|
98
|
+
"genericShow'": v => {
|
|
99
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
100
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
101
|
+
$runtime.fail();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
})();
|
|
106
|
+
const UnquoteIsSymbol = {reflectSymbol: () => "Unquote"};
|
|
107
|
+
const EndIsSymbol = {reflectSymbol: () => "End"};
|
|
108
|
+
const NextIsSymbol = {reflectSymbol: () => "Next"};
|
|
109
|
+
const genericShowSum5 = /* #__PURE__ */ (() => {
|
|
110
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Var"});
|
|
111
|
+
return dictGenericShow1 => (
|
|
112
|
+
{
|
|
113
|
+
"genericShow'": v => {
|
|
114
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
115
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
116
|
+
$runtime.fail();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
})();
|
|
121
|
+
const genericShowSum6 = /* #__PURE__ */ (() => {
|
|
122
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument)({reflectSymbol: () => "Op"});
|
|
123
|
+
return dictGenericShow1 => (
|
|
124
|
+
{
|
|
125
|
+
"genericShow'": v => {
|
|
126
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
127
|
+
if (v.tag === "Inr") { return dictGenericShow1["genericShow'"](v._1); }
|
|
128
|
+
$runtime.fail();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
})();
|
|
133
|
+
const genericShowArgsArgument1 = {genericShowArgs: v => [Data$dShow.showIntImpl(v)]};
|
|
134
|
+
const IntIsSymbol = {reflectSymbol: () => "Int"};
|
|
135
|
+
const genericShowArgsArgument2 = {genericShowArgs: v => [Data$dShow.showNumberImpl(v)]};
|
|
136
|
+
const FloatIsSymbol = {reflectSymbol: () => "Float"};
|
|
137
|
+
const StrIsSymbol = {reflectSymbol: () => "Str"};
|
|
138
|
+
const ConstrIsSymbol = {reflectSymbol: () => "Constr"};
|
|
139
|
+
const DictionaryIsSymbol = {reflectSymbol: () => "Dictionary"};
|
|
140
|
+
const genericShowArgsProduct1 = /* #__PURE__ */ Data$dShow$dGeneric.genericShowArgsProduct(/* #__PURE__ */ (() => {
|
|
141
|
+
const $0 = showTuple(Data$dShow.showString);
|
|
142
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
143
|
+
})());
|
|
144
|
+
const MatrixIsSymbol = {reflectSymbol: () => "Matrix"};
|
|
145
|
+
const LambdaIsSymbol = {reflectSymbol: () => "Lambda"};
|
|
146
|
+
const ProjectIsSymbol = {reflectSymbol: () => "Project"};
|
|
147
|
+
const DProjectIsSymbol = {reflectSymbol: () => "DProject"};
|
|
148
|
+
const AppIsSymbol = {reflectSymbol: () => "App"};
|
|
149
|
+
const BinaryAppIsSymbol = {reflectSymbol: () => "BinaryApp"};
|
|
150
|
+
const UnaryPrefixAppIsSymbol = {reflectSymbol: () => "UnaryPrefixApp"};
|
|
151
|
+
const MatchAsIsSymbol = {reflectSymbol: () => "MatchAs"};
|
|
152
|
+
const IfElseIsSymbol = {reflectSymbol: () => "IfElse"};
|
|
153
|
+
const ParagraphIsSymbol = {reflectSymbol: () => "Paragraph"};
|
|
154
|
+
const ListEmptyIsSymbol = {reflectSymbol: () => "ListEmpty"};
|
|
155
|
+
const ListNonEmptyIsSymbol = {reflectSymbol: () => "ListNonEmpty"};
|
|
156
|
+
const ListEnumIsSymbol = {reflectSymbol: () => "ListEnum"};
|
|
157
|
+
const ListCompIsSymbol = {reflectSymbol: () => "ListComp"};
|
|
158
|
+
const LetIsSymbol = {reflectSymbol: () => "Let"};
|
|
159
|
+
const LetRecIsSymbol = {reflectSymbol: () => "LetRec"};
|
|
160
|
+
const DocExprIsSymbol = {reflectSymbol: () => "DocExpr"};
|
|
161
|
+
const ExprKeyIsSymbol = {reflectSymbol: () => "ExprKey"};
|
|
162
|
+
const VarKeyIsSymbol = {reflectSymbol: () => "VarKey"};
|
|
163
|
+
const ClausesIsSymbol = {reflectSymbol: () => "Clauses"};
|
|
164
|
+
const ClauseIsSymbol = {reflectSymbol: () => "Clause"};
|
|
165
|
+
const difference = /* #__PURE__ */ Data$dList.difference(Data$dEq.eqString);
|
|
166
|
+
const toUnfoldable = x => {
|
|
167
|
+
const go = (m$p, z$p) => {
|
|
168
|
+
if (m$p.tag === "Leaf") { return z$p; }
|
|
169
|
+
if (m$p.tag === "Node") { return go(m$p._5, Data$dList$dTypes.$List("Cons", m$p._3, go(m$p._6, z$p))); }
|
|
170
|
+
$runtime.fail();
|
|
171
|
+
};
|
|
172
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
173
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
174
|
+
while (go$1$c) {
|
|
175
|
+
const source = go$1$a0, memo = go$1$a1;
|
|
176
|
+
if (source.tag === "Nil") {
|
|
177
|
+
const go$2 = go$2$a0$copy => go$2$a1$copy => {
|
|
178
|
+
let go$2$a0 = go$2$a0$copy, go$2$a1 = go$2$a1$copy, go$2$c = true, go$2$r;
|
|
179
|
+
while (go$2$c) {
|
|
180
|
+
const b = go$2$a0, v = go$2$a1;
|
|
181
|
+
if (v.tag === "Nil") {
|
|
182
|
+
go$2$c = false;
|
|
183
|
+
go$2$r = b;
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
if (v.tag === "Cons") {
|
|
187
|
+
go$2$a0 = Data$dList$dTypes.$List("Cons", v._1, b);
|
|
188
|
+
go$2$a1 = v._2;
|
|
189
|
+
continue;
|
|
190
|
+
}
|
|
191
|
+
$runtime.fail();
|
|
192
|
+
}
|
|
193
|
+
return go$2$r;
|
|
194
|
+
};
|
|
195
|
+
go$1$c = false;
|
|
196
|
+
go$1$r = go$2(Data$dList$dTypes.Nil)(memo);
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (source.tag === "Cons") {
|
|
200
|
+
go$1$a0 = source._2;
|
|
201
|
+
go$1$a1 = Data$dList$dTypes.$List("Cons", source._1, memo);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
$runtime.fail();
|
|
205
|
+
}
|
|
206
|
+
return go$1$r;
|
|
207
|
+
};
|
|
208
|
+
return go$1(go(x, Data$dList$dTypes.Nil))(Data$dList$dTypes.Nil);
|
|
209
|
+
};
|
|
210
|
+
const monadThrowExceptT = /* #__PURE__ */ Control$dMonad$dExcept$dTrans.monadThrowExceptT(Data$dIdentity.monadIdentity);
|
|
211
|
+
const fromFoldable = /* #__PURE__ */ Foreign$dObject.fromFoldable(Data$dFoldable.foldableArray);
|
|
212
|
+
const fromFoldable1 = /* #__PURE__ */ Foreign$dObject.fromFoldable(Data$dList$dTypes.foldableNonEmptyList);
|
|
213
|
+
const fromFoldable2 = /* #__PURE__ */ Foreign$dObject.fromFoldable(Data$dList$dTypes.foldableList);
|
|
214
|
+
const monadErrorExceptT = /* #__PURE__ */ Control$dMonad$dExcept$dTrans.monadErrorExceptT(Data$dIdentity.monadIdentity);
|
|
215
|
+
const PListVar = value0 => $ListRestPattern("PListVar", value0);
|
|
216
|
+
const PListEnd = /* #__PURE__ */ $ListRestPattern("PListEnd");
|
|
217
|
+
const PListNext = value0 => value1 => $ListRestPattern("PListNext", value0, value1);
|
|
218
|
+
const PVar = value0 => $Pattern("PVar", value0);
|
|
219
|
+
const PConstr = value0 => value1 => $Pattern("PConstr", value0, value1);
|
|
220
|
+
const PRecord = value0 => $Pattern("PRecord", value0);
|
|
221
|
+
const PListEmpty = /* #__PURE__ */ $Pattern("PListEmpty");
|
|
222
|
+
const PListNonEmpty = value0 => value1 => $Pattern("PListNonEmpty", value0, value1);
|
|
223
|
+
const Clause = x => x;
|
|
224
|
+
const Var = value0 => $Expr("Var", value0);
|
|
225
|
+
const Op = value0 => $Expr("Op", value0);
|
|
226
|
+
const Int = value0 => value1 => $Expr("Int", value0, value1);
|
|
227
|
+
const Float = value0 => value1 => $Expr("Float", value0, value1);
|
|
228
|
+
const Str = value0 => value1 => $Expr("Str", value0, value1);
|
|
229
|
+
const Constr = value0 => value1 => value2 => $Expr("Constr", value0, value1, value2);
|
|
230
|
+
const Dictionary = value0 => value1 => $Expr("Dictionary", value0, value1);
|
|
231
|
+
const Matrix = value0 => value1 => value2 => value3 => $Expr("Matrix", value0, value1, value2, value3);
|
|
232
|
+
const Lambda = value0 => $Expr("Lambda", value0);
|
|
233
|
+
const Project = value0 => value1 => $Expr("Project", value0, value1);
|
|
234
|
+
const DProject = value0 => value1 => $Expr("DProject", value0, value1);
|
|
235
|
+
const App = value0 => value1 => $Expr("App", value0, value1);
|
|
236
|
+
const BinaryApp = value0 => value1 => value2 => $Expr("BinaryApp", value0, value1, value2);
|
|
237
|
+
const UnaryPrefixApp = value0 => value1 => $Expr("UnaryPrefixApp", value0, value1);
|
|
238
|
+
const MatchAs = value0 => value1 => $Expr("MatchAs", value0, value1);
|
|
239
|
+
const IfElse = value0 => value1 => $Expr("IfElse", value0, value1);
|
|
240
|
+
const Paragraph = value0 => $Expr("Paragraph", value0);
|
|
241
|
+
const ListEmpty = value0 => $Expr("ListEmpty", value0);
|
|
242
|
+
const ListNonEmpty = value0 => value1 => value2 => $Expr("ListNonEmpty", value0, value1, value2);
|
|
243
|
+
const ListEnum = value0 => value1 => $Expr("ListEnum", value0, value1);
|
|
244
|
+
const ListComp = value0 => value1 => value2 => $Expr("ListComp", value0, value1, value2);
|
|
245
|
+
const Let = value0 => value1 => $Expr("Let", value0, value1);
|
|
246
|
+
const LetRec = value0 => value1 => $Expr("LetRec", value0, value1);
|
|
247
|
+
const DocExpr = value0 => value1 => $Expr("DocExpr", value0, value1);
|
|
248
|
+
const ExprKey = value0 => $DictEntry("ExprKey", value0);
|
|
249
|
+
const VarKey = value0 => value1 => $DictEntry("VarKey", value0, value1);
|
|
250
|
+
const Clauses = x => x;
|
|
251
|
+
const Token = value0 => $ParagraphElem("Token", value0);
|
|
252
|
+
const Unquote = value0 => $ParagraphElem("Unquote", value0);
|
|
253
|
+
const End = value0 => $ListRest("End", value0);
|
|
254
|
+
const Next = value0 => value1 => value2 => $ListRest("Next", value0, value1, value2);
|
|
255
|
+
const ListCompGuard = value0 => $Qualifier("ListCompGuard", value0);
|
|
256
|
+
const ListCompGen = value0 => value1 => $Qualifier("ListCompGen", value0, value1);
|
|
257
|
+
const ListCompDecl = value0 => $Qualifier("ListCompDecl", value0);
|
|
258
|
+
const VarDef = value0 => value1 => $VarDef(value0, value1);
|
|
259
|
+
const RecDef = x => x;
|
|
260
|
+
const Module = value0 => $Module(value0);
|
|
261
|
+
const newtypeRecDef_ = {Coercible0: () => {}};
|
|
262
|
+
const newtypeClauses_ = {Coercible0: () => {}};
|
|
263
|
+
const newtypeClause_ = {Coercible0: () => {}};
|
|
264
|
+
const joinSemilatticeExpr = dictJoinSemilattice => ({join: v => Effect$dException.throwException(Effect$dException.error("unimplemented"))()});
|
|
265
|
+
const genericVarDef_ = {to: x => $VarDef(x._1, x._2), from: x => Data$dGeneric$dRep.$Product(x._1, x._2)};
|
|
266
|
+
const genericQualifier_ = {
|
|
267
|
+
to: x => {
|
|
268
|
+
if (x.tag === "Inl") { return $Qualifier("ListCompGuard", x._1); }
|
|
269
|
+
if (x.tag === "Inr") {
|
|
270
|
+
if (x._1.tag === "Inl") { return $Qualifier("ListCompGen", x._1._1._1, x._1._1._2); }
|
|
271
|
+
if (x._1.tag === "Inr") { return $Qualifier("ListCompDecl", x._1._1); }
|
|
272
|
+
}
|
|
273
|
+
$runtime.fail();
|
|
274
|
+
},
|
|
275
|
+
from: x => {
|
|
276
|
+
if (x.tag === "ListCompGuard") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
277
|
+
if (x.tag === "ListCompGen") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))); }
|
|
278
|
+
if (x.tag === "ListCompDecl") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", x._1)); }
|
|
279
|
+
$runtime.fail();
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const genericPattern_ = {
|
|
283
|
+
to: x => {
|
|
284
|
+
if (x.tag === "Inl") { return $Pattern("PVar", x._1); }
|
|
285
|
+
if (x.tag === "Inr") {
|
|
286
|
+
if (x._1.tag === "Inl") { return $Pattern("PConstr", x._1._1._1, x._1._1._2); }
|
|
287
|
+
if (x._1.tag === "Inr") {
|
|
288
|
+
if (x._1._1.tag === "Inl") { return $Pattern("PRecord", x._1._1._1); }
|
|
289
|
+
if (x._1._1.tag === "Inr") {
|
|
290
|
+
if (x._1._1._1.tag === "Inl") { return PListEmpty; }
|
|
291
|
+
if (x._1._1._1.tag === "Inr") { return $Pattern("PListNonEmpty", x._1._1._1._1._1, x._1._1._1._1._2); }
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
$runtime.fail();
|
|
296
|
+
},
|
|
297
|
+
from: x => {
|
|
298
|
+
if (x.tag === "PVar") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
299
|
+
if (x.tag === "PConstr") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))); }
|
|
300
|
+
if (x.tag === "PRecord") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))); }
|
|
301
|
+
if (x.tag === "PListEmpty") {
|
|
302
|
+
return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))));
|
|
303
|
+
}
|
|
304
|
+
if (x.tag === "PListNonEmpty") {
|
|
305
|
+
return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(x._1, x._2)))));
|
|
306
|
+
}
|
|
307
|
+
$runtime.fail();
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const genericParagraphElem_ = {
|
|
311
|
+
to: x => {
|
|
312
|
+
if (x.tag === "Inl") { return $ParagraphElem("Token", x._1); }
|
|
313
|
+
if (x.tag === "Inr") { return $ParagraphElem("Unquote", x._1); }
|
|
314
|
+
$runtime.fail();
|
|
315
|
+
},
|
|
316
|
+
from: x => {
|
|
317
|
+
if (x.tag === "Token") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
318
|
+
if (x.tag === "Unquote") { return Data$dGeneric$dRep.$Sum("Inr", x._1); }
|
|
319
|
+
$runtime.fail();
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
const genericListRest_ = {
|
|
323
|
+
to: x => {
|
|
324
|
+
if (x.tag === "Inl") { return $ListRest("End", x._1); }
|
|
325
|
+
if (x.tag === "Inr") { return $ListRest("Next", x._1._1, x._1._2._1, x._1._2._2); }
|
|
326
|
+
$runtime.fail();
|
|
327
|
+
},
|
|
328
|
+
from: x => {
|
|
329
|
+
if (x.tag === "End") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
330
|
+
if (x.tag === "Next") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, x._3))); }
|
|
331
|
+
$runtime.fail();
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const genericListRestPattern_ = {
|
|
335
|
+
to: x => {
|
|
336
|
+
if (x.tag === "Inl") { return $ListRestPattern("PListVar", x._1); }
|
|
337
|
+
if (x.tag === "Inr") {
|
|
338
|
+
if (x._1.tag === "Inl") { return PListEnd; }
|
|
339
|
+
if (x._1.tag === "Inr") { return $ListRestPattern("PListNext", x._1._1._1, x._1._1._2); }
|
|
340
|
+
}
|
|
341
|
+
$runtime.fail();
|
|
342
|
+
},
|
|
343
|
+
from: x => {
|
|
344
|
+
if (x.tag === "PListVar") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
345
|
+
if (x.tag === "PListEnd") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)); }
|
|
346
|
+
if (x.tag === "PListNext") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(x._1, x._2))); }
|
|
347
|
+
$runtime.fail();
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
const showPattern1 = {
|
|
351
|
+
show: c => genericShowSum((() => {
|
|
352
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
353
|
+
const $0 = Data$dList$dTypes.showList(showPattern1);
|
|
354
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
355
|
+
})()))(PConstrIsSymbol);
|
|
356
|
+
const $1 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
357
|
+
const $1 = Data$dList$dTypes.showList(showTuple(showPattern1));
|
|
358
|
+
return {genericShowArgs: v => [$1.show(v)]};
|
|
359
|
+
})())(PRecordIsSymbol);
|
|
360
|
+
const $2 = genericShowSum1(Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct({genericShowArgs: v => [showPattern1.show(v)]})({
|
|
361
|
+
genericShowArgs: v => [showListRestPattern.show(v)]
|
|
362
|
+
}))(PListNonEmptyIsSymbol));
|
|
363
|
+
return {
|
|
364
|
+
"genericShow'": v => {
|
|
365
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
366
|
+
if (v.tag === "Inr") {
|
|
367
|
+
if (v._1.tag === "Inl") { return $1["genericShow'"](v._1._1); }
|
|
368
|
+
if (v._1.tag === "Inr") { return $2["genericShow'"](v._1._1); }
|
|
369
|
+
}
|
|
370
|
+
$runtime.fail();
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
})())["genericShow'"]((() => {
|
|
374
|
+
if (c.tag === "PVar") { return Data$dGeneric$dRep.$Sum("Inl", c._1); }
|
|
375
|
+
if (c.tag === "PConstr") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(c._1, c._2))); }
|
|
376
|
+
if (c.tag === "PRecord") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", c._1))); }
|
|
377
|
+
if (c.tag === "PListEmpty") {
|
|
378
|
+
return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments))));
|
|
379
|
+
}
|
|
380
|
+
if (c.tag === "PListNonEmpty") {
|
|
381
|
+
return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(c._1, c._2)))));
|
|
382
|
+
}
|
|
383
|
+
$runtime.fail();
|
|
384
|
+
})())
|
|
385
|
+
};
|
|
386
|
+
const showListRestPattern = {
|
|
387
|
+
show: c => genericShowSum2(genericShowSum3(Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct({genericShowArgs: v => [showPattern1.show(v)]})({
|
|
388
|
+
genericShowArgs: v => [showListRestPattern.show(v)]
|
|
389
|
+
}))(PListNextIsSymbol)))["genericShow'"]((() => {
|
|
390
|
+
if (c.tag === "PListVar") { return Data$dGeneric$dRep.$Sum("Inl", c._1); }
|
|
391
|
+
if (c.tag === "PListEnd") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.NoArguments)); }
|
|
392
|
+
if (c.tag === "PListNext") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(c._1, c._2))); }
|
|
393
|
+
$runtime.fail();
|
|
394
|
+
})())
|
|
395
|
+
};
|
|
396
|
+
const showTuple1 = dictShow1 => ({show: v => "(Tuple " + showPattern1.show(v._1) + " " + dictShow1.show(v._2) + ")"});
|
|
397
|
+
const showTuple2 = /* #__PURE__ */ (() => {
|
|
398
|
+
const $0 = Data$dList$dTypes.showNonEmptyList(showPattern1);
|
|
399
|
+
return dictShow1 => ({show: v => "(Tuple " + $0.show(v._1) + " " + dictShow1.show(v._2) + ")"});
|
|
400
|
+
})();
|
|
401
|
+
const genericExpr_ = {
|
|
402
|
+
to: x => {
|
|
403
|
+
if (x.tag === "Inl") { return $Expr("Var", x._1); }
|
|
404
|
+
if (x.tag === "Inr") {
|
|
405
|
+
if (x._1.tag === "Inl") { return $Expr("Op", x._1._1); }
|
|
406
|
+
if (x._1.tag === "Inr") {
|
|
407
|
+
if (x._1._1.tag === "Inl") { return $Expr("Int", x._1._1._1._1, x._1._1._1._2); }
|
|
408
|
+
if (x._1._1.tag === "Inr") {
|
|
409
|
+
if (x._1._1._1.tag === "Inl") { return $Expr("Float", x._1._1._1._1._1, x._1._1._1._1._2); }
|
|
410
|
+
if (x._1._1._1.tag === "Inr") {
|
|
411
|
+
if (x._1._1._1._1.tag === "Inl") { return $Expr("Str", x._1._1._1._1._1._1, x._1._1._1._1._1._2); }
|
|
412
|
+
if (x._1._1._1._1.tag === "Inr") {
|
|
413
|
+
if (x._1._1._1._1._1.tag === "Inl") { return $Expr("Constr", x._1._1._1._1._1._1._1, x._1._1._1._1._1._1._2._1, x._1._1._1._1._1._1._2._2); }
|
|
414
|
+
if (x._1._1._1._1._1.tag === "Inr") {
|
|
415
|
+
if (x._1._1._1._1._1._1.tag === "Inl") { return $Expr("Dictionary", x._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._2); }
|
|
416
|
+
if (x._1._1._1._1._1._1.tag === "Inr") {
|
|
417
|
+
if (x._1._1._1._1._1._1._1.tag === "Inl") {
|
|
418
|
+
return $Expr("Matrix", x._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._2._1, x._1._1._1._1._1._1._1._1._2._2._1, x._1._1._1._1._1._1._1._1._2._2._2);
|
|
419
|
+
}
|
|
420
|
+
if (x._1._1._1._1._1._1._1.tag === "Inr") {
|
|
421
|
+
if (x._1._1._1._1._1._1._1._1.tag === "Inl") { return $Expr("Lambda", x._1._1._1._1._1._1._1._1._1); }
|
|
422
|
+
if (x._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
423
|
+
if (x._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $Expr("Project", x._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._2); }
|
|
424
|
+
if (x._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
425
|
+
if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
426
|
+
return $Expr("DProject", x._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
427
|
+
}
|
|
428
|
+
if (x._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
429
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
430
|
+
return $Expr("App", x._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
431
|
+
}
|
|
432
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
433
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
434
|
+
return $Expr(
|
|
435
|
+
"BinaryApp",
|
|
436
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
437
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
438
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
439
|
+
);
|
|
440
|
+
}
|
|
441
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
442
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
443
|
+
return $Expr("UnaryPrefixApp", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
444
|
+
}
|
|
445
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
446
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
447
|
+
return $Expr("MatchAs", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
448
|
+
}
|
|
449
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
450
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
451
|
+
return $Expr("IfElse", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1, x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2);
|
|
452
|
+
}
|
|
453
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
454
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
455
|
+
return $Expr("Paragraph", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
456
|
+
}
|
|
457
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
458
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
459
|
+
return $Expr("ListEmpty", x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
460
|
+
}
|
|
461
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
462
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
463
|
+
return $Expr(
|
|
464
|
+
"ListNonEmpty",
|
|
465
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
466
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
467
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
471
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
472
|
+
return $Expr(
|
|
473
|
+
"ListEnum",
|
|
474
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
475
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
479
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
480
|
+
return $Expr(
|
|
481
|
+
"ListComp",
|
|
482
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
483
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._1,
|
|
484
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2._2
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
488
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
489
|
+
return $Expr(
|
|
490
|
+
"Let",
|
|
491
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
492
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
496
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
497
|
+
return $Expr(
|
|
498
|
+
"LetRec",
|
|
499
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
500
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
if (x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
504
|
+
return $Expr(
|
|
505
|
+
"DocExpr",
|
|
506
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1,
|
|
507
|
+
x._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._2
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
$runtime.fail();
|
|
533
|
+
},
|
|
534
|
+
from: x => {
|
|
535
|
+
if (x.tag === "Var") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
536
|
+
if (x.tag === "Op") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)); }
|
|
537
|
+
if (x.tag === "Int") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2)))); }
|
|
538
|
+
if (x.tag === "Float") {
|
|
539
|
+
return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2)))));
|
|
540
|
+
}
|
|
541
|
+
if (x.tag === "Str") {
|
|
542
|
+
return Data$dGeneric$dRep.$Sum(
|
|
543
|
+
"Inr",
|
|
544
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2)))))
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
if (x.tag === "Constr") {
|
|
548
|
+
return Data$dGeneric$dRep.$Sum(
|
|
549
|
+
"Inr",
|
|
550
|
+
Data$dGeneric$dRep.$Sum(
|
|
551
|
+
"Inr",
|
|
552
|
+
Data$dGeneric$dRep.$Sum(
|
|
553
|
+
"Inr",
|
|
554
|
+
Data$dGeneric$dRep.$Sum(
|
|
555
|
+
"Inr",
|
|
556
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, x._3))))
|
|
557
|
+
)
|
|
558
|
+
)
|
|
559
|
+
)
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
if (x.tag === "Dictionary") {
|
|
563
|
+
return Data$dGeneric$dRep.$Sum(
|
|
564
|
+
"Inr",
|
|
565
|
+
Data$dGeneric$dRep.$Sum(
|
|
566
|
+
"Inr",
|
|
567
|
+
Data$dGeneric$dRep.$Sum(
|
|
568
|
+
"Inr",
|
|
569
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2)))))
|
|
570
|
+
)
|
|
571
|
+
)
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
if (x.tag === "Matrix") {
|
|
575
|
+
return Data$dGeneric$dRep.$Sum(
|
|
576
|
+
"Inr",
|
|
577
|
+
Data$dGeneric$dRep.$Sum(
|
|
578
|
+
"Inr",
|
|
579
|
+
Data$dGeneric$dRep.$Sum(
|
|
580
|
+
"Inr",
|
|
581
|
+
Data$dGeneric$dRep.$Sum(
|
|
582
|
+
"Inr",
|
|
583
|
+
Data$dGeneric$dRep.$Sum(
|
|
584
|
+
"Inr",
|
|
585
|
+
Data$dGeneric$dRep.$Sum(
|
|
586
|
+
"Inr",
|
|
587
|
+
Data$dGeneric$dRep.$Sum(
|
|
588
|
+
"Inr",
|
|
589
|
+
Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, Data$dGeneric$dRep.$Product(x._3, x._4))))
|
|
590
|
+
)
|
|
591
|
+
)
|
|
592
|
+
)
|
|
593
|
+
)
|
|
594
|
+
)
|
|
595
|
+
)
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
if (x.tag === "Lambda") {
|
|
599
|
+
return Data$dGeneric$dRep.$Sum(
|
|
600
|
+
"Inr",
|
|
601
|
+
Data$dGeneric$dRep.$Sum(
|
|
602
|
+
"Inr",
|
|
603
|
+
Data$dGeneric$dRep.$Sum(
|
|
604
|
+
"Inr",
|
|
605
|
+
Data$dGeneric$dRep.$Sum(
|
|
606
|
+
"Inr",
|
|
607
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1)))))
|
|
608
|
+
)
|
|
609
|
+
)
|
|
610
|
+
)
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
if (x.tag === "Project") {
|
|
614
|
+
return Data$dGeneric$dRep.$Sum(
|
|
615
|
+
"Inr",
|
|
616
|
+
Data$dGeneric$dRep.$Sum(
|
|
617
|
+
"Inr",
|
|
618
|
+
Data$dGeneric$dRep.$Sum(
|
|
619
|
+
"Inr",
|
|
620
|
+
Data$dGeneric$dRep.$Sum(
|
|
621
|
+
"Inr",
|
|
622
|
+
Data$dGeneric$dRep.$Sum(
|
|
623
|
+
"Inr",
|
|
624
|
+
Data$dGeneric$dRep.$Sum(
|
|
625
|
+
"Inr",
|
|
626
|
+
Data$dGeneric$dRep.$Sum(
|
|
627
|
+
"Inr",
|
|
628
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
629
|
+
)
|
|
630
|
+
)
|
|
631
|
+
)
|
|
632
|
+
)
|
|
633
|
+
)
|
|
634
|
+
)
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
if (x.tag === "DProject") {
|
|
638
|
+
return Data$dGeneric$dRep.$Sum(
|
|
639
|
+
"Inr",
|
|
640
|
+
Data$dGeneric$dRep.$Sum(
|
|
641
|
+
"Inr",
|
|
642
|
+
Data$dGeneric$dRep.$Sum(
|
|
643
|
+
"Inr",
|
|
644
|
+
Data$dGeneric$dRep.$Sum(
|
|
645
|
+
"Inr",
|
|
646
|
+
Data$dGeneric$dRep.$Sum(
|
|
647
|
+
"Inr",
|
|
648
|
+
Data$dGeneric$dRep.$Sum(
|
|
649
|
+
"Inr",
|
|
650
|
+
Data$dGeneric$dRep.$Sum(
|
|
651
|
+
"Inr",
|
|
652
|
+
Data$dGeneric$dRep.$Sum(
|
|
653
|
+
"Inr",
|
|
654
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
655
|
+
)
|
|
656
|
+
)
|
|
657
|
+
)
|
|
658
|
+
)
|
|
659
|
+
)
|
|
660
|
+
)
|
|
661
|
+
)
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
if (x.tag === "App") {
|
|
665
|
+
return Data$dGeneric$dRep.$Sum(
|
|
666
|
+
"Inr",
|
|
667
|
+
Data$dGeneric$dRep.$Sum(
|
|
668
|
+
"Inr",
|
|
669
|
+
Data$dGeneric$dRep.$Sum(
|
|
670
|
+
"Inr",
|
|
671
|
+
Data$dGeneric$dRep.$Sum(
|
|
672
|
+
"Inr",
|
|
673
|
+
Data$dGeneric$dRep.$Sum(
|
|
674
|
+
"Inr",
|
|
675
|
+
Data$dGeneric$dRep.$Sum(
|
|
676
|
+
"Inr",
|
|
677
|
+
Data$dGeneric$dRep.$Sum(
|
|
678
|
+
"Inr",
|
|
679
|
+
Data$dGeneric$dRep.$Sum(
|
|
680
|
+
"Inr",
|
|
681
|
+
Data$dGeneric$dRep.$Sum(
|
|
682
|
+
"Inr",
|
|
683
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
684
|
+
)
|
|
685
|
+
)
|
|
686
|
+
)
|
|
687
|
+
)
|
|
688
|
+
)
|
|
689
|
+
)
|
|
690
|
+
)
|
|
691
|
+
)
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
if (x.tag === "BinaryApp") {
|
|
695
|
+
return Data$dGeneric$dRep.$Sum(
|
|
696
|
+
"Inr",
|
|
697
|
+
Data$dGeneric$dRep.$Sum(
|
|
698
|
+
"Inr",
|
|
699
|
+
Data$dGeneric$dRep.$Sum(
|
|
700
|
+
"Inr",
|
|
701
|
+
Data$dGeneric$dRep.$Sum(
|
|
702
|
+
"Inr",
|
|
703
|
+
Data$dGeneric$dRep.$Sum(
|
|
704
|
+
"Inr",
|
|
705
|
+
Data$dGeneric$dRep.$Sum(
|
|
706
|
+
"Inr",
|
|
707
|
+
Data$dGeneric$dRep.$Sum(
|
|
708
|
+
"Inr",
|
|
709
|
+
Data$dGeneric$dRep.$Sum(
|
|
710
|
+
"Inr",
|
|
711
|
+
Data$dGeneric$dRep.$Sum(
|
|
712
|
+
"Inr",
|
|
713
|
+
Data$dGeneric$dRep.$Sum(
|
|
714
|
+
"Inr",
|
|
715
|
+
Data$dGeneric$dRep.$Sum(
|
|
716
|
+
"Inr",
|
|
717
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, x._3))))
|
|
718
|
+
)
|
|
719
|
+
)
|
|
720
|
+
)
|
|
721
|
+
)
|
|
722
|
+
)
|
|
723
|
+
)
|
|
724
|
+
)
|
|
725
|
+
)
|
|
726
|
+
)
|
|
727
|
+
)
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
if (x.tag === "UnaryPrefixApp") {
|
|
731
|
+
return Data$dGeneric$dRep.$Sum(
|
|
732
|
+
"Inr",
|
|
733
|
+
Data$dGeneric$dRep.$Sum(
|
|
734
|
+
"Inr",
|
|
735
|
+
Data$dGeneric$dRep.$Sum(
|
|
736
|
+
"Inr",
|
|
737
|
+
Data$dGeneric$dRep.$Sum(
|
|
738
|
+
"Inr",
|
|
739
|
+
Data$dGeneric$dRep.$Sum(
|
|
740
|
+
"Inr",
|
|
741
|
+
Data$dGeneric$dRep.$Sum(
|
|
742
|
+
"Inr",
|
|
743
|
+
Data$dGeneric$dRep.$Sum(
|
|
744
|
+
"Inr",
|
|
745
|
+
Data$dGeneric$dRep.$Sum(
|
|
746
|
+
"Inr",
|
|
747
|
+
Data$dGeneric$dRep.$Sum(
|
|
748
|
+
"Inr",
|
|
749
|
+
Data$dGeneric$dRep.$Sum(
|
|
750
|
+
"Inr",
|
|
751
|
+
Data$dGeneric$dRep.$Sum(
|
|
752
|
+
"Inr",
|
|
753
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
754
|
+
)
|
|
755
|
+
)
|
|
756
|
+
)
|
|
757
|
+
)
|
|
758
|
+
)
|
|
759
|
+
)
|
|
760
|
+
)
|
|
761
|
+
)
|
|
762
|
+
)
|
|
763
|
+
)
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
if (x.tag === "MatchAs") {
|
|
767
|
+
return Data$dGeneric$dRep.$Sum(
|
|
768
|
+
"Inr",
|
|
769
|
+
Data$dGeneric$dRep.$Sum(
|
|
770
|
+
"Inr",
|
|
771
|
+
Data$dGeneric$dRep.$Sum(
|
|
772
|
+
"Inr",
|
|
773
|
+
Data$dGeneric$dRep.$Sum(
|
|
774
|
+
"Inr",
|
|
775
|
+
Data$dGeneric$dRep.$Sum(
|
|
776
|
+
"Inr",
|
|
777
|
+
Data$dGeneric$dRep.$Sum(
|
|
778
|
+
"Inr",
|
|
779
|
+
Data$dGeneric$dRep.$Sum(
|
|
780
|
+
"Inr",
|
|
781
|
+
Data$dGeneric$dRep.$Sum(
|
|
782
|
+
"Inr",
|
|
783
|
+
Data$dGeneric$dRep.$Sum(
|
|
784
|
+
"Inr",
|
|
785
|
+
Data$dGeneric$dRep.$Sum(
|
|
786
|
+
"Inr",
|
|
787
|
+
Data$dGeneric$dRep.$Sum(
|
|
788
|
+
"Inr",
|
|
789
|
+
Data$dGeneric$dRep.$Sum(
|
|
790
|
+
"Inr",
|
|
791
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
792
|
+
)
|
|
793
|
+
)
|
|
794
|
+
)
|
|
795
|
+
)
|
|
796
|
+
)
|
|
797
|
+
)
|
|
798
|
+
)
|
|
799
|
+
)
|
|
800
|
+
)
|
|
801
|
+
)
|
|
802
|
+
)
|
|
803
|
+
);
|
|
804
|
+
}
|
|
805
|
+
if (x.tag === "IfElse") {
|
|
806
|
+
return Data$dGeneric$dRep.$Sum(
|
|
807
|
+
"Inr",
|
|
808
|
+
Data$dGeneric$dRep.$Sum(
|
|
809
|
+
"Inr",
|
|
810
|
+
Data$dGeneric$dRep.$Sum(
|
|
811
|
+
"Inr",
|
|
812
|
+
Data$dGeneric$dRep.$Sum(
|
|
813
|
+
"Inr",
|
|
814
|
+
Data$dGeneric$dRep.$Sum(
|
|
815
|
+
"Inr",
|
|
816
|
+
Data$dGeneric$dRep.$Sum(
|
|
817
|
+
"Inr",
|
|
818
|
+
Data$dGeneric$dRep.$Sum(
|
|
819
|
+
"Inr",
|
|
820
|
+
Data$dGeneric$dRep.$Sum(
|
|
821
|
+
"Inr",
|
|
822
|
+
Data$dGeneric$dRep.$Sum(
|
|
823
|
+
"Inr",
|
|
824
|
+
Data$dGeneric$dRep.$Sum(
|
|
825
|
+
"Inr",
|
|
826
|
+
Data$dGeneric$dRep.$Sum(
|
|
827
|
+
"Inr",
|
|
828
|
+
Data$dGeneric$dRep.$Sum(
|
|
829
|
+
"Inr",
|
|
830
|
+
Data$dGeneric$dRep.$Sum(
|
|
831
|
+
"Inr",
|
|
832
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
833
|
+
)
|
|
834
|
+
)
|
|
835
|
+
)
|
|
836
|
+
)
|
|
837
|
+
)
|
|
838
|
+
)
|
|
839
|
+
)
|
|
840
|
+
)
|
|
841
|
+
)
|
|
842
|
+
)
|
|
843
|
+
)
|
|
844
|
+
)
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
if (x.tag === "Paragraph") {
|
|
848
|
+
return Data$dGeneric$dRep.$Sum(
|
|
849
|
+
"Inr",
|
|
850
|
+
Data$dGeneric$dRep.$Sum(
|
|
851
|
+
"Inr",
|
|
852
|
+
Data$dGeneric$dRep.$Sum(
|
|
853
|
+
"Inr",
|
|
854
|
+
Data$dGeneric$dRep.$Sum(
|
|
855
|
+
"Inr",
|
|
856
|
+
Data$dGeneric$dRep.$Sum(
|
|
857
|
+
"Inr",
|
|
858
|
+
Data$dGeneric$dRep.$Sum(
|
|
859
|
+
"Inr",
|
|
860
|
+
Data$dGeneric$dRep.$Sum(
|
|
861
|
+
"Inr",
|
|
862
|
+
Data$dGeneric$dRep.$Sum(
|
|
863
|
+
"Inr",
|
|
864
|
+
Data$dGeneric$dRep.$Sum(
|
|
865
|
+
"Inr",
|
|
866
|
+
Data$dGeneric$dRep.$Sum(
|
|
867
|
+
"Inr",
|
|
868
|
+
Data$dGeneric$dRep.$Sum(
|
|
869
|
+
"Inr",
|
|
870
|
+
Data$dGeneric$dRep.$Sum(
|
|
871
|
+
"Inr",
|
|
872
|
+
Data$dGeneric$dRep.$Sum(
|
|
873
|
+
"Inr",
|
|
874
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))))
|
|
875
|
+
)
|
|
876
|
+
)
|
|
877
|
+
)
|
|
878
|
+
)
|
|
879
|
+
)
|
|
880
|
+
)
|
|
881
|
+
)
|
|
882
|
+
)
|
|
883
|
+
)
|
|
884
|
+
)
|
|
885
|
+
)
|
|
886
|
+
)
|
|
887
|
+
);
|
|
888
|
+
}
|
|
889
|
+
if (x.tag === "ListEmpty") {
|
|
890
|
+
return Data$dGeneric$dRep.$Sum(
|
|
891
|
+
"Inr",
|
|
892
|
+
Data$dGeneric$dRep.$Sum(
|
|
893
|
+
"Inr",
|
|
894
|
+
Data$dGeneric$dRep.$Sum(
|
|
895
|
+
"Inr",
|
|
896
|
+
Data$dGeneric$dRep.$Sum(
|
|
897
|
+
"Inr",
|
|
898
|
+
Data$dGeneric$dRep.$Sum(
|
|
899
|
+
"Inr",
|
|
900
|
+
Data$dGeneric$dRep.$Sum(
|
|
901
|
+
"Inr",
|
|
902
|
+
Data$dGeneric$dRep.$Sum(
|
|
903
|
+
"Inr",
|
|
904
|
+
Data$dGeneric$dRep.$Sum(
|
|
905
|
+
"Inr",
|
|
906
|
+
Data$dGeneric$dRep.$Sum(
|
|
907
|
+
"Inr",
|
|
908
|
+
Data$dGeneric$dRep.$Sum(
|
|
909
|
+
"Inr",
|
|
910
|
+
Data$dGeneric$dRep.$Sum(
|
|
911
|
+
"Inr",
|
|
912
|
+
Data$dGeneric$dRep.$Sum(
|
|
913
|
+
"Inr",
|
|
914
|
+
Data$dGeneric$dRep.$Sum(
|
|
915
|
+
"Inr",
|
|
916
|
+
Data$dGeneric$dRep.$Sum(
|
|
917
|
+
"Inr",
|
|
918
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", x._1))))
|
|
919
|
+
)
|
|
920
|
+
)
|
|
921
|
+
)
|
|
922
|
+
)
|
|
923
|
+
)
|
|
924
|
+
)
|
|
925
|
+
)
|
|
926
|
+
)
|
|
927
|
+
)
|
|
928
|
+
)
|
|
929
|
+
)
|
|
930
|
+
)
|
|
931
|
+
)
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
if (x.tag === "ListNonEmpty") {
|
|
935
|
+
return Data$dGeneric$dRep.$Sum(
|
|
936
|
+
"Inr",
|
|
937
|
+
Data$dGeneric$dRep.$Sum(
|
|
938
|
+
"Inr",
|
|
939
|
+
Data$dGeneric$dRep.$Sum(
|
|
940
|
+
"Inr",
|
|
941
|
+
Data$dGeneric$dRep.$Sum(
|
|
942
|
+
"Inr",
|
|
943
|
+
Data$dGeneric$dRep.$Sum(
|
|
944
|
+
"Inr",
|
|
945
|
+
Data$dGeneric$dRep.$Sum(
|
|
946
|
+
"Inr",
|
|
947
|
+
Data$dGeneric$dRep.$Sum(
|
|
948
|
+
"Inr",
|
|
949
|
+
Data$dGeneric$dRep.$Sum(
|
|
950
|
+
"Inr",
|
|
951
|
+
Data$dGeneric$dRep.$Sum(
|
|
952
|
+
"Inr",
|
|
953
|
+
Data$dGeneric$dRep.$Sum(
|
|
954
|
+
"Inr",
|
|
955
|
+
Data$dGeneric$dRep.$Sum(
|
|
956
|
+
"Inr",
|
|
957
|
+
Data$dGeneric$dRep.$Sum(
|
|
958
|
+
"Inr",
|
|
959
|
+
Data$dGeneric$dRep.$Sum(
|
|
960
|
+
"Inr",
|
|
961
|
+
Data$dGeneric$dRep.$Sum(
|
|
962
|
+
"Inr",
|
|
963
|
+
Data$dGeneric$dRep.$Sum(
|
|
964
|
+
"Inr",
|
|
965
|
+
Data$dGeneric$dRep.$Sum(
|
|
966
|
+
"Inr",
|
|
967
|
+
Data$dGeneric$dRep.$Sum(
|
|
968
|
+
"Inr",
|
|
969
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, x._3))))
|
|
970
|
+
)
|
|
971
|
+
)
|
|
972
|
+
)
|
|
973
|
+
)
|
|
974
|
+
)
|
|
975
|
+
)
|
|
976
|
+
)
|
|
977
|
+
)
|
|
978
|
+
)
|
|
979
|
+
)
|
|
980
|
+
)
|
|
981
|
+
)
|
|
982
|
+
)
|
|
983
|
+
)
|
|
984
|
+
)
|
|
985
|
+
)
|
|
986
|
+
);
|
|
987
|
+
}
|
|
988
|
+
if (x.tag === "ListEnum") {
|
|
989
|
+
return Data$dGeneric$dRep.$Sum(
|
|
990
|
+
"Inr",
|
|
991
|
+
Data$dGeneric$dRep.$Sum(
|
|
992
|
+
"Inr",
|
|
993
|
+
Data$dGeneric$dRep.$Sum(
|
|
994
|
+
"Inr",
|
|
995
|
+
Data$dGeneric$dRep.$Sum(
|
|
996
|
+
"Inr",
|
|
997
|
+
Data$dGeneric$dRep.$Sum(
|
|
998
|
+
"Inr",
|
|
999
|
+
Data$dGeneric$dRep.$Sum(
|
|
1000
|
+
"Inr",
|
|
1001
|
+
Data$dGeneric$dRep.$Sum(
|
|
1002
|
+
"Inr",
|
|
1003
|
+
Data$dGeneric$dRep.$Sum(
|
|
1004
|
+
"Inr",
|
|
1005
|
+
Data$dGeneric$dRep.$Sum(
|
|
1006
|
+
"Inr",
|
|
1007
|
+
Data$dGeneric$dRep.$Sum(
|
|
1008
|
+
"Inr",
|
|
1009
|
+
Data$dGeneric$dRep.$Sum(
|
|
1010
|
+
"Inr",
|
|
1011
|
+
Data$dGeneric$dRep.$Sum(
|
|
1012
|
+
"Inr",
|
|
1013
|
+
Data$dGeneric$dRep.$Sum(
|
|
1014
|
+
"Inr",
|
|
1015
|
+
Data$dGeneric$dRep.$Sum(
|
|
1016
|
+
"Inr",
|
|
1017
|
+
Data$dGeneric$dRep.$Sum(
|
|
1018
|
+
"Inr",
|
|
1019
|
+
Data$dGeneric$dRep.$Sum(
|
|
1020
|
+
"Inr",
|
|
1021
|
+
Data$dGeneric$dRep.$Sum(
|
|
1022
|
+
"Inr",
|
|
1023
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
1024
|
+
)
|
|
1025
|
+
)
|
|
1026
|
+
)
|
|
1027
|
+
)
|
|
1028
|
+
)
|
|
1029
|
+
)
|
|
1030
|
+
)
|
|
1031
|
+
)
|
|
1032
|
+
)
|
|
1033
|
+
)
|
|
1034
|
+
)
|
|
1035
|
+
)
|
|
1036
|
+
)
|
|
1037
|
+
)
|
|
1038
|
+
)
|
|
1039
|
+
)
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
1042
|
+
if (x.tag === "ListComp") {
|
|
1043
|
+
return Data$dGeneric$dRep.$Sum(
|
|
1044
|
+
"Inr",
|
|
1045
|
+
Data$dGeneric$dRep.$Sum(
|
|
1046
|
+
"Inr",
|
|
1047
|
+
Data$dGeneric$dRep.$Sum(
|
|
1048
|
+
"Inr",
|
|
1049
|
+
Data$dGeneric$dRep.$Sum(
|
|
1050
|
+
"Inr",
|
|
1051
|
+
Data$dGeneric$dRep.$Sum(
|
|
1052
|
+
"Inr",
|
|
1053
|
+
Data$dGeneric$dRep.$Sum(
|
|
1054
|
+
"Inr",
|
|
1055
|
+
Data$dGeneric$dRep.$Sum(
|
|
1056
|
+
"Inr",
|
|
1057
|
+
Data$dGeneric$dRep.$Sum(
|
|
1058
|
+
"Inr",
|
|
1059
|
+
Data$dGeneric$dRep.$Sum(
|
|
1060
|
+
"Inr",
|
|
1061
|
+
Data$dGeneric$dRep.$Sum(
|
|
1062
|
+
"Inr",
|
|
1063
|
+
Data$dGeneric$dRep.$Sum(
|
|
1064
|
+
"Inr",
|
|
1065
|
+
Data$dGeneric$dRep.$Sum(
|
|
1066
|
+
"Inr",
|
|
1067
|
+
Data$dGeneric$dRep.$Sum(
|
|
1068
|
+
"Inr",
|
|
1069
|
+
Data$dGeneric$dRep.$Sum(
|
|
1070
|
+
"Inr",
|
|
1071
|
+
Data$dGeneric$dRep.$Sum(
|
|
1072
|
+
"Inr",
|
|
1073
|
+
Data$dGeneric$dRep.$Sum(
|
|
1074
|
+
"Inr",
|
|
1075
|
+
Data$dGeneric$dRep.$Sum(
|
|
1076
|
+
"Inr",
|
|
1077
|
+
Data$dGeneric$dRep.$Sum(
|
|
1078
|
+
"Inr",
|
|
1079
|
+
Data$dGeneric$dRep.$Sum(
|
|
1080
|
+
"Inr",
|
|
1081
|
+
Data$dGeneric$dRep.$Sum(
|
|
1082
|
+
"Inr",
|
|
1083
|
+
Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, Data$dGeneric$dRep.$Product(x._2, x._3)))
|
|
1084
|
+
)
|
|
1085
|
+
)
|
|
1086
|
+
)
|
|
1087
|
+
)
|
|
1088
|
+
)
|
|
1089
|
+
)
|
|
1090
|
+
)
|
|
1091
|
+
)
|
|
1092
|
+
)
|
|
1093
|
+
)
|
|
1094
|
+
)
|
|
1095
|
+
)
|
|
1096
|
+
)
|
|
1097
|
+
)
|
|
1098
|
+
)
|
|
1099
|
+
)
|
|
1100
|
+
)
|
|
1101
|
+
)
|
|
1102
|
+
)
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
if (x.tag === "Let") {
|
|
1106
|
+
return Data$dGeneric$dRep.$Sum(
|
|
1107
|
+
"Inr",
|
|
1108
|
+
Data$dGeneric$dRep.$Sum(
|
|
1109
|
+
"Inr",
|
|
1110
|
+
Data$dGeneric$dRep.$Sum(
|
|
1111
|
+
"Inr",
|
|
1112
|
+
Data$dGeneric$dRep.$Sum(
|
|
1113
|
+
"Inr",
|
|
1114
|
+
Data$dGeneric$dRep.$Sum(
|
|
1115
|
+
"Inr",
|
|
1116
|
+
Data$dGeneric$dRep.$Sum(
|
|
1117
|
+
"Inr",
|
|
1118
|
+
Data$dGeneric$dRep.$Sum(
|
|
1119
|
+
"Inr",
|
|
1120
|
+
Data$dGeneric$dRep.$Sum(
|
|
1121
|
+
"Inr",
|
|
1122
|
+
Data$dGeneric$dRep.$Sum(
|
|
1123
|
+
"Inr",
|
|
1124
|
+
Data$dGeneric$dRep.$Sum(
|
|
1125
|
+
"Inr",
|
|
1126
|
+
Data$dGeneric$dRep.$Sum(
|
|
1127
|
+
"Inr",
|
|
1128
|
+
Data$dGeneric$dRep.$Sum(
|
|
1129
|
+
"Inr",
|
|
1130
|
+
Data$dGeneric$dRep.$Sum(
|
|
1131
|
+
"Inr",
|
|
1132
|
+
Data$dGeneric$dRep.$Sum(
|
|
1133
|
+
"Inr",
|
|
1134
|
+
Data$dGeneric$dRep.$Sum(
|
|
1135
|
+
"Inr",
|
|
1136
|
+
Data$dGeneric$dRep.$Sum(
|
|
1137
|
+
"Inr",
|
|
1138
|
+
Data$dGeneric$dRep.$Sum(
|
|
1139
|
+
"Inr",
|
|
1140
|
+
Data$dGeneric$dRep.$Sum(
|
|
1141
|
+
"Inr",
|
|
1142
|
+
Data$dGeneric$dRep.$Sum(
|
|
1143
|
+
"Inr",
|
|
1144
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2))))
|
|
1145
|
+
)
|
|
1146
|
+
)
|
|
1147
|
+
)
|
|
1148
|
+
)
|
|
1149
|
+
)
|
|
1150
|
+
)
|
|
1151
|
+
)
|
|
1152
|
+
)
|
|
1153
|
+
)
|
|
1154
|
+
)
|
|
1155
|
+
)
|
|
1156
|
+
)
|
|
1157
|
+
)
|
|
1158
|
+
)
|
|
1159
|
+
)
|
|
1160
|
+
)
|
|
1161
|
+
)
|
|
1162
|
+
)
|
|
1163
|
+
);
|
|
1164
|
+
}
|
|
1165
|
+
if (x.tag === "LetRec") {
|
|
1166
|
+
return Data$dGeneric$dRep.$Sum(
|
|
1167
|
+
"Inr",
|
|
1168
|
+
Data$dGeneric$dRep.$Sum(
|
|
1169
|
+
"Inr",
|
|
1170
|
+
Data$dGeneric$dRep.$Sum(
|
|
1171
|
+
"Inr",
|
|
1172
|
+
Data$dGeneric$dRep.$Sum(
|
|
1173
|
+
"Inr",
|
|
1174
|
+
Data$dGeneric$dRep.$Sum(
|
|
1175
|
+
"Inr",
|
|
1176
|
+
Data$dGeneric$dRep.$Sum(
|
|
1177
|
+
"Inr",
|
|
1178
|
+
Data$dGeneric$dRep.$Sum(
|
|
1179
|
+
"Inr",
|
|
1180
|
+
Data$dGeneric$dRep.$Sum(
|
|
1181
|
+
"Inr",
|
|
1182
|
+
Data$dGeneric$dRep.$Sum(
|
|
1183
|
+
"Inr",
|
|
1184
|
+
Data$dGeneric$dRep.$Sum(
|
|
1185
|
+
"Inr",
|
|
1186
|
+
Data$dGeneric$dRep.$Sum(
|
|
1187
|
+
"Inr",
|
|
1188
|
+
Data$dGeneric$dRep.$Sum(
|
|
1189
|
+
"Inr",
|
|
1190
|
+
Data$dGeneric$dRep.$Sum(
|
|
1191
|
+
"Inr",
|
|
1192
|
+
Data$dGeneric$dRep.$Sum(
|
|
1193
|
+
"Inr",
|
|
1194
|
+
Data$dGeneric$dRep.$Sum(
|
|
1195
|
+
"Inr",
|
|
1196
|
+
Data$dGeneric$dRep.$Sum(
|
|
1197
|
+
"Inr",
|
|
1198
|
+
Data$dGeneric$dRep.$Sum(
|
|
1199
|
+
"Inr",
|
|
1200
|
+
Data$dGeneric$dRep.$Sum(
|
|
1201
|
+
"Inr",
|
|
1202
|
+
Data$dGeneric$dRep.$Sum(
|
|
1203
|
+
"Inr",
|
|
1204
|
+
Data$dGeneric$dRep.$Sum(
|
|
1205
|
+
"Inr",
|
|
1206
|
+
Data$dGeneric$dRep.$Sum(
|
|
1207
|
+
"Inr",
|
|
1208
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inl", Data$dGeneric$dRep.$Product(x._1, x._2)))
|
|
1209
|
+
)
|
|
1210
|
+
)
|
|
1211
|
+
)
|
|
1212
|
+
)
|
|
1213
|
+
)
|
|
1214
|
+
)
|
|
1215
|
+
)
|
|
1216
|
+
)
|
|
1217
|
+
)
|
|
1218
|
+
)
|
|
1219
|
+
)
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
)
|
|
1223
|
+
)
|
|
1224
|
+
)
|
|
1225
|
+
)
|
|
1226
|
+
)
|
|
1227
|
+
)
|
|
1228
|
+
)
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
if (x.tag === "DocExpr") {
|
|
1232
|
+
return Data$dGeneric$dRep.$Sum(
|
|
1233
|
+
"Inr",
|
|
1234
|
+
Data$dGeneric$dRep.$Sum(
|
|
1235
|
+
"Inr",
|
|
1236
|
+
Data$dGeneric$dRep.$Sum(
|
|
1237
|
+
"Inr",
|
|
1238
|
+
Data$dGeneric$dRep.$Sum(
|
|
1239
|
+
"Inr",
|
|
1240
|
+
Data$dGeneric$dRep.$Sum(
|
|
1241
|
+
"Inr",
|
|
1242
|
+
Data$dGeneric$dRep.$Sum(
|
|
1243
|
+
"Inr",
|
|
1244
|
+
Data$dGeneric$dRep.$Sum(
|
|
1245
|
+
"Inr",
|
|
1246
|
+
Data$dGeneric$dRep.$Sum(
|
|
1247
|
+
"Inr",
|
|
1248
|
+
Data$dGeneric$dRep.$Sum(
|
|
1249
|
+
"Inr",
|
|
1250
|
+
Data$dGeneric$dRep.$Sum(
|
|
1251
|
+
"Inr",
|
|
1252
|
+
Data$dGeneric$dRep.$Sum(
|
|
1253
|
+
"Inr",
|
|
1254
|
+
Data$dGeneric$dRep.$Sum(
|
|
1255
|
+
"Inr",
|
|
1256
|
+
Data$dGeneric$dRep.$Sum(
|
|
1257
|
+
"Inr",
|
|
1258
|
+
Data$dGeneric$dRep.$Sum(
|
|
1259
|
+
"Inr",
|
|
1260
|
+
Data$dGeneric$dRep.$Sum(
|
|
1261
|
+
"Inr",
|
|
1262
|
+
Data$dGeneric$dRep.$Sum(
|
|
1263
|
+
"Inr",
|
|
1264
|
+
Data$dGeneric$dRep.$Sum(
|
|
1265
|
+
"Inr",
|
|
1266
|
+
Data$dGeneric$dRep.$Sum(
|
|
1267
|
+
"Inr",
|
|
1268
|
+
Data$dGeneric$dRep.$Sum(
|
|
1269
|
+
"Inr",
|
|
1270
|
+
Data$dGeneric$dRep.$Sum(
|
|
1271
|
+
"Inr",
|
|
1272
|
+
Data$dGeneric$dRep.$Sum(
|
|
1273
|
+
"Inr",
|
|
1274
|
+
Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(x._1, x._2)))
|
|
1275
|
+
)
|
|
1276
|
+
)
|
|
1277
|
+
)
|
|
1278
|
+
)
|
|
1279
|
+
)
|
|
1280
|
+
)
|
|
1281
|
+
)
|
|
1282
|
+
)
|
|
1283
|
+
)
|
|
1284
|
+
)
|
|
1285
|
+
)
|
|
1286
|
+
)
|
|
1287
|
+
)
|
|
1288
|
+
)
|
|
1289
|
+
)
|
|
1290
|
+
)
|
|
1291
|
+
)
|
|
1292
|
+
)
|
|
1293
|
+
)
|
|
1294
|
+
)
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
$runtime.fail();
|
|
1298
|
+
}
|
|
1299
|
+
};
|
|
1300
|
+
const genericDictEntry_ = {
|
|
1301
|
+
to: x => {
|
|
1302
|
+
if (x.tag === "Inl") { return $DictEntry("ExprKey", x._1); }
|
|
1303
|
+
if (x.tag === "Inr") { return $DictEntry("VarKey", x._1._1, x._1._2); }
|
|
1304
|
+
$runtime.fail();
|
|
1305
|
+
},
|
|
1306
|
+
from: x => {
|
|
1307
|
+
if (x.tag === "ExprKey") { return Data$dGeneric$dRep.$Sum("Inl", x._1); }
|
|
1308
|
+
if (x.tag === "VarKey") { return Data$dGeneric$dRep.$Sum("Inr", Data$dGeneric$dRep.$Product(x._1, x._2)); }
|
|
1309
|
+
$runtime.fail();
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
const genericClauses_ = {to: x => x, from: x => x};
|
|
1313
|
+
const genericClause_ = {to: x => x, from: x => x};
|
|
1314
|
+
const showVarDef = dictShow => (
|
|
1315
|
+
{
|
|
1316
|
+
show: c => Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct({genericShowArgs: v => [showPattern1.show(v)]})((() => {
|
|
1317
|
+
const $0 = showExpr(dictShow);
|
|
1318
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1319
|
+
})()))(VarDefIsSymbol)["genericShow'"](Data$dGeneric$dRep.$Product(c._1, c._2))
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
const showQualifier = dictShow => (
|
|
1323
|
+
{
|
|
1324
|
+
show: c => {
|
|
1325
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1326
|
+
const $0 = showExpr(dictShow);
|
|
1327
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1328
|
+
})())(ListCompGuardIsSymbol);
|
|
1329
|
+
const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct({genericShowArgs: v => [showPattern1.show(v)]})((() => {
|
|
1330
|
+
const $1 = showExpr(dictShow);
|
|
1331
|
+
return {genericShowArgs: v => [$1.show(v)]};
|
|
1332
|
+
})()))(ListCompGenIsSymbol);
|
|
1333
|
+
const $2 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1334
|
+
const $2 = showVarDef(dictShow);
|
|
1335
|
+
return {genericShowArgs: v => [$2.show(v)]};
|
|
1336
|
+
})())(ListCompDeclIsSymbol);
|
|
1337
|
+
if (c.tag === "ListCompGuard") { return $0["genericShow'"](c._1); }
|
|
1338
|
+
if (c.tag === "ListCompGen") { return $1["genericShow'"](Data$dGeneric$dRep.$Product(c._1, c._2)); }
|
|
1339
|
+
if (c.tag === "ListCompDecl") { return $2["genericShow'"](c._1); }
|
|
1340
|
+
$runtime.fail();
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
);
|
|
1344
|
+
const showParagraphElem = dictShow => (
|
|
1345
|
+
{
|
|
1346
|
+
show: c => genericShowSum4(Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1347
|
+
const $0 = showExpr(dictShow);
|
|
1348
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1349
|
+
})())(UnquoteIsSymbol))["genericShow'"]((() => {
|
|
1350
|
+
if (c.tag === "Token") { return Data$dGeneric$dRep.$Sum("Inl", c._1); }
|
|
1351
|
+
if (c.tag === "Unquote") { return Data$dGeneric$dRep.$Sum("Inr", c._1); }
|
|
1352
|
+
$runtime.fail();
|
|
1353
|
+
})())
|
|
1354
|
+
}
|
|
1355
|
+
);
|
|
1356
|
+
const showListRest = dictShow => {
|
|
1357
|
+
const genericShowArgsArgument3 = {genericShowArgs: v => [dictShow.show(v)]};
|
|
1358
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument3)(EndIsSymbol);
|
|
1359
|
+
return {
|
|
1360
|
+
show: c => {
|
|
1361
|
+
const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1362
|
+
const $1 = showExpr(dictShow);
|
|
1363
|
+
return {genericShowArgs: v => [$1.show(v)]};
|
|
1364
|
+
})())((() => {
|
|
1365
|
+
const $1 = showListRest(dictShow);
|
|
1366
|
+
return {genericShowArgs: v => [$1.show(v)]};
|
|
1367
|
+
})())))(NextIsSymbol);
|
|
1368
|
+
if (c.tag === "End") { return $0["genericShow'"](c._1); }
|
|
1369
|
+
if (c.tag === "Next") { return $1["genericShow'"](Data$dGeneric$dRep.$Product(c._1, Data$dGeneric$dRep.$Product(c._2, c._3))); }
|
|
1370
|
+
$runtime.fail();
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
const showExpr = dictShow => {
|
|
1375
|
+
const genericShowArgsArgument3 = {genericShowArgs: v => [dictShow.show(v)]};
|
|
1376
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument1))(IntIsSymbol);
|
|
1377
|
+
const $1 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument2))(FloatIsSymbol);
|
|
1378
|
+
const $2 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(genericShowArgsArgument))(StrIsSymbol);
|
|
1379
|
+
const $3 = Data$dShow$dGeneric.genericShowConstructor(genericShowArgsArgument3)(ListEmptyIsSymbol);
|
|
1380
|
+
return {
|
|
1381
|
+
show: c => genericShowSum5(genericShowSum6((() => {
|
|
1382
|
+
const $4 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
1383
|
+
const $4 = Data$dList$dTypes.showList(showExpr(dictShow));
|
|
1384
|
+
return {genericShowArgs: v => [$4.show(v)]};
|
|
1385
|
+
})())))(ConstrIsSymbol);
|
|
1386
|
+
const $5 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)((() => {
|
|
1387
|
+
const $5 = Data$dList$dTypes.showList((() => {
|
|
1388
|
+
const $5 = showDictEntry(dictShow);
|
|
1389
|
+
const $6 = showExpr(dictShow);
|
|
1390
|
+
return {show: v => "(Tuple " + $5.show(v._1) + " " + $6.show(v._2) + ")"};
|
|
1391
|
+
})());
|
|
1392
|
+
return {genericShowArgs: v => [$5.show(v)]};
|
|
1393
|
+
})()))(DictionaryIsSymbol);
|
|
1394
|
+
const $6 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1395
|
+
const $6 = showExpr(dictShow);
|
|
1396
|
+
return {genericShowArgs: v => [$6.show(v)]};
|
|
1397
|
+
})())(genericShowArgsProduct1((() => {
|
|
1398
|
+
const $6 = showExpr(dictShow);
|
|
1399
|
+
return {genericShowArgs: v => [$6.show(v)]};
|
|
1400
|
+
})()))))(MatrixIsSymbol);
|
|
1401
|
+
const $7 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1402
|
+
const $7 = showClauses(dictShow);
|
|
1403
|
+
return {genericShowArgs: v => [$7.show(v)]};
|
|
1404
|
+
})())(LambdaIsSymbol);
|
|
1405
|
+
const $8 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1406
|
+
const $8 = showExpr(dictShow);
|
|
1407
|
+
return {genericShowArgs: v => [$8.show(v)]};
|
|
1408
|
+
})())(genericShowArgsArgument))(ProjectIsSymbol);
|
|
1409
|
+
const $9 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1410
|
+
const $9 = showExpr(dictShow);
|
|
1411
|
+
return {genericShowArgs: v => [$9.show(v)]};
|
|
1412
|
+
})())((() => {
|
|
1413
|
+
const $9 = showExpr(dictShow);
|
|
1414
|
+
return {genericShowArgs: v => [$9.show(v)]};
|
|
1415
|
+
})()))(DProjectIsSymbol);
|
|
1416
|
+
const $10 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1417
|
+
const $10 = showExpr(dictShow);
|
|
1418
|
+
return {genericShowArgs: v => [$10.show(v)]};
|
|
1419
|
+
})())((() => {
|
|
1420
|
+
const $10 = showExpr(dictShow);
|
|
1421
|
+
return {genericShowArgs: v => [$10.show(v)]};
|
|
1422
|
+
})()))(AppIsSymbol);
|
|
1423
|
+
const $11 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1424
|
+
const $11 = showExpr(dictShow);
|
|
1425
|
+
return {genericShowArgs: v => [$11.show(v)]};
|
|
1426
|
+
})())(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
1427
|
+
const $11 = showExpr(dictShow);
|
|
1428
|
+
return {genericShowArgs: v => [$11.show(v)]};
|
|
1429
|
+
})())))(BinaryAppIsSymbol);
|
|
1430
|
+
const $12 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument)((() => {
|
|
1431
|
+
const $12 = showExpr(dictShow);
|
|
1432
|
+
return {genericShowArgs: v => [$12.show(v)]};
|
|
1433
|
+
})()))(UnaryPrefixAppIsSymbol);
|
|
1434
|
+
const $13 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1435
|
+
const $13 = showExpr(dictShow);
|
|
1436
|
+
return {genericShowArgs: v => [$13.show(v)]};
|
|
1437
|
+
})())((() => {
|
|
1438
|
+
const $13 = Data$dList$dTypes.showNonEmptyList(showTuple1(showExpr(dictShow)));
|
|
1439
|
+
return {genericShowArgs: v => [$13.show(v)]};
|
|
1440
|
+
})()))(MatchAsIsSymbol);
|
|
1441
|
+
const $14 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1442
|
+
const $14 = Data$dList$dTypes.showNonEmptyList((() => {
|
|
1443
|
+
const $14 = showExpr(dictShow);
|
|
1444
|
+
const $15 = showExpr(dictShow);
|
|
1445
|
+
return {show: v => "(Tuple " + $14.show(v._1) + " " + $15.show(v._2) + ")"};
|
|
1446
|
+
})());
|
|
1447
|
+
return {genericShowArgs: v => [$14.show(v)]};
|
|
1448
|
+
})())((() => {
|
|
1449
|
+
const $14 = showExpr(dictShow);
|
|
1450
|
+
return {genericShowArgs: v => [$14.show(v)]};
|
|
1451
|
+
})()))(IfElseIsSymbol);
|
|
1452
|
+
const $15 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1453
|
+
const $15 = Data$dList$dTypes.showList(showParagraphElem(dictShow));
|
|
1454
|
+
return {genericShowArgs: v => [$15.show(v)]};
|
|
1455
|
+
})())(ParagraphIsSymbol);
|
|
1456
|
+
const $16 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1457
|
+
const $16 = showExpr(dictShow);
|
|
1458
|
+
return {genericShowArgs: v => [$16.show(v)]};
|
|
1459
|
+
})())((() => {
|
|
1460
|
+
const $16 = showListRest(dictShow);
|
|
1461
|
+
return {genericShowArgs: v => [$16.show(v)]};
|
|
1462
|
+
})())))(ListNonEmptyIsSymbol);
|
|
1463
|
+
const $17 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1464
|
+
const $17 = showExpr(dictShow);
|
|
1465
|
+
return {genericShowArgs: v => [$17.show(v)]};
|
|
1466
|
+
})())((() => {
|
|
1467
|
+
const $17 = showExpr(dictShow);
|
|
1468
|
+
return {genericShowArgs: v => [$17.show(v)]};
|
|
1469
|
+
})()))(ListEnumIsSymbol);
|
|
1470
|
+
const $18 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct(genericShowArgsArgument3)(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1471
|
+
const $18 = showExpr(dictShow);
|
|
1472
|
+
return {genericShowArgs: v => [$18.show(v)]};
|
|
1473
|
+
})())((() => {
|
|
1474
|
+
const $18 = Data$dList$dTypes.showList(showQualifier(dictShow));
|
|
1475
|
+
return {genericShowArgs: v => [$18.show(v)]};
|
|
1476
|
+
})())))(ListCompIsSymbol);
|
|
1477
|
+
const $19 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1478
|
+
const $19 = Data$dList$dTypes.showNonEmptyList(showVarDef(dictShow));
|
|
1479
|
+
return {genericShowArgs: v => [$19.show(v)]};
|
|
1480
|
+
})())((() => {
|
|
1481
|
+
const $19 = showExpr(dictShow);
|
|
1482
|
+
return {genericShowArgs: v => [$19.show(v)]};
|
|
1483
|
+
})()))(LetIsSymbol);
|
|
1484
|
+
const $20 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1485
|
+
const $20 = Data$dList$dTypes.showNonEmptyList(showTuple(showClause(dictShow)));
|
|
1486
|
+
return {genericShowArgs: v => [$20.show(v)]};
|
|
1487
|
+
})())((() => {
|
|
1488
|
+
const $20 = showExpr(dictShow);
|
|
1489
|
+
return {genericShowArgs: v => [$20.show(v)]};
|
|
1490
|
+
})()))(LetRecIsSymbol);
|
|
1491
|
+
const $21 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct((() => {
|
|
1492
|
+
const $21 = showExpr(dictShow);
|
|
1493
|
+
return {genericShowArgs: v => [$21.show(v)]};
|
|
1494
|
+
})())((() => {
|
|
1495
|
+
const $21 = showExpr(dictShow);
|
|
1496
|
+
return {genericShowArgs: v => [$21.show(v)]};
|
|
1497
|
+
})()))(DocExprIsSymbol);
|
|
1498
|
+
return {
|
|
1499
|
+
"genericShow'": v => {
|
|
1500
|
+
if (v.tag === "Inl") { return $0["genericShow'"](v._1); }
|
|
1501
|
+
if (v.tag === "Inr") {
|
|
1502
|
+
if (v._1.tag === "Inl") { return $1["genericShow'"](v._1._1); }
|
|
1503
|
+
if (v._1.tag === "Inr") {
|
|
1504
|
+
if (v._1._1.tag === "Inl") { return $2["genericShow'"](v._1._1._1); }
|
|
1505
|
+
if (v._1._1.tag === "Inr") {
|
|
1506
|
+
if (v._1._1._1.tag === "Inl") { return $4["genericShow'"](v._1._1._1._1); }
|
|
1507
|
+
if (v._1._1._1.tag === "Inr") {
|
|
1508
|
+
if (v._1._1._1._1.tag === "Inl") { return $5["genericShow'"](v._1._1._1._1._1); }
|
|
1509
|
+
if (v._1._1._1._1.tag === "Inr") {
|
|
1510
|
+
if (v._1._1._1._1._1.tag === "Inl") { return $6["genericShow'"](v._1._1._1._1._1._1); }
|
|
1511
|
+
if (v._1._1._1._1._1.tag === "Inr") {
|
|
1512
|
+
if (v._1._1._1._1._1._1.tag === "Inl") { return $7["genericShow'"](v._1._1._1._1._1._1._1); }
|
|
1513
|
+
if (v._1._1._1._1._1._1.tag === "Inr") {
|
|
1514
|
+
if (v._1._1._1._1._1._1._1.tag === "Inl") { return $8["genericShow'"](v._1._1._1._1._1._1._1._1); }
|
|
1515
|
+
if (v._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1516
|
+
if (v._1._1._1._1._1._1._1._1.tag === "Inl") { return $9["genericShow'"](v._1._1._1._1._1._1._1._1._1); }
|
|
1517
|
+
if (v._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1518
|
+
if (v._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $10["genericShow'"](v._1._1._1._1._1._1._1._1._1._1); }
|
|
1519
|
+
if (v._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1520
|
+
if (v._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $11["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1); }
|
|
1521
|
+
if (v._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1522
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $12["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1); }
|
|
1523
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1524
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $13["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1); }
|
|
1525
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1526
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $14["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
|
|
1527
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1528
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") { return $15["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1); }
|
|
1529
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1530
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1531
|
+
return $3["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1532
|
+
}
|
|
1533
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1534
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1535
|
+
return $16["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1536
|
+
}
|
|
1537
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1538
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1539
|
+
return $17["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1540
|
+
}
|
|
1541
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1542
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1543
|
+
return $18["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1544
|
+
}
|
|
1545
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1546
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1547
|
+
return $19["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1548
|
+
}
|
|
1549
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1550
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inl") {
|
|
1551
|
+
return $20["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1552
|
+
}
|
|
1553
|
+
if (v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1.tag === "Inr") {
|
|
1554
|
+
return $21["genericShow'"](v._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1._1);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
$runtime.fail();
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1579
|
+
})()))["genericShow'"](genericExpr_.from(c))
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
const showDictEntry = dictShow => {
|
|
1583
|
+
const genericShowConstructor2 = Data$dShow$dGeneric.genericShowConstructor(Data$dShow$dGeneric.genericShowArgsProduct({genericShowArgs: v => [dictShow.show(v)]})(genericShowArgsArgument))(VarKeyIsSymbol);
|
|
1584
|
+
return {
|
|
1585
|
+
show: c => {
|
|
1586
|
+
const $0 = Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1587
|
+
const $0 = showExpr(dictShow);
|
|
1588
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1589
|
+
})())(ExprKeyIsSymbol);
|
|
1590
|
+
if (c.tag === "ExprKey") { return $0["genericShow'"](c._1); }
|
|
1591
|
+
if (c.tag === "VarKey") { return genericShowConstructor2["genericShow'"](Data$dGeneric$dRep.$Product(c._1, c._2)); }
|
|
1592
|
+
$runtime.fail();
|
|
1593
|
+
}
|
|
1594
|
+
};
|
|
1595
|
+
};
|
|
1596
|
+
const showClauses = dictShow => (
|
|
1597
|
+
{
|
|
1598
|
+
show: c => Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1599
|
+
const $0 = Data$dList$dTypes.showNonEmptyList(showClause(dictShow));
|
|
1600
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1601
|
+
})())(ClausesIsSymbol)["genericShow'"](c)
|
|
1602
|
+
}
|
|
1603
|
+
);
|
|
1604
|
+
const showClause = dictShow => (
|
|
1605
|
+
{
|
|
1606
|
+
show: c => Data$dShow$dGeneric.genericShowConstructor((() => {
|
|
1607
|
+
const $0 = showTuple2(showExpr(dictShow));
|
|
1608
|
+
return {genericShowArgs: v => [$0.show(v)]};
|
|
1609
|
+
})())(ClauseIsSymbol)["genericShow'"](c)
|
|
1610
|
+
}
|
|
1611
|
+
);
|
|
1612
|
+
const functorVarDef = {map: f => m => $VarDef(m._1, functorExpr.map(f)(m._2))};
|
|
1613
|
+
const functorQualifier = {
|
|
1614
|
+
map: f => m => {
|
|
1615
|
+
if (m.tag === "ListCompGuard") { return $Qualifier("ListCompGuard", functorExpr.map(f)(m._1)); }
|
|
1616
|
+
if (m.tag === "ListCompGen") { return $Qualifier("ListCompGen", m._1, functorExpr.map(f)(m._2)); }
|
|
1617
|
+
if (m.tag === "ListCompDecl") { return $Qualifier("ListCompDecl", $VarDef(m._1._1, functorExpr.map(f)(m._1._2))); }
|
|
1618
|
+
$runtime.fail();
|
|
1619
|
+
}
|
|
1620
|
+
};
|
|
1621
|
+
const functorParagraphElem = {
|
|
1622
|
+
map: f => m => {
|
|
1623
|
+
if (m.tag === "Token") { return $ParagraphElem("Token", m._1); }
|
|
1624
|
+
if (m.tag === "Unquote") { return $ParagraphElem("Unquote", functorExpr.map(f)(m._1)); }
|
|
1625
|
+
$runtime.fail();
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
const functorListRest = {
|
|
1629
|
+
map: f => m => {
|
|
1630
|
+
if (m.tag === "End") { return $ListRest("End", f(m._1)); }
|
|
1631
|
+
if (m.tag === "Next") { return $ListRest("Next", f(m._1), functorExpr.map(f)(m._2), functorListRest.map(f)(m._3)); }
|
|
1632
|
+
$runtime.fail();
|
|
1633
|
+
}
|
|
1634
|
+
};
|
|
1635
|
+
const functorExpr = {
|
|
1636
|
+
map: f => m => {
|
|
1637
|
+
if (m.tag === "Var") { return $Expr("Var", m._1); }
|
|
1638
|
+
if (m.tag === "Op") { return $Expr("Op", m._1); }
|
|
1639
|
+
if (m.tag === "Int") { return $Expr("Int", f(m._1), m._2); }
|
|
1640
|
+
if (m.tag === "Float") { return $Expr("Float", f(m._1), m._2); }
|
|
1641
|
+
if (m.tag === "Str") { return $Expr("Str", f(m._1), m._2); }
|
|
1642
|
+
if (m.tag === "Constr") { return $Expr("Constr", f(m._1), m._2, Data$dList$dTypes.listMap(functorExpr.map(f))(m._3)); }
|
|
1643
|
+
if (m.tag === "Dictionary") {
|
|
1644
|
+
return $Expr(
|
|
1645
|
+
"Dictionary",
|
|
1646
|
+
f(m._1),
|
|
1647
|
+
Data$dList$dTypes.listMap((() => {
|
|
1648
|
+
const $0 = functorDictEntry.map(f);
|
|
1649
|
+
const $1 = functorExpr.map(f);
|
|
1650
|
+
return v => Data$dTuple.$Tuple($0(v._1), $1(v._2));
|
|
1651
|
+
})())(m._2)
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
if (m.tag === "Matrix") { return $Expr("Matrix", f(m._1), functorExpr.map(f)(m._2), m._3, functorExpr.map(f)(m._4)); }
|
|
1655
|
+
if (m.tag === "Lambda") { return $Expr("Lambda", functorClauses.map(f)(m._1)); }
|
|
1656
|
+
if (m.tag === "Project") { return $Expr("Project", functorExpr.map(f)(m._1), m._2); }
|
|
1657
|
+
if (m.tag === "DProject") { return $Expr("DProject", functorExpr.map(f)(m._1), functorExpr.map(f)(m._2)); }
|
|
1658
|
+
if (m.tag === "App") { return $Expr("App", functorExpr.map(f)(m._1), functorExpr.map(f)(m._2)); }
|
|
1659
|
+
if (m.tag === "BinaryApp") { return $Expr("BinaryApp", functorExpr.map(f)(m._1), m._2, functorExpr.map(f)(m._3)); }
|
|
1660
|
+
if (m.tag === "UnaryPrefixApp") { return $Expr("UnaryPrefixApp", m._1, functorExpr.map(f)(m._2)); }
|
|
1661
|
+
if (m.tag === "MatchAs") {
|
|
1662
|
+
return $Expr(
|
|
1663
|
+
"MatchAs",
|
|
1664
|
+
functorExpr.map(f)(m._1),
|
|
1665
|
+
(() => {
|
|
1666
|
+
const $0 = functorExpr.map(f);
|
|
1667
|
+
return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple(m._2._1._1, $0(m._2._1._2)), Data$dList$dTypes.listMap(m$1 => Data$dTuple.$Tuple(m$1._1, $0(m$1._2)))(m._2._2));
|
|
1668
|
+
})()
|
|
1669
|
+
);
|
|
1670
|
+
}
|
|
1671
|
+
if (m.tag === "IfElse") {
|
|
1672
|
+
return $Expr(
|
|
1673
|
+
"IfElse",
|
|
1674
|
+
(() => {
|
|
1675
|
+
const $0 = functorExpr.map(f);
|
|
1676
|
+
const $1 = functorExpr.map(f);
|
|
1677
|
+
return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple($0(m._1._1._1), $1(m._1._1._2)), Data$dList$dTypes.listMap(v => Data$dTuple.$Tuple($0(v._1), $1(v._2)))(m._1._2));
|
|
1678
|
+
})(),
|
|
1679
|
+
functorExpr.map(f)(m._2)
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
if (m.tag === "Paragraph") { return $Expr("Paragraph", Data$dList$dTypes.listMap(functorParagraphElem.map(f))(m._1)); }
|
|
1683
|
+
if (m.tag === "ListEmpty") { return $Expr("ListEmpty", f(m._1)); }
|
|
1684
|
+
if (m.tag === "ListNonEmpty") { return $Expr("ListNonEmpty", f(m._1), functorExpr.map(f)(m._2), functorListRest.map(f)(m._3)); }
|
|
1685
|
+
if (m.tag === "ListEnum") { return $Expr("ListEnum", functorExpr.map(f)(m._1), functorExpr.map(f)(m._2)); }
|
|
1686
|
+
if (m.tag === "ListComp") { return $Expr("ListComp", f(m._1), functorExpr.map(f)(m._2), Data$dList$dTypes.listMap(functorQualifier.map(f))(m._3)); }
|
|
1687
|
+
if (m.tag === "Let") {
|
|
1688
|
+
return $Expr(
|
|
1689
|
+
"Let",
|
|
1690
|
+
Data$dNonEmpty.$NonEmpty($VarDef(m._1._1._1, functorExpr.map(f)(m._1._1._2)), Data$dList$dTypes.listMap(functorVarDef.map(f))(m._1._2)),
|
|
1691
|
+
functorExpr.map(f)(m._2)
|
|
1692
|
+
);
|
|
1693
|
+
}
|
|
1694
|
+
if (m.tag === "LetRec") {
|
|
1695
|
+
return $Expr(
|
|
1696
|
+
"LetRec",
|
|
1697
|
+
(() => {
|
|
1698
|
+
const $0 = functorClause.map(f);
|
|
1699
|
+
return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple(m._1._1._1, $0(m._1._1._2)), Data$dList$dTypes.listMap(m$1 => Data$dTuple.$Tuple(m$1._1, $0(m$1._2)))(m._1._2));
|
|
1700
|
+
})(),
|
|
1701
|
+
functorExpr.map(f)(m._2)
|
|
1702
|
+
);
|
|
1703
|
+
}
|
|
1704
|
+
if (m.tag === "DocExpr") { return $Expr("DocExpr", functorExpr.map(f)(m._1), functorExpr.map(f)(m._2)); }
|
|
1705
|
+
$runtime.fail();
|
|
1706
|
+
}
|
|
1707
|
+
};
|
|
1708
|
+
const functorDictEntry = {
|
|
1709
|
+
map: f => m => {
|
|
1710
|
+
if (m.tag === "ExprKey") { return $DictEntry("ExprKey", functorExpr.map(f)(m._1)); }
|
|
1711
|
+
if (m.tag === "VarKey") { return $DictEntry("VarKey", f(m._1), m._2); }
|
|
1712
|
+
$runtime.fail();
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
const functorClauses = {
|
|
1716
|
+
map: f => m => {
|
|
1717
|
+
const $0 = functorClause.map(f);
|
|
1718
|
+
return Data$dNonEmpty.$NonEmpty($0(m._1), Data$dList$dTypes.listMap($0)(m._2));
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
const functorClause = {map: f => m => Data$dTuple.$Tuple(m._1, functorExpr.map(f)(m._2))};
|
|
1722
|
+
const functorModule = {
|
|
1723
|
+
map: f => v => $Module(Data$dList$dTypes.listMap(v2 => {
|
|
1724
|
+
if (v2.tag === "Left") {
|
|
1725
|
+
return Data$dEither.$Either(
|
|
1726
|
+
"Left",
|
|
1727
|
+
Data$dNonEmpty.$NonEmpty($VarDef(v2._1._1._1, functorExpr.map(f)(v2._1._1._2)), Data$dList$dTypes.listMap(functorVarDef.map(f))(v2._1._2))
|
|
1728
|
+
);
|
|
1729
|
+
}
|
|
1730
|
+
if (v2.tag === "Right") {
|
|
1731
|
+
return Data$dEither.$Either(
|
|
1732
|
+
"Right",
|
|
1733
|
+
(() => {
|
|
1734
|
+
const $0 = v3 => Data$dTuple.$Tuple(v3._1, Data$dTuple.$Tuple(v3._2._1, functorExpr.map(f)(v3._2._2)));
|
|
1735
|
+
return Data$dNonEmpty.$NonEmpty($0(v2._1._1), Data$dList$dTypes.listMap($1 => $0($1))(v2._1._2));
|
|
1736
|
+
})()
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
$runtime.fail();
|
|
1740
|
+
})(v._1))
|
|
1741
|
+
};
|
|
1742
|
+
const eqPattern = {
|
|
1743
|
+
eq: x => y => {
|
|
1744
|
+
if (x.tag === "PVar") { return y.tag === "PVar" && x._1 === y._1; }
|
|
1745
|
+
if (x.tag === "PConstr") {
|
|
1746
|
+
return y.tag === "PConstr" && x._1 === y._1 && (() => {
|
|
1747
|
+
const go = v => v1 => v2 => {
|
|
1748
|
+
if (!v2) { return false; }
|
|
1749
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1750
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && eqPattern.eq(v1._1)(v._1));
|
|
1751
|
+
};
|
|
1752
|
+
return go(x._2)(y._2)(true);
|
|
1753
|
+
})();
|
|
1754
|
+
}
|
|
1755
|
+
if (x.tag === "PRecord") {
|
|
1756
|
+
return y.tag === "PRecord" && (() => {
|
|
1757
|
+
const go = v => v1 => v2 => {
|
|
1758
|
+
if (!v2) { return false; }
|
|
1759
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1760
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && v1._1._1 === v._1._1 && eqPattern.eq(v1._1._2)(v._1._2));
|
|
1761
|
+
};
|
|
1762
|
+
return go(x._1)(y._1)(true);
|
|
1763
|
+
})();
|
|
1764
|
+
}
|
|
1765
|
+
if (x.tag === "PListEmpty") { return y.tag === "PListEmpty"; }
|
|
1766
|
+
return x.tag === "PListNonEmpty" && y.tag === "PListNonEmpty" && eqPattern.eq(x._1)(y._1) && eqListRestPattern.eq(x._2)(y._2);
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
const eqListRestPattern = {
|
|
1770
|
+
eq: x => y => {
|
|
1771
|
+
if (x.tag === "PListVar") { return y.tag === "PListVar" && x._1 === y._1; }
|
|
1772
|
+
if (x.tag === "PListEnd") { return y.tag === "PListEnd"; }
|
|
1773
|
+
return x.tag === "PListNext" && y.tag === "PListNext" && eqPattern.eq(x._1)(y._1) && eqListRestPattern.eq(x._2)(y._2);
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
const eqTuple1 = dictEq1 => ({eq: x => y => eqPattern.eq(x._1)(y._1) && dictEq1.eq(x._2)(y._2)});
|
|
1777
|
+
const eqTuple2 = dictEq1 => (
|
|
1778
|
+
{
|
|
1779
|
+
eq: x => y => eqPattern.eq(x._1._1)(y._1._1) && (() => {
|
|
1780
|
+
const go = v => v1 => v2 => {
|
|
1781
|
+
if (!v2) { return false; }
|
|
1782
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1783
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && eqPattern.eq(v1._1)(v._1));
|
|
1784
|
+
};
|
|
1785
|
+
return go(x._1._2)(y._1._2)(true);
|
|
1786
|
+
})() && dictEq1.eq(x._2)(y._2)
|
|
1787
|
+
}
|
|
1788
|
+
);
|
|
1789
|
+
const eqList = {
|
|
1790
|
+
eq: xs => ys => {
|
|
1791
|
+
const go = v => v1 => v2 => {
|
|
1792
|
+
if (!v2) { return false; }
|
|
1793
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1794
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v1._1.tag === "Left"
|
|
1795
|
+
? v2 && v._1.tag === "Left" && eqPattern.eq(v1._1._1)(v._1._1)
|
|
1796
|
+
: v2 && v1._1.tag === "Right" && v._1.tag === "Right" && eqListRestPattern.eq(v1._1._1)(v._1._1));
|
|
1797
|
+
};
|
|
1798
|
+
return go(xs)(ys)(true);
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1801
|
+
const eq8 = xs => ys => {
|
|
1802
|
+
const go = v => v1 => v2 => {
|
|
1803
|
+
if (!v2) { return false; }
|
|
1804
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1805
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && eqPattern.eq(v1._1)(v._1));
|
|
1806
|
+
};
|
|
1807
|
+
return go(xs)(ys)(true);
|
|
1808
|
+
};
|
|
1809
|
+
const eqVarDef = dictEq => ({eq: x => y => eqPattern.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2)});
|
|
1810
|
+
const eqQualifier = dictEq => (
|
|
1811
|
+
{
|
|
1812
|
+
eq: x => y => {
|
|
1813
|
+
if (x.tag === "ListCompGuard") { return y.tag === "ListCompGuard" && eqExpr(dictEq).eq(x._1)(y._1); }
|
|
1814
|
+
if (x.tag === "ListCompGen") { return y.tag === "ListCompGen" && eqPattern.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2); }
|
|
1815
|
+
return x.tag === "ListCompDecl" && y.tag === "ListCompDecl" && eqVarDef(dictEq).eq(x._1)(y._1);
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
);
|
|
1819
|
+
const eqParagraphElem = dictEq => (
|
|
1820
|
+
{
|
|
1821
|
+
eq: x => y => {
|
|
1822
|
+
if (x.tag === "Token") { return y.tag === "Token" && x._1 === y._1; }
|
|
1823
|
+
return x.tag === "Unquote" && y.tag === "Unquote" && eqExpr(dictEq).eq(x._1)(y._1);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
);
|
|
1827
|
+
const eqListRest = dictEq => (
|
|
1828
|
+
{
|
|
1829
|
+
eq: x => y => {
|
|
1830
|
+
if (x.tag === "End") { return y.tag === "End" && dictEq.eq(x._1)(y._1); }
|
|
1831
|
+
return x.tag === "Next" && y.tag === "Next" && dictEq.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2) && eqListRest(dictEq).eq(x._3)(y._3);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
);
|
|
1835
|
+
const eqExpr = dictEq => (
|
|
1836
|
+
{
|
|
1837
|
+
eq: x => y => {
|
|
1838
|
+
if (x.tag === "Var") { return y.tag === "Var" && x._1 === y._1; }
|
|
1839
|
+
if (x.tag === "Op") { return y.tag === "Op" && x._1 === y._1; }
|
|
1840
|
+
if (x.tag === "Int") { return y.tag === "Int" && dictEq.eq(x._1)(y._1) && x._2 === y._2; }
|
|
1841
|
+
if (x.tag === "Float") { return y.tag === "Float" && dictEq.eq(x._1)(y._1) && x._2 === y._2; }
|
|
1842
|
+
if (x.tag === "Str") { return y.tag === "Str" && dictEq.eq(x._1)(y._1) && x._2 === y._2; }
|
|
1843
|
+
if (x.tag === "Constr") {
|
|
1844
|
+
return y.tag === "Constr" && (() => {
|
|
1845
|
+
const $0 = eqExpr(dictEq);
|
|
1846
|
+
return dictEq.eq(x._1)(y._1) && x._2 === y._2 && (() => {
|
|
1847
|
+
const go = v => v1 => v2 => {
|
|
1848
|
+
if (!v2) { return false; }
|
|
1849
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1850
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1851
|
+
};
|
|
1852
|
+
return go(x._3)(y._3)(true);
|
|
1853
|
+
})();
|
|
1854
|
+
})();
|
|
1855
|
+
}
|
|
1856
|
+
if (x.tag === "Dictionary") {
|
|
1857
|
+
return y.tag === "Dictionary" && (() => {
|
|
1858
|
+
const $0 = eqDictEntry(dictEq);
|
|
1859
|
+
return dictEq.eq(x._1)(y._1) && (() => {
|
|
1860
|
+
const $1 = eqExpr(dictEq);
|
|
1861
|
+
const go = v => v1 => v2 => {
|
|
1862
|
+
if (!v2) { return false; }
|
|
1863
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1864
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1._1)(v._1._1) && $1.eq(v1._1._2)(v._1._2));
|
|
1865
|
+
};
|
|
1866
|
+
return go(x._2)(y._2)(true);
|
|
1867
|
+
})();
|
|
1868
|
+
})();
|
|
1869
|
+
}
|
|
1870
|
+
if (x.tag === "Matrix") {
|
|
1871
|
+
return y.tag === "Matrix" && dictEq.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2) && x._3._1 === y._3._1 && x._3._2 === y._3._2 && eqExpr(dictEq).eq(x._4)(y._4);
|
|
1872
|
+
}
|
|
1873
|
+
if (x.tag === "Lambda") { return y.tag === "Lambda" && eqClauses(dictEq).eq(x._1)(y._1); }
|
|
1874
|
+
if (x.tag === "Project") { return y.tag === "Project" && eqExpr(dictEq).eq(x._1)(y._1) && x._2 === y._2; }
|
|
1875
|
+
if (x.tag === "DProject") { return y.tag === "DProject" && eqExpr(dictEq).eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2); }
|
|
1876
|
+
if (x.tag === "App") { return y.tag === "App" && eqExpr(dictEq).eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2); }
|
|
1877
|
+
if (x.tag === "BinaryApp") { return y.tag === "BinaryApp" && eqExpr(dictEq).eq(x._1)(y._1) && x._2 === y._2 && eqExpr(dictEq).eq(x._3)(y._3); }
|
|
1878
|
+
if (x.tag === "UnaryPrefixApp") { return y.tag === "UnaryPrefixApp" && x._1 === y._1 && eqExpr(dictEq).eq(x._2)(y._2); }
|
|
1879
|
+
if (x.tag === "MatchAs") {
|
|
1880
|
+
return y.tag === "MatchAs" && (() => {
|
|
1881
|
+
const $0 = eqTuple1(eqExpr(dictEq));
|
|
1882
|
+
return eqExpr(dictEq).eq(x._1)(y._1) && $0.eq(x._2._1)(y._2._1) && (() => {
|
|
1883
|
+
const go = v => v1 => v2 => {
|
|
1884
|
+
if (!v2) { return false; }
|
|
1885
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1886
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1887
|
+
};
|
|
1888
|
+
return go(x._2._2)(y._2._2)(true);
|
|
1889
|
+
})();
|
|
1890
|
+
})();
|
|
1891
|
+
}
|
|
1892
|
+
if (x.tag === "IfElse") {
|
|
1893
|
+
return y.tag === "IfElse" && (() => {
|
|
1894
|
+
const $0 = eqExpr(dictEq);
|
|
1895
|
+
const $1 = eqExpr(dictEq);
|
|
1896
|
+
const $2 = (x$1, y$1) => $0.eq(x$1._1)(y$1._1) && $1.eq(x$1._2)(y$1._2);
|
|
1897
|
+
return $2(x._1._1, y._1._1) && (() => {
|
|
1898
|
+
const go = v => v1 => v2 => {
|
|
1899
|
+
if (!v2) { return false; }
|
|
1900
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1901
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $2(v1._1, v._1));
|
|
1902
|
+
};
|
|
1903
|
+
return go(x._1._2)(y._1._2)(true);
|
|
1904
|
+
})() && eqExpr(dictEq).eq(x._2)(y._2);
|
|
1905
|
+
})();
|
|
1906
|
+
}
|
|
1907
|
+
if (x.tag === "Paragraph") {
|
|
1908
|
+
return y.tag === "Paragraph" && (() => {
|
|
1909
|
+
const $0 = eqParagraphElem(dictEq);
|
|
1910
|
+
const go = v => v1 => v2 => {
|
|
1911
|
+
if (!v2) { return false; }
|
|
1912
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1913
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1914
|
+
};
|
|
1915
|
+
return go(x._1)(y._1)(true);
|
|
1916
|
+
})();
|
|
1917
|
+
}
|
|
1918
|
+
if (x.tag === "ListEmpty") { return y.tag === "ListEmpty" && dictEq.eq(x._1)(y._1); }
|
|
1919
|
+
if (x.tag === "ListNonEmpty") { return y.tag === "ListNonEmpty" && dictEq.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2) && eqListRest(dictEq).eq(x._3)(y._3); }
|
|
1920
|
+
if (x.tag === "ListEnum") { return y.tag === "ListEnum" && eqExpr(dictEq).eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2); }
|
|
1921
|
+
if (x.tag === "ListComp") {
|
|
1922
|
+
return y.tag === "ListComp" && (() => {
|
|
1923
|
+
const $0 = eqQualifier(dictEq);
|
|
1924
|
+
return dictEq.eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2) && (() => {
|
|
1925
|
+
const go = v => v1 => v2 => {
|
|
1926
|
+
if (!v2) { return false; }
|
|
1927
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1928
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1929
|
+
};
|
|
1930
|
+
return go(x._3)(y._3)(true);
|
|
1931
|
+
})();
|
|
1932
|
+
})();
|
|
1933
|
+
}
|
|
1934
|
+
if (x.tag === "Let") {
|
|
1935
|
+
return y.tag === "Let" && (() => {
|
|
1936
|
+
const $0 = eqVarDef(dictEq);
|
|
1937
|
+
return $0.eq(x._1._1)(y._1._1) && (() => {
|
|
1938
|
+
const go = v => v1 => v2 => {
|
|
1939
|
+
if (!v2) { return false; }
|
|
1940
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1941
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1942
|
+
};
|
|
1943
|
+
return go(x._1._2)(y._1._2)(true);
|
|
1944
|
+
})() && eqExpr(dictEq).eq(x._2)(y._2);
|
|
1945
|
+
})();
|
|
1946
|
+
}
|
|
1947
|
+
if (x.tag === "LetRec") {
|
|
1948
|
+
return y.tag === "LetRec" && (() => {
|
|
1949
|
+
const $0 = eqClause(dictEq);
|
|
1950
|
+
return x._1._1._1 === y._1._1._1 && $0.eq(x._1._1._2)(y._1._1._2) && (() => {
|
|
1951
|
+
const go = v => v1 => v2 => {
|
|
1952
|
+
if (!v2) { return false; }
|
|
1953
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1954
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && v1._1._1 === v._1._1 && $0.eq(v1._1._2)(v._1._2));
|
|
1955
|
+
};
|
|
1956
|
+
return go(x._1._2)(y._1._2)(true);
|
|
1957
|
+
})() && eqExpr(dictEq).eq(x._2)(y._2);
|
|
1958
|
+
})();
|
|
1959
|
+
}
|
|
1960
|
+
return x.tag === "DocExpr" && y.tag === "DocExpr" && eqExpr(dictEq).eq(x._1)(y._1) && eqExpr(dictEq).eq(x._2)(y._2);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
);
|
|
1964
|
+
const eqDictEntry = dictEq => (
|
|
1965
|
+
{
|
|
1966
|
+
eq: x => y => {
|
|
1967
|
+
if (x.tag === "ExprKey") { return y.tag === "ExprKey" && eqExpr(dictEq).eq(x._1)(y._1); }
|
|
1968
|
+
return x.tag === "VarKey" && y.tag === "VarKey" && dictEq.eq(x._1)(y._1) && x._2 === y._2;
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
);
|
|
1972
|
+
const eqClauses = dictEq => (
|
|
1973
|
+
{
|
|
1974
|
+
eq: x => y => {
|
|
1975
|
+
const $0 = eqClause(dictEq);
|
|
1976
|
+
return $0.eq(x._1)(y._1) && (() => {
|
|
1977
|
+
const go = v => v1 => v2 => {
|
|
1978
|
+
if (!v2) { return false; }
|
|
1979
|
+
if (v.tag === "Nil") { return v1.tag === "Nil" && v2; }
|
|
1980
|
+
return v.tag === "Cons" && v1.tag === "Cons" && go(v._2)(v1._2)(v2 && $0.eq(v1._1)(v._1));
|
|
1981
|
+
};
|
|
1982
|
+
return go(x._2)(y._2)(true);
|
|
1983
|
+
})();
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
);
|
|
1987
|
+
const eqClause = dictEq => ({eq: x => y => eqTuple2(eqExpr(dictEq)).eq(x)(y)});
|
|
1988
|
+
const varKeyBwd = v => v1 => {
|
|
1989
|
+
if (v.tag === "Str" && v1.tag === "VarKey") { return $DictEntry("VarKey", v._1, v1._2); }
|
|
1990
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
1991
|
+
};
|
|
1992
|
+
const toClausesStateFwd = v => Data$dList$dTypes.listMap(v1 => Data$dTuple.$Tuple(
|
|
1993
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v1._1._1), Data$dList$dTypes.Nil),
|
|
1994
|
+
Data$dTuple.$Tuple(v1._1._2, v1._2)
|
|
1995
|
+
))(Data$dList$dTypes.$List("Cons", v._1, v._2));
|
|
1996
|
+
const toClausesStateBwd = v => {
|
|
1997
|
+
if (v.tag === "Nil") { return Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))(); }
|
|
1998
|
+
if (v.tag === "Cons") {
|
|
1999
|
+
return Data$dNonEmpty.$NonEmpty(
|
|
2000
|
+
v._1._1.tag === "Cons" && v._1._1._1.tag === "Left" && v._1._1._2.tag === "Nil"
|
|
2001
|
+
? Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v._1._1._1._1, v._1._2._1), v._1._2._2)
|
|
2002
|
+
: Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))(),
|
|
2003
|
+
Data$dList$dTypes.listMap(v1 => {
|
|
2004
|
+
if (v1._1.tag === "Cons" && v1._1._1.tag === "Left" && v1._1._2.tag === "Nil") { return Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v1._1._1._1, v1._2._1), v1._2._2); }
|
|
2005
|
+
return Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))();
|
|
2006
|
+
})(v._2)
|
|
2007
|
+
);
|
|
2008
|
+
}
|
|
2009
|
+
$runtime.fail();
|
|
2010
|
+
};
|
|
2011
|
+
const subpatts = v => {
|
|
2012
|
+
if (v.tag === "Left") {
|
|
2013
|
+
if (v._1.tag === "PVar") { return Data$dList$dTypes.Nil; }
|
|
2014
|
+
if (v._1.tag === "PConstr") { return Data$dList$dTypes.listMap(Data$dEither.Left)(v._1._2); }
|
|
2015
|
+
if (v._1.tag === "PRecord") { return Data$dList$dTypes.listMap(Data$dEither.Left)(Data$dList$dTypes.listMap(Data$dTuple.snd)(v._1._1)); }
|
|
2016
|
+
if (v._1.tag === "PListEmpty") { return Data$dList$dTypes.Nil; }
|
|
2017
|
+
if (v._1.tag === "PListNonEmpty") {
|
|
2018
|
+
return Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v._1._1), Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", v._1._2), Data$dList$dTypes.Nil));
|
|
2019
|
+
}
|
|
2020
|
+
$runtime.fail();
|
|
2021
|
+
}
|
|
2022
|
+
if (v.tag === "Right") {
|
|
2023
|
+
if (v._1.tag === "PListVar") { return Data$dList$dTypes.Nil; }
|
|
2024
|
+
if (v._1.tag === "PListEnd") { return Data$dList$dTypes.Nil; }
|
|
2025
|
+
if (v._1.tag === "PListNext") {
|
|
2026
|
+
return Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v._1._1), Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", v._1._2), Data$dList$dTypes.Nil));
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
$runtime.fail();
|
|
2030
|
+
};
|
|
2031
|
+
const showPattern = v => {
|
|
2032
|
+
if (v.tag === "Left") { return showPattern1.show(v._1); }
|
|
2033
|
+
if (v.tag === "Right") { return showListRestPattern.show(v._1); }
|
|
2034
|
+
$runtime.fail();
|
|
2035
|
+
};
|
|
2036
|
+
const popVarFwd = dictMonadError => {
|
|
2037
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
|
2038
|
+
const Monad0 = MonadThrow0.Monad0();
|
|
2039
|
+
return v => v1 => {
|
|
2040
|
+
if (v1.tag === "Cons") {
|
|
2041
|
+
if (v1._1._1.tag === "Cons" && v1._1._1._1.tag === "Left" && v1._1._1._1._1.tag === "PVar") {
|
|
2042
|
+
const $0 = v1._1._2._2;
|
|
2043
|
+
const $1 = v1._1._1._1._1._1;
|
|
2044
|
+
const $2 = v1._1._1._2;
|
|
2045
|
+
const $3 = v1._1._2._1;
|
|
2046
|
+
return Monad0.Bind1().Apply0().Functor0().map(v2 => Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple($2, Data$dTuple.$Tuple($3, $0)), v2))(popVarFwd(dictMonadError)(Util.assertWhen(false)("mustEq")(v$1 => v === $1)(v))(v1._2));
|
|
2047
|
+
}
|
|
2048
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2049
|
+
}
|
|
2050
|
+
if (v1.tag === "Nil") { return Monad0.Applicative0().pure(Data$dList$dTypes.Nil); }
|
|
2051
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2052
|
+
};
|
|
2053
|
+
};
|
|
2054
|
+
const popVarFwd1 = /* #__PURE__ */ popVarFwd(monadErrorExceptT);
|
|
2055
|
+
const popVarBwd = v => v1 => {
|
|
2056
|
+
if (v1.tag === "Cons") {
|
|
2057
|
+
return Data$dList$dTypes.$List(
|
|
2058
|
+
"Cons",
|
|
2059
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", $Pattern("PVar", v)), v1._1._1), Data$dTuple.$Tuple(v1._1._2._1, v1._1._2._2)),
|
|
2060
|
+
popVarBwd(v)(v1._2)
|
|
2061
|
+
);
|
|
2062
|
+
}
|
|
2063
|
+
if (v1.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2064
|
+
$runtime.fail();
|
|
2065
|
+
};
|
|
2066
|
+
const popRecordFwd = dictMonadError => {
|
|
2067
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
|
2068
|
+
const Monad0 = MonadThrow0.Monad0();
|
|
2069
|
+
return v => v1 => {
|
|
2070
|
+
if (v1.tag === "Cons") {
|
|
2071
|
+
if (v1._1._1.tag === "Cons" && v1._1._1._1.tag === "Left" && v1._1._1._1._1.tag === "PRecord") {
|
|
2072
|
+
const $0 = v1._1._2._2;
|
|
2073
|
+
const $1 = v1._1._1._1._1._1;
|
|
2074
|
+
const $2 = v1._1._1._2;
|
|
2075
|
+
const $3 = v1._1._2._1;
|
|
2076
|
+
return Util.assertWith("")((() => {
|
|
2077
|
+
const go = v$1 => v1$1 => v2 => {
|
|
2078
|
+
if (!v2) { return false; }
|
|
2079
|
+
if (v$1.tag === "Nil") { return v1$1.tag === "Nil" && v2; }
|
|
2080
|
+
return v$1.tag === "Cons" && v1$1.tag === "Cons" && go(v$1._2)(v1$1._2)(v2 && v1$1._1 === v$1._1);
|
|
2081
|
+
};
|
|
2082
|
+
return go(Data$dList$dTypes.listMap(Data$dTuple.fst)($1))(v)(true);
|
|
2083
|
+
})())(Monad0.Bind1().Apply0().Functor0().map(v2 => Data$dList$dTypes.$List(
|
|
2084
|
+
"Cons",
|
|
2085
|
+
Data$dTuple.$Tuple(
|
|
2086
|
+
Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)($2)(Data$dList$dTypes.listMap(x => Data$dEither.$Either("Left", x._2))($1)),
|
|
2087
|
+
Data$dTuple.$Tuple($3, $0)
|
|
2088
|
+
),
|
|
2089
|
+
v2
|
|
2090
|
+
))(popRecordFwd(dictMonadError)(v)(v1._2)));
|
|
2091
|
+
}
|
|
2092
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2093
|
+
}
|
|
2094
|
+
if (v1.tag === "Nil") { return Monad0.Applicative0().pure(Data$dList$dTypes.Nil); }
|
|
2095
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
const popRecordFwd1 = /* #__PURE__ */ popRecordFwd(monadErrorExceptT);
|
|
2099
|
+
const popRecordBwd = v => v1 => {
|
|
2100
|
+
if (v1.tag === "Cons") {
|
|
2101
|
+
return Data$dList$dTypes.$List(
|
|
2102
|
+
"Cons",
|
|
2103
|
+
Data$dTuple.$Tuple(
|
|
2104
|
+
Data$dList$dTypes.$List(
|
|
2105
|
+
"Cons",
|
|
2106
|
+
Data$dEither.$Either(
|
|
2107
|
+
"Left",
|
|
2108
|
+
$Pattern(
|
|
2109
|
+
"PRecord",
|
|
2110
|
+
(() => {
|
|
2111
|
+
const go = go$a0$copy => go$a1$copy => go$a2$copy => {
|
|
2112
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
2113
|
+
while (go$c) {
|
|
2114
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
2115
|
+
if (v$1.tag === "Nil") {
|
|
2116
|
+
go$c = false;
|
|
2117
|
+
go$r = v2;
|
|
2118
|
+
continue;
|
|
2119
|
+
}
|
|
2120
|
+
if (v1$1.tag === "Nil") {
|
|
2121
|
+
go$c = false;
|
|
2122
|
+
go$r = v2;
|
|
2123
|
+
continue;
|
|
2124
|
+
}
|
|
2125
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
2126
|
+
go$a0 = v$1._2;
|
|
2127
|
+
go$a1 = v1$1._2;
|
|
2128
|
+
go$a2 = Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v$1._1, v1$1._1), v2);
|
|
2129
|
+
continue;
|
|
2130
|
+
}
|
|
2131
|
+
$runtime.fail();
|
|
2132
|
+
}
|
|
2133
|
+
return go$r;
|
|
2134
|
+
};
|
|
2135
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
2136
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
2137
|
+
while (go$1$c) {
|
|
2138
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
2139
|
+
if (v1$1.tag === "Nil") {
|
|
2140
|
+
go$1$c = false;
|
|
2141
|
+
go$1$r = v$1;
|
|
2142
|
+
continue;
|
|
2143
|
+
}
|
|
2144
|
+
if (v1$1.tag === "Cons") {
|
|
2145
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
2146
|
+
go$1$a1 = v1$1._2;
|
|
2147
|
+
continue;
|
|
2148
|
+
}
|
|
2149
|
+
$runtime.fail();
|
|
2150
|
+
}
|
|
2151
|
+
return go$1$r;
|
|
2152
|
+
};
|
|
2153
|
+
return go$1(Data$dList$dTypes.Nil)(go(v)(Data$dList$dTypes.listMap(v2 => {
|
|
2154
|
+
if (v2.tag === "Left") { return v2._1; }
|
|
2155
|
+
$runtime.fail();
|
|
2156
|
+
})(Data$dList.take((() => {
|
|
2157
|
+
const go$2 = go$2$a0$copy => go$2$a1$copy => {
|
|
2158
|
+
let go$2$a0 = go$2$a0$copy, go$2$a1 = go$2$a1$copy, go$2$c = true, go$2$r;
|
|
2159
|
+
while (go$2$c) {
|
|
2160
|
+
const b = go$2$a0, v$1 = go$2$a1;
|
|
2161
|
+
if (v$1.tag === "Nil") {
|
|
2162
|
+
go$2$c = false;
|
|
2163
|
+
go$2$r = b;
|
|
2164
|
+
continue;
|
|
2165
|
+
}
|
|
2166
|
+
if (v$1.tag === "Cons") {
|
|
2167
|
+
go$2$a0 = 1 + b | 0;
|
|
2168
|
+
go$2$a1 = v$1._2;
|
|
2169
|
+
continue;
|
|
2170
|
+
}
|
|
2171
|
+
$runtime.fail();
|
|
2172
|
+
}
|
|
2173
|
+
return go$2$r;
|
|
2174
|
+
};
|
|
2175
|
+
return go$2(0)(v);
|
|
2176
|
+
})())(v1._1._1)))(Data$dList$dTypes.Nil));
|
|
2177
|
+
})()
|
|
2178
|
+
)
|
|
2179
|
+
),
|
|
2180
|
+
Data$dList.drop((() => {
|
|
2181
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
2182
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
2183
|
+
while (go$c) {
|
|
2184
|
+
const b = go$a0, v$1 = go$a1;
|
|
2185
|
+
if (v$1.tag === "Nil") {
|
|
2186
|
+
go$c = false;
|
|
2187
|
+
go$r = b;
|
|
2188
|
+
continue;
|
|
2189
|
+
}
|
|
2190
|
+
if (v$1.tag === "Cons") {
|
|
2191
|
+
go$a0 = 1 + b | 0;
|
|
2192
|
+
go$a1 = v$1._2;
|
|
2193
|
+
continue;
|
|
2194
|
+
}
|
|
2195
|
+
$runtime.fail();
|
|
2196
|
+
}
|
|
2197
|
+
return go$r;
|
|
2198
|
+
};
|
|
2199
|
+
return go(0)(v);
|
|
2200
|
+
})())(v1._1._1)
|
|
2201
|
+
),
|
|
2202
|
+
Data$dTuple.$Tuple(v1._1._2._1, v1._1._2._2)
|
|
2203
|
+
),
|
|
2204
|
+
popRecordBwd(v)(v1._2)
|
|
2205
|
+
);
|
|
2206
|
+
}
|
|
2207
|
+
if (v1.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2208
|
+
$runtime.fail();
|
|
2209
|
+
};
|
|
2210
|
+
const popListVarFwd = dictMonadError => {
|
|
2211
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
|
2212
|
+
const Monad0 = MonadThrow0.Monad0();
|
|
2213
|
+
return v => v1 => {
|
|
2214
|
+
if (v1.tag === "Cons") {
|
|
2215
|
+
if (v1._1._1.tag === "Cons" && v1._1._1._1.tag === "Right" && v1._1._1._1._1.tag === "PListVar") {
|
|
2216
|
+
const $0 = v1._1._2._2;
|
|
2217
|
+
const $1 = v1._1._1._1._1._1;
|
|
2218
|
+
const $2 = v1._1._1._2;
|
|
2219
|
+
const $3 = v1._1._2._1;
|
|
2220
|
+
return Monad0.Bind1().Apply0().Functor0().map(v2 => Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple($2, Data$dTuple.$Tuple($3, $0)), v2))(popListVarFwd(dictMonadError)(Util.assertWhen(false)("mustEq")(v$1 => v === $1)(v))(v1._2));
|
|
2221
|
+
}
|
|
2222
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2223
|
+
}
|
|
2224
|
+
if (v1.tag === "Nil") { return Monad0.Applicative0().pure(Data$dList$dTypes.Nil); }
|
|
2225
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2226
|
+
};
|
|
2227
|
+
};
|
|
2228
|
+
const popListVarFwd1 = /* #__PURE__ */ popListVarFwd(monadErrorExceptT);
|
|
2229
|
+
const popListVarBwd = v => v1 => {
|
|
2230
|
+
if (v1.tag === "Cons") {
|
|
2231
|
+
return Data$dList$dTypes.$List(
|
|
2232
|
+
"Cons",
|
|
2233
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", $Pattern("PVar", v)), v1._1._1), Data$dTuple.$Tuple(v1._1._2._1, v1._1._2._2)),
|
|
2234
|
+
popListVarBwd(v)(v1._2)
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
if (v1.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2238
|
+
$runtime.fail();
|
|
2239
|
+
};
|
|
2240
|
+
const popArgFwd = dictMonadError => {
|
|
2241
|
+
const MonadThrow0 = dictMonadError.MonadThrow0();
|
|
2242
|
+
const Monad0 = MonadThrow0.Monad0();
|
|
2243
|
+
return v => {
|
|
2244
|
+
if (v.tag === "Cons") {
|
|
2245
|
+
if (v._1._1.tag === "Nil" && v._1._2._1.tag === "Cons") {
|
|
2246
|
+
const $0 = v._1._2._1._1;
|
|
2247
|
+
const $1 = v._1._2._2;
|
|
2248
|
+
const $2 = v._1._2._1._2;
|
|
2249
|
+
return Monad0.Bind1().Apply0().Functor0().map(v1 => Data$dList$dTypes.$List(
|
|
2250
|
+
"Cons",
|
|
2251
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", $0), Data$dList$dTypes.Nil), Data$dTuple.$Tuple($2, $1)),
|
|
2252
|
+
v1
|
|
2253
|
+
))(popArgFwd(dictMonadError)(v._2));
|
|
2254
|
+
}
|
|
2255
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2256
|
+
}
|
|
2257
|
+
if (v.tag === "Nil") { return Monad0.Applicative0().pure(Data$dList$dTypes.Nil); }
|
|
2258
|
+
return MonadThrow0.throwError(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()));
|
|
2259
|
+
};
|
|
2260
|
+
};
|
|
2261
|
+
const popArgFwd1 = /* #__PURE__ */ popArgFwd(monadErrorExceptT);
|
|
2262
|
+
const popArgBwd = v => {
|
|
2263
|
+
if (v.tag === "Cons") {
|
|
2264
|
+
if (v._1._1.tag === "Cons" && v._1._1._1.tag === "Left" && v._1._1._2.tag === "Nil") {
|
|
2265
|
+
return Data$dList$dTypes.$List(
|
|
2266
|
+
"Cons",
|
|
2267
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.Nil, Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", v._1._1._1._1, v._1._2._1), v._1._2._2)),
|
|
2268
|
+
popArgBwd(v._2)
|
|
2269
|
+
);
|
|
2270
|
+
}
|
|
2271
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2272
|
+
}
|
|
2273
|
+
if (v.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2274
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2275
|
+
};
|
|
2276
|
+
const pVarAnon = /* #__PURE__ */ $Pattern("PVar", "_");
|
|
2277
|
+
const pListVarAnon = /* #__PURE__ */ $ListRestPattern("PListVar", "_");
|
|
2278
|
+
const unless = v => {
|
|
2279
|
+
if (v.tag === "Left") {
|
|
2280
|
+
if (v._1.tag === "PVar") { return Data$dList$dTypes.Nil; }
|
|
2281
|
+
if (v._1.tag === "PRecord") { return Data$dList$dTypes.Nil; }
|
|
2282
|
+
if (v._1.tag === "PConstr") {
|
|
2283
|
+
return Data$dList$dTypes.listMap(c$p => Data$dEither.$Either(
|
|
2284
|
+
"Left",
|
|
2285
|
+
$Pattern(
|
|
2286
|
+
"PConstr",
|
|
2287
|
+
c$p,
|
|
2288
|
+
(() => {
|
|
2289
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
2290
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
2291
|
+
while (go$c) {
|
|
2292
|
+
const source = go$a0, memo = go$a1;
|
|
2293
|
+
if (source <= 0) {
|
|
2294
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
2295
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
2296
|
+
while (go$1$c) {
|
|
2297
|
+
const b = go$1$a0, v$1 = go$1$a1;
|
|
2298
|
+
if (v$1.tag === "Nil") {
|
|
2299
|
+
go$1$c = false;
|
|
2300
|
+
go$1$r = b;
|
|
2301
|
+
continue;
|
|
2302
|
+
}
|
|
2303
|
+
if (v$1.tag === "Cons") {
|
|
2304
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v$1._1, b);
|
|
2305
|
+
go$1$a1 = v$1._2;
|
|
2306
|
+
continue;
|
|
2307
|
+
}
|
|
2308
|
+
$runtime.fail();
|
|
2309
|
+
}
|
|
2310
|
+
return go$1$r;
|
|
2311
|
+
};
|
|
2312
|
+
go$c = false;
|
|
2313
|
+
go$r = go$1(Data$dList$dTypes.Nil)(memo);
|
|
2314
|
+
continue;
|
|
2315
|
+
}
|
|
2316
|
+
go$a0 = source - 1 | 0;
|
|
2317
|
+
go$a1 = Data$dList$dTypes.$List("Cons", $Pattern("PVar", "_"), memo);
|
|
2318
|
+
}
|
|
2319
|
+
return go$r;
|
|
2320
|
+
};
|
|
2321
|
+
return go(Util.defined(DataType.arity(monadThrowExceptT)(c$p)))(Data$dList$dTypes.Nil);
|
|
2322
|
+
})()
|
|
2323
|
+
)
|
|
2324
|
+
))(difference(toUnfoldable(DataType.fromFoldable1(Util$dMap.mapObjectString.keys(Util.defined(DataType.dataTypeForCtr.dataTypeFor(monadThrowExceptT)(v._1._1))._2))))(Data$dList$dTypes.$List(
|
|
2325
|
+
"Cons",
|
|
2326
|
+
v._1._1,
|
|
2327
|
+
Data$dList$dTypes.Nil
|
|
2328
|
+
)));
|
|
2329
|
+
}
|
|
2330
|
+
if (v._1.tag === "PListEmpty") {
|
|
2331
|
+
return Data$dList$dTypes.$List(
|
|
2332
|
+
"Cons",
|
|
2333
|
+
Data$dEither.$Either(
|
|
2334
|
+
"Left",
|
|
2335
|
+
$Pattern(
|
|
2336
|
+
"PConstr",
|
|
2337
|
+
":",
|
|
2338
|
+
(() => {
|
|
2339
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
2340
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
2341
|
+
while (go$c) {
|
|
2342
|
+
const source = go$a0, memo = go$a1;
|
|
2343
|
+
if (source <= 0) {
|
|
2344
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
2345
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
2346
|
+
while (go$1$c) {
|
|
2347
|
+
const b = go$1$a0, v$1 = go$1$a1;
|
|
2348
|
+
if (v$1.tag === "Nil") {
|
|
2349
|
+
go$1$c = false;
|
|
2350
|
+
go$1$r = b;
|
|
2351
|
+
continue;
|
|
2352
|
+
}
|
|
2353
|
+
if (v$1.tag === "Cons") {
|
|
2354
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v$1._1, b);
|
|
2355
|
+
go$1$a1 = v$1._2;
|
|
2356
|
+
continue;
|
|
2357
|
+
}
|
|
2358
|
+
$runtime.fail();
|
|
2359
|
+
}
|
|
2360
|
+
return go$1$r;
|
|
2361
|
+
};
|
|
2362
|
+
go$c = false;
|
|
2363
|
+
go$r = go$1(Data$dList$dTypes.Nil)(memo);
|
|
2364
|
+
continue;
|
|
2365
|
+
}
|
|
2366
|
+
go$a0 = source - 1 | 0;
|
|
2367
|
+
go$a1 = Data$dList$dTypes.$List("Cons", $Pattern("PVar", "_"), memo);
|
|
2368
|
+
}
|
|
2369
|
+
return go$r;
|
|
2370
|
+
};
|
|
2371
|
+
return go(2)(Data$dList$dTypes.Nil);
|
|
2372
|
+
})()
|
|
2373
|
+
)
|
|
2374
|
+
),
|
|
2375
|
+
Data$dList$dTypes.Nil
|
|
2376
|
+
);
|
|
2377
|
+
}
|
|
2378
|
+
if (v._1.tag === "PListNonEmpty") { return Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", PListEmpty), Data$dList$dTypes.Nil); }
|
|
2379
|
+
$runtime.fail();
|
|
2380
|
+
}
|
|
2381
|
+
if (v.tag === "Right") {
|
|
2382
|
+
if (v._1.tag === "PListVar") { return Data$dList$dTypes.Nil; }
|
|
2383
|
+
if (v._1.tag === "PListNext") { return Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", PListEnd), Data$dList$dTypes.Nil); }
|
|
2384
|
+
if (v._1.tag === "PListEnd") {
|
|
2385
|
+
return Data$dList$dTypes.$List(
|
|
2386
|
+
"Cons",
|
|
2387
|
+
Data$dEither.$Either("Right", $ListRestPattern("PListNext", $Pattern("PVar", "_"), $ListRestPattern("PListVar", "_"))),
|
|
2388
|
+
Data$dList$dTypes.Nil
|
|
2389
|
+
);
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
$runtime.fail();
|
|
2393
|
+
};
|
|
2394
|
+
const forConstrFwd = v => v1 => v2 => {
|
|
2395
|
+
if (v2.tag === "Nil") { return Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v, Data$dList$dTypes.$List("Cons", v1, Data$dList$dTypes.Nil)), Data$dList$dTypes.Nil); }
|
|
2396
|
+
if (v2.tag === "Cons") {
|
|
2397
|
+
if (v === v2._1._1) { return Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v2._1._1, Data$dList$dTypes.$List("Cons", v1, v2._1._2)), v2._2); }
|
|
2398
|
+
return Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v2._1._1, v2._1._2), forConstrFwd(v)(v1)(v2._2));
|
|
2399
|
+
}
|
|
2400
|
+
$runtime.fail();
|
|
2401
|
+
};
|
|
2402
|
+
const forConstrBwd = v => v1 => {
|
|
2403
|
+
if (v1.tag === "Nil") { return Data$dMaybe.Nothing; }
|
|
2404
|
+
if (v1.tag === "Cons") {
|
|
2405
|
+
if (v === v1._1._1) {
|
|
2406
|
+
if (v1._1._2.tag === "Nil") { return Data$dMaybe.Nothing; }
|
|
2407
|
+
if (v1._1._2.tag === "Cons") {
|
|
2408
|
+
return Data$dMaybe.$Maybe("Just", Data$dTuple.$Tuple(v1._1._2._1, Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v1._1._1, v1._1._2._2), v1._2)));
|
|
2409
|
+
}
|
|
2410
|
+
$runtime.fail();
|
|
2411
|
+
}
|
|
2412
|
+
const $0 = forConstrBwd(v)(v1._2);
|
|
2413
|
+
if ($0.tag === "Just") { return Data$dMaybe.$Maybe("Just", Data$dTuple.$Tuple($0._1._1, Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v1._1._1, v1._1._2), $0._1._2))); }
|
|
2414
|
+
return Data$dMaybe.Nothing;
|
|
2415
|
+
}
|
|
2416
|
+
$runtime.fail();
|
|
2417
|
+
};
|
|
2418
|
+
const enil = α => Expr.$Expr("Constr", α, "Nil", Data$dList$dTypes.Nil);
|
|
2419
|
+
const elimBool = κ => κ$p => Expr.$Elim("ElimConstr", fromFoldable([Data$dTuple.$Tuple("True", κ), Data$dTuple.$Tuple("False", κ$p)]));
|
|
2420
|
+
const econs = α => e => e$p => Expr.$Expr("Constr", α, ":", Data$dList$dTypes.$List("Cons", e, Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil)));
|
|
2421
|
+
const ctrFor = v => {
|
|
2422
|
+
if (v.tag === "Left") {
|
|
2423
|
+
if (v._1.tag === "PVar") { return Data$dMaybe.Nothing; }
|
|
2424
|
+
if (v._1.tag === "PConstr") { return Data$dMaybe.$Maybe("Just", v._1._1); }
|
|
2425
|
+
if (v._1.tag === "PRecord") { return Data$dMaybe.Nothing; }
|
|
2426
|
+
if (v._1.tag === "PListEmpty") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2427
|
+
if (v._1.tag === "PListNonEmpty") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2428
|
+
$runtime.fail();
|
|
2429
|
+
}
|
|
2430
|
+
if (v.tag === "Right") {
|
|
2431
|
+
if (v._1.tag === "PListVar") { return Data$dMaybe.Nothing; }
|
|
2432
|
+
if (v._1.tag === "PListEnd") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2433
|
+
if (v._1.tag === "PListNext") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2434
|
+
}
|
|
2435
|
+
$runtime.fail();
|
|
2436
|
+
};
|
|
2437
|
+
const popConstrBwd = v => v1 => {
|
|
2438
|
+
if (v1.tag === "Cons") {
|
|
2439
|
+
if (v1._1._1.tag === "Nil") { return Effect$dException.throwException(Effect$dException.error("absurd"))(); }
|
|
2440
|
+
if (v1._1._1.tag === "Cons") {
|
|
2441
|
+
const v2 = forConstrBwd(Util.definitely("absurd")((() => {
|
|
2442
|
+
if (v1._1._1._1.tag === "Left") {
|
|
2443
|
+
if (v1._1._1._1._1.tag === "PVar") { return Data$dMaybe.Nothing; }
|
|
2444
|
+
if (v1._1._1._1._1.tag === "PConstr") { return Data$dMaybe.$Maybe("Just", v1._1._1._1._1._1); }
|
|
2445
|
+
if (v1._1._1._1._1.tag === "PRecord") { return Data$dMaybe.Nothing; }
|
|
2446
|
+
if (v1._1._1._1._1.tag === "PListEmpty") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2447
|
+
if (v1._1._1._1._1.tag === "PListNonEmpty") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2448
|
+
$runtime.fail();
|
|
2449
|
+
}
|
|
2450
|
+
if (v1._1._1._1.tag === "Right") {
|
|
2451
|
+
if (v1._1._1._1._1.tag === "PListVar") { return Data$dMaybe.Nothing; }
|
|
2452
|
+
if (v1._1._1._1._1.tag === "PListEnd") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2453
|
+
if (v1._1._1._1._1.tag === "PListNext") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2454
|
+
}
|
|
2455
|
+
$runtime.fail();
|
|
2456
|
+
})()))(v);
|
|
2457
|
+
if (v2.tag === "Nothing") { return popConstrBwd(v)(v1._2); }
|
|
2458
|
+
if (v2.tag === "Just") {
|
|
2459
|
+
if (eqList.eq(v2._1._1._1)(Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)(v1._1._1._2)(subpatts(v1._1._1._1))) && eq8(v2._1._1._2._1)(v1._1._2._1)) {
|
|
2460
|
+
return Data$dList$dTypes.$List(
|
|
2461
|
+
"Cons",
|
|
2462
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", v1._1._1._1, v1._1._1._2), Data$dTuple.$Tuple(v1._1._2._1, v2._1._1._2._2)),
|
|
2463
|
+
popConstrBwd(v2._1._2)(v1._2)
|
|
2464
|
+
);
|
|
2465
|
+
}
|
|
2466
|
+
return popConstrBwd(v)(v1._2);
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
$runtime.fail();
|
|
2470
|
+
}
|
|
2471
|
+
if (v1.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2472
|
+
$runtime.fail();
|
|
2473
|
+
};
|
|
2474
|
+
const popConstrFwd = dictMonadError => {
|
|
2475
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
2476
|
+
return v => v1 => {
|
|
2477
|
+
if (v1.tag === "Cons") {
|
|
2478
|
+
if (v1._1._1.tag === "Nil") { return Effect$dException.throwException(Effect$dException.error("absurd"))(); }
|
|
2479
|
+
if (v1._1._1.tag === "Cons") {
|
|
2480
|
+
const π = subpatts(v1._1._1._1);
|
|
2481
|
+
const c = Util.definitely("Failed to distinguish constructor: " + showPattern(v1._1._1._1))((() => {
|
|
2482
|
+
if (v1._1._1._1.tag === "Left") {
|
|
2483
|
+
if (v1._1._1._1._1.tag === "PVar") { return Data$dMaybe.Nothing; }
|
|
2484
|
+
if (v1._1._1._1._1.tag === "PConstr") { return Data$dMaybe.$Maybe("Just", v1._1._1._1._1._1); }
|
|
2485
|
+
if (v1._1._1._1._1.tag === "PRecord") { return Data$dMaybe.Nothing; }
|
|
2486
|
+
if (v1._1._1._1._1.tag === "PListEmpty") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2487
|
+
if (v1._1._1._1._1.tag === "PListNonEmpty") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2488
|
+
$runtime.fail();
|
|
2489
|
+
}
|
|
2490
|
+
if (v1._1._1._1.tag === "Right") {
|
|
2491
|
+
if (v1._1._1._1._1.tag === "PListVar") { return Data$dMaybe.Nothing; }
|
|
2492
|
+
if (v1._1._1._1._1.tag === "PListEnd") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
2493
|
+
if (v1._1._1._1._1.tag === "PListNext") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
2494
|
+
}
|
|
2495
|
+
$runtime.fail();
|
|
2496
|
+
})());
|
|
2497
|
+
return Util.assertWith("")((() => {
|
|
2498
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
2499
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
2500
|
+
while (go$c) {
|
|
2501
|
+
const b = go$a0, v$1 = go$a1;
|
|
2502
|
+
if (v$1.tag === "Nil") {
|
|
2503
|
+
go$c = false;
|
|
2504
|
+
go$r = b;
|
|
2505
|
+
continue;
|
|
2506
|
+
}
|
|
2507
|
+
if (v$1.tag === "Cons") {
|
|
2508
|
+
go$a0 = 1 + b | 0;
|
|
2509
|
+
go$a1 = v$1._2;
|
|
2510
|
+
continue;
|
|
2511
|
+
}
|
|
2512
|
+
$runtime.fail();
|
|
2513
|
+
}
|
|
2514
|
+
return go$r;
|
|
2515
|
+
};
|
|
2516
|
+
return go(0)(π) === Util.defined(DataType.arity(monadThrowExceptT)(c)) && Util.defined(DataType.dataTypeForCtr.dataTypeFor(monadThrowExceptT)(c))._1 === v._1;
|
|
2517
|
+
})())(Monad0.Bind1().Apply0().Functor0().map(forConstrFwd(c)(Data$dTuple.$Tuple(
|
|
2518
|
+
Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)(v1._1._1._2)(π),
|
|
2519
|
+
Data$dTuple.$Tuple(v1._1._2._1, v1._1._2._2)
|
|
2520
|
+
)))(popConstrFwd(dictMonadError)(v)(v1._2)));
|
|
2521
|
+
}
|
|
2522
|
+
$runtime.fail();
|
|
2523
|
+
}
|
|
2524
|
+
if (v1.tag === "Nil") { return Monad0.Applicative0().pure(Data$dList$dTypes.Nil); }
|
|
2525
|
+
$runtime.fail();
|
|
2526
|
+
};
|
|
2527
|
+
};
|
|
2528
|
+
const popConstrFwd1 = /* #__PURE__ */ popConstrFwd(monadErrorExceptT);
|
|
2529
|
+
const anon = v => {
|
|
2530
|
+
if (v.tag === "Left") { return Data$dEither.$Either("Left", $Pattern("PVar", "_")); }
|
|
2531
|
+
if (v.tag === "Right") { return Data$dEither.$Either("Right", $ListRestPattern("PListVar", "_")); }
|
|
2532
|
+
$runtime.fail();
|
|
2533
|
+
};
|
|
2534
|
+
const orElseBwd = dictBoundedJoinSemilattice => {
|
|
2535
|
+
const bot = dictBoundedJoinSemilattice.bot;
|
|
2536
|
+
const $0 = dictBoundedJoinSemilattice.JoinSemilattice0();
|
|
2537
|
+
return v => ks => {
|
|
2538
|
+
if (v._1.tag === "Nil") {
|
|
2539
|
+
if (ks._1._1.tag === "Nil" && ks._2.tag === "Nil") { return Data$dTuple.$Tuple(bot, ks._1._2); }
|
|
2540
|
+
$runtime.fail();
|
|
2541
|
+
}
|
|
2542
|
+
if (v._1.tag === "Cons") {
|
|
2543
|
+
const $1 = v._1._2;
|
|
2544
|
+
const popIfPresent = v1 => v2 => {
|
|
2545
|
+
if (v1.tag === "Nil") { return Data$dTuple.$Tuple(bot, v2); }
|
|
2546
|
+
const v3 = Data$dList$dNonEmpty.unsnoc(v2);
|
|
2547
|
+
const v4 = Data$dList$dNonEmpty.unsnoc(Util.nonEmptyListNonEmptyList.nonEmpty(v1));
|
|
2548
|
+
if (!eqList.eq(Data$dList$dTypes.$List("Cons", v4.last, Data$dList$dTypes.listMap(anon)($1)))(v3.last._1)) { return popIfPresent(v4.init)(v2); }
|
|
2549
|
+
const $2 = popIfPresent(v4.init)(Util.nonEmptyListNonEmptyList.nonEmpty(v3.init));
|
|
2550
|
+
return Data$dTuple.$Tuple(
|
|
2551
|
+
$0.join($2._1)((() => {
|
|
2552
|
+
if (v3.last._2.tag === "ListEmpty") { return v3.last._2._1; }
|
|
2553
|
+
$runtime.fail();
|
|
2554
|
+
})()),
|
|
2555
|
+
$2._2
|
|
2556
|
+
);
|
|
2557
|
+
};
|
|
2558
|
+
const $2 = popIfPresent(unless(v._1._1))(ks);
|
|
2559
|
+
const $3 = orElseBwd(dictBoundedJoinSemilattice)(Data$dTuple.$Tuple(Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)($1)(subpatts(v._1._1)), v._2))(Data$dNonEmpty.$NonEmpty(
|
|
2560
|
+
(() => {
|
|
2561
|
+
if ($2._2._1._1.tag === "Cons") {
|
|
2562
|
+
return Data$dTuple.$Tuple(Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)($2._2._1._1._2)(subpatts($2._2._1._1._1)), $2._2._1._2);
|
|
2563
|
+
}
|
|
2564
|
+
$runtime.fail();
|
|
2565
|
+
})(),
|
|
2566
|
+
Data$dList$dTypes.listMap(v2 => {
|
|
2567
|
+
if (v2._1.tag === "Cons") { return Data$dTuple.$Tuple(Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)(v2._1._2)(subpatts(v2._1._1)), v2._2); }
|
|
2568
|
+
$runtime.fail();
|
|
2569
|
+
})($2._2._2)
|
|
2570
|
+
));
|
|
2571
|
+
return Data$dTuple.$Tuple($0.join($3._1)($2._1), $3._2);
|
|
2572
|
+
}
|
|
2573
|
+
$runtime.fail();
|
|
2574
|
+
};
|
|
2575
|
+
};
|
|
2576
|
+
const orElseFwd = α => v => {
|
|
2577
|
+
if (v._1.tag === "Nil") { return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple(Data$dList$dTypes.Nil, v._2), Data$dList$dTypes.Nil); }
|
|
2578
|
+
if (v._1.tag === "Cons") {
|
|
2579
|
+
const $0 = v._1._2;
|
|
2580
|
+
const π$p = subpatts(v._1._1);
|
|
2581
|
+
const $1 = orElseFwd(α)(Data$dTuple.$Tuple(Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)($0)(π$p), v._2));
|
|
2582
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
2583
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
2584
|
+
while (go$c) {
|
|
2585
|
+
const b = go$a0, v$1 = go$a1;
|
|
2586
|
+
if (v$1.tag === "Nil") {
|
|
2587
|
+
go$c = false;
|
|
2588
|
+
go$r = b;
|
|
2589
|
+
continue;
|
|
2590
|
+
}
|
|
2591
|
+
if (v$1.tag === "Cons") {
|
|
2592
|
+
go$a0 = 1 + b | 0;
|
|
2593
|
+
go$a1 = v$1._2;
|
|
2594
|
+
continue;
|
|
2595
|
+
}
|
|
2596
|
+
$runtime.fail();
|
|
2597
|
+
}
|
|
2598
|
+
return go$r;
|
|
2599
|
+
};
|
|
2600
|
+
const $2 = go(0)(π$p);
|
|
2601
|
+
const $3 = v$1 => Data$dTuple.$Tuple(Data$dList.take($2)(v$1._1), Data$dTuple.$Tuple(Data$dList.drop($2)(v$1._1), v$1._2));
|
|
2602
|
+
const $4 = (() => {
|
|
2603
|
+
if (v._1._1.tag === "Left") {
|
|
2604
|
+
if (v._1._1._1.tag === "PVar") {
|
|
2605
|
+
const $4 = v._1._1._1._1;
|
|
2606
|
+
return v1 => Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", $Pattern("PVar", $4)), v1._2._1), v1._2._2);
|
|
2607
|
+
}
|
|
2608
|
+
if (v._1._1._1.tag === "PRecord") {
|
|
2609
|
+
const $4 = v._1._1._1._1;
|
|
2610
|
+
return v1 => Data$dTuple.$Tuple(
|
|
2611
|
+
Data$dList$dTypes.$List(
|
|
2612
|
+
"Cons",
|
|
2613
|
+
Data$dEither.$Either(
|
|
2614
|
+
"Left",
|
|
2615
|
+
$Pattern(
|
|
2616
|
+
"PRecord",
|
|
2617
|
+
(() => {
|
|
2618
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => go$1$a2$copy => {
|
|
2619
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$a2 = go$1$a2$copy, go$1$c = true, go$1$r;
|
|
2620
|
+
while (go$1$c) {
|
|
2621
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1, v2 = go$1$a2;
|
|
2622
|
+
if (v$1.tag === "Nil") {
|
|
2623
|
+
go$1$c = false;
|
|
2624
|
+
go$1$r = v2;
|
|
2625
|
+
continue;
|
|
2626
|
+
}
|
|
2627
|
+
if (v1$1.tag === "Nil") {
|
|
2628
|
+
go$1$c = false;
|
|
2629
|
+
go$1$r = v2;
|
|
2630
|
+
continue;
|
|
2631
|
+
}
|
|
2632
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
2633
|
+
go$1$a0 = v$1._2;
|
|
2634
|
+
go$1$a1 = v1$1._2;
|
|
2635
|
+
go$1$a2 = Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v$1._1, v1$1._1), v2);
|
|
2636
|
+
continue;
|
|
2637
|
+
}
|
|
2638
|
+
$runtime.fail();
|
|
2639
|
+
}
|
|
2640
|
+
return go$1$r;
|
|
2641
|
+
};
|
|
2642
|
+
const go$2 = go$2$a0$copy => go$2$a1$copy => {
|
|
2643
|
+
let go$2$a0 = go$2$a0$copy, go$2$a1 = go$2$a1$copy, go$2$c = true, go$2$r;
|
|
2644
|
+
while (go$2$c) {
|
|
2645
|
+
const v$1 = go$2$a0, v1$1 = go$2$a1;
|
|
2646
|
+
if (v1$1.tag === "Nil") {
|
|
2647
|
+
go$2$c = false;
|
|
2648
|
+
go$2$r = v$1;
|
|
2649
|
+
continue;
|
|
2650
|
+
}
|
|
2651
|
+
if (v1$1.tag === "Cons") {
|
|
2652
|
+
go$2$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
2653
|
+
go$2$a1 = v1$1._2;
|
|
2654
|
+
continue;
|
|
2655
|
+
}
|
|
2656
|
+
$runtime.fail();
|
|
2657
|
+
}
|
|
2658
|
+
return go$2$r;
|
|
2659
|
+
};
|
|
2660
|
+
return go$2(Data$dList$dTypes.Nil)(go$1(Data$dList$dTypes.listMap(Data$dTuple.fst)($4))(Data$dList$dTypes.listMap(v2 => {
|
|
2661
|
+
if (v2.tag === "Left") { return v2._1; }
|
|
2662
|
+
$runtime.fail();
|
|
2663
|
+
})(v1._1))(Data$dList$dTypes.Nil));
|
|
2664
|
+
})()
|
|
2665
|
+
)
|
|
2666
|
+
),
|
|
2667
|
+
v1._2._1
|
|
2668
|
+
),
|
|
2669
|
+
v1._2._2
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
if (v._1._1._1.tag === "PConstr") {
|
|
2673
|
+
const $4 = v._1._1._1._1;
|
|
2674
|
+
return v1 => Data$dTuple.$Tuple(
|
|
2675
|
+
Data$dList$dTypes.$List(
|
|
2676
|
+
"Cons",
|
|
2677
|
+
Data$dEither.$Either(
|
|
2678
|
+
"Left",
|
|
2679
|
+
$Pattern(
|
|
2680
|
+
"PConstr",
|
|
2681
|
+
$4,
|
|
2682
|
+
Data$dList$dTypes.listMap(v2 => {
|
|
2683
|
+
if (v2.tag === "Left") { return v2._1; }
|
|
2684
|
+
$runtime.fail();
|
|
2685
|
+
})(v1._1)
|
|
2686
|
+
)
|
|
2687
|
+
),
|
|
2688
|
+
v1._2._1
|
|
2689
|
+
),
|
|
2690
|
+
v1._2._2
|
|
2691
|
+
);
|
|
2692
|
+
}
|
|
2693
|
+
if (v._1._1._1.tag === "PListEmpty") { return v1 => Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", PListEmpty), v1._2._1), v1._2._2); }
|
|
2694
|
+
if (v._1._1._1.tag === "PListNonEmpty") {
|
|
2695
|
+
return v1 => {
|
|
2696
|
+
if (v1._1.tag === "Cons" && v1._1._1.tag === "Left" && v1._1._2.tag === "Cons" && v1._1._2._1.tag === "Right" && v1._1._2._2.tag === "Nil") {
|
|
2697
|
+
return Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", $Pattern("PListNonEmpty", v1._1._1._1, v1._1._2._1._1)), v1._2._1), v1._2._2);
|
|
2698
|
+
}
|
|
2699
|
+
$runtime.fail();
|
|
2700
|
+
};
|
|
2701
|
+
}
|
|
2702
|
+
$runtime.fail();
|
|
2703
|
+
}
|
|
2704
|
+
if (v._1._1.tag === "Right") {
|
|
2705
|
+
if (v._1._1._1.tag === "PListVar") {
|
|
2706
|
+
const $4 = v._1._1._1._1;
|
|
2707
|
+
return v1 => Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", $ListRestPattern("PListVar", $4)), v1._2._1), v1._2._2);
|
|
2708
|
+
}
|
|
2709
|
+
if (v._1._1._1.tag === "PListNext") {
|
|
2710
|
+
return v1 => {
|
|
2711
|
+
if (v1._1.tag === "Cons" && v1._1._1.tag === "Left" && v1._1._2.tag === "Cons" && v1._1._2._1.tag === "Right" && v1._1._2._2.tag === "Nil") {
|
|
2712
|
+
return Data$dTuple.$Tuple(
|
|
2713
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", $ListRestPattern("PListNext", v1._1._1._1, v1._1._2._1._1)), v1._2._1),
|
|
2714
|
+
v1._2._2
|
|
2715
|
+
);
|
|
2716
|
+
}
|
|
2717
|
+
$runtime.fail();
|
|
2718
|
+
};
|
|
2719
|
+
}
|
|
2720
|
+
if (v._1._1._1.tag === "PListEnd") { return v1 => Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", PListEnd), v1._2._1), v1._2._2); }
|
|
2721
|
+
}
|
|
2722
|
+
$runtime.fail();
|
|
2723
|
+
})();
|
|
2724
|
+
return Data$dNonEmpty.$NonEmpty(
|
|
2725
|
+
$4($3($1._1)),
|
|
2726
|
+
Data$dList$dTypes.foldableList.foldr(Data$dList$dTypes.Cons)(Data$dList$dTypes.listMap(p$p => Data$dTuple.$Tuple(
|
|
2727
|
+
Data$dList$dTypes.$List("Cons", p$p, Data$dList$dTypes.listMap(anon)($0)),
|
|
2728
|
+
$Expr("ListEmpty", α)
|
|
2729
|
+
))(unless(v._1._1)))(Data$dList$dTypes.listMap($4)(Data$dList$dTypes.listMap($5 => $3($5))($1._2)))
|
|
2730
|
+
);
|
|
2731
|
+
}
|
|
2732
|
+
$runtime.fail();
|
|
2733
|
+
};
|
|
2734
|
+
const desugarableListRestExpr = {
|
|
2735
|
+
desug: dictMonadError => dictBoundedLattice => {
|
|
2736
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
2737
|
+
const Apply0 = Monad0.Bind1().Apply0();
|
|
2738
|
+
return v => {
|
|
2739
|
+
if (v.tag === "End") { return Monad0.Applicative0().pure(Expr.$Expr("Constr", v._1, "Nil", Data$dList$dTypes.Nil)); }
|
|
2740
|
+
if (v.tag === "Next") {
|
|
2741
|
+
const $0 = v._1;
|
|
2742
|
+
return Apply0.apply(Apply0.Functor0().map(e => e$p => Expr.$Expr(
|
|
2743
|
+
"Constr",
|
|
2744
|
+
$0,
|
|
2745
|
+
":",
|
|
2746
|
+
Data$dList$dTypes.$List("Cons", e, Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil))
|
|
2747
|
+
))(desugarableExprExpr.desug(dictMonadError)(dictBoundedLattice)(v._2)))(desugarableListRestExpr.desug(dictMonadError)(dictBoundedLattice)(v._3));
|
|
2748
|
+
}
|
|
2749
|
+
$runtime.fail();
|
|
2750
|
+
};
|
|
2751
|
+
},
|
|
2752
|
+
desugBwd: dictBoundedJoinSemilattice => v => v1 => {
|
|
2753
|
+
if (v.tag === "Constr") {
|
|
2754
|
+
if (v1.tag === "End") { return $ListRest("End", v._1); }
|
|
2755
|
+
if (v._3.tag === "Cons" && v._3._2.tag === "Cons" && v._3._2._2.tag === "Nil" && v1.tag === "Next") {
|
|
2756
|
+
return $ListRest(
|
|
2757
|
+
"Next",
|
|
2758
|
+
v._1,
|
|
2759
|
+
desugarableExprExpr.desugBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._2),
|
|
2760
|
+
desugarableListRestExpr.desugBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._3)
|
|
2761
|
+
);
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2765
|
+
},
|
|
2766
|
+
Functor0: () => functorListRest,
|
|
2767
|
+
Functor1: () => Expr.functorExpr
|
|
2768
|
+
};
|
|
2769
|
+
const desugarableExprExpr = {
|
|
2770
|
+
desug: dictMonadError => dictBoundedLattice => exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0()),
|
|
2771
|
+
desugBwd: dictBoundedJoinSemilattice => exprBwd(dictBoundedJoinSemilattice),
|
|
2772
|
+
Functor0: () => functorExpr,
|
|
2773
|
+
Functor1: () => Expr.functorExpr
|
|
2774
|
+
};
|
|
2775
|
+
const desugarableDictEntryExpr = {
|
|
2776
|
+
desug: dictMonadError => dictBoundedLattice => v => {
|
|
2777
|
+
if (v.tag === "ExprKey") { return exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1); }
|
|
2778
|
+
if (v.tag === "VarKey") { return dictMonadError.MonadThrow0().Monad0().Applicative0().pure(Expr.$Expr("Str", v._1, v._2)); }
|
|
2779
|
+
$runtime.fail();
|
|
2780
|
+
},
|
|
2781
|
+
desugBwd: dictBoundedJoinSemilattice => v => v1 => {
|
|
2782
|
+
if (v1.tag === "ExprKey") { return $DictEntry("ExprKey", exprBwd(dictBoundedJoinSemilattice)(v)(v1._1)); }
|
|
2783
|
+
return varKeyBwd(v)(v1);
|
|
2784
|
+
},
|
|
2785
|
+
Functor0: () => functorDictEntry,
|
|
2786
|
+
Functor1: () => Expr.functorExpr
|
|
2787
|
+
};
|
|
2788
|
+
const desugarableClausesElim = {
|
|
2789
|
+
desug: dictMonadError => dictBoundedLattice => {
|
|
2790
|
+
const $0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0();
|
|
2791
|
+
return μ => $0.map(Expr.asElim)(clausesStateFwd(dictBoundedLattice)(dictMonadError)(toClausesStateFwd(μ)));
|
|
2792
|
+
},
|
|
2793
|
+
desugBwd: dictBoundedJoinSemilattice => σ => μ => toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", σ))(toClausesStateFwd(μ))),
|
|
2794
|
+
Functor0: () => functorClauses,
|
|
2795
|
+
Functor1: () => Expr.functorElim
|
|
2796
|
+
};
|
|
2797
|
+
const varDefsFwd = dictMonadError => {
|
|
2798
|
+
const Apply0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0();
|
|
2799
|
+
const $0 = Apply0.Functor0();
|
|
2800
|
+
return dictBoundedLattice => v => {
|
|
2801
|
+
if (v._1._2.tag === "Nil") {
|
|
2802
|
+
return Apply0.apply($0.map(Expr.Let)(varDefFwd(dictMonadError)(dictBoundedLattice)(v._1._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
2803
|
+
}
|
|
2804
|
+
if (v._1._2.tag === "Cons") {
|
|
2805
|
+
return Apply0.apply($0.map(Expr.Let)(varDefFwd(dictMonadError)(dictBoundedLattice)(v._1._1)))(varDefsFwd(dictMonadError)(dictBoundedLattice)(Data$dTuple.$Tuple(
|
|
2806
|
+
Data$dNonEmpty.$NonEmpty(v._1._2._1, v._1._2._2),
|
|
2807
|
+
v._2
|
|
2808
|
+
)));
|
|
2809
|
+
}
|
|
2810
|
+
$runtime.fail();
|
|
2811
|
+
};
|
|
2812
|
+
};
|
|
2813
|
+
const varDefsBwd = dictBoundedJoinSemilattice => v => v1 => {
|
|
2814
|
+
if (v.tag === "Let") {
|
|
2815
|
+
if (v1._1._2.tag === "Nil") {
|
|
2816
|
+
return Data$dTuple.$Tuple(
|
|
2817
|
+
Data$dNonEmpty.$NonEmpty($VarDef(v1._1._1._1, exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1._1._2)), Data$dList$dTypes.Nil),
|
|
2818
|
+
exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)
|
|
2819
|
+
);
|
|
2820
|
+
}
|
|
2821
|
+
if (v1._1._2.tag === "Cons") {
|
|
2822
|
+
const v2 = varDefsBwd(dictBoundedJoinSemilattice)(v._2)(Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v1._1._2._1, v1._1._2._2), v1._2));
|
|
2823
|
+
return Data$dTuple.$Tuple(
|
|
2824
|
+
Data$dNonEmpty.$NonEmpty($VarDef(v1._1._1._1, exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1._1._2)), Data$dList$dTypes.$List("Cons", v2._1._1, v2._1._2)),
|
|
2825
|
+
v2._2
|
|
2826
|
+
);
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2830
|
+
};
|
|
2831
|
+
const varDefFwd = dictMonadError => {
|
|
2832
|
+
const Apply0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0();
|
|
2833
|
+
return dictBoundedLattice => {
|
|
2834
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
2835
|
+
return v => Apply0.apply(Apply0.Functor0().map(Expr.VarDef)(desugarableClausesElim.desug(dictMonadError)(dictBoundedLattice)(Data$dNonEmpty.$NonEmpty(
|
|
2836
|
+
Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v._1, Data$dList$dTypes.Nil), $Expr("Dictionary", top, Data$dList$dTypes.Nil)),
|
|
2837
|
+
Data$dList$dTypes.Nil
|
|
2838
|
+
))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
2839
|
+
};
|
|
2840
|
+
};
|
|
2841
|
+
const recDefsFwd = dictMonadError => {
|
|
2842
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
2843
|
+
const traverse2 = Data$dList$dTypes.traversableNonEmptyList.traverse(Monad0.Applicative0());
|
|
2844
|
+
return dictBoundedLattice => {
|
|
2845
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
2846
|
+
return xcs => Monad0.Bind1().Apply0().Functor0().map((() => {
|
|
2847
|
+
const $0 = Expr.RecDefs(top);
|
|
2848
|
+
return x => $0(fromFoldable1(x));
|
|
2849
|
+
})())(traverse2(recDefFwd(dictMonadError)(dictBoundedLattice))((() => {
|
|
2850
|
+
const $0 = Data$dList$dNonEmpty.wrappedOperation("groupBy")(Data$dList.groupBy(x => y => x._1 === y._1))(xcs);
|
|
2851
|
+
return Data$dNonEmpty.$NonEmpty($0._1, Data$dList$dTypes.listMap(RecDef)($0._2));
|
|
2852
|
+
})()));
|
|
2853
|
+
};
|
|
2854
|
+
};
|
|
2855
|
+
const recDefsBwd = dictBoundedJoinSemilattice => v => xcs => {
|
|
2856
|
+
const $0 = v._2;
|
|
2857
|
+
const go = v1 => Data$dNonEmpty.$NonEmpty(
|
|
2858
|
+
recDefBwd(dictBoundedJoinSemilattice)(Data$dTuple.$Tuple(v1._1._1._1, Util$dMap.get(Data$dShow.showString)(Dict.mapDictString)(v1._1._1._1)($0)))(v1._1),
|
|
2859
|
+
(() => {
|
|
2860
|
+
if (v1._2.tag === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2861
|
+
if (v1._2.tag === "Cons") {
|
|
2862
|
+
const $1 = go(Data$dNonEmpty.$NonEmpty(v1._2._1, v1._2._2));
|
|
2863
|
+
return Data$dList$dTypes.$List("Cons", $1._1, $1._2);
|
|
2864
|
+
}
|
|
2865
|
+
$runtime.fail();
|
|
2866
|
+
})()
|
|
2867
|
+
);
|
|
2868
|
+
return Data$dList$dTypes.bindNonEmptyList.bind(go(Data$dList$dNonEmpty.wrappedOperation("groupBy")(Data$dList.groupBy(x => y => x._1 === y._1))(xcs)))(Control$dBind.identity);
|
|
2869
|
+
};
|
|
2870
|
+
const recDefFwd = dictMonadError => dictBoundedLattice => xcs => dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0().map(v => Data$dTuple.$Tuple(xcs._1._1, v))(desugarableClausesElim.desug(dictMonadError)(dictBoundedLattice)(Data$dNonEmpty.$NonEmpty(
|
|
2871
|
+
xcs._1._2,
|
|
2872
|
+
Data$dList$dTypes.listMap(Data$dTuple.snd)(xcs._2)
|
|
2873
|
+
)));
|
|
2874
|
+
const recDefBwd = dictBoundedJoinSemilattice => v => v1 => {
|
|
2875
|
+
const $0 = v._1;
|
|
2876
|
+
const $1 = toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", v._2))(toClausesStateFwd(Data$dNonEmpty.$NonEmpty(
|
|
2877
|
+
v1._1._2,
|
|
2878
|
+
Data$dList$dTypes.listMap(Data$dTuple.snd)(v1._2)
|
|
2879
|
+
))));
|
|
2880
|
+
return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple($0, $1._1), Data$dList$dTypes.listMap(v2 => Data$dTuple.$Tuple($0, v2))($1._2));
|
|
2881
|
+
};
|
|
2882
|
+
const paragraphFwd = dictBoundedLattice => {
|
|
2883
|
+
const bot = dictBoundedLattice.BoundedJoinSemilattice0().bot;
|
|
2884
|
+
return dictMonadError => {
|
|
2885
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
2886
|
+
return elems => Monad0.Bind1().bind(paragraphElemsFwd(dictBoundedLattice)(dictMonadError)(elems))(es => Monad0.Applicative0().pure(Expr.$Expr(
|
|
2887
|
+
"Constr",
|
|
2888
|
+
bot,
|
|
2889
|
+
"Paragraph",
|
|
2890
|
+
Data$dList$dTypes.$List("Cons", es, Data$dList$dTypes.Nil)
|
|
2891
|
+
)));
|
|
2892
|
+
};
|
|
2893
|
+
};
|
|
2894
|
+
const paragraphElemsFwd = dictBoundedLattice => {
|
|
2895
|
+
const bot = dictBoundedLattice.BoundedJoinSemilattice0().bot;
|
|
2896
|
+
return dictMonadError => {
|
|
2897
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
2898
|
+
const $0 = Monad0.Applicative0();
|
|
2899
|
+
const $1 = Monad0.Bind1();
|
|
2900
|
+
return v => {
|
|
2901
|
+
if (v.tag === "Nil") { return $0.pure(Expr.$Expr("Constr", bot, "Nil", Data$dList$dTypes.Nil)); }
|
|
2902
|
+
if (v.tag === "Cons") {
|
|
2903
|
+
if (v._1.tag === "Token") {
|
|
2904
|
+
const $2 = v._1._1;
|
|
2905
|
+
return $1.bind(paragraphElemsFwd(dictBoundedLattice)(dictMonadError)(v._2))(e$p => $0.pure(Expr.$Expr(
|
|
2906
|
+
"Constr",
|
|
2907
|
+
bot,
|
|
2908
|
+
":",
|
|
2909
|
+
Data$dList$dTypes.$List("Cons", Expr.$Expr("Str", bot, $2), Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil))
|
|
2910
|
+
)));
|
|
2911
|
+
}
|
|
2912
|
+
if (v._1.tag === "Unquote") {
|
|
2913
|
+
const $2 = v._2;
|
|
2914
|
+
return $1.bind(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1._1))(e => $1.bind(paragraphElemsFwd(dictBoundedLattice)(dictMonadError)($2))(e$p => $0.pure(Expr.$Expr(
|
|
2915
|
+
"Constr",
|
|
2916
|
+
bot,
|
|
2917
|
+
":",
|
|
2918
|
+
Data$dList$dTypes.$List("Cons", e, Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil))
|
|
2919
|
+
))));
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
$runtime.fail();
|
|
2923
|
+
};
|
|
2924
|
+
};
|
|
2925
|
+
};
|
|
2926
|
+
const paragraphElemsBwd = dictBoundedJoinSemilattice => v => v1 => {
|
|
2927
|
+
if (v.tag === "Constr") {
|
|
2928
|
+
if (v1.tag === "Nil") {
|
|
2929
|
+
if (v._3.tag === "Nil" && v._2 === "Nil") { return Data$dList$dTypes.Nil; }
|
|
2930
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2931
|
+
}
|
|
2932
|
+
if (v._3.tag === "Cons" && v._3._2.tag === "Cons" && v._3._2._2.tag === "Nil" && v1.tag === "Cons" && v._2 === ":") {
|
|
2933
|
+
if (v._3._1.tag === "Str" && v1._1.tag === "Token") {
|
|
2934
|
+
return Data$dList$dTypes.$List("Cons", $ParagraphElem("Token", v._3._1._2), paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._2));
|
|
2935
|
+
}
|
|
2936
|
+
if (v1._1.tag === "Unquote") {
|
|
2937
|
+
return Data$dList$dTypes.$List(
|
|
2938
|
+
"Cons",
|
|
2939
|
+
$ParagraphElem("Unquote", exprBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._1._1)),
|
|
2940
|
+
paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._2)
|
|
2941
|
+
);
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
2946
|
+
};
|
|
2947
|
+
const listCompFwd = dictMonadError => {
|
|
2948
|
+
const Bind1 = dictMonadError.MonadThrow0().Monad0().Bind1();
|
|
2949
|
+
const Functor0 = Bind1.Apply0().Functor0();
|
|
2950
|
+
return dictBoundedLattice => v => {
|
|
2951
|
+
if (v._2._1.tag === "Nil") {
|
|
2952
|
+
const $0 = v._1;
|
|
2953
|
+
return Functor0.map(f => f(Expr.$Expr("Constr", $0, "Nil", Data$dList$dTypes.Nil)))(Functor0.map(e => e$p => Expr.$Expr(
|
|
2954
|
+
"Constr",
|
|
2955
|
+
$0,
|
|
2956
|
+
":",
|
|
2957
|
+
Data$dList$dTypes.$List("Cons", e, Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil))
|
|
2958
|
+
))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2._2)));
|
|
2959
|
+
}
|
|
2960
|
+
if (v._2._1.tag === "Cons") {
|
|
2961
|
+
if (v._2._1._1.tag === "ListCompGuard") {
|
|
2962
|
+
const $0 = v._2._1._1._1;
|
|
2963
|
+
const $1 = v._1;
|
|
2964
|
+
return Bind1.bind(listCompFwd(dictMonadError)(dictBoundedLattice)(Data$dTuple.$Tuple($1, Data$dTuple.$Tuple(v._2._1._2, v._2._2))))(e => Functor0.map(Expr.App(Expr.$Expr(
|
|
2965
|
+
"Lambda",
|
|
2966
|
+
$1,
|
|
2967
|
+
Expr.$Elim(
|
|
2968
|
+
"ElimConstr",
|
|
2969
|
+
fromFoldable([
|
|
2970
|
+
Data$dTuple.$Tuple("True", Expr.$Cont("ContExpr", e)),
|
|
2971
|
+
Data$dTuple.$Tuple("False", Expr.$Cont("ContExpr", Expr.$Expr("Constr", $1, "Nil", Data$dList$dTypes.Nil)))
|
|
2972
|
+
])
|
|
2973
|
+
)
|
|
2974
|
+
)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())($0)));
|
|
2975
|
+
}
|
|
2976
|
+
if (v._2._1._1.tag === "ListCompDecl") {
|
|
2977
|
+
const $0 = v._2._1._1._1._2;
|
|
2978
|
+
const $1 = v._1;
|
|
2979
|
+
return Bind1.bind(clausesStateFwd(dictBoundedLattice)(dictMonadError)(Data$dList$dTypes.$List(
|
|
2980
|
+
"Cons",
|
|
2981
|
+
Data$dTuple.$Tuple(
|
|
2982
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v._2._1._1._1._1), Data$dList$dTypes.Nil),
|
|
2983
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.Nil, $Expr("ListComp", $1, v._2._2, v._2._1._2))
|
|
2984
|
+
),
|
|
2985
|
+
Data$dList$dTypes.Nil
|
|
2986
|
+
)))(σ => Functor0.map(Expr.App(Expr.$Expr("Lambda", $1, σ.tag === "ContElim" ? σ._1 : Effect$dException.throwException(Effect$dException.error("Eliminator expected"))())))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())($0)));
|
|
2987
|
+
}
|
|
2988
|
+
if (v._2._1._1.tag === "ListCompGen") {
|
|
2989
|
+
const $0 = v._2._1._1._2;
|
|
2990
|
+
const $1 = v._1;
|
|
2991
|
+
return Bind1.bind(clausesStateFwd(dictBoundedLattice)(dictMonadError)((() => {
|
|
2992
|
+
const $2 = orElseFwd($1)(Data$dTuple.$Tuple(
|
|
2993
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v._2._1._1._1), Data$dList$dTypes.Nil),
|
|
2994
|
+
$Expr("ListComp", $1, v._2._2, v._2._1._2)
|
|
2995
|
+
));
|
|
2996
|
+
return Data$dList$dTypes.$List(
|
|
2997
|
+
"Cons",
|
|
2998
|
+
Data$dTuple.$Tuple($2._1._1, Data$dTuple.$Tuple(Data$dList$dTypes.Nil, $2._1._2)),
|
|
2999
|
+
Data$dList$dTypes.listMap(m => Data$dTuple.$Tuple(m._1, Data$dTuple.$Tuple(Data$dList$dTypes.Nil, m._2)))($2._2)
|
|
3000
|
+
);
|
|
3001
|
+
})()))(σ => Functor0.map(Expr.App(Expr.$Expr(
|
|
3002
|
+
"App",
|
|
3003
|
+
Expr.$Expr("Var", "concat_map"),
|
|
3004
|
+
Expr.$Expr("Lambda", $1, σ.tag === "ContElim" ? σ._1 : Effect$dException.throwException(Effect$dException.error("Eliminator expected"))())
|
|
3005
|
+
)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())($0)));
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
$runtime.fail();
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
const listCompBwd = dictBoundedJoinSemilattice => {
|
|
3012
|
+
const $0 = dictBoundedJoinSemilattice.JoinSemilattice0();
|
|
3013
|
+
const orElseBwd1 = orElseBwd(dictBoundedJoinSemilattice);
|
|
3014
|
+
return v => v1 => {
|
|
3015
|
+
const $1 = (e, p, qs, s0, s0$p, α$p, σ) => {
|
|
3016
|
+
const $1 = clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", σ))(Data$dList$dTypes.$List(
|
|
3017
|
+
"Cons",
|
|
3018
|
+
Data$dTuple.$Tuple(
|
|
3019
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", p), Data$dList$dTypes.Nil),
|
|
3020
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.Nil, $Expr("ListComp", undefined, s0$p, qs))
|
|
3021
|
+
),
|
|
3022
|
+
Data$dList$dTypes.Nil
|
|
3023
|
+
));
|
|
3024
|
+
if (
|
|
3025
|
+
$1.tag === "Cons" && $1._1._1.tag === "Cons" && $1._1._1._1.tag === "Left" && $1._1._1._2.tag === "Nil" && $1._1._2._1.tag === "Nil" && $1._1._2._2.tag === "ListComp" && $1._2.tag === "Nil"
|
|
3026
|
+
) {
|
|
3027
|
+
return Data$dTuple.$Tuple(
|
|
3028
|
+
$0.join($1._1._2._2._1)(α$p),
|
|
3029
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", $Qualifier("ListCompDecl", $VarDef(p, exprBwd(dictBoundedJoinSemilattice)(e)(s0))), $1._1._2._2._3), $1._1._2._2._2)
|
|
3030
|
+
);
|
|
3031
|
+
}
|
|
3032
|
+
$runtime.fail();
|
|
3033
|
+
};
|
|
3034
|
+
if (v.tag === "Constr") {
|
|
3035
|
+
if (
|
|
3036
|
+
v._3.tag === "Cons" && v._3._2.tag === "Cons" && v._3._2._1.tag === "Constr" && v._3._2._1._3.tag === "Nil" && v._3._2._2.tag === "Nil" && v1._1.tag === "Nil" && v._2 === ":" && v._3._2._1._2 === "Nil"
|
|
3037
|
+
) {
|
|
3038
|
+
return Data$dTuple.$Tuple($0.join(v._3._2._1._1)(v._1), Data$dTuple.$Tuple(Data$dList$dTypes.Nil, exprBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._2)));
|
|
3039
|
+
}
|
|
3040
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3041
|
+
}
|
|
3042
|
+
if (v.tag === "App" && v1._1.tag === "Cons") {
|
|
3043
|
+
if (v._1.tag === "Lambda") {
|
|
3044
|
+
if (v._1._2.tag === "ElimConstr" && v1._1._1.tag === "ListCompGuard") {
|
|
3045
|
+
const $2 = listCompBwd(dictBoundedJoinSemilattice)((() => {
|
|
3046
|
+
const $2 = Util$dMap.get(Data$dShow.showString)(Dict.mapDictString)("True")(v._1._2._1);
|
|
3047
|
+
if ($2.tag === "ContExpr") { return $2._1; }
|
|
3048
|
+
return Effect$dException.throwException(Effect$dException.error("Expression expected"))();
|
|
3049
|
+
})())(Data$dTuple.$Tuple(v1._1._2, v1._2));
|
|
3050
|
+
const $3 = Util$dMap.get(Data$dShow.showString)(Dict.mapDictString)("False")(v._1._2._1);
|
|
3051
|
+
const $4 = $3.tag === "ContExpr" ? $3._1 : Effect$dException.throwException(Effect$dException.error("Expression expected"))();
|
|
3052
|
+
if ($4.tag === "Constr" && $4._3.tag === "Nil" && $4._2 === "Nil") {
|
|
3053
|
+
return Data$dTuple.$Tuple(
|
|
3054
|
+
$0.join($0.join($2._1)(v._1._1))($4._1),
|
|
3055
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", $Qualifier("ListCompGuard", exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1)), $2._2._1), $2._2._2)
|
|
3056
|
+
);
|
|
3057
|
+
}
|
|
3058
|
+
$runtime.fail();
|
|
3059
|
+
}
|
|
3060
|
+
if (v1._1._1.tag === "ListCompDecl") { return $1(v._2, v1._1._1._1._1, v1._1._2, v1._1._1._1._2, v1._2, v._1._1, v._1._2); }
|
|
3061
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3062
|
+
}
|
|
3063
|
+
if (v._1.tag === "App" && v._1._1.tag === "Var" && v._1._1._1 === "concat_map" && v._1._2.tag === "Lambda" && v1._1._1.tag === "ListCompGen") {
|
|
3064
|
+
const $2 = orElseBwd1(Data$dTuple.$Tuple(
|
|
3065
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v1._1._1._1), Data$dList$dTypes.Nil),
|
|
3066
|
+
$Expr("ListComp", undefined, v1._2, v1._1._2)
|
|
3067
|
+
))((() => {
|
|
3068
|
+
const $2 = Util.nonEmptyListNonEmptyList.nonEmpty(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", v._1._2._2))((() => {
|
|
3069
|
+
const $2 = orElseFwd()(Data$dTuple.$Tuple(
|
|
3070
|
+
Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Left", v1._1._1._1), Data$dList$dTypes.Nil),
|
|
3071
|
+
$Expr("ListComp", undefined, v1._2, v1._1._2)
|
|
3072
|
+
));
|
|
3073
|
+
return Data$dList$dTypes.$List(
|
|
3074
|
+
"Cons",
|
|
3075
|
+
Data$dTuple.$Tuple($2._1._1, Data$dTuple.$Tuple(Data$dList$dTypes.Nil, $2._1._2)),
|
|
3076
|
+
Data$dList$dTypes.listMap(m => Data$dTuple.$Tuple(m._1, Data$dTuple.$Tuple(Data$dList$dTypes.Nil, m._2)))($2._2)
|
|
3077
|
+
);
|
|
3078
|
+
})()));
|
|
3079
|
+
return Data$dNonEmpty.$NonEmpty(
|
|
3080
|
+
(() => {
|
|
3081
|
+
if ($2._1._2._1.tag === "Nil") { return Data$dTuple.$Tuple($2._1._1, $2._1._2._2); }
|
|
3082
|
+
$runtime.fail();
|
|
3083
|
+
})(),
|
|
3084
|
+
Data$dList$dTypes.listMap(v2 => {
|
|
3085
|
+
if (v2._2._1.tag === "Nil") { return Data$dTuple.$Tuple(v2._1, v2._2._2); }
|
|
3086
|
+
$runtime.fail();
|
|
3087
|
+
})($2._2)
|
|
3088
|
+
);
|
|
3089
|
+
})());
|
|
3090
|
+
if ($2._2.tag === "ListComp") {
|
|
3091
|
+
return Data$dTuple.$Tuple(
|
|
3092
|
+
$0.join($0.join($2._2._1)(v._1._2._1))($2._1),
|
|
3093
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", $Qualifier("ListCompGen", v1._1._1._1, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._2)), $2._2._3), $2._2._2)
|
|
3094
|
+
);
|
|
3095
|
+
}
|
|
3096
|
+
$runtime.fail();
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3100
|
+
};
|
|
3101
|
+
};
|
|
3102
|
+
const ifElseFwd = dictBoundedLattice => {
|
|
3103
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
3104
|
+
return dictMonadError => {
|
|
3105
|
+
const Apply0 = dictMonadError.MonadThrow0().Monad0().Bind1().Apply0();
|
|
3106
|
+
const $0 = Apply0.Functor0();
|
|
3107
|
+
return v => {
|
|
3108
|
+
const $1 = (v1, e3) => Apply0.apply($0.map(Expr.App)($0.map(Expr.Lambda(top))(Apply0.apply($0.map(elimBool)($0.map(Expr.ContExpr)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v1._2))))($0.map(Expr.ContExpr)(e3)))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v1._1));
|
|
3109
|
+
return $1(
|
|
3110
|
+
v._1._1,
|
|
3111
|
+
Data$dList$dTypes.foldableList.foldr($2 => $3 => $1($2, $3))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2))(v._1._2)
|
|
3112
|
+
);
|
|
3113
|
+
};
|
|
3114
|
+
};
|
|
3115
|
+
};
|
|
3116
|
+
const ifElseBwd = dictBoundedJoinSemilattice => {
|
|
3117
|
+
const botOf = functorExpr.map((() => {
|
|
3118
|
+
const $0 = dictBoundedJoinSemilattice.bot;
|
|
3119
|
+
return v => $0;
|
|
3120
|
+
})());
|
|
3121
|
+
return v => v1 => {
|
|
3122
|
+
if (v.tag === "App" && v._1.tag === "Lambda" && v._1._2.tag === "ElimConstr") {
|
|
3123
|
+
const $0 = v._1._2._1;
|
|
3124
|
+
const bwdWhen = c => {
|
|
3125
|
+
if (Object.hasOwn($0, c)) {
|
|
3126
|
+
return exprBwd(dictBoundedJoinSemilattice)((() => {
|
|
3127
|
+
const $1 = Util$dMap.get(Data$dShow.showString)(Dict.mapDictString)(c)($0);
|
|
3128
|
+
if ($1.tag === "ContExpr") { return $1._1; }
|
|
3129
|
+
return Effect$dException.throwException(Effect$dException.error("Expression expected"))();
|
|
3130
|
+
})());
|
|
3131
|
+
}
|
|
3132
|
+
return botOf;
|
|
3133
|
+
};
|
|
3134
|
+
if (v1._1._2.tag === "Nil") {
|
|
3135
|
+
return Data$dTuple.$Tuple(
|
|
3136
|
+
Util.nonEmptyListNonEmptyList.nonEmpty(Data$dList$dTypes.$List(
|
|
3137
|
+
"Cons",
|
|
3138
|
+
Data$dTuple.$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
3139
|
+
Data$dList$dTypes.Nil
|
|
3140
|
+
)),
|
|
3141
|
+
bwdWhen("False")(v1._2)
|
|
3142
|
+
);
|
|
3143
|
+
}
|
|
3144
|
+
const v3 = bwdWhen("False")($Expr("IfElse", Util.nonEmptyListNonEmptyList.nonEmpty(v1._1._2), v1._2));
|
|
3145
|
+
if (v3.tag === "IfElse") {
|
|
3146
|
+
return Data$dTuple.$Tuple(
|
|
3147
|
+
Util.nonEmptyListNonEmptyList.nonEmpty(Data$dList$dTypes.$List(
|
|
3148
|
+
"Cons",
|
|
3149
|
+
Data$dTuple.$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
3150
|
+
Data$dList$dTypes.$List("Cons", v3._1._1, v3._1._2)
|
|
3151
|
+
)),
|
|
3152
|
+
v3._2
|
|
3153
|
+
);
|
|
3154
|
+
}
|
|
3155
|
+
return Data$dTuple.$Tuple(
|
|
3156
|
+
Util.nonEmptyListNonEmptyList.nonEmpty(Data$dList$dTypes.$List(
|
|
3157
|
+
"Cons",
|
|
3158
|
+
Data$dTuple.$Tuple(exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1._1._1), bwdWhen("True")(v1._1._1._2)),
|
|
3159
|
+
Effect$dException.throwException(Effect$dException.error("absurd"))()._1
|
|
3160
|
+
)),
|
|
3161
|
+
Effect$dException.throwException(Effect$dException.error("absurd"))()._2
|
|
3162
|
+
);
|
|
3163
|
+
}
|
|
3164
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3165
|
+
};
|
|
3166
|
+
};
|
|
3167
|
+
const exprFwd = dictBoundedLattice => {
|
|
3168
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
3169
|
+
const JoinSemilattice0 = dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0();
|
|
3170
|
+
return dictMonadError => {
|
|
3171
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
3172
|
+
const Applicative0 = Monad0.Applicative0();
|
|
3173
|
+
const Bind1 = Monad0.Bind1();
|
|
3174
|
+
const Apply0 = Bind1.Apply0();
|
|
3175
|
+
const Functor0 = Apply0.Functor0();
|
|
3176
|
+
const traverse2 = Data$dList$dTypes.traversableList.traverse(Applicative0);
|
|
3177
|
+
return dictJoinSemilattice => v => {
|
|
3178
|
+
if (v.tag === "Var") { return Applicative0.pure(Expr.$Expr("Var", v._1)); }
|
|
3179
|
+
if (v.tag === "Op") { return Applicative0.pure(Expr.$Expr("Op", v._1)); }
|
|
3180
|
+
if (v.tag === "Int") { return Applicative0.pure(Expr.$Expr("Int", v._1, v._2)); }
|
|
3181
|
+
if (v.tag === "Float") { return Applicative0.pure(Expr.$Expr("Float", v._1, v._2)); }
|
|
3182
|
+
if (v.tag === "Str") { return Applicative0.pure(Expr.$Expr("Str", v._1, v._2)); }
|
|
3183
|
+
if (v.tag === "Constr") {
|
|
3184
|
+
return Functor0.map(Expr.Constr(v._1)(v._2))(traverse2(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0()))(v._3));
|
|
3185
|
+
}
|
|
3186
|
+
if (v.tag === "Dictionary") {
|
|
3187
|
+
const $0 = v._1;
|
|
3188
|
+
const v1 = Data$dList.unzip(v._2);
|
|
3189
|
+
const $1 = v1._2;
|
|
3190
|
+
return Bind1.bind(traverse2(desugarableDictEntryExpr.desug(dictMonadError)(dictBoundedLattice))(v1._1))(ks$p => Bind1.bind(traverse2(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0()))($1))(es => Functor0.map(Expr.Dictionary($0))(Applicative0.pure((() => {
|
|
3191
|
+
const go = go$a0$copy => go$a1$copy => go$a2$copy => {
|
|
3192
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
3193
|
+
while (go$c) {
|
|
3194
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
3195
|
+
if (v$1.tag === "Nil") {
|
|
3196
|
+
go$c = false;
|
|
3197
|
+
go$r = v2;
|
|
3198
|
+
continue;
|
|
3199
|
+
}
|
|
3200
|
+
if (v1$1.tag === "Nil") {
|
|
3201
|
+
go$c = false;
|
|
3202
|
+
go$r = v2;
|
|
3203
|
+
continue;
|
|
3204
|
+
}
|
|
3205
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
3206
|
+
go$a0 = v$1._2;
|
|
3207
|
+
go$a1 = v1$1._2;
|
|
3208
|
+
go$a2 = Data$dList$dTypes.$List("Cons", Util$dPair.$Pair(v$1._1, v1$1._1), v2);
|
|
3209
|
+
continue;
|
|
3210
|
+
}
|
|
3211
|
+
$runtime.fail();
|
|
3212
|
+
}
|
|
3213
|
+
return go$r;
|
|
3214
|
+
};
|
|
3215
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
3216
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
3217
|
+
while (go$1$c) {
|
|
3218
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
3219
|
+
if (v1$1.tag === "Nil") {
|
|
3220
|
+
go$1$c = false;
|
|
3221
|
+
go$1$r = v$1;
|
|
3222
|
+
continue;
|
|
3223
|
+
}
|
|
3224
|
+
if (v1$1.tag === "Cons") {
|
|
3225
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
3226
|
+
go$1$a1 = v1$1._2;
|
|
3227
|
+
continue;
|
|
3228
|
+
}
|
|
3229
|
+
$runtime.fail();
|
|
3230
|
+
}
|
|
3231
|
+
return go$1$r;
|
|
3232
|
+
};
|
|
3233
|
+
return go$1(Data$dList$dTypes.Nil)(go(ks$p)(es)(Data$dList$dTypes.Nil));
|
|
3234
|
+
})()))));
|
|
3235
|
+
}
|
|
3236
|
+
if (v.tag === "Matrix") {
|
|
3237
|
+
return Apply0.apply(Functor0.map(f => f(Data$dTuple.$Tuple(v._3._1, v._3._2)))(Functor0.map(Expr.Matrix(v._1))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._4));
|
|
3238
|
+
}
|
|
3239
|
+
if (v.tag === "Lambda") { return Functor0.map(Expr.Lambda(top))(desugarableClausesElim.desug(dictMonadError)(dictBoundedLattice)(v._1)); }
|
|
3240
|
+
if (v.tag === "Project") {
|
|
3241
|
+
return Functor0.map(f => f(Expr.$Expr("Str", top, v._2)))(Functor0.map(Expr.DProject)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)));
|
|
3242
|
+
}
|
|
3243
|
+
if (v.tag === "DProject") {
|
|
3244
|
+
return Apply0.apply(Functor0.map(Expr.DProject)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
3245
|
+
}
|
|
3246
|
+
if (v.tag === "App") {
|
|
3247
|
+
return Apply0.apply(Functor0.map(Expr.App)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
3248
|
+
}
|
|
3249
|
+
if (v.tag === "BinaryApp") {
|
|
3250
|
+
return Apply0.apply(Functor0.map(Expr.App)(Functor0.map(Expr.App(Expr.$Expr("Op", v._2)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._3));
|
|
3251
|
+
}
|
|
3252
|
+
if (v.tag === "UnaryPrefixApp") {
|
|
3253
|
+
return Functor0.map(Expr.App(Expr.$Expr("Op", v._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
3254
|
+
}
|
|
3255
|
+
if (v.tag === "MatchAs") {
|
|
3256
|
+
return Apply0.apply(Functor0.map(Expr.App)(Functor0.map(Expr.Lambda(top))(desugarableClausesElim.desug(dictMonadError)(dictBoundedLattice)(Data$dNonEmpty.$NonEmpty(
|
|
3257
|
+
Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v._2._1._1, Data$dList$dTypes.Nil), v._2._1._2),
|
|
3258
|
+
Data$dList$dTypes.listMap(x => Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(x._1, Data$dList$dTypes.Nil), x._2))(v._2._2)
|
|
3259
|
+
)))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1));
|
|
3260
|
+
}
|
|
3261
|
+
if (v.tag === "IfElse") { return ifElseFwd(dictBoundedLattice)(dictMonadError)(Data$dTuple.$Tuple(v._1, v._2)); }
|
|
3262
|
+
if (v.tag === "Paragraph") { return paragraphFwd(dictBoundedLattice)(dictMonadError)(v._1); }
|
|
3263
|
+
if (v.tag === "ListEmpty") { return Applicative0.pure(Expr.$Expr("Constr", v._1, "Nil", Data$dList$dTypes.Nil)); }
|
|
3264
|
+
if (v.tag === "ListNonEmpty") {
|
|
3265
|
+
const $0 = v._1;
|
|
3266
|
+
return Apply0.apply(Functor0.map(e => e$p => Expr.$Expr("Constr", $0, ":", Data$dList$dTypes.$List("Cons", e, Data$dList$dTypes.$List("Cons", e$p, Data$dList$dTypes.Nil))))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2)))(desugarableListRestExpr.desug(dictMonadError)(dictBoundedLattice)(v._3));
|
|
3267
|
+
}
|
|
3268
|
+
if (v.tag === "ListEnum") {
|
|
3269
|
+
return Apply0.apply(Functor0.map(Expr.App)(Functor0.map(Expr.App(Expr.$Expr("Var", "range")))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._1))))(Functor0.map(f => f(Expr.$Expr(
|
|
3270
|
+
"Int",
|
|
3271
|
+
top,
|
|
3272
|
+
1
|
|
3273
|
+
)))(Functor0.map(Expr.App)(Functor0.map(Expr.App(Expr.$Expr("Op", "+")))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2)))));
|
|
3274
|
+
}
|
|
3275
|
+
if (v.tag === "ListComp") {
|
|
3276
|
+
if (v._3.tag === "Cons" && v._3._1.tag === "ListCompGen") {
|
|
3277
|
+
return listCompFwd(dictMonadError)(dictBoundedLattice)(Data$dTuple.$Tuple(
|
|
3278
|
+
v._1,
|
|
3279
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", $Qualifier("ListCompGen", v._3._1._1, v._3._1._2), v._3._2), v._2)
|
|
3280
|
+
));
|
|
3281
|
+
}
|
|
3282
|
+
return listCompFwd(dictMonadError)(dictBoundedLattice)(Data$dTuple.$Tuple(v._1, Data$dTuple.$Tuple(v._3, v._2)));
|
|
3283
|
+
}
|
|
3284
|
+
if (v.tag === "Let") { return varDefsFwd(dictMonadError)(dictBoundedLattice)(Data$dTuple.$Tuple(v._1, v._2)); }
|
|
3285
|
+
if (v.tag === "LetRec") {
|
|
3286
|
+
return Apply0.apply(Functor0.map(Expr.LetRec)(recDefsFwd(dictMonadError)(dictBoundedLattice)(v._1)))(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(v._2));
|
|
3287
|
+
}
|
|
3288
|
+
if (v.tag === "DocExpr") {
|
|
3289
|
+
const $0 = v._2;
|
|
3290
|
+
return Bind1.bind(exprFwd(dictBoundedLattice)(dictMonadError)(JoinSemilattice0)(v._1))(e => Bind1.bind(exprFwd(dictBoundedLattice)(dictMonadError)(JoinSemilattice0)($0))(e$p => Applicative0.pure(Expr.$Expr(
|
|
3291
|
+
"DocExpr",
|
|
3292
|
+
e,
|
|
3293
|
+
e$p
|
|
3294
|
+
))));
|
|
3295
|
+
}
|
|
3296
|
+
$runtime.fail();
|
|
3297
|
+
};
|
|
3298
|
+
};
|
|
3299
|
+
};
|
|
3300
|
+
const exprBwd = dictBoundedJoinSemilattice => v => v1 => {
|
|
3301
|
+
const $0 = (e, q, qs, s) => {
|
|
3302
|
+
const v2 = listCompBwd(dictBoundedJoinSemilattice)(e)(Data$dTuple.$Tuple(Data$dList$dTypes.$List("Cons", q, qs), s));
|
|
3303
|
+
return $Expr("ListComp", v2._1, v2._2._2, v2._2._1);
|
|
3304
|
+
};
|
|
3305
|
+
const $1 = (e, qs, s) => {
|
|
3306
|
+
const v2 = listCompBwd(dictBoundedJoinSemilattice)(e)(Data$dTuple.$Tuple(qs, s));
|
|
3307
|
+
return $Expr("ListComp", v2._1, v2._2._2, v2._2._1);
|
|
3308
|
+
};
|
|
3309
|
+
if (v.tag === "Var") {
|
|
3310
|
+
if (v1.tag === "Var") { return $Expr("Var", v1._1); }
|
|
3311
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3312
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3313
|
+
}
|
|
3314
|
+
if (v.tag === "Op") {
|
|
3315
|
+
if (v1.tag === "Op") { return $Expr("Op", v1._1); }
|
|
3316
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3317
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3318
|
+
}
|
|
3319
|
+
if (v.tag === "Int") {
|
|
3320
|
+
if (v1.tag === "Int") { return $Expr("Int", v._1, v1._2); }
|
|
3321
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3322
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3323
|
+
}
|
|
3324
|
+
if (v.tag === "Float") {
|
|
3325
|
+
if (v1.tag === "Float") { return $Expr("Float", v._1, v1._2); }
|
|
3326
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3327
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3328
|
+
}
|
|
3329
|
+
if (v.tag === "Str") {
|
|
3330
|
+
if (v1.tag === "Str") { return $Expr("Str", v._1, v1._2); }
|
|
3331
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3332
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3333
|
+
}
|
|
3334
|
+
if (v.tag === "Constr") {
|
|
3335
|
+
if (v1.tag === "Constr") {
|
|
3336
|
+
return $Expr(
|
|
3337
|
+
"Constr",
|
|
3338
|
+
v._1,
|
|
3339
|
+
v1._2,
|
|
3340
|
+
Data$dList$dTypes.listMap((() => {
|
|
3341
|
+
const $2 = exprBwd(dictBoundedJoinSemilattice);
|
|
3342
|
+
return v$1 => $2(v$1._1)(v$1._2);
|
|
3343
|
+
})())((() => {
|
|
3344
|
+
const go = go$a0$copy => go$a1$copy => go$a2$copy => {
|
|
3345
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
3346
|
+
while (go$c) {
|
|
3347
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
3348
|
+
if (v$1.tag === "Nil") {
|
|
3349
|
+
go$c = false;
|
|
3350
|
+
go$r = v2;
|
|
3351
|
+
continue;
|
|
3352
|
+
}
|
|
3353
|
+
if (v1$1.tag === "Nil") {
|
|
3354
|
+
go$c = false;
|
|
3355
|
+
go$r = v2;
|
|
3356
|
+
continue;
|
|
3357
|
+
}
|
|
3358
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
3359
|
+
go$a0 = v$1._2;
|
|
3360
|
+
go$a1 = v1$1._2;
|
|
3361
|
+
go$a2 = Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v$1._1, v1$1._1), v2);
|
|
3362
|
+
continue;
|
|
3363
|
+
}
|
|
3364
|
+
$runtime.fail();
|
|
3365
|
+
}
|
|
3366
|
+
return go$r;
|
|
3367
|
+
};
|
|
3368
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
3369
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
3370
|
+
while (go$1$c) {
|
|
3371
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
3372
|
+
if (v1$1.tag === "Nil") {
|
|
3373
|
+
go$1$c = false;
|
|
3374
|
+
go$1$r = v$1;
|
|
3375
|
+
continue;
|
|
3376
|
+
}
|
|
3377
|
+
if (v1$1.tag === "Cons") {
|
|
3378
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
3379
|
+
go$1$a1 = v1$1._2;
|
|
3380
|
+
continue;
|
|
3381
|
+
}
|
|
3382
|
+
$runtime.fail();
|
|
3383
|
+
}
|
|
3384
|
+
return go$1$r;
|
|
3385
|
+
};
|
|
3386
|
+
return go$1(Data$dList$dTypes.Nil)(go(v._3)(v1._3)(Data$dList$dTypes.Nil));
|
|
3387
|
+
})())
|
|
3388
|
+
);
|
|
3389
|
+
}
|
|
3390
|
+
if (v._3.tag === "Cons") {
|
|
3391
|
+
if (v._3._2.tag === "Nil") {
|
|
3392
|
+
if (v1.tag === "Paragraph") {
|
|
3393
|
+
if (v._2 === "Paragraph") { return $Expr("Paragraph", paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._1)); }
|
|
3394
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3395
|
+
}
|
|
3396
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3397
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3398
|
+
}
|
|
3399
|
+
if (v._3._2.tag === "Cons" && v._3._2._2.tag === "Nil" && v1.tag === "ListNonEmpty") {
|
|
3400
|
+
return $Expr("ListNonEmpty", v._1, exprBwd(dictBoundedJoinSemilattice)(v._3._1)(v1._2), desugarableListRestExpr.desugBwd(dictBoundedJoinSemilattice)(v._3._2._1)(v1._3));
|
|
3401
|
+
}
|
|
3402
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3403
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3404
|
+
}
|
|
3405
|
+
if (v._3.tag === "Nil" && v1.tag === "ListEmpty") { return $Expr("ListEmpty", v._1); }
|
|
3406
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3407
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3408
|
+
}
|
|
3409
|
+
if (v.tag === "Dictionary") {
|
|
3410
|
+
if (v1.tag === "Dictionary") {
|
|
3411
|
+
return $Expr(
|
|
3412
|
+
"Dictionary",
|
|
3413
|
+
v._1,
|
|
3414
|
+
(() => {
|
|
3415
|
+
const go = go$a0$copy => go$a1$copy => go$a2$copy => {
|
|
3416
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$a2 = go$a2$copy, go$c = true, go$r;
|
|
3417
|
+
while (go$c) {
|
|
3418
|
+
const v$1 = go$a0, v1$1 = go$a1, v2 = go$a2;
|
|
3419
|
+
if (v$1.tag === "Nil") {
|
|
3420
|
+
go$c = false;
|
|
3421
|
+
go$r = v2;
|
|
3422
|
+
continue;
|
|
3423
|
+
}
|
|
3424
|
+
if (v1$1.tag === "Nil") {
|
|
3425
|
+
go$c = false;
|
|
3426
|
+
go$r = v2;
|
|
3427
|
+
continue;
|
|
3428
|
+
}
|
|
3429
|
+
if (v$1.tag === "Cons" && v1$1.tag === "Cons") {
|
|
3430
|
+
go$a0 = v$1._2;
|
|
3431
|
+
go$a1 = v1$1._2;
|
|
3432
|
+
go$a2 = Data$dList$dTypes.$List(
|
|
3433
|
+
"Cons",
|
|
3434
|
+
Data$dTuple.$Tuple(
|
|
3435
|
+
desugarableDictEntryExpr.desugBwd(dictBoundedJoinSemilattice)(v$1._1._1)(v1$1._1._1),
|
|
3436
|
+
exprBwd(dictBoundedJoinSemilattice)(v$1._1._2)(v1$1._1._2)
|
|
3437
|
+
),
|
|
3438
|
+
v2
|
|
3439
|
+
);
|
|
3440
|
+
continue;
|
|
3441
|
+
}
|
|
3442
|
+
$runtime.fail();
|
|
3443
|
+
}
|
|
3444
|
+
return go$r;
|
|
3445
|
+
};
|
|
3446
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
3447
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
3448
|
+
while (go$1$c) {
|
|
3449
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
3450
|
+
if (v1$1.tag === "Nil") {
|
|
3451
|
+
go$1$c = false;
|
|
3452
|
+
go$1$r = v$1;
|
|
3453
|
+
continue;
|
|
3454
|
+
}
|
|
3455
|
+
if (v1$1.tag === "Cons") {
|
|
3456
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
3457
|
+
go$1$a1 = v1$1._2;
|
|
3458
|
+
continue;
|
|
3459
|
+
}
|
|
3460
|
+
$runtime.fail();
|
|
3461
|
+
}
|
|
3462
|
+
return go$1$r;
|
|
3463
|
+
};
|
|
3464
|
+
return go$1(Data$dList$dTypes.Nil)(go(v._2)(v1._2)(Data$dList$dTypes.Nil));
|
|
3465
|
+
})()
|
|
3466
|
+
);
|
|
3467
|
+
}
|
|
3468
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3469
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3470
|
+
}
|
|
3471
|
+
if (v.tag === "Matrix") {
|
|
3472
|
+
if (v1.tag === "Matrix") {
|
|
3473
|
+
return $Expr("Matrix", v._1, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2), Data$dTuple.$Tuple(v1._3._1, v1._3._2), exprBwd(dictBoundedJoinSemilattice)(v._4)(v1._4));
|
|
3474
|
+
}
|
|
3475
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3476
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3477
|
+
}
|
|
3478
|
+
if (v.tag === "Lambda") {
|
|
3479
|
+
if (v1.tag === "Lambda") { return $Expr("Lambda", toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", v._2))(toClausesStateFwd(v1._1)))); }
|
|
3480
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3481
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3482
|
+
}
|
|
3483
|
+
if (v.tag === "DProject") {
|
|
3484
|
+
if (v1.tag === "Project") { return $Expr("Project", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), v1._2); }
|
|
3485
|
+
if (v1.tag === "DProject") { return $Expr("DProject", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)); }
|
|
3486
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3487
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3488
|
+
}
|
|
3489
|
+
if (v.tag === "App") {
|
|
3490
|
+
if (v1.tag === "App") { return $Expr("App", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)); }
|
|
3491
|
+
if (v._1.tag === "App") {
|
|
3492
|
+
if (v._1._1.tag === "Op") {
|
|
3493
|
+
if (v1.tag === "BinaryApp") { return $Expr("BinaryApp", exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1), v1._2, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._3)); }
|
|
3494
|
+
if (v1.tag === "ListComp") {
|
|
3495
|
+
if (v1._3.tag === "Cons" && v1._3._1.tag === "ListCompGen") { return $0(v, v1._3._1, v1._3._2, v1._2); }
|
|
3496
|
+
return $1(v, v1._3, v1._2);
|
|
3497
|
+
}
|
|
3498
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3499
|
+
}
|
|
3500
|
+
if (v._1._1.tag === "Var" && v._1._1._1 === "range" && v1.tag === "ListEnum") {
|
|
3501
|
+
if (v._2.tag === "App" && v._2._1.tag === "App") {
|
|
3502
|
+
return $Expr("ListEnum", exprBwd(dictBoundedJoinSemilattice)(v._1._2)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2._1._2)(v1._2));
|
|
3503
|
+
}
|
|
3504
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3505
|
+
}
|
|
3506
|
+
if (v1.tag === "ListComp") {
|
|
3507
|
+
if (v1._3.tag === "Cons" && v1._3._1.tag === "ListCompGen") { return $0(v, v1._3._1, v1._3._2, v1._2); }
|
|
3508
|
+
return $1(v, v1._3, v1._2);
|
|
3509
|
+
}
|
|
3510
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3511
|
+
}
|
|
3512
|
+
if (v._1.tag === "Op") {
|
|
3513
|
+
if (v1.tag === "UnaryPrefixApp") { return $Expr("UnaryPrefixApp", v1._1, exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)); }
|
|
3514
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3515
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3516
|
+
}
|
|
3517
|
+
if (v._1.tag === "Lambda") {
|
|
3518
|
+
if (v1.tag === "MatchAs") {
|
|
3519
|
+
return $Expr(
|
|
3520
|
+
"MatchAs",
|
|
3521
|
+
exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._1),
|
|
3522
|
+
(() => {
|
|
3523
|
+
const $2 = toClausesStateBwd(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", v._1._2))(toClausesStateFwd(Data$dNonEmpty.$NonEmpty(
|
|
3524
|
+
Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(v1._2._1._1, Data$dList$dTypes.Nil), v1._2._1._2),
|
|
3525
|
+
Data$dList$dTypes.listMap(x => Data$dTuple.$Tuple(Data$dNonEmpty.$NonEmpty(x._1, Data$dList$dTypes.Nil), x._2))(v1._2._2)
|
|
3526
|
+
))));
|
|
3527
|
+
return Data$dNonEmpty.$NonEmpty(Data$dTuple.$Tuple($2._1._1._1, $2._1._2), Data$dList$dTypes.listMap(x => Data$dTuple.$Tuple(x._1._1, x._2))($2._2));
|
|
3528
|
+
})()
|
|
3529
|
+
);
|
|
3530
|
+
}
|
|
3531
|
+
if (v._1._2.tag === "ElimConstr" && v1.tag === "IfElse") {
|
|
3532
|
+
const v2 = ifElseBwd(dictBoundedJoinSemilattice)(v)(Data$dTuple.$Tuple(v1._1, v1._2));
|
|
3533
|
+
return $Expr("IfElse", v2._1, v2._2);
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3537
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3538
|
+
}
|
|
3539
|
+
if (v1.tag === "ListComp") { return $1(v, v1._3, v1._2); }
|
|
3540
|
+
if (v.tag === "Let") {
|
|
3541
|
+
if (v1.tag === "Let") {
|
|
3542
|
+
const v2 = varDefsBwd(dictBoundedJoinSemilattice)(Expr.$Expr("Let", v._1, v._2))(Data$dTuple.$Tuple(v1._1, v1._2));
|
|
3543
|
+
return $Expr("Let", v2._1, v2._2);
|
|
3544
|
+
}
|
|
3545
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3546
|
+
}
|
|
3547
|
+
if (v.tag === "LetRec") {
|
|
3548
|
+
if (v1.tag === "LetRec") { return $Expr("LetRec", recDefsBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)); }
|
|
3549
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3550
|
+
}
|
|
3551
|
+
if (v.tag === "DocExpr" && v1.tag === "DocExpr") { return $Expr("DocExpr", exprBwd(dictBoundedJoinSemilattice)(v._1)(v1._1), exprBwd(dictBoundedJoinSemilattice)(v._2)(v1._2)); }
|
|
3552
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3553
|
+
};
|
|
3554
|
+
const clausesStateFwd = dictBoundedLattice => {
|
|
3555
|
+
const top = dictBoundedLattice.BoundedMeetSemilattice1().top;
|
|
3556
|
+
return dictMonadError => {
|
|
3557
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
3558
|
+
const Bind1 = Monad0.Bind1();
|
|
3559
|
+
const $0 = Bind1.Apply0().Functor0();
|
|
3560
|
+
const popArgFwd2 = popArgFwd(dictMonadError);
|
|
3561
|
+
const popVarFwd2 = popVarFwd(dictMonadError);
|
|
3562
|
+
const popRecordFwd2 = popRecordFwd(dictMonadError);
|
|
3563
|
+
const popListVarFwd2 = popListVarFwd(dictMonadError);
|
|
3564
|
+
const popConstrFwd2 = popConstrFwd(dictMonadError);
|
|
3565
|
+
const Applicative0 = Monad0.Applicative0();
|
|
3566
|
+
const sequence1 = Data$dList$dTypes.traversableList.traverse(Applicative0)(Data$dList$dTypes.identity);
|
|
3567
|
+
const rtraverse1 = Data$dBitraversable.bitraversableTuple.bitraverse(Applicative0)(Applicative0.pure);
|
|
3568
|
+
return ks => {
|
|
3569
|
+
const $1 = p => Bind1.bind(popConstrFwd2(Util.defined(DataType.dataTypeForCtr.dataTypeFor(monadThrowExceptT)(Util.definitely("clausesStateFwd ctrFor failed for: " + showPattern(p))((() => {
|
|
3570
|
+
if (p.tag === "Left") {
|
|
3571
|
+
if (p._1.tag === "PVar") { return Data$dMaybe.Nothing; }
|
|
3572
|
+
if (p._1.tag === "PConstr") { return Data$dMaybe.$Maybe("Just", p._1._1); }
|
|
3573
|
+
if (p._1.tag === "PRecord") { return Data$dMaybe.Nothing; }
|
|
3574
|
+
if (p._1.tag === "PListEmpty") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
3575
|
+
if (p._1.tag === "PListNonEmpty") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
3576
|
+
$runtime.fail();
|
|
3577
|
+
}
|
|
3578
|
+
if (p.tag === "Right") {
|
|
3579
|
+
if (p._1.tag === "PListVar") { return Data$dMaybe.Nothing; }
|
|
3580
|
+
if (p._1.tag === "PListEnd") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
3581
|
+
if (p._1.tag === "PListNext") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
3582
|
+
}
|
|
3583
|
+
$runtime.fail();
|
|
3584
|
+
})()))))(ks))(kss => $0.map(x => Expr.$Cont("ContElim", Expr.$Elim("ElimConstr", fromFoldable2(x))))(sequence1(Data$dList$dTypes.listMap(rtraverse1(clausesStateFwd(dictBoundedLattice)(dictMonadError)))(kss))));
|
|
3585
|
+
if (ks.tag === "Nil") { return Effect$dException.throwException(Effect$dException.error("absurd"))(); }
|
|
3586
|
+
if (ks.tag === "Cons") {
|
|
3587
|
+
if (ks._1._1.tag === "Nil") {
|
|
3588
|
+
if (ks._1._2._1.tag === "Nil" && ks._2.tag === "Nil") {
|
|
3589
|
+
return $0.map(Expr.ContExpr)(exprFwd(dictBoundedLattice)(dictMonadError)(dictBoundedLattice.BoundedJoinSemilattice0().JoinSemilattice0())(ks._1._2._2));
|
|
3590
|
+
}
|
|
3591
|
+
return $0.map((() => {
|
|
3592
|
+
const $2 = Expr.Lambda(top);
|
|
3593
|
+
return x => Expr.$Cont("ContExpr", $2(x.tag === "ContElim" ? x._1 : Effect$dException.throwException(Effect$dException.error("Eliminator expected"))()));
|
|
3594
|
+
})())(Bind1.bind(popArgFwd2(ks))(clausesStateFwd(dictBoundedLattice)(dictMonadError)));
|
|
3595
|
+
}
|
|
3596
|
+
if (ks._1._1.tag === "Cons") {
|
|
3597
|
+
if (ks._1._1._1.tag === "Left") {
|
|
3598
|
+
if (ks._1._1._1._1.tag === "PVar") {
|
|
3599
|
+
const $2 = ks._1._1._1._1._1;
|
|
3600
|
+
return $0.map((() => {
|
|
3601
|
+
const $3 = Expr.ElimVar($2);
|
|
3602
|
+
return x => Expr.$Cont("ContElim", $3(x));
|
|
3603
|
+
})())(Bind1.bind(popVarFwd2($2)(ks))(clausesStateFwd(dictBoundedLattice)(dictMonadError)));
|
|
3604
|
+
}
|
|
3605
|
+
if (ks._1._1._1._1.tag === "PRecord") {
|
|
3606
|
+
const $2 = ks._1._1._1._1._1;
|
|
3607
|
+
return $0.map((() => {
|
|
3608
|
+
const $3 = Expr.ElimDict(Bind.keys($2));
|
|
3609
|
+
return x => Expr.$Cont("ContElim", $3(x));
|
|
3610
|
+
})())(Bind1.bind(popRecordFwd2(Data$dList$dTypes.listMap(Data$dTuple.fst)($2))(ks))(clausesStateFwd(dictBoundedLattice)(dictMonadError)));
|
|
3611
|
+
}
|
|
3612
|
+
return $1(ks._1._1._1);
|
|
3613
|
+
}
|
|
3614
|
+
if (ks._1._1._1.tag === "Right" && ks._1._1._1._1.tag === "PListVar") {
|
|
3615
|
+
const $2 = ks._1._1._1._1._1;
|
|
3616
|
+
return $0.map((() => {
|
|
3617
|
+
const $3 = Expr.ElimVar($2);
|
|
3618
|
+
return x => Expr.$Cont("ContElim", $3(x));
|
|
3619
|
+
})())(Bind1.bind(popListVarFwd2($2)(ks))(clausesStateFwd(dictBoundedLattice)(dictMonadError)));
|
|
3620
|
+
}
|
|
3621
|
+
return $1(ks._1._1._1);
|
|
3622
|
+
}
|
|
3623
|
+
}
|
|
3624
|
+
$runtime.fail();
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3627
|
+
};
|
|
3628
|
+
const clausesStateBwd = dictBoundedJoinSemilattice => κ0 => ks => {
|
|
3629
|
+
const $0 = σ => popArgBwd(clausesStateBwd(dictBoundedJoinSemilattice)(Expr.$Cont("ContElim", σ))(Util.defined(popArgFwd1(ks))));
|
|
3630
|
+
const $1 = (m, p) => popConstrBwd((() => {
|
|
3631
|
+
const go = go$a0$copy => go$a1$copy => {
|
|
3632
|
+
let go$a0 = go$a0$copy, go$a1 = go$a1$copy, go$c = true, go$r;
|
|
3633
|
+
while (go$c) {
|
|
3634
|
+
const v = go$a0, v1 = go$a1;
|
|
3635
|
+
if (v1.tag === "Nil") {
|
|
3636
|
+
const go$1 = go$1$a0$copy => go$1$a1$copy => {
|
|
3637
|
+
let go$1$a0 = go$1$a0$copy, go$1$a1 = go$1$a1$copy, go$1$c = true, go$1$r;
|
|
3638
|
+
while (go$1$c) {
|
|
3639
|
+
const v$1 = go$1$a0, v1$1 = go$1$a1;
|
|
3640
|
+
if (v1$1.tag === "Nil") {
|
|
3641
|
+
go$1$c = false;
|
|
3642
|
+
go$1$r = v$1;
|
|
3643
|
+
continue;
|
|
3644
|
+
}
|
|
3645
|
+
if (v1$1.tag === "Cons") {
|
|
3646
|
+
go$1$a0 = Data$dList$dTypes.$List("Cons", v1$1._1, v$1);
|
|
3647
|
+
go$1$a1 = v1$1._2;
|
|
3648
|
+
continue;
|
|
3649
|
+
}
|
|
3650
|
+
$runtime.fail();
|
|
3651
|
+
}
|
|
3652
|
+
return go$1$r;
|
|
3653
|
+
};
|
|
3654
|
+
go$c = false;
|
|
3655
|
+
go$r = go$1(Data$dList$dTypes.Nil)(v);
|
|
3656
|
+
continue;
|
|
3657
|
+
}
|
|
3658
|
+
if (v1.tag === "Cons") {
|
|
3659
|
+
const $1 = clausesStateBwd(dictBoundedJoinSemilattice);
|
|
3660
|
+
const $2 = Foreign$dObject._lookup(Data$dMaybe.Nothing, Data$dMaybe.Just, v1._1._1, m);
|
|
3661
|
+
if ($2.tag === "Just") {
|
|
3662
|
+
go$a0 = Data$dList$dTypes.$List("Cons", Data$dTuple.$Tuple(v1._1._1, $1($2._1)(v1._1._2)), v);
|
|
3663
|
+
go$a1 = v1._2;
|
|
3664
|
+
continue;
|
|
3665
|
+
}
|
|
3666
|
+
go$a0 = v;
|
|
3667
|
+
go$a1 = v1._2;
|
|
3668
|
+
continue;
|
|
3669
|
+
}
|
|
3670
|
+
$runtime.fail();
|
|
3671
|
+
}
|
|
3672
|
+
return go$r;
|
|
3673
|
+
};
|
|
3674
|
+
return go(Data$dList$dTypes.Nil)(Util.defined(popConstrFwd1(Util.defined(DataType.dataTypeForCtr.dataTypeFor(monadThrowExceptT)(Util.definitely("absurd")((() => {
|
|
3675
|
+
if (p.tag === "Left") {
|
|
3676
|
+
if (p._1.tag === "PVar") { return Data$dMaybe.Nothing; }
|
|
3677
|
+
if (p._1.tag === "PConstr") { return Data$dMaybe.$Maybe("Just", p._1._1); }
|
|
3678
|
+
if (p._1.tag === "PRecord") { return Data$dMaybe.Nothing; }
|
|
3679
|
+
if (p._1.tag === "PListEmpty") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
3680
|
+
if (p._1.tag === "PListNonEmpty") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
3681
|
+
$runtime.fail();
|
|
3682
|
+
}
|
|
3683
|
+
if (p.tag === "Right") {
|
|
3684
|
+
if (p._1.tag === "PListVar") { return Data$dMaybe.Nothing; }
|
|
3685
|
+
if (p._1.tag === "PListEnd") { return Data$dMaybe.$Maybe("Just", "Nil"); }
|
|
3686
|
+
if (p._1.tag === "PListNext") { return Data$dMaybe.$Maybe("Just", ":"); }
|
|
3687
|
+
}
|
|
3688
|
+
$runtime.fail();
|
|
3689
|
+
})()))))(ks)));
|
|
3690
|
+
})())(ks);
|
|
3691
|
+
if (ks.tag === "Nil") { return Effect$dException.throwException(Effect$dException.error("absurd"))(); }
|
|
3692
|
+
if (κ0.tag === "ContExpr") {
|
|
3693
|
+
if (ks.tag === "Cons" && ks._1._1.tag === "Nil") {
|
|
3694
|
+
if (ks._1._2._1.tag === "Nil" && ks._2.tag === "Nil") {
|
|
3695
|
+
return Data$dList$dTypes.$List(
|
|
3696
|
+
"Cons",
|
|
3697
|
+
Data$dTuple.$Tuple(Data$dList$dTypes.Nil, Data$dTuple.$Tuple(Data$dList$dTypes.Nil, exprBwd(dictBoundedJoinSemilattice)(κ0._1)(ks._1._2._2))),
|
|
3698
|
+
Data$dList$dTypes.Nil
|
|
3699
|
+
);
|
|
3700
|
+
}
|
|
3701
|
+
if (κ0._1.tag === "Lambda") { return $0(κ0._1._2); }
|
|
3702
|
+
}
|
|
3703
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3704
|
+
}
|
|
3705
|
+
if (κ0.tag === "ContElim") {
|
|
3706
|
+
if (ks.tag === "Cons" && ks._1._1.tag === "Cons") {
|
|
3707
|
+
if (ks._1._1._1.tag === "Left") {
|
|
3708
|
+
if (ks._1._1._1._1.tag === "PVar") {
|
|
3709
|
+
if (κ0._1.tag === "ElimVar") { return popVarBwd(κ0._1._1)(clausesStateBwd(dictBoundedJoinSemilattice)(κ0._1._2)(Util.defined(popVarFwd1(κ0._1._1)(ks)))); }
|
|
3710
|
+
if (κ0._1.tag === "ElimConstr") { return $1(κ0._1._1, ks._1._1._1); }
|
|
3711
|
+
return Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))();
|
|
3712
|
+
}
|
|
3713
|
+
if (ks._1._1._1._1.tag === "PRecord" && κ0._1.tag === "ElimDict") {
|
|
3714
|
+
const $2 = ks._1._1._1._1._1;
|
|
3715
|
+
return popRecordBwd(Data$dList$dTypes.listMap(Data$dTuple.fst)($2))(clausesStateBwd(dictBoundedJoinSemilattice)(κ0._1._2)(Util.defined(popRecordFwd1(Data$dList$dTypes.listMap(Data$dTuple.fst)($2))(ks))));
|
|
3716
|
+
}
|
|
3717
|
+
if (κ0._1.tag === "ElimConstr") { return $1(κ0._1._1, ks._1._1._1); }
|
|
3718
|
+
return Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))();
|
|
3719
|
+
}
|
|
3720
|
+
if (ks._1._1._1.tag === "Right" && ks._1._1._1._1.tag === "PListVar" && κ0._1.tag === "ElimVar") {
|
|
3721
|
+
return popListVarBwd(κ0._1._1)(clausesStateBwd(dictBoundedJoinSemilattice)(κ0._1._2)(Util.defined(popListVarFwd1(κ0._1._1)(ks))));
|
|
3722
|
+
}
|
|
3723
|
+
if (κ0._1.tag === "ElimConstr") { return $1(κ0._1._1, ks._1._1._1); }
|
|
3724
|
+
}
|
|
3725
|
+
return Effect$dException.throwException(Effect$dException.error(Effect$dException.throwException(Effect$dException.error("Shape mismatch"))()))();
|
|
3726
|
+
}
|
|
3727
|
+
$runtime.fail();
|
|
3728
|
+
};
|
|
3729
|
+
const paragraphBwd = dictBoundedJoinSemilattice => v => v1 => {
|
|
3730
|
+
if (v.tag === "Constr" && v._3.tag === "Cons" && v._3._2.tag === "Nil" && v._2 === "Paragraph") { return paragraphElemsBwd(dictBoundedJoinSemilattice)(v._3._1)(v1); }
|
|
3731
|
+
return Effect$dException.throwException(Effect$dException.error("absurd"))();
|
|
3732
|
+
};
|
|
3733
|
+
const moduleFwd = dictMonadError => {
|
|
3734
|
+
const Monad0 = dictMonadError.MonadThrow0().Monad0();
|
|
3735
|
+
const $0 = Monad0.Bind1().Apply0().Functor0();
|
|
3736
|
+
const varDefFwd1 = varDefFwd(dictMonadError);
|
|
3737
|
+
const recDefsFwd1 = recDefsFwd(dictMonadError);
|
|
3738
|
+
const traverse2 = Data$dList$dTypes.traversableList.traverse(Monad0.Applicative0());
|
|
3739
|
+
return dictBoundedLattice => {
|
|
3740
|
+
const varDefFwd2 = varDefFwd1(dictBoundedLattice);
|
|
3741
|
+
const recDefsFwd2 = recDefsFwd1(dictBoundedLattice);
|
|
3742
|
+
return v => $0.map(Expr.Module)(traverse2(v1 => {
|
|
3743
|
+
if (v1.tag === "Left") { return $0.map(Data$dEither.Left)(varDefFwd2(v1._1)); }
|
|
3744
|
+
if (v1.tag === "Right") { return $0.map(Data$dEither.Right)(recDefsFwd2(v1._1)); }
|
|
3745
|
+
$runtime.fail();
|
|
3746
|
+
})(Data$dList$dTypes.bindList.bind(Data$dList$dTypes.listMap(v1 => {
|
|
3747
|
+
if (v1.tag === "Left") { return Data$dList$dTypes.listMap(Data$dEither.Left)(Data$dList$dTypes.$List("Cons", v1._1._1, v1._1._2)); }
|
|
3748
|
+
if (v1.tag === "Right") { return Data$dList$dTypes.$List("Cons", Data$dEither.$Either("Right", v1._1), Data$dList$dTypes.Nil); }
|
|
3749
|
+
$runtime.fail();
|
|
3750
|
+
})(v._1))(Control$dBind.identity)));
|
|
3751
|
+
};
|
|
3752
|
+
};
|
|
3753
|
+
const desugarModuleFwd = dictMonadError => moduleFwd(dictMonadError);
|
|
3754
|
+
export {
|
|
3755
|
+
$DictEntry,
|
|
3756
|
+
$Expr,
|
|
3757
|
+
$ListRest,
|
|
3758
|
+
$ListRestPattern,
|
|
3759
|
+
$Module,
|
|
3760
|
+
$ParagraphElem,
|
|
3761
|
+
$Pattern,
|
|
3762
|
+
$Qualifier,
|
|
3763
|
+
$VarDef,
|
|
3764
|
+
App,
|
|
3765
|
+
AppIsSymbol,
|
|
3766
|
+
BinaryApp,
|
|
3767
|
+
BinaryAppIsSymbol,
|
|
3768
|
+
Clause,
|
|
3769
|
+
ClauseIsSymbol,
|
|
3770
|
+
Clauses,
|
|
3771
|
+
ClausesIsSymbol,
|
|
3772
|
+
Constr,
|
|
3773
|
+
ConstrIsSymbol,
|
|
3774
|
+
DProject,
|
|
3775
|
+
DProjectIsSymbol,
|
|
3776
|
+
Dictionary,
|
|
3777
|
+
DictionaryIsSymbol,
|
|
3778
|
+
DocExpr,
|
|
3779
|
+
DocExprIsSymbol,
|
|
3780
|
+
End,
|
|
3781
|
+
EndIsSymbol,
|
|
3782
|
+
ExprKey,
|
|
3783
|
+
ExprKeyIsSymbol,
|
|
3784
|
+
Float,
|
|
3785
|
+
FloatIsSymbol,
|
|
3786
|
+
IfElse,
|
|
3787
|
+
IfElseIsSymbol,
|
|
3788
|
+
Int,
|
|
3789
|
+
IntIsSymbol,
|
|
3790
|
+
Lambda,
|
|
3791
|
+
LambdaIsSymbol,
|
|
3792
|
+
Let,
|
|
3793
|
+
LetIsSymbol,
|
|
3794
|
+
LetRec,
|
|
3795
|
+
LetRecIsSymbol,
|
|
3796
|
+
ListComp,
|
|
3797
|
+
ListCompDecl,
|
|
3798
|
+
ListCompDeclIsSymbol,
|
|
3799
|
+
ListCompGen,
|
|
3800
|
+
ListCompGenIsSymbol,
|
|
3801
|
+
ListCompGuard,
|
|
3802
|
+
ListCompGuardIsSymbol,
|
|
3803
|
+
ListCompIsSymbol,
|
|
3804
|
+
ListEmpty,
|
|
3805
|
+
ListEmptyIsSymbol,
|
|
3806
|
+
ListEnum,
|
|
3807
|
+
ListEnumIsSymbol,
|
|
3808
|
+
ListNonEmpty,
|
|
3809
|
+
ListNonEmptyIsSymbol,
|
|
3810
|
+
MatchAs,
|
|
3811
|
+
MatchAsIsSymbol,
|
|
3812
|
+
Matrix,
|
|
3813
|
+
MatrixIsSymbol,
|
|
3814
|
+
Module,
|
|
3815
|
+
Next,
|
|
3816
|
+
NextIsSymbol,
|
|
3817
|
+
Op,
|
|
3818
|
+
PConstr,
|
|
3819
|
+
PConstrIsSymbol,
|
|
3820
|
+
PListEmpty,
|
|
3821
|
+
PListEnd,
|
|
3822
|
+
PListNext,
|
|
3823
|
+
PListNextIsSymbol,
|
|
3824
|
+
PListNonEmpty,
|
|
3825
|
+
PListNonEmptyIsSymbol,
|
|
3826
|
+
PListVar,
|
|
3827
|
+
PRecord,
|
|
3828
|
+
PRecordIsSymbol,
|
|
3829
|
+
PVar,
|
|
3830
|
+
Paragraph,
|
|
3831
|
+
ParagraphIsSymbol,
|
|
3832
|
+
Project,
|
|
3833
|
+
ProjectIsSymbol,
|
|
3834
|
+
RecDef,
|
|
3835
|
+
Str,
|
|
3836
|
+
StrIsSymbol,
|
|
3837
|
+
Token,
|
|
3838
|
+
UnaryPrefixApp,
|
|
3839
|
+
UnaryPrefixAppIsSymbol,
|
|
3840
|
+
Unquote,
|
|
3841
|
+
UnquoteIsSymbol,
|
|
3842
|
+
Var,
|
|
3843
|
+
VarDef,
|
|
3844
|
+
VarDefIsSymbol,
|
|
3845
|
+
VarKey,
|
|
3846
|
+
VarKeyIsSymbol,
|
|
3847
|
+
anon,
|
|
3848
|
+
clausesStateBwd,
|
|
3849
|
+
clausesStateFwd,
|
|
3850
|
+
ctrFor,
|
|
3851
|
+
desugarModuleFwd,
|
|
3852
|
+
desugarableClausesElim,
|
|
3853
|
+
desugarableDictEntryExpr,
|
|
3854
|
+
desugarableExprExpr,
|
|
3855
|
+
desugarableListRestExpr,
|
|
3856
|
+
difference,
|
|
3857
|
+
econs,
|
|
3858
|
+
elimBool,
|
|
3859
|
+
enil,
|
|
3860
|
+
eq8,
|
|
3861
|
+
eqClause,
|
|
3862
|
+
eqClauses,
|
|
3863
|
+
eqDictEntry,
|
|
3864
|
+
eqExpr,
|
|
3865
|
+
eqList,
|
|
3866
|
+
eqListRest,
|
|
3867
|
+
eqListRestPattern,
|
|
3868
|
+
eqParagraphElem,
|
|
3869
|
+
eqPattern,
|
|
3870
|
+
eqQualifier,
|
|
3871
|
+
eqTuple1,
|
|
3872
|
+
eqTuple2,
|
|
3873
|
+
eqVarDef,
|
|
3874
|
+
exprBwd,
|
|
3875
|
+
exprFwd,
|
|
3876
|
+
forConstrBwd,
|
|
3877
|
+
forConstrFwd,
|
|
3878
|
+
fromFoldable,
|
|
3879
|
+
fromFoldable1,
|
|
3880
|
+
fromFoldable2,
|
|
3881
|
+
functorClause,
|
|
3882
|
+
functorClauses,
|
|
3883
|
+
functorDictEntry,
|
|
3884
|
+
functorExpr,
|
|
3885
|
+
functorListRest,
|
|
3886
|
+
functorModule,
|
|
3887
|
+
functorParagraphElem,
|
|
3888
|
+
functorQualifier,
|
|
3889
|
+
functorVarDef,
|
|
3890
|
+
genericClause_,
|
|
3891
|
+
genericClauses_,
|
|
3892
|
+
genericDictEntry_,
|
|
3893
|
+
genericExpr_,
|
|
3894
|
+
genericListRestPattern_,
|
|
3895
|
+
genericListRest_,
|
|
3896
|
+
genericParagraphElem_,
|
|
3897
|
+
genericPattern_,
|
|
3898
|
+
genericQualifier_,
|
|
3899
|
+
genericShowArgsArgument,
|
|
3900
|
+
genericShowArgsArgument1,
|
|
3901
|
+
genericShowArgsArgument2,
|
|
3902
|
+
genericShowArgsProduct1,
|
|
3903
|
+
genericShowSum,
|
|
3904
|
+
genericShowSum1,
|
|
3905
|
+
genericShowSum2,
|
|
3906
|
+
genericShowSum3,
|
|
3907
|
+
genericShowSum4,
|
|
3908
|
+
genericShowSum5,
|
|
3909
|
+
genericShowSum6,
|
|
3910
|
+
genericVarDef_,
|
|
3911
|
+
ifElseBwd,
|
|
3912
|
+
ifElseFwd,
|
|
3913
|
+
joinSemilatticeExpr,
|
|
3914
|
+
listCompBwd,
|
|
3915
|
+
listCompFwd,
|
|
3916
|
+
moduleFwd,
|
|
3917
|
+
monadErrorExceptT,
|
|
3918
|
+
monadThrowExceptT,
|
|
3919
|
+
newtypeClause_,
|
|
3920
|
+
newtypeClauses_,
|
|
3921
|
+
newtypeRecDef_,
|
|
3922
|
+
orElseBwd,
|
|
3923
|
+
orElseFwd,
|
|
3924
|
+
pListVarAnon,
|
|
3925
|
+
pVarAnon,
|
|
3926
|
+
paragraphBwd,
|
|
3927
|
+
paragraphElemsBwd,
|
|
3928
|
+
paragraphElemsFwd,
|
|
3929
|
+
paragraphFwd,
|
|
3930
|
+
popArgBwd,
|
|
3931
|
+
popArgFwd,
|
|
3932
|
+
popArgFwd1,
|
|
3933
|
+
popConstrBwd,
|
|
3934
|
+
popConstrFwd,
|
|
3935
|
+
popConstrFwd1,
|
|
3936
|
+
popListVarBwd,
|
|
3937
|
+
popListVarFwd,
|
|
3938
|
+
popListVarFwd1,
|
|
3939
|
+
popRecordBwd,
|
|
3940
|
+
popRecordFwd,
|
|
3941
|
+
popRecordFwd1,
|
|
3942
|
+
popVarBwd,
|
|
3943
|
+
popVarFwd,
|
|
3944
|
+
popVarFwd1,
|
|
3945
|
+
recDefBwd,
|
|
3946
|
+
recDefFwd,
|
|
3947
|
+
recDefsBwd,
|
|
3948
|
+
recDefsFwd,
|
|
3949
|
+
showClause,
|
|
3950
|
+
showClauses,
|
|
3951
|
+
showDictEntry,
|
|
3952
|
+
showExpr,
|
|
3953
|
+
showListRest,
|
|
3954
|
+
showListRestPattern,
|
|
3955
|
+
showParagraphElem,
|
|
3956
|
+
showPattern,
|
|
3957
|
+
showPattern1,
|
|
3958
|
+
showQualifier,
|
|
3959
|
+
showTuple,
|
|
3960
|
+
showTuple1,
|
|
3961
|
+
showTuple2,
|
|
3962
|
+
showVarDef,
|
|
3963
|
+
subpatts,
|
|
3964
|
+
toClausesStateBwd,
|
|
3965
|
+
toClausesStateFwd,
|
|
3966
|
+
toUnfoldable,
|
|
3967
|
+
unless,
|
|
3968
|
+
varDefFwd,
|
|
3969
|
+
varDefsBwd,
|
|
3970
|
+
varDefsFwd,
|
|
3971
|
+
varKeyBwd
|
|
3972
|
+
};
|