Giter VIP home page Giter VIP logo

lamdu / lamdu Goto Github PK

View Code? Open in Web Editor NEW
1.8K 54.0 65.0 31.92 MB

lamdu - towards the next generation IDE

Home Page: https://lamdu.org

License: GNU General Public License v3.0

Haskell 96.31% Shell 0.21% JavaScript 1.72% Emacs Lisp 0.01% Python 0.02% Nix 1.42% Inno Setup 0.12% HTML 0.06% Dhall 0.11% jq 0.02%
integrated-development-environment programming-language programmer-tool projectional-editor structure-editor wytiwys

lamdu's Introduction

Lamdu

Join the chat at https://gitter.im/lamdu/lamdu

This project aims to create a next-generation, live programming environment that radically improves the programming experience.

See the Main Page

Installation

To build Lamdu from source, see the instructions for your platform

Tutorial

Note: In the shortcut key combinations, "left" refers to the left cursor key.

Simple expressions

At the top we have an interactive shell, where we can type calculations.

The is our prompt to this shell. Think of it like a calculator: you enter an expression, hit a button, and it tells you the answer. The next time you use the calculator, you clear whatever's in there and enter a new expression. Same here.

Golden ratio example

To type the calculation above:

  • Type "1+s" at the prompt (). Notice we have chosen "1" for the addition's left argument. However, we have only begun to type the second argument: it starts with an "s". Lamdu knows we have finalized the left argument because we have moved on from it, indicated by the +. But we have done nothing to indicate that just s is the second argument. To help us finalize the right argument, Lamdu has presented a menu of type-appropriate choices containing "s" in their names – "containing", not just "starting with". This menu updates as we type.
  • Next, we will flesh out the "s" into a "sqrt". As of September 2017, "sqrt" should already be selected in the nearby menu, because it is alphabetically the first function in the library to contain an "s" in its name and to output a number. However your menu, take the path of fewest keystrokes: continuing to type the function's name reduces the menu options to just those that match. Cursor keys allow you to select from the menu. Hit space to chose your selected menu option.
  • Type "5".
  • Select the whole expression by pressing shift+left until the whole REPL expression is selected.
  • Type "/2". Notice that Lamdu automatically inserted the parentheses.

Lamdu displays the evaluation of each expression, whether the whole or a subexpression. Such an automatic display is called an "annotation". The annotation of an expression appears below that of any child expression. For example, the evaluation of (1 + sqrt 5) / 2 appears below that of its child expression, (1 + sqrt 5). The former is 1.61... and the latter is 3.23....

To keep the expression size from bloating, some annotations are shrunk, like that of the sqrt 5 above, which is 2.23.... To see this in normal size, navigate to the expression by going to the sqrt, or to the 5, and press shift+left.

We have just expressed the golden ratio. To save it and give it a name, navigate to the sign and press return. Press return to name the new definition. Type "golden" and enter. You do not need to explicitly save - as your Lamdu program is always saved.

Creating a function

Note: Ctrl-Z is undo.

Factorial function

To create the function above:

  • Navigate to the "New..." button and type factorial x=.

    Note: Lamdu spaces your code automatically. When you pressed space at the left-hand-side of a definition, Lamdu added a parameter to the function rather than a "space" whitespace character as a normal text editor would.

    The equals sign after factorial appeared without typing it because all definitions have one. However, after factorial x, you may type an equals sign anyways, or skip over it with the right cursor key.

  • Now type the body of the function: if x=0, tab, 1, tab, x*fac (x-1)

We've now written the function. Let's use it.

  • Open a REPL by navigating to the "New..." button and pressing space.
  • We don't have to name the repl, press right or tab to go to its body
  • Type "fac 5" and press space.

Lamdu should now display the evaluation of the whole function, as well as its subexpresssions. The active if branch (the else) is highlighted via a green background on the | symbol. The | represents a suspended computation.

This function is recursive and invoked additional applications of itself. To navigate between these function applications, navigate to the arrows under the x parameter and press right or left.

Further Exploration / Help Documentation

In the lower-right of Lamdu's screen, you'll see that F1 brings up contextual help.

It shows all the key bindings currently active, which changes according to the current context.

lamdu's People

Contributors

aleksj avatar atacratic avatar configurator avatar da-x avatar deannaireland avatar dependabot[bot] avatar drdub avatar faineance avatar freeman42x avatar fricklerhandwerk avatar gitter-badger avatar gvnnz avatar jakeandrew avatar king6cong avatar mkoloberdin avatar peaker avatar pthariensflame avatar rvion avatar sinelaw avatar tkvogt avatar yairchu avatar ysangkok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lamdu's Issues

Barf

I feel like this came up on HN some times before, and every time I've wanted to try it and every time it's resisted me.

This time it builds cleanly, though slowly, but when I get to the big moment:

$ lamdu
lamdu(99057,0x7fffb0ddf3c0) malloc: *** malloc_zone_unregister() failed for 0x7fffb0dd5000
Using GL version: "2.1 INTEL-10.25.13"
Main exiting due to exception: user error (Inexistent uuid: 7265706c-0000-0000-0000-000000000000 referenced)

I'm on a mac, if that helps ...

Adding fields to named tuples should be more straight forward.

Adding fields to named tuples should be more straight forward.

I had to search for a really hard time that I should press 'A' to add a field to a named tuple.

Maybe pressing enter will enter tuple editing and then there is always one empty name field that can be filled in, and once it's edited, there should be another empty one, and when exiting the tuple, it should disappear if it hasn't been edited.

Can't build on Ubuntu 16.04

   /home/egor/Work/GitHub/lamdu/.stack-work/downloaded/tY0zL32R4CX3/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build lib:nodejs-exec --ghc-options " -ddump-hi -ddump-to-file"

    Process exited with code: ExitFailure 1
    Logs have been written to: /home/egor/Work/GitHub/lamdu/.stack-work/logs/nodejs-exec-0.1.0.0.log
    Preprocessing library nodejs-exec-0.1.0.0...
    In-place registering nodejs-exec-0.1.0.0...
    build_node.sh: 4: build_node.sh: Bad substitution
    build_node.sh: 1: build_node.sh: node: not found
    build_node.sh: 8: build_node.sh: version: not found
    build_node.sh: 8: build_node.sh: version: not found
    Using existing system node 
    cp: missing destination file operand after 'node/node'
    Try 'cp --help' for more information.

Node.js installed from ubuntu repos:

$ nodejs -v
v4.2.6

web-fork?

Not sure if this is possible, but I proposed an idea in #haskell for someone to crate a clone of http://explainshell.com for breaking down and explaining lines of haskell code. I wonder if the code here could be used for that

lens 4.3 incompatible with latest code

Here is the error message

rvions-mbp:lamdu rvion$ cabal install
Resolving dependencies...
Configuring lamdu-0.1...
Building lamdu-0.1...
Failed to install lamdu-0.1
Build log ( /Users/rvion/.cabal/logs/lamdu-0.1.log ):
Configuring lamdu-0.1...
Building lamdu-0.1...
Preprocessing library lamdu-0.1...
[50 of 63] Compiling Data.OpaqueRef   ( bottlelib/Data/OpaqueRef.hs, dist/build/Data/OpaqueRef.o )

bottlelib/Data/OpaqueRef.hs:55:1: Not in scope: ‘Lens.makeIso’

bottlelib/Data/OpaqueRef.hs:55:1:
    GHC stage restriction:
      ‘makeIso’ is used in a top-level splice or annotation,
      and must be imported, not defined locally
    In the expression: makeIso ''Ref
cabal: Error: some packages failed to install:
lamdu-0.1 failed during the building phase. The exception was:
ExitFailure 1
rvions-mbp:lamdu rvion$ 

Failing to install: transformers / lens conflict

GHC version 7.6.3

$ cabal install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: lamdu-0.1
trying: transformers-0.4.1.0
trying: split-0.2.2
trying: derive-2.5.16
trying: haskell-src-exts-1.15.0.1
trying: cpphs-1.18.4
trying: polyparse-1.9
trying: text-1.1.1.2/installed-a0d...
rejecting: lens-4.1.2.1, 4.1.2, 4.1.1, 4.1, 4.0.7, 4.0.6, 4.0.5, 4.0.4, 4.0.3,
4.0.2, 4.0.1, 4.0, 3.10.2, 3.10.1, 3.10.0.1 (conflict: transformers==0.4.1.0,
lens => transformers>=0.2 && <0.4)
rejecting: lens-3.10, 3.9.2, 3.9.1 (conflict: text==1.1.1.2/installed-a0d...,
lens => text>=0.11 && <0.12)
rejecting: lens-3.9.0.3 (conflict: split==0.2.2, lens => split>=0.2 && <0.2.2)
rejecting: lens-3.9.0.2, 3.9.0.1, 3.9 (conflict:
text==1.1.1.2/installed-a0d..., lens => text>=0.11 && <0.12)
rejecting: lens-3.8.7.3, 3.8.7.2, 3.8.7.1, 3.8.7, 3.8.6, 3.8.5, 3.8.4, 3.8.3,
3.8.2, 3.8.1, 3.8.0.2, 3.8.0.1, 3.8, 3.7.6, 3.7.5, 3.7.4, 3.7.3, 3.7.2,
3.7.1.2, 3.7.1.1, 3.7.1, 3.7.0.2, 3.7.0.1, 3.7, 3.6.0.4, 3.6.0.3, 3.6.0.2,
3.6.0.1, 3.6, 3.5.1, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0.6, 3.0.5, 3.0.4, 3.0.3,
3.0.2, 3.0.1, 3.0, 2.9, 2.8, 2.7.0.1, 2.7, 2.6.1, 2.6, 2.5, 2.4.0.2, 2.4, 2.3,
2.2, 2.1, 2.0, 1.9.1, 1.9, 1.8, 1.7.1, 1.7, 1.6, 1.5, 1.4.1, 1.4, 1.3.1, 1.3,
1.2, 1.1.1, 1.1, 1.0.3, 1.0.2, 1.0.1, 1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3,
0.2, 0.1 (conflict: lamdu => lens>=3.9)

Black screen with green dots

I've installed the latest version of lamdu (3ff2c87).

On starting, all I'm seeing is a dark grey screen with some green dots in the top left corner

Typing increases the number of pixels but not much else is achieved.
Clicking with the mouse I'm also able to see some red rectangles.

I'd love to help out in debugging the issue.

Build problem

So I just tried building Lamdu in a cabal sandbox using GHC 7.6.3 and I get the following failure.

[44 of 77] Compiling Lamdu.Config     ( Lamdu/Config.hs, dist/build/lamdu/lamdu-tmp/Lamdu/Config.o )

Lamdu/Config.hs:203:12:
    Couldn't match expected type `aeson-0.6.2.0:Data.Aeson.Types.Internal.Options'
                with actual type `a0 -> a0'
    In the first argument of `deriveJSON', namely `id'
    In the expression: deriveJSON id ''Vector2
make: *** [all] Error 1

I'm guessing I have the wrong version of aeson. I'll look at patching it, but I wanted to report it first. Cheers.

Issue compiling Lamdu.Font

I have tried with graphics-drawingcombinators v1.5.0.3, v1.5.0.2 and v1.5 and I'm still getting this issue:

[ 82 of 120] Compiling Lamdu.Font ( Lamdu/Font.hs, dist/build/lamdu/lamdu-tmp/Lamdu/Font.o )

Lamdu/Font.hs:19:9: Not in scope: ‘Draw.withFont’
cabal: Error: some packages failed to install:
lamdu-ide-0.1 failed during the building phase. The exception was:
ExitFailure 1

Key binding for Mac?

I just compiled it successfully. But I think the key binding for Mac OS X not very comfortable. Is there a possible change?

I mean that F1 is Fn + F1 for most people. I also mean that Command key is not widely used in this program.

consider release process?

Hey authors, fantastic project. excited :) -- so much "Yes!!!".

Would be nice if there were builds of lamdu, even just on the "github releases" page.

bonus points:

  • version changelog
  • some release schedule (i recommend cutting a version from master every N weeks, way easier on you as you dont have to justify holding or making a release)

I dont care for this, but if you eventually want an osx installer, you can use template here: https://github.com/jbenet/data/tree/master/platforms/installers/osx (and i can contribute this if you want it, but idk if it is desired here)

lamdu.org has expired

As of writing, lamdu.org shows a landing page stating:

This domain name expired on Aug 6 2016 04:18:47:000PM

You might want to update the link pointing to it in the README, or renew the domain.

Can't build lamdu on fedora 23

While trying to build with stack:

Warning: File listed in .stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/nodejs-exec.cabal file does not exist: node/node

...

Progress: 4/8
--  While building package nodejs-exec-0.1.0.0 using:
      /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build lib:nodejs-exec --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 2
    Logs have been written to: /home/me/code/projects/haskell/lamdu/.stack-work/logs/nodejs-exec-0.1.0.0.log

    Preprocessing library nodejs-exec-0.1.0.0...
    In-place registering nodejs-exec-0.1.0.0...
    creating  ./icu_config.gypi
    { 'target_defaults': { 'cflags': [],
                           'default_configuration': 'Release',
                           'defines': [],
                           'include_dirs': [],
                           'libraries': []},
      'variables': { 'asan': 0,
                     'gas_version': '2.25',
                     'host_arch': 'x64',
                     'icu_small': 'false',
                     'node_byteorder': 'little',
                     'node_enable_v8_vtunejit': 'false',
                     'node_install_npm': 'true',
                     'node_no_browser_globals': 'false',
                     'node_prefix': '/tmp',
                     'node_release_urlbase': '',
                     'node_shared_cares': 'false',
                     'node_shared_http_parser': 'false',
                     'node_shared_libuv': 'false',
                     'node_shared_openssl': 'false',
                     'node_shared_zlib': 'false',
                     'node_tag': '',
                     'node_use_dtrace': 'false',
                     'node_use_etw': 'false',
                     'node_use_lttng': 'false',
                     'node_use_openssl': 'true',
                     'node_use_perfctr': 'false',
                     'openssl_fips': '',
                     'openssl_no_asm': 0,
                     'target_arch': 'x64',
                     'uv_parent_path': '/deps/uv/',
                     'uv_use_dtrace': 'false',
                     'v8_enable_gdbjit': 0,
                     'v8_enable_i18n_support': 0,
                     'v8_no_strict_aliasing': 1,
                     'v8_optimized_debug': 0,
                     'v8_random_seed': 0,
                     'v8_use_snapshot': 'true',
                     'want_separate_host_toolset': 0}}
    creating  ./config.gypi
    creating  ./config.mk
    make -C out BUILDTYPE=Release V=1
    make[1]: Entering directory '/home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out'
      g++ -pthread -rdynamic -m64 -fuse-ld=gold -B/home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/third_party/binutils/Linux_x64/Release/bin -m64  -o /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/mksnapshot -Wl,--start-group /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_libplatform.a /home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a -Wl,--end-group -ldl -lrt
    make[1]: execvp: printf: Argument list too long
    deps/openssl/openssl.target.mk:860: recipe for target '/home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/openssl/libopenssl.a' failed
    make[1]: *** [/home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory '/home/me/code/projects/haskell/lamdu/.stack-work/downloaded/e7407878fefbd2ce514d6e1b14f42d130e5c3b493ab477dc845ea6f0e32a6682/node/out'
    Makefile:63: recipe for target 'node' failed
    make: *** [node] Error 2

The bug is reproducible.
Versions:

    $ npm -v
1.3.6
    $ node -v
v0.10.42
    $ make -v
GNU Make 4.0
Built for x86_64-redhat-linux-gnu
    $ stack --version
Version 1.0.4.3, Git revision db1afb275ebd64016e8ef0db122f0f03da9e5906 (3242 commits) x86_64

Thanks!

Problem compiling Lamdu

Hi,

I get some error when running cabal install on that project. The error is:

Lamdu/Data/Expression/Infer.hs:445:5:
Not in scope: `Map.traverseWithKey'

I am using GHC 7.4.1

Thanks!

Issues compiling on OSX

Everything works fine until building the Lamdu package itself, which fails with the following error:

stack install
Lamdu-0.1: configure
Lamdu-0.1: build

--  While building package Lamdu-0.1 using:
      /Users/lenni/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build lib:Lamdu exe:lamdu --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/lenni/Source/lamdu/.stack-work/logs/Lamdu-0.1.log

    Configuring Lamdu-0.1...
    Preprocessing library Lamdu-0.1...
    In-place registering Lamdu-0.1...
    Preprocessing executable 'lamdu' for Lamdu-0.1...
    setup-Simple-Cabal-1.22.5.0-ghc-7.10.3: can't find source for
    Data/Hashable/Generic in ., submodules/AlgoW,
    .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen

No clue what's wrong, sorry. This is OS 10.11 (El Capitan), latest homebrew.

Can anyone help?

Dependency won't install

Sorry to bother you with this here, but I can't install lamdu because bindings-GLFW fails to install, see issue here.

The bindings-GLFW issue page doesn't seem that active and I am very eager to try out lamdu. Do you have any idea what my problem could be?

Creating Data Types

I see that there are data types available when writing code, but is there support for creating our own yet? If so, I can't figure out how.

reference submodules with https:// vs git@

fetching submodules is more complex when submodules are defined with "git@" instead of "https://"

  1. If github has never been contacted before (it could be the case for CI, newly created docker containers, etc.), you have a yes/no question to answer manually

    The authenticity of host 'github.com (192.30.252.129)' can't be established.
    RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
    Are you sure you want to continue connecting (yes/no)? yes``
    
  2. If you have no ssh key setup, operation fail anyway with

    Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    Clone of '[email protected]:Peaker/Algorithm-W-Step-By-Step.git' into submodule path 'submodules/AlgoW' failed
    

I'm not asking submodule definition to change from git to https. It's more an open statement waiting for tips and tricks to smooth newcomers installation :)

OpenGL needs bump to 2.9

I'm running into a compilation error when installing OpenGL 2.8. Bumping the version to 2.9.1 will fix it.

Make fails on aeson dependencies issue.

Building on MacOSX Maverick with a clean install of GHC. After "cabal install aeson" and the rest of the dependencies I did a "make". Unfortunately "make" failed with the following message:

: cannot satisfy -package-id aeson-0.8.0.2-0a45c62392101b292e476335cf17659d:
aeson-0.8.0.2-0a45c62392101b292e476335cf17659d is unusable due to missing or recursive dependencies:
attoparsec-0.12.1.2-4234caf5378e4a4ebcf5fec65d43ea74 hashable-1.2.2.0-b7cf90008a40abec30f029373a00f9ad scientific-0.3.3.3-5c2a6b6e292891f73ca23601e08aa268 unordered-containers-0.2.5.1-28a4ce84977ab114e54414ac83a93a7f

How to run lamdu?

I have installed lamdu on OSX (10.11.2) as described in the README.md, and there was no errors that I could see. How do I now run lamdu?

can't build `lamdu`: on OSX 10.10.x, `ghc` v7.10.3

Made sure that ftgl, leveldb and libiconv were installed beforehand

Compiled with additional switches: --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib
since '/opt' is the default/standard $PREFIX applied when using MacPorts

Following is the error log displayed:

Configuring Lamdu-0.1...
Preprocessing library Lamdu-0.1...
In-place registering Lamdu-0.1...
Preprocessing executable 'lamdu' for Lamdu-0.1...
Linking .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/lamdu/lamdu ...
Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _hs_iconv in libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(iconv.o)
     (maybe you meant: _hs_iconv, _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc_info , _base_GHCziIOziEncodingziIconv_iconvEncoding10_info , _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc_closure , _hs_iconv_close , _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc1_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding11_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding8_info , _base_GHCziIOziEncodingziIconv_iconvEncoding10_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding9_info , _base_GHCziIOziEncodingziIconv_iconvEncoding7_info , _hs_iconv_open , _base_GHCziIOziEncodingziIconv_iconvEncoding2_info , _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure , _base_GHCziIOziEncodingziIconv_iconvEncoding4_info , _base_GHCziIOziEncodingziIconv_iconvEncoding11_info , _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc1_info , _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure )
  "_iconv_close", referenced from:
      _hs_iconv_close in libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(iconv.o)
     (maybe you meant: _hs_iconv_close)
  "_iconv_open", referenced from:
      _hs_iconv_open in libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(iconv.o)
     (maybe you meant: _hs_iconv_open)
  "_locale_charset", referenced from:
      _localeEncoding in libHSbase-4.8.2.0-HQfYBxpPvuw8OunzQu6JGM.a(PrelIOUtils.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Support for non-QWERTZ layouts

GLFW hardcodes the standard US layout, which means that one has to press the physical key associated with the desired character on the American layout, even though it might be a different key on the layout one is actually using.

Only the Key functions do this, the character functions respect the layout.

While this might be desirable behaviour for a game (chat with the layout one is used to, but movement keys stay the same), I don't think it is adequate for an IDE.

A solution by GLFW is planned for 3.1: glfw/glfw#117

Build failure in bottlelib/Data/Cache.hs

I'm using ghc 7.4.1 on ElementaryOS Luna. Did nothing outside the TUTORIAL build instructions except I had to apt-get libXxf86vm to get the GLFW bindings to build. Don't imagine that's implicated in the following:

[56 of 56] Compiling Data.Cache ( bottlelib/Data/Cache.hs, dist/build/Data/Cache.o )

bottlelib/Data/Cache.hs:119:11:
Could not deduce (m ~ Lens.Identity)
from the context (MonadA m, Key k, Typeable v)
bound by the type signature for
lookupS :: (MonadA m, Key k, Typeable v) =>
k -> StateT Cache m (Maybe v)
at bottlelib/Data/Cache.hs:119:1-24
m' is a rigid type variable bound by the type signature for lookupS :: (MonadA m, Key k, Typeable v) => k -> StateT Cache m (Maybe v) at bottlelib/Data/Cache.hs:119:1 Expected type: (Cache -> (Maybe v, Cache)) -> StateT Cache m (Maybe v) Actual type: (Cache -> (Maybe v, Cache)) -> Control.Monad.Trans.State.Lazy.State Cache (Maybe v) In the first argument of(.)', namely `state'
In the expression: state . lookup
cabal: Error: some packages failed to install:
lamdu-0.1 failed during the building phase. The exception was:
ExitFailure 1

Lamdu language specification/examples

Hi,

this is an interesting editor that you are working on! Do you specify somewhere the features of the lamdu language? I would like to see some examples of the supported Haskell subset. Do you plan to support adhoc polymorphism (via typeclasses, modular implicits, ...)? And what about dependent types?

Daniel

Wrapping a block in a function call

Following the factors example from Lamdu's page,
I started writing from inside out, i.e. take, then wrap in filter then wrap in caseList.
In order to wrap the take block in filter, I had to select the whole block (Shift+Left) which wasn't straight forward, and then start writing an operator like +, delete it, and write filter.

At first I expected that if I come behind take and start writing filter it would figure it out, and wrap it.

can't build lamdu

Hi, I want to try out lamdu but it fails during build. I am using Arch Linux.

ghc --version: The Glorious Glasgow Haskell Compilation System, version 7.10.3

stack install:

text-1.2.2.0: configure
text-1.2.2.0: build
TraceUtils-0.1.0.2: configure
TraceUtils-0.1.0.2: build
bitmap-0.0.2: configure
TraceUtils-0.1.0.2: copy/register
bitmap-0.0.2: build
FTGL-2.1: configure
FTGL-2.1: build
FTGL-2.1: copy/register
bitmap-0.0.2: copy/register
stb-image-0.2.1: configure
stb-image-0.2.1: build
stb-image-0.2.1: copy/register
text-1.2.2.0: copy/register
hashable-1.2.4.0: configure
hashable-1.2.4.0: build
OpenGLRaw-3.1.0.0: configure
OpenGLRaw-3.1.0.0: build
parsec-3.1.9: configure
parsec-3.1.9: build
hashable-1.2.4.0: copy/register
scientific-0.3.4.4: configure
scientific-0.3.4.4: build
unordered-containers-0.2.5.1: configure
unordered-containers-0.2.5.1: build
scientific-0.3.4.4: copy/register
attoparsec-0.13.0.1: configure
attoparsec-0.13.0.1: build
parsec-3.1.9: copy/register
unordered-containers-0.2.5.1: copy/register
uniplate-1.6.12: configure
uniplate-1.6.12: build
semigroups-0.18.1: configure
semigroups-0.18.1: build
uniplate-1.6.12: copy/register
semigroups-0.18.1: copy/register
language-ecmascript-0.17.0.2: configure
language-ecmascript-0.17.0.2: build
void-0.7.1: configure
void-0.7.1: build
void-0.7.1: copy/register
contravariant-1.4: configure
contravariant-1.4: build
attoparsec-0.13.0.1: copy/register
aeson-0.9.0.1: configure
aeson-0.9.0.1: build
contravariant-1.4: copy/register
comonad-4.2.7.2: configure
comonad-4.2.7.2: build
comonad-4.2.7.2: copy/register
bifunctors-5.2: configure
bifunctors-5.2: build
bifunctors-5.2: copy/register
profunctors-5.2: configure
profunctors-5.2: build
profunctors-5.2: copy/register
semigroupoids-5.0.1: configure
semigroupoids-5.0.1: build
semigroupoids-5.0.1: copy/register
free-4.12.4: configure
free-4.12.4: build
language-ecmascript-0.17.0.2: copy/register
aeson-0.9.0.1: copy/register
free-4.12.4: copy/register
adjunctions-4.3: configure
adjunctions-4.3: build
either-4.4.1: configure
either-4.4.1: build
either-4.4.1: copy/register
adjunctions-4.3: copy/register
kan-extensions-4.2.3: configure
kan-extensions-4.2.3: build
kan-extensions-4.2.3: copy/register
lens-4.13: configure
lens-4.13: build
OpenGLRaw-3.1.0.0: copy/register
GLURaw-2.0.0.1: configure
GLURaw-2.0.0.1: build
GLURaw-2.0.0.1: copy/register
OpenGL-3.0.0.1: configure
OpenGL-3.0.0.1: build
lens-4.13: copy/register
OpenGL-3.0.0.1: copy/register
bitmap-opengl-0.0.1.5: configure
bitmap-opengl-0.0.1.5: build
bitmap-opengl-0.0.1.5: copy/register
graphics-drawingcombinators-1.5.1.2: configure
graphics-drawingcombinators-1.5.1.2: build
graphics-drawingcombinators-1.5.1.2: copy/register
Lamdu-0.1: configure
Lamdu-0.1: build
Completed 31 action(s).

--  While building package Lamdu-0.1 using:
      /home/michael/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build lib:Lamdu exe:lamdu --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure (-6)
    Logs have been written to: /home/michael/Dokumente/git/lamdu/.stack-work/logs/Lamdu-0.1.log

    Configuring Lamdu-0.1...
    Preprocessing library Lamdu-0.1...
    [ 1 of 69] Compiling System.Random.Utils ( bottlelib/System/Random/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/System/Random/Utils.o )
    [ 2 of 69] Compiling Graphics.UI.Bottle.Widgets.StdKeys ( bottlelib/Graphics/UI/Bottle/Widgets/StdKeys.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/StdKeys.o )
    [ 3 of 69] Compiling Graphics.UI.GLFW.Instances ( bottlelib/Graphics/UI/GLFW/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/GLFW/Instances.o )
    [ 4 of 69] Compiling Graphics.UI.Bottle.ModKey ( bottlelib/Graphics/UI/Bottle/ModKey.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/ModKey.o )
    [ 5 of 69] Compiling Graphics.UI.Bottle.Animation.Id ( bottlelib/Graphics/UI/Bottle/Animation/Id.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Animation/Id.o )
    [ 6 of 69] Compiling Foreign.C.Types.Instances ( bottlelib/Foreign/C/Types/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Foreign/C/Types/Instances.o )
    [ 7 of 69] Compiling Numeric.Utils    ( bottlelib/Numeric/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Numeric/Utils.o )
    [ 8 of 69] Compiling Graphics.UI.Bottle.WidgetId ( bottlelib/Graphics/UI/Bottle/WidgetId.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/WidgetId.o )
    [ 9 of 69] Compiling Data.Set.Ordered ( bottlelib/Data/Set/Ordered.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Set/Ordered.o )
    [10 of 69] Compiling Data.Monoid.Instances ( bottlelib/Data/Monoid/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Monoid/Instances.o )
    [11 of 69] Compiling Data.Monoid.Generic ( bottlelib/Data/Monoid/Generic.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Monoid/Generic.o )
    [12 of 69] Compiling Data.Vector.Vector2 ( bottlelib/Data/Vector/Vector2.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Vector/Vector2.o )
    [13 of 69] Compiling Graphics.DrawingCombinators.Utils ( bottlelib/Graphics/DrawingCombinators/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/DrawingCombinators/Utils.o )
    [14 of 69] Compiling Graphics.UI.Bottle.Rect ( bottlelib/Graphics/UI/Bottle/Rect.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Rect.o )
    [15 of 69] Compiling Graphics.UI.Bottle.Direction ( bottlelib/Graphics/UI/Bottle/Direction.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Direction.o )
    [16 of 69] Compiling Graphics.UI.Bottle.SizedFont ( bottlelib/Graphics/UI/Bottle/SizedFont.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/SizedFont.o )
    [17 of 69] Compiling Data.Monoid.Applicative ( bottlelib/Data/Monoid/Applicative.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Monoid/Applicative.o )
    [18 of 69] Compiling Data.MRUMemo     ( bottlelib/Data/MRUMemo.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/MRUMemo.o )
    [19 of 69] Compiling Data.List.Utils  ( bottlelib/Data/List/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/List/Utils.o )
    [20 of 69] Compiling Graphics.UI.Bottle.Animation ( bottlelib/Graphics/UI/Bottle/Animation.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Animation.o )
    [21 of 69] Compiling Graphics.UI.Bottle.View ( bottlelib/Graphics/UI/Bottle/View.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/View.o )
    [22 of 69] Compiling Graphics.UI.Bottle.Widgets.GridView ( bottlelib/Graphics/UI/Bottle/Widgets/GridView.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/GridView.o )
    [23 of 69] Compiling Data.List.Assoc  ( bottlelib/Data/List/Assoc.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/List/Assoc.o )
    [24 of 69] Compiling Data.IORef.Utils ( bottlelib/Data/IORef/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/IORef/Utils.o )
    [25 of 69] Compiling Graphics.UI.GLFW.Events ( bottlelib/Graphics/UI/GLFW/Events.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/GLFW/Events.o )
    [26 of 69] Compiling Graphics.UI.Bottle.EventMap ( bottlelib/Graphics/UI/Bottle/EventMap.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/EventMap.o )
    [27 of 69] Compiling Graphics.UI.Bottle.Widget ( bottlelib/Graphics/UI/Bottle/Widget.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widget.o )
    [28 of 69] Compiling Graphics.UI.Bottle.Widgets.Spacer ( bottlelib/Graphics/UI/Bottle/Widgets/Spacer.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/Spacer.o )
    [29 of 69] Compiling Graphics.UI.Bottle.Widgets.TextView ( bottlelib/Graphics/UI/Bottle/Widgets/TextView.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/TextView.o )
    [30 of 69] Compiling Graphics.UI.Bottle.Widgets.FocusDelegator ( bottlelib/Graphics/UI/Bottle/Widgets/FocusDelegator.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/FocusDelegator.o )
    [31 of 69] Compiling Graphics.UI.Bottle.Widgets.Grid ( bottlelib/Graphics/UI/Bottle/Widgets/Grid.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/Grid.o )
    [32 of 69] Compiling Graphics.UI.Bottle.Widgets.Box ( bottlelib/Graphics/UI/Bottle/Widgets/Box.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/Box.o )
    [33 of 69] Compiling Graphics.UI.Bottle.Widgets.Choice ( bottlelib/Graphics/UI/Bottle/Widgets/Choice.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/Choice.o )
    [34 of 69] Compiling Graphics.UI.Bottle.Widgets.Layout ( bottlelib/Graphics/UI/Bottle/Widgets/Layout.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/Layout.o )
    [35 of 69] Compiling Graphics.UI.Bottle.Widgets.EventMapDoc ( bottlelib/Graphics/UI/Bottle/Widgets/EventMapDoc.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/EventMapDoc.o )
    [36 of 69] Compiling Graphics.UI.Bottle.Widgets.FlyNav ( bottlelib/Graphics/UI/Bottle/Widgets/FlyNav.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/FlyNav.o )
    [37 of 69] Compiling Data.Function.Decycle ( bottlelib/Data/Function/Decycle.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Function/Decycle.o )
    [38 of 69] Compiling Data.CurAndPrev  ( bottlelib/Data/CurAndPrev.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/CurAndPrev.o )
    [39 of 69] Compiling Data.Random.Instances ( bottlelib/Data/Random/Instances.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Random/Instances.o )
    [40 of 69] Compiling Data.ByteString.NFData ( bottlelib/Data/ByteString/NFData.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/ByteString/NFData.o )
    [41 of 69] Compiling Data.ByteString.Hex ( bottlelib/Data/ByteString/Hex.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/ByteString/Hex.o )
    [42 of 69] Compiling Data.ByteString.Utils ( bottlelib/Data/ByteString/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/ByteString/Utils.o )
    [43 of 69] Compiling Data.Binary.Utils ( bottlelib/Data/Binary/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Binary/Utils.o )
    [44 of 69] Compiling Data.Store.Guid  ( bottlelib/Data/Store/Guid.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Guid.o )
    [45 of 69] Compiling Data.Store.Guid.Arbitrary ( bottlelib/Data/Store/Guid/Arbitrary.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Guid/Arbitrary.o )
    [46 of 69] Compiling Data.Store.IRef  ( bottlelib/Data/Store/IRef.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/IRef.o )
    [47 of 69] Compiling Data.Store.Rev.Change ( bottlelib/Data/Store/Rev/Change.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Rev/Change.o )
    [48 of 69] Compiling Graphics.UI.Bottle.Widgets.TextEdit ( bottlelib/Graphics/UI/Bottle/Widgets/TextEdit.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets/TextEdit.o )
    [49 of 69] Compiling Control.MonadA   ( bottlelib/Control/MonadA.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/MonadA.o )
    [50 of 69] Compiling Data.Store.Property ( bottlelib/Data/Store/Property.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Property.o )
    [51 of 69] Compiling Data.Store.Transaction ( bottlelib/Data/Store/Transaction.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Transaction.o )
    [52 of 69] Compiling Data.Store.Db    ( bottlelib/Data/Store/Db.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Db.o )
    [53 of 69] Compiling Data.Store.Map   ( bottlelib/Data/Store/Map.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Map.o )
    [54 of 69] Compiling Data.Store.Rev.Version ( bottlelib/Data/Store/Rev/Version.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Rev/Version.o )
    [55 of 69] Compiling Data.Store.Rev.ViewBranchInternal ( bottlelib/Data/Store/Rev/ViewBranchInternal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Rev/ViewBranchInternal.o )
    [56 of 69] Compiling Data.Store.Rev.Branch ( bottlelib/Data/Store/Rev/Branch.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Rev/Branch.o )
    [57 of 69] Compiling Data.Store.Rev.View ( bottlelib/Data/Store/Rev/View.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Store/Rev/View.o )
    [58 of 69] Compiling Graphics.UI.Bottle.WidgetsEnvT ( bottlelib/Graphics/UI/Bottle/WidgetsEnvT.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/WidgetsEnvT.o )
    [59 of 69] Compiling Graphics.UI.Bottle.Widgets ( bottlelib/Graphics/UI/Bottle/Widgets.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/Widgets.o )
    [60 of 69] Compiling Graphics.UI.GLFW.Utils ( bottlelib/Graphics/UI/GLFW/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/GLFW/Utils.o )
    [61 of 69] Compiling Control.Monad.Unit ( bottlelib/Control/Monad/Unit.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Monad/Unit.o )
    [62 of 69] Compiling Control.Monad.Trans.State.Utils ( bottlelib/Control/Monad/Trans/State/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Monad/Trans/State/Utils.o )
    [63 of 69] Compiling Control.Monad.Trans.Either.Utils ( bottlelib/Control/Monad/Trans/Either/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Monad/Trans/Either/Utils.o )
    [64 of 69] Compiling Control.Monad.Trans.Decycle ( bottlelib/Control/Monad/Trans/Decycle.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Monad/Trans/Decycle.o )
    [65 of 69] Compiling Data.Maybe.Utils ( bottlelib/Data/Maybe/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Data/Maybe/Utils.o )
    [66 of 69] Compiling Control.Lens.Utils ( bottlelib/Control/Lens/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Lens/Utils.o )
    [67 of 69] Compiling Control.Concurrent.Utils ( bottlelib/Control/Concurrent/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Concurrent/Utils.o )
    [68 of 69] Compiling Graphics.UI.Bottle.MainLoop ( bottlelib/Graphics/UI/Bottle/MainLoop.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Graphics/UI/Bottle/MainLoop.o )
    [69 of 69] Compiling Control.Applicative.Utils ( bottlelib/Control/Applicative/Utils.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Control/Applicative/Utils.o )
    In-place registering Lamdu-0.1...
    Preprocessing executable 'lamdu' for Lamdu-0.1...
    [  1 of 148] Compiling Paths_Lamdu      ( .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/autogen/Paths_Lamdu.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/lamdu/lamdu-tmp/Paths_Lamdu.o )
    [  2 of 148] Compiling Lamdu.Formatting ( Lamdu/Formatting.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/lamdu/lamdu-tmp/Lamdu/Formatting.o )
    [  3 of 148] Compiling Lamdu.GUI.Precedence ( Lamdu/GUI/Precedence.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/lamdu/lamdu-tmp/Lamdu/GUI/Precedence.o )
    src/tcmalloc.cc:278] Attempt to free invalid pointer 0x23d9980

Do you need more information?

Tutorial?

Is there a Lamdu tutorial somewhere?

Problem installing Lamdu on Mac El Captain

I wanna install lamdu but the terminal tells me

: cannot satisfy -package-id mtl-2.2.1-b6b36d751642fde56f037818eb788105

Does anyone know what the problem is and how to fix it

ghci claims Main.hs has wrong module path

janus@zeus ~/lamdu % stack ghci                                              
Warning: File listed in .stack-work/downloaded/0pCfpnxANlB-/freetype2.cabal file does not exist: objs/ftmodule.h
Warning: File listed in .stack-work/downloaded/0pCfpnxANlB-/freetype2.cabal file does not exist: objs/ftmodule.h
Lamdu-0.1: configure (lib + exe)
Configuring Lamdu-0.1...
Lamdu-0.1: initial-build-steps (lib + exe)
The following GHC options are incompatible with GHCi and have not been passed to it: -O2 -threaded
Configuring GHCi with the following packages: Lamdu
Using main module: 1. Package `Lamdu' component exe:lamdu with main-is file: /home/janus/lamdu/Lamdu/Main.hs
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/janus/lamdu/.ghci

/home/janus/lamdu/Lamdu/Main.hs:2:8: error:
    File name does not match module name:
    Saw: ‘Main’
    Expected: ‘Lamdu.Main’
Failed, modules loaded: none.

/home/janus/lamdu/Lamdu/Main.hs:2:8: error:
    File name does not match module name:
    Saw: ‘Main’
    Expected: ‘Lamdu.Main’
Failed, modules loaded: none.

<no location info>: error:
    Could not find module ‘Control.Concurrent.Utils’
    Perhaps you meant
      Control.Concurrent.Async (needs flag -package-key [email protected])
      Control.Concurrent.Chan (from base-4.9.0.0)
      Control.Concurrent.MVar (from base-4.9.0.0)
Loaded GHCi configuration from /tmp/ghci4984/ghci-script
Prelude> 

How can I work around this? Thanks in advance.

Screenshots!

A picture is worth a thousand words. So why not make some?

Arrows and lamdas missing.

There is no arrow in a function type,

and also I noticed the lambdas are missing.

no function arrow

I'm running on Windows.

FTGL doesn't compile with ghc 7.8 (link to fix included)

Error message from GHC:

rvions-mbp:lamdu rvion$ cabal install --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib
Resolving dependencies...
Configuring FTGL-1.333...
Building FTGL-1.333...
Failed to install FTGL-1.333
Build log ( /Users/rvion/.cabal/logs/FTGL-1.333.log ):
Configuring FTGL-1.333...
Building FTGL-1.333...
Preprocessing library FTGL-1.333...

Graphics/Rendering/FTGL.hs:1:12: Warning:
    -#include and INCLUDE pragmas are deprecated: They no longer have any effect

Graphics/Rendering/FTGL.hs:3:16: Warning:
    -fglasgow-exts is deprecated: Use individual extensions instead
[1 of 1] Compiling Graphics.Rendering.FTGL ( Graphics/Rendering/FTGL.hs, dist/build/Graphics/Rendering/FTGL.o )

Graphics/Rendering/FTGL.hs:29:17:
    Module ‘Foreign’ does not export ‘unsafePerformIO’
cabal: Error: some packages failed to install:
FTGL-1.333 failed during the building phase. The exception was:
ExitFailure 1
graphics-drawingcombinators-1.5 depends on FTGL-1.333 which failed to install.
lamdu-0.1 depends on FTGL-1.333 which failed to install.

Initialize failed

After installing lamdu on a fresh Ubuntu 14.04 install, following the instructions listed in README.md, running
~/.local/bin/lamdu
results in:

# ~/.local/bin/lamdu
importing from: "/root/lamdu/freshdb.json"
Main exiting due to exception: user error (initialize failed)

Further attempts to run lamdu continue to result in Main exiting due to exception: user error (initialize failed).

Can't write characters using AltGr

Hi.

I'm using the german keyboard-layout. We have a modifier key called AltGr (https://en.wikipedia.org/wiki/Alt_Gr) which we need to type [, ], {, }, and . But in Bottle, it doesn't work, that is, I can't write those characters. I don't get an error or any message or so either, it just doesn't write the character down.

Cheers

lamdu: Unknown Prelude function sqrt

  1. Open lambdu
  2. Type (without quotes): "1+s"
  3. See the auto complete with "sqrt at top"
  4. Hit enter

Crashes:

´´´
~/.local/bin/lamdu
lamdu: Unknown Prelude function sqrt
Main exiting due to exception: Unknown Prelude function sqrt
´´´

Build Failure with ghc 7.4.1

Got the following after I pulled today (Sept 27).

codeedit/Editor/Data.hs:1:1:
Exception when trying to run compile-time code:
Could not convert (Strict,Type) to BangType
(Unpacked,AppT (ConT Editor.Data.Lambda) (VarT expr_1627396732))
Language/Haskell/Convert.hs:(64,5)-(65,42): Non-exhaustive patterns in function conv

  Code: derive makeFoldable ''ExpressionBody

Collecting build result for bottle-0.1
cabal: Error: some packages failed to install:
bottle-0.1 failed during the building phase. The exception was:
ExitFailure 1

Looks like a derive failure actually. Maybe it works with a specific version of derive?

Haskell

If you throw haskell away, aren't you throwing away a massive library of work that can be immediately used?

(Or, put alternatively, aren't you making things harder than they need to be?)

Error in types.hs

while doing cabal install

Lamdu/Sugar/Types.hs:491:1:
    The second argument of ‘Scope’ should have kind ‘* -> *’,
      but ‘m_1628154838’ has kind ‘*’
    In the instance declaration for
      ‘Monoid (Scope name_1628154837 m_1628154838)’
cabal: Error: some packages failed to install:
lamdu-0.1 failed during the building phase. The exception was:
ExitFailure 1

ghc 7.8.3 by installing haskell platform 2014.2.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.