1. 01 Oct, 2020 1 commit
    • 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
      TODOs.
      dfd43d66
  2. 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
      15489cf4
  3. 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
      REPL.
      a1550c8c
  4. 24 Aug, 2020 1 commit
  5. 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.
      18f53c2c
  6. 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`.
      6c6f6526
  7. 19 Jun, 2020 2 commits
    • 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
      9f3d3d66
    • 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.
      1145fb98
  8. 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.
      55505f3a
  9. 09 Jun, 2020 1 commit
    • 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.
      8a5a2539
  10. 03 Jun, 2020 4 commits
  11. 01 Jun, 2020 2 commits
  12. 25 May, 2020 1 commit
  13. 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
      825f6432
    • 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
      89ae9d78
  14. 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.
      0f7ebb99
    • 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`
      bff9757b
    • 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`.
      6cc9ddec
  15. 20 May, 2020 2 commits
  16. 15 May, 2020 1 commit
    • Kirill Elagin's avatar
      Add licensing information · 1776886c
      Kirill Elagin authored
      * Add licenses for everything
      * Almost everything is copyrighted by TQ and the license is MIT,
      * apart from some dot-files in the root (Unlicensed by Serokell)
      * and example contracts comming from Tezos.
      1776886c
  17. 13 May, 2020 1 commit
  18. 11 May, 2020 1 commit
    • Pinto Pasquale's avatar
      [#135] add custom Indigo fromInteger · 2afa4bb2
      Pinto Pasquale authored
      Problem: type signatures or annotations always need to be specified for
      numeric values in Indigo code, because they are otherwise ambiguous.
      However, Indigo uses `RebindableSyntax` that allows to define a
      `fromInteger` function used to resolve numeric literals, and this can
      be used to implement (some) custom resolution logic.
      
      Solution: implement a `fromInteger` that takes an additional value
      (beside the Integer) that provides disambiguation for the resulting
      value type, with function constructors for this type that match the
      target Michelson type.
      Additionally, because of this, the 'int' expression has been renamed
      'toInt'.
      2afa4bb2
  19. 08 May, 2020 2 commits
  20. 04 May, 2020 1 commit
    • Pinto Pasquale's avatar
      [#90] add appendix to Indigo tutorial · 44750f1e
      Pinto Pasquale authored
      Problem: The chapters of the Indigo tutorial refer to appendices that
      are empty regarding types and expressions.
      
      Solution: add content to both appendices (and complete the tutorial).
      44750f1e
  21. 01 May, 2020 1 commit
    • Anton Myasnikov's avatar
      [#182] Rename *Just and *Nothing to *Some and *None · 5710d3bf
      Anton Myasnikov authored
      Problem: In indigo we have expressions that refer to haskell `Maybe`
      types such as `ifJust` which is inconvient since we use constructors
      such as `some` and `none` that refer to Michelson types and so such
      occurences need to be renamed.
      
      Solution: Rename `ifJust` and `ifNothing` to `ifSome` and `ifNone`.
      5710d3bf
  22. 28 Apr, 2020 1 commit
    • Ilya Peresadin's avatar
      [#143] Define different types of lambda with single argument · 4909b41f
      Ilya Peresadin authored
      Problem: some lambas may modify storage, some may not,
      and depending on that the amount of code which is generated
      can be reduced.
      
      Solution: introduce three types of lambda with one argument:
      * pure lambdas (which don't modify neither storage nor operations)
      * regular lambas (which modify storage)
      * lambda with effects (which modify storage and operations)
      4909b41f
  23. 20 Apr, 2020 1 commit
    • Pinto Pasquale's avatar
      [90] improve docs of Indigo tutorial and the modules it references · 89be01f4
      Pinto Pasquale authored
      Problem: Indigo tutorial has not been fully checked since recent
      changes and there are some small mistakes, additionally the modules
      it references also have some imperfections in their docs.
      
      Solution: The tutorial was rechecked agaist the current implementation
      and the docs have been rephrased/adjusted.
      Additionally some code-style fixes have been made in these modules.
      89be01f4
  24. 07 Apr, 2020 1 commit
    • Pinto Pasquale's avatar
      [#90] fix Indigo's tutorial package to make it buildable · ebbc1761
      Pinto Pasquale authored
      Problem: Indigo's tutorial does not actually build, because its
      example modules are not included in the cabal file.
      This was caused by the modules having thir name starting with a
      number instead of a capital letter.
      Additionally, recent updates have broken these modules so they
      would not compile anyway.
      
      Solution: rename modules to include them in the cabal file, fix what
      was broken by recent changes.
      ebbc1761
  25. 01 Apr, 2020 1 commit
  26. 19 Mar, 2020 1 commit
    • Pinto Pasquale's avatar
      [#90] update Indigo README and add a tutorial · 372c60c6
      Pinto Pasquale authored
      Problem: Indigo documentation is outdated and was written for internal
      use only. It would be better to have a newcomers-frienly tutorial that
      also introduces concepts for developers.
      
      Solution: create a tutorial with examples that is easy to follow and
      contains (updated) information from the old README.
      Provide then a simpler README that refers to the tutorial.
      Additionally, add printing and type synonyms that help Indigo usage.
      372c60c6