1. 01 Oct, 2020 3 commits
    • Ilya Peresadin's avatar
      [#279] Combine Decompose and Sequential approach · 923952eb
      Ilya Peresadin authored
      Problem: currently Sequential machinery incompatible with
      exising decomposition approach (which has been removed)
      Solution: glue them together to get working code.
    • Pinto Pasquale's avatar
      [#279] add intermediate compilation representation for optimization · dfd43d66
      Pinto Pasquale authored
      Problem: performing analysis and modification of Indigo's code for the
      purpose of optimization during compilation is not robust, nor
      convenient. The problem resides in the fact that to manipulate the
      frontend freer monad before it is compiled to the backend we have to
      interpret it and break the bindings.
      This was circumvented based on predictability of the `Var`s resulting
      from statements, but we need something better to have a wider and more
      stable machinery for optimization.
      Solution: add an intermediate representation that is not a Monad, but a
      data-type that also contains (as "argument") the resulting vars (if
      any). The variable are all assigned in the conversion between the
      frontend and this new representation. This in turns frees the backend
      from generating variables, making its function without a return value
      as well (and allowing a conversion to happen).
      Additinally, because it was easier to solve these now instead of
      updating them and solve them later, this also solves some exising
    • Pinto Pasquale's avatar
      [#279] remove Indigo's machinery for field decomposition · 7fe0beea
      Pinto Pasquale authored
      Problem: current field-based optimization is built around decomposed
      structures, this is not compatible with the SRA compiler optimization
      that we want to implement.
      Solution: revert the field decomposition machinery, return to a simple
      variable representation and field manipulation.
      As a result of this semplification the `Indigo.Internal.Object` module
      has been renamed to `Indigo.Internal.Var`.
  2. 29 Sep, 2020 1 commit
    • Moremi Vannak's avatar
      [#232] Extend Indigo tutorial with information about full smart contract development · de9dfe25
      Moremi Vannak authored
      Problem: Indigo tutorial describes language features that allow you to
      write contract code, but apparently it does not mention tools that let
      you and other people use your contract. In other words, how to go from
      just having Indigo code into a full project consisting Indigo contract(s).
      Solution: Add a tutorial on how to setup an Indigo project for full
      smart contract development.
  3. 25 Sep, 2020 1 commit
    • Moremi Vannak's avatar
      [#270] Add Indigo CLI installation script · 812bb78e
      Moremi Vannak authored
      Problem: Currently to get started with Indigo, we need to ask the users
      following its tutorial to do two things:
      - install `stack`
      - compile Indigo
      This is not ideal, because it requires to read about `stack` and a lot of
      patience just to try out even the first, simplest, example.
      What we would like for the user instead is to be able to "grab" and/or
      install Indigo directly without having to jump through hoops.
      Solution: Create a script that will install stack and
      Indigo CLI and add how to install Indigo CLI in the tutorial.
  4. 24 Sep, 2020 1 commit
  5. 04 Sep, 2020 1 commit
    • Pinto Pasquale's avatar
      [#337] add expression to coerce to Indigo · 008a4460
      Pinto Pasquale authored
      Problem: there is no way in Indigo to coerce from a type to another
      that has the same Michelson representation.
      Solution: add a 'coerce' and 'forcedCoerce' expressions to allow
      coercing between these types.
      fixup! [#337] add expression to coerce to Indigo
  6. 02 Sep, 2020 1 commit
    • Pinto Pasquale's avatar
      [#330] add wrap and unwrap expressions for sum types constructors · a946fe8a
      Pinto Pasquale authored
      Problem: Indigo lacks an equivalent of Lorent'z `wrap_` to make
      values of sum types from a single-field constructor.
      Moreover, the same can be said for unwrapping.
      Solution: add expression to Indigo to perform wrapping and unwrapping
      of values to/from single-field constructors of sum types
  7. 01 Sep, 2020 1 commit
    • Moremi Vannak's avatar
      [#277] Add good example contracts to the Indigo website · 15489cf4
      Moremi Vannak authored
      Problem: People want to see examples of Indigo smart contracts,
      but our website does not have anything beside toy examples. We have
      some examples that demonstrate how Indigo can be used to write non-toy
      contracts, we should make it easy to find them. If you consider using
      Indigo for your non-toy project, you want to see examples of successful
      non-toy smart contracts.
      Solutions: Add examples of Indigo smart contracts in the Indigo doc such as:
      - AbstractLedger and ManagedLedger
      - Globacap
  8. 31 Aug, 2020 1 commit
    • Moremi Vannak's avatar
      [#180] Add contract documentation tutorial to Indigo website · a1550c8c
      Moremi Vannak authored
      Problem: The first problem is that documenting entrypoints requires defining
      instances of a big typeclass, which is scary-looking for beginners,
      especially if they are not Haskell-friendly.
      The second problem is that, while there are ways to print and create contracts
      from ghci explained in the tutorial, there is no explanation of docs in it or
      method to interact with them.
      Solution: Add documentation tutorial including the interacting docs via the
  9. 24 Aug, 2020 1 commit
  10. 18 Aug, 2020 1 commit
  11. 05 Aug, 2020 2 commits
    • Pinto Pasquale's avatar
      [TM-410] fix Indigo website included lines · e0f2026b
      Pinto Pasquale authored
      Problem: Some lines included in the website from source files are not
      correct. The mistake was probably caused by an incorrect update after
      switching from 0-indexed to 1-indexed, so there are 2 issues:
      - single lines are included still using 0-indexes
      - some line indexes have not been updated, pointing at some wrong lines
      Solution: update the line-including plugin to use 1-indexing for single
      lines and update the indexes in document inclusions that are incorrect.
    • Pinto Pasquale's avatar
      [#311] add more info for contributing to Indigo's Website · 72e648b6
      Pinto Pasquale authored
      Problem: Indigo's website does not explain how to open issues or merge
      requests for it. Additionally, its directory's README does not specify
      well how to build it or check the result of changes.
      Solution: add a paragraph for contributing to the website's main page
      and more building info in its source code README.
  12. 22 Jul, 2020 1 commit
    • Anton Myasnikov's avatar
      [#27] Rename EntryPoints to Entrypoints · 18f53c2c
      Anton Myasnikov authored
      Problem: Currently we have some appearances of
      "EntryPoints" throughout the project which should
      be renamed to "Entrypoints".
      Solution: Rename the corresponding types, functions
      and modules.
  13. 20 Jul, 2020 1 commit
    • Moremi Vannak's avatar
      [#282] Add safe initial values for mutez · 6c6f6526
      Moremi Vannak authored
      Problem: It would be nice to have safe initial values for mutez like zero and one,
      available directly from the library and they are pretty common things to have for
      Natural-like numbers.
      Solution: Add `zeroMutez` and `oneMutez`.
  14. 17 Jul, 2020 1 commit
    • Pinto Pasquale's avatar
      [TM-410] improve readability of Indigo website tables · dffd7015
      Pinto Pasquale authored
      Problem: long "Description" lines in the expressions page in the
      Indigo website do not look good as "centered", however the short
      code cells look worse otherwise.
      Solution: change the tables' cells text alignment to justified, but
      also change the style of code inside tables to look better.
  15. 19 Jun, 2020 3 commits
    • Pinto Pasquale's avatar
      [TM-410] fix included source files links · 7d4bd812
      Pinto Pasquale authored
      Problem: links for included source files in Indigo's website are
      built incorrectly, pointing at the wrong URL.
      This is because the `base_url` set in `mkdocs.yml` for `include_code`
      does not end with a `/` character.
      Solution: Add an `/` to the end of `base_url`.
    • Pinto Pasquale's avatar
      [TM-410] make Indigo's tutorial a buildable website · 9f3d3d66
      Pinto Pasquale authored
      Problem: we can use the existing tutorial to make a static website
      for Indigo using mkdocs.
      This needs changed in the documentation's content, namely:
      - we would like to statically include part of the example modules
      - there needs to be an index/home page
      - the appendices should be moved to be "reference" pages
      - the explanations should not be flat, but include note blocks, etc.
      - references to local files need to be removed, as they don't work
      Solution: Make a buildable website with:
      - configuration for mkdocs and its extension
      - CSS for customized styling
      - a python-markdown extension for example source code inclusion
    • Pinto Pasquale's avatar
      [TM-410] re-arrange indigo tutorial's files for website building · 1145fb98
      Pinto Pasquale authored
      Problem: A website for Indigo needs to be built from its current
      tutorial, however the tree structure is not ideal, in particular:
      - markdown files for the chapters are organized alonside the source
        code for the examples
      - the example modules are tied to the documentation structure
      These constitute a problem because we want the documentation's file
      tree structure to be independent from the examples and vice-versa.
      Solution: move the markdown files in a flat new directory and move
      the example modules in a topic-based tree structure.
  16. 15 Jun, 2020 1 commit
    • Anton Myasnikov's avatar
      [#177] Make 'contractCallingUnsafe' easier to use · 55505f3a
      Anton Myasnikov authored
      Problem: Currently `contractCallingUnsafe` uses `EpName` for its
      argument which possesses a problem for a beginners to properly use.
      Solution: Define `buildEpName` and `unsafeBuildEpName` functions and
      update the tutorial.
  17. 09 Jun, 2020 2 commits
    • Pinto Pasquale's avatar
      [#124] revise Indigo operators · 8a5a2539
      Pinto Pasquale authored
      Problem: some operators in Indigo are named in an odd way (usually with
      a `.`) to avoid conflicts with Haskell operators, additionally many of
      them operating on structures have been added organically and do not
      follow any convention, being confusing.
      Moreover, many of them do not have a prefix counterpart, which may be
      useful to have available.
      Solution: rename operators, replacing the ones from Prelude in case of
      name clashing and based on a convention in case of structure-based.
      Addionally, add all necessary prefix counterpart using the names of
      Michelson instructions where one exists.
    • Moremi Vannak's avatar
      [#221] Use mixins instead of base-noprelude · 07210557
      Moremi Vannak authored
      Problem: We are using `base-noprelude` dependency which is not a
      standard package. We can use `base` instead and just hide its
      `Prelude` module using `mixins` feature of Cabal. The advantage is
      that we will have less dependencies.
      Solution: Remove `base-noprelude`, use `base` with mixin `hiding
      Prelude` instead.
  18. 03 Jun, 2020 4 commits
  19. 01 Jun, 2020 2 commits
  20. 30 May, 2020 1 commit
    • Maxim Koltsov's avatar
      [TM-62] Do address computation more correctly · 70388829
      Maxim Koltsov authored
      Problem: currently the address of any originated contract is calculated,
      essentially, as a hash of its JSON-encoded code and initial storage.
      This means that multiple originations of the same contract lead to the
      identical addresses, contrary to what reference Tezos does.
      Solution: include a global operation counter and in-operation
      origination nonce to the calculation of the addresses. Match Tezos's
      encoding of addresses more closely, namely dervive addresses from any
      global operation that led to origination, not the immediate
  21. 25 May, 2020 1 commit
  22. 22 May, 2020 2 commits
    • Moremi Vannak's avatar
      [#217] - Add `nonZero` to Indigo expression · 825f6432
      Moremi Vannak authored
      Problem:  We have `nonZero` in Lorentz that returns Nothing if the
      value is `0`, and `Just` the value otherwise.
      There is however no equivalent to it in Indigo.
      Solution: Add `nonZero` expression equivalent to its Lorentz homonym
    • Moremi Vannak's avatar
      [#138] Reduce the usage `$` in Indigo · 89ae9d78
      Moremi Vannak authored
      Problem: Indigo code often contains the `$` Haskell operator,
      however since the language is meant to be used by people not
      familiar with Haskell it would be great to not make it a necessity.
      Solution: Reduce usage of `$` in 2 places:
      1. right before `do` is used for a block code
      - Solved by using `BlockArguments`
      2. right after `new`
      - Solved by treating `new$` as one keyword
  23. 21 May, 2020 3 commits
    • Moremi Vannak's avatar
      [#175] Remove TODO related to `xor` · 0f7ebb99
      Moremi Vannak authored
      Problem: There is a TODO comment related to `xor` issue that is not removed.
      Solution: Remove the TODO comment.
    • Moremi Vannak's avatar
      [#176] Rename `concat'` expression in Indigo · bff9757b
      Moremi Vannak authored
      Problem: Indigo has a `concat` expression to concat 2 values and
      `concat'` to concatenate a list of values. We want to keep `concat`
      since it has an equivalent to Michelson's `CONCAT`. However,
      `concat'` can be confusing, it is better to rename this.
      Solution: Rename `concat'` to `concatAll`
    • Moremi Vannak's avatar
      [#204] Fix the Indigo tutorial REPL command · 6cc9ddec
      Moremi Vannak authored
      Problem: Current `stack ghci indigo` causes ambiguous error
      `Ambiguous occurrence ‘>>=’ `. A workaround is to load the file
      directly `stack ghci code/indigo/src/Indigo.hs`, but that is not ideal.
      Solution: By using stack target syntax, we can add an executable
      component inside indigo, and only load that executable via `stack
      ghci :indigo-repl`.
  24. 20 May, 2020 2 commits
  25. 19 May, 2020 2 commits
    • Ivan Gromakovskii's avatar
      Require cabal-version to be 2.2 · 6be834a4
      Ivan Gromakovskii authored
      Problem: somehow hpack decided to set `cabal-version` to 2.0 and
      now `indigo` fails the check for common mistakes:
      Package check reported the following errors:
      The package uses RebindableSyntax with OverloadedStrings or
      OverloadedLists in default-extensions, and also Paths_ autogen module.
      That configuration is known to cause compile failures with Cabal < 2.2.
      To use these default-extensions with Paths_ autogen module specify at
      least 'cabal-version: 2.2'.
      Solution: in order to avoid such errors we explicitly require
      cabal-version to be 2.2.
    • Ivan Gromakovskii's avatar
      Update license information in Haskell packages · 9754db3a
      Ivan Gromakovskii authored
      Problem: we recently updated license that applies to all files.
      Now it's MIT. But Haskell packages still say it's AGPL.
      Solution: update `LICENSE` files and `license` fields.