commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
e032f1f9380446a354355fb03b1caba9c4bd7ad8
priv/repo/migrations/20190331134602_add-not-null-constraint-to-retros-stage.exs
priv/repo/migrations/20190331134602_add-not-null-constraint-to-retros-stage.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Add-not-null-constraint-to-retros-stage" do use Ecto.Migration def up do alter table(:retros) do modify :stage, :string, default: "lobby", null: false end end def down do alter table(:retros) do modify :stage, :string, default: "lobby", nu...
Add not null constraint to retros.stage
Add not null constraint to retros.stage
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
f4d652cea96247b6bb48e9cd46363faa186c5a3b
test/funnel/percolator_test.exs
test/funnel/percolator_test.exs
defmodule Funnel.PercolatorTest do use Funnel.TestCase, async: true test "percolator is alive" do { :ok, percolator} = Funnel.Percolator.start_link assert Process.alive?(percolator) end end
Add basic test on Funnel.Percolator
Add basic test on Funnel.Percolator Signed-off-by: chatgris <f9469d12bf3d131e7aae80be27ccfe58aa9db1f1@af83.com>
Elixir
mit
chatgris/funnel
3b268ed4886f380f51c266e82cbdb648ca25e9fd
lib/evercam_media/snapshot/cam_client.ex
lib/evercam_media/snapshot/cam_client.ex
defmodule EvercamMedia.Snapshot.CamClient do @moduledoc """ Client to talk with the camera for various data. Currently this only fetches snapshots. In future, we could expand this module to check camera status, video stream etc. """ alias EvercamMedia.HTTPClient alias EvercamMedia.Snapshot.Util @doc """...
defmodule EvercamMedia.Snapshot.CamClient do @moduledoc """ Client to talk with the camera for various data. Currently this only fetches snapshots. In future, we could expand this module to check camera status, video stream etc. """ alias EvercamMedia.HTTPClient alias EvercamMedia.Snapshot.Util require L...
Return tuples on error in the same format
Return tuples on error in the same format
Elixir
agpl-3.0
shankardevy/evercam-media,evercam/evercam-server,shankardevy/evercam-media,evercam/evercam-media,shankardevy/evercam-media,evercam/evercam-server
c62150edf40b050f603812b6c636644af13eea29
example/test/support/changeset_helper.exs
example/test/support/changeset_helper.exs
defmodule ChangesetHelper do # Company related changeset functions def new_company(attrs), do: Company.changeset(%Company{}, attrs) def new_company(attrs, :multitenant) do new_company(attrs) |> MultiTenantHelper.add_prefix_to_changeset() end def update_company(company, attrs), do: Company.changeset(comp...
Add new ChangesetHelper module into example test support folder
Add new ChangesetHelper module into example test support folder This module contains functions related with models changesets for test purposes
Elixir
mit
izelnakri/paper_trail
79837478bff611d5f719d3d56595ab97c4bf54d5
test/xema/multi_type_test.exs
test/xema/multi_type_test.exs
defmodule Xema.MultiTypeTest do use ExUnit.Case, async: true import Xema, only: [validate: 2] test "&new/1 called with a wrong type list raised an exception" do assert_raise ArgumentError, fn -> Xema.new([:string, :foo]) end end describe "schema with type string or nil:" do setup do ...
Add multi type test file
Add multi type test file
Elixir
mit
hrzndhrn/xema
decfc49dce57e07c82615907b41e8723ec37cfa2
test/concurrency_test.exs
test/concurrency_test.exs
defmodule ConcurrencyTest do use ExUnit.Case, async: true defmodule Computator do def double do receive do {sender, msg} -> send sender, { :ok, 2 * msg } end end end # @tag :focus test "spawns a process that passes back a message" do # run it in a separate proce...
Add a simple koan around basic message passing
Add a simple koan around basic message passing
Elixir
mit
thbar/elixir-playground
7e1f37b276dc2a4b021ac84867fbe42dd7ef2cc4
priv/repo/migrations/20190331130808_add-foreign-key-indexes-to-retros-and-ideas.exs
priv/repo/migrations/20190331130808_add-foreign-key-indexes-to-retros-and-ideas.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Add-foreign-key-indexes-to-retros-and-ideas" do use Ecto.Migration def change do create index(:retros, [:facilitator_id]) create index(:ideas, [:user_id]) end end
Add b-tree indexes to retros.facilitator_id and ideas.user_id
Add b-tree indexes to retros.facilitator_id and ideas.user_id
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
010f572ec1efb3eaa48343585efd3eaaabc6b503
lib/mix/tasks/farmbot/firmware/env_change.ex
lib/mix/tasks/farmbot/firmware/env_change.ex
defmodule Mix.Tasks.Farmbot.Firmware.EnvChange do use Mix.Task def run([node_name]) do node_name = connect!(node_name) files = :rpc.call(node_name, Path, :wildcard, ["/root/*-dev.sqlite3"]) :rpc.call(node_name, Enum, :each, [files, fn(filename) -> new_filename = String.replace(filename, "dev", "p...
Add helpful mix task to change remote fbos env
Add helpful mix task to change remote fbos env
Elixir
mit
FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os,FarmBot/farmbot_os
131ebff5fc150437b6cbd54dc4619ee0ca7e5ccf
.iex.exs
.iex.exs
alias Jumubase.Repo, warn: false alias Jumubase.Foundation.{Category, Contest, ContestCategory, Host}, warn: false alias Jumubase.Showtime.{Appearance, Participant, Performance, Piece}, warn: false
Add alias file for easier IEx'ing
Add alias file for easier IEx'ing
Elixir
mit
richeterre/jumubase-phoenix,richeterre/jumubase-phoenix
a782e4de0a0ca053c87ad91701677b76a355b272
priv/repo/migrations/20201214030501_alter_drop_old_member_id_columns.exs
priv/repo/migrations/20201214030501_alter_drop_old_member_id_columns.exs
defmodule Erlef.Repo.Migrations.AlterDropOldMemberIdColumns do use Ecto.Migration def change do alter table(:events) do modify :submitted_by, :uuid, null: false remove :old_approved_by remove :old_submitted_by end end end
Add migration to drop old_* columns on events
Add migration to drop old_* columns on events
Elixir
apache-2.0
simplabs/website,simplabs/website
e72aacb6eac5213c6311216a420c668630016b3d
test/integration/presence_channel_test.exs
test/integration/presence_channel_test.exs
defmodule Poxa.Integration.PresenceChannelTest do use ExUnit.Case @moduletag :integration setup do {:ok, pid} = PusherClient.start_link("ws://localhost:8080", "app_key", "secret", stream_to: self) Application.ensure_all_started(:pusher) Pusher.configure!("localhost", 8080, "app_id", "app_key", "secr...
Add basic integration test to Presence Channel
Add basic integration test to Presence Channel
Elixir
mit
edgurgel/poxa,waffleio/poxa,RobertoSchneiders/poxa,joshk/poxa,joshk/poxa,RobertoSchneiders/poxa,edgurgel/poxa,waffleio/poxa,edgurgel/poxa
8bdbf8255a939ee3649c04107372ffef1f5ef086
priv/repo/migrations/20211122015946_migrate-stage-of-labeling-plus-voting-retros-to-groups-labeling.exs
priv/repo/migrations/20211122015946_migrate-stage-of-labeling-plus-voting-retros-to-groups-labeling.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Migrate-stage-of-labeling-plus-voting-retros-to-groups-labeling" do use Ecto.Migration alias RemoteRetro.{Repo, Retro} import Ecto.Query, only: [from: 2] def up do query = from r in Retro, where: r.stage == "labeling-plus-voting" retros_needing_upda...
Add database migration that ports retros that are currently in the labeling-plus-voting stage to be either groups-labeling or groups-voting (depending on whether votes had been cast in the given retro) - add rollback query as well
Add database migration that ports retros that are currently in the labeling-plus-voting stage to be either groups-labeling or groups-voting (depending on whether votes had been cast in the given retro) - add rollback query as well
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
bdbb9896363b6e5d66dbddcf4b151187931f6ec9
elixir/day1/tic_tac_toe.exs
elixir/day1/tic_tac_toe.exs
# Given an incomplete tic-tac-toe board, compute the next player’s best move. defmodule TicTacToe do def state([a, a, a, _, _, _, _, _, _]) when a != "_", do: a def state([_, _, _, a, a, a, _, _, _]) when a != "_", do: a def state([_, _, _, _, _, ...
Add elixir day 1 TicTacToe minimax
Add elixir day 1 TicTacToe minimax
Elixir
mit
hemslo/seven-in-seven,hemslo/seven-in-seven,hemslo/seven-in-seven
ab4bbcfa269bb7bcf635984dcdd71dc4b40459b8
apps/user_app/test/controllers/session_controller_test.exs
apps/user_app/test/controllers/session_controller_test.exs
defmodule UserApp.SessionControllerTest do use UserApp.ConnCase @user_credentials %{username: "john", password: "johndoe"} setup %{conn: conn} do user = insert_user @user_credentials conn = put_req_header(conn, "accept", "application/json") {:ok, conn: conn, user: user} end test "creates new u...
Test creating new user's session
Test creating new user's session
Elixir
mit
nemanja-m/ex-chat,nemanja-m/ex-chat,nemanja-m/ex-chat
acf863cd2d3d9478951606d0ae8e9002c6c7dc43
2016/Main/H/Elixir/solution_1.exs
2016/Main/H/Elixir/solution_1.exs
vowels? = fn c -> Enum.member?(["a", "e", "i", "o", "u"], c) end palindrome? = fn list -> reversed = list |> Enum.reverse list == reversed end laugh = IO.read(:line) |> String.trim if laugh |> String.graphemes |> Enum.filter(vowels?) |> palindrome?.() do IO.puts "S" else IO.puts "N" end
Solve 2016 H in Elixir
Solve 2016 H in Elixir
Elixir
mit
DestructHub/bcs-contest,DestructHub/bcs-contest
39c736a8c3e620b0f260c8a5a727b163f6093eca
mix_ex/test/bucket_test.exs
mix_ex/test/bucket_test.exs
defmodule MixEx.BucketTest do use ExUnit.Case, async: true test "stores values by key" do {:ok, bucket} = MixEx.Bucket.start_link assert MixEx.Bucket.get(bucket, "milk") == nil MixEx.Bucket.put(bucket, "milk", 3) assert MixEx.Bucket.get(bucket, "milk") == 3 end end
Add unit test for buckets
Add unit test for buckets
Elixir
mit
Quirk0o/secret-elixir
0adaf59c41b2313e554161a033c3c8c306069887
lib/hell/hell/dev_tools.ex
lib/hell/hell/dev_tools.ex
defmodule HELL.DevTools do # credo:disable-for-this-file defmodule Atoms do @moduledoc """ Lists all atoms defined on the VM at a given time. Use `search_exact` for exact search, and `search_similar` in order to query subsets of atoms. `IO.inspect` hard-coded in order to ensure the output lis...
Add DevTools.Atoms to list all VM atoms
Add DevTools.Atoms to list all VM atoms
Elixir
agpl-3.0
renatomassaro/Helix,HackerExperience/Helix,renatomassaro/Helix,HackerExperience/Helix
bd258f4d7b5c4c2719779560afb93d4bce5370a1
priv/repo/migrations/20190830151044_add-index-to-ideas-assignee_id.exs
priv/repo/migrations/20190830151044_add-index-to-ideas-assignee_id.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Add-index-to-ideas-assigneeId" do use Ecto.Migration def change do create index(:ideas, [:assignee_id]) end end
Add b-tree index to ideas.assignee_id
Add b-tree index to ideas.assignee_id
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
6eb4d980401f28912475118800180a164c33be81
sort/selection_sort/selection_sort.ex
sort/selection_sort/selection_sort.ex
defmodule Selection do def sort(list) when is_list(list) do do_selection(list, []) end def do_selection([head|[]], acc) do acc ++ [head] end def do_selection(list, acc) do min = min(list) do_selection(:lists.delete(min, list), acc ++ [min]) end defp min([first|[second|[]]]) do smalle...
Implement selection sort in Elixir
Implement selection sort in Elixir
Elixir
cc0-1.0
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
56334e7cfe281e9ced4b537c4dcf93957e89403b
mix.exs
mix.exs
defmodule WhiteBread.Mixfile do use Mix.Project def project do [app: :white_bread, name: "WhiteBread", description: """ Story BDD tool written in and for Elixir. Parses Gherkin formatted feature files and executes them as tests. """, package: [ contributors: ["Steve Brazier...
defmodule WhiteBread.Mixfile do use Mix.Project def project do [app: :white_bread, name: "WhiteBread", description: """ Story BDD tool written in and for Elixir. Parses Gherkin formatted feature files and executes them as tests. """, package: [ contributors: ["Steve Brazier...
Fix version to 1.0.0 as no BC changes are planned
Fix version to 1.0.0 as no BC changes are planned
Elixir
mit
meadsteve/white-bread,oldfartdeveloper/white-bread,jurriaan/white-bread
4b1c94c181ff5921b286783309683263b7815d5e
lib/addict/postgres_error_handler.ex
lib/addict/postgres_error_handler.ex
defmodule PostgresErrorHandler do @moduledoc """ Handles Postgres errors and provides friendly messages on known failures. """ require Logger @doc """ Handles errors for Addict Repository interactions. """ def handle_error(Addict.Repository, postgres_error) do case postgres_error.postgres.code do ...
Add requires Postgres Error Handler module
Add requires Postgres Error Handler module
Elixir
mit
trenpixster/addict,jjt/addict,mrluc/addict,altenwald/addict,pap/addict,suranyami/addict,esbullington/addict,breakoutbit/addict,trenpixster/addict
621778af0a132f41dfa1ca18a2afc4c2d0cdcbc0
lib/mix/tasks/purge_tokens.ex
lib/mix/tasks/purge_tokens.ex
defmodule Mix.Tasks.ExMoney.PurgeTokens do use Mix.Task @shortdoc "Purges stale Guardian tokens from a database" def run(_args) do {:ok, pid} = ExMoney.Repo.start_link GuardianDb.Token.purge_expired_tokens! ExMoney.Repo.stop(pid) end end
Add a mix task to purge stale tokens
Add a mix task to purge stale tokens
Elixir
isc
gaynetdinov/ex_money,gaynetdinov/ex_money
b743c9b2622493638a24f9ad008c11d80d94e52f
lib/gatekeeper/guardian_serializer.ex
lib/gatekeeper/guardian_serializer.ex
defmodule Gatekeeper.GuardianSerializer do @behaviour Guardian.Serializer alias Gatekeeper.Repo alias Gatekeeper.Member def for_token(member = %Member{}), do: { :ok, "Member:#{member.id}" } def for_token(_), do: { :error, "Unknown resource type" } def from_token("Member:" <> id), do: { :ok, Repo.get(Memb...
Add required serializer for Guardian sessions
Add required serializer for Guardian sessions
Elixir
mit
alkaloid/gatekeeper,alkaloid/gatekeeper,alkaloid/gatekeeper
f2519dbe638f10da9aa470fb892a17856d18d6f3
example/test/support/query_helper.exs
example/test/support/query_helper.exs
defmodule QueryHelper do import Ecto.Query # Company related query functions def company_count(), do: (from company in Company, select: count(company.id)) def company_count(:multitenant), do: company_count() |> MultiTenantHelper.add_prefix_to_query() def first_company(), do: (first(Company, :id) |> preload(...
Add new QueryHelper module into example test support folder
Add new QueryHelper module into example test support folder This module contains functions related with models queries for test purposes
Elixir
mit
izelnakri/paper_trail
9d8951f2f77ee42c1818aa8e38986a165dd15605
test/controllers/comment_controller_test.exs
test/controllers/comment_controller_test.exs
defmodule TheJuice.CommentControllerTest do use TheJuice.ConnCase import TheJuice.Factory @valid_attrs %{author: "Some Person", body: "This is a sample comment"} @invalid_attrs %{} setup do user = insert(:user) post = insert(:post, user: user) {:ok, conn: build_conn(), user: user, post: post} ...
Add controller tests for comments
Add controller tests for comments Test posting with valid attributes and verify redirect. Test posting with invalid attributes and verify error message.
Elixir
agpl-3.0
omegaphoenix/omegaphoenix.github.com,omegaphoenix/omegaphoenix.github.com
a74f0ccf4f22eea8bbbbcf60b376b14ffe0eb4b2
brainfuck2/bf.exs
brainfuck2/bf.exs
defmodule BF.Tape do alias BF.Tape, as: Tape defstruct data: :array.new(default: 0), pos: 0 def current(tape) do :array.get(tape.pos, tape.data) end def inc(tape, x) when x == -1 or x == 1 do new_data = :array.set(tape.pos, :array.get(tape.pos, tape.data) + x, tape.data) ...
Implement BF2 benchmark in Elixir
Implement BF2 benchmark in Elixir
Elixir
mit
kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks,kostya/benchmarks
9bb61629bdc732cabd5c852b72723d3a79ccc583
priv/repo/migrations/20190203165215_update-completed-retros-count.exs
priv/repo/migrations/20190203165215_update-completed-retros-count.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Update-completed-retros-count" do use Ecto.Migration def up do execute """ UPDATE users SET completed_retros_count = user_id_completed_retro_count.completed_retros_count FROM users u INNER JOIN ( SELECT p.user_id, cou...
Add migration that updates users.completed_retros_count based on participations
Add migration that updates users.completed_retros_count based on participations
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
c0838661d37b137891ebe7fec07072bb27d7bf9b
priv/repo/migrations/20190830162530_add-not-null-constraint-to-ideas-retro_id.exs
priv/repo/migrations/20190830162530_add-not-null-constraint-to-ideas-retro_id.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Add-not-null-constraint-to-ideas-retroId" do use Ecto.Migration def up do drop constraint(:ideas, "ideas_retro_id_fkey") alter table(:ideas) do modify(:retro_id, references(:retros, [ column: :id, type: :uuid, on_delete: :delete_...
Add not null constraint to ideas.retro_id
Add not null constraint to ideas.retro_id
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
65ac0172b35280fb997ca4b862e531bd9e124c67
priv/repo/migrations/20190908225747_add-not-null-constraints-to-participations.exs
priv/repo/migrations/20190908225747_add-not-null-constraints-to-participations.exs
defmodule :"Elixir.RemoteRetro.Repo.Migrations.Add-not-null-constraints-to-participations" do use Ecto.Migration def up do drop_if_exists unique_index(:participations, [:user_id, :retro_id]) drop_if_exists index(:participations, [:user_id]) drop_if_exists index(:participations, [:retro_id]) drop c...
Add not null constraints to participations.{user_id, retro_id}
Add not null constraints to participations.{user_id, retro_id}
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
fa74d8d1de3d4b2d489949abfdd0e5f118caf047
priv/repo/migrations/20161228200617_constraints.exs
priv/repo/migrations/20161228200617_constraints.exs
defmodule Aelita2.Repo.Migrations.Constraints do use Ecto.Migration def change do create index(:batches, [:commit], name: :batches_commit_index, unique: true) create index(:users, [:user_xref], name: :users_user_xref_index, unique: true) create index(:installations, [:installation_xref], ...
Add DB constraints (unique indexes)
Add DB constraints (unique indexes)
Elixir
apache-2.0
bors-ng/bors-ng,bors-ng/bors-ng,bors-ng/bors-ng
a2b90859885ee0e6d587de921adf1791205653fc
test/features/voting_test.exs
test/features/voting_test.exs
defmodule VotingTest do use RemoteRetro.IntegrationCase, async: false alias RemoteRetro.Idea import ShorterMaps describe "voting for an idea" do setup [:persist_idea_for_retro] @tag [ retro_stage: "voting", idea: %Idea{category: "happy", body: "pacing well"}, ] test "increments t...
Add end-to-end test for voting stage
Add end-to-end test for voting stage
Elixir
mit
stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro
0f72e863e643c83df22d92956d8bf86335527c49
jarbas/frontend/elm/Documents/Receipt/View.elm
jarbas/frontend/elm/Documents/Receipt/View.elm
module Documents.Receipt.View exposing (view) import Html exposing (a, div, text, span) import Html.Attributes exposing (href, target, class) import Internationalization exposing (Language(..), TranslationId(..), translate) import Material.Button as Button import Material.Icon as Icon import Material.Spinner as Spinne...
module Documents.Receipt.View exposing (view) import Html exposing (a, div, text) import Html.Attributes exposing (href, target, class) import Internationalization exposing (Language(..), TranslationId(..), translate) import Material.Button as Button import Material.Icon as Icon import Material.Options as Options impo...
Put class directly in button without adding extra span
Put class directly in button without adding extra span
Elm
mit
Guilhermeslucas/jarbas,datasciencebr/jarbas,marcusrehm/serenata-de-amor,datasciencebr/jarbas,Guilhermeslucas/jarbas,rogeriochaves/jarbas,datasciencebr/serenata-de-amor,Guilhermeslucas/jarbas,Guilhermeslucas/jarbas,rogeriochaves/jarbas,datasciencebr/serenata-de-amor,datasciencebr/jarbas,marcusrehm/serenata-de-amor,roger...
121114fc55a1ff82c4a7c24e8b044e4e8b3cc9d2
elm/App.elm
elm/App.elm
module App where import Html exposing (Html) -- MODEL type alias Artist = { id: Int , name: String } type alias Model = List Artist init : Model init = [] -- UPDATE type Action = NoOp update : Action -> Model -> Model update action model = case action of NoOp -> model -- SIGNALS ...
module App where import Html exposing (Html) import Json.Decode exposing ((:=)) -- MODEL type alias Artist = { id: Int , name: String } artist : Json.Decode.Decoder Artist artist = Json.Decode.object2 Artist ("id" := Json.Decode.int) ("name" := Json.Decode.string) type alias Model = List Artist...
Add json decoder for artist data
Add json decoder for artist data
Elm
mit
truqu/real-world-elm,kangkyu/real-world-elm
07a6b40b9fc60fd762e7a40d91874d16d3f7511a
src/BoardHelpers.elm
src/BoardHelpers.elm
module BoardHelpers exposing (..) import Models exposing (..) getBoardByStorageKey : List TrelloBoard -> String -> Maybe TrelloBoard getBoardByStorageKey boards key = case getBoardIdByStorageKey key of Just id -> List.head (List.filter (\b -> b.id == id) boards) Nothing -> ...
module BoardHelpers exposing (..) import Models exposing (..) getBoardByStorageKey : List TrelloBoard -> String -> Maybe TrelloBoard getBoardByStorageKey boards key = case getBoardIdByStorageKey key of Just id -> getBoardById boards id Nothing -> Nothing getBoardIdBySto...
Add helper to get board by id
Add helper to get board by id
Elm
mit
mattiaslundberg/trellooverview,mattiaslundberg/trellooverview
c1fce28c2fa133df489f5b9705d29123da55c2cd
src/Random/Pcg/Interop.elm
src/Random/Pcg/Interop.elm
module Random.Pcg.Interop exposing (fission) {-| Provides a function to create a PCG seed from a seed in the core library. This is useful for library writers who need a splittable or most robust PRNG but don't want to require client code to use the PCG implementation. ```elm import Random import Random.Pcg import Ran...
module Random.Pcg.Interop exposing (fission) {-| Provides a function to create a PCG seed from a seed in the core library. This is useful for library writers who need a splittable or most robust PRNG but don't want to require client code to use the PCG implementation. ```elm import Random import Random.Pcg import Ran...
Change fission to be a generator
Change fission to be a generator
Elm
bsd-3-clause
mgold/elm-random-pcg,mgold/elm-random-pcg,mgold/elm-random-pcg
aadd52f61525d60c6f6c643546af98f16ddb8379
Frontend/Application/Router/Input.elm
Frontend/Application/Router/Input.elm
module Router.Input where import History import Router.Action exposing (Action(..)) import Action as RootAction exposing (Action(..)) input : Signal RootAction.Action input = Signal.map (ActionRouter << PathChange) History.hash
module Router.Input where import History import Router.Action exposing (Action(..)) import Action as RootAction exposing (Action(..)) input : Signal RootAction.Action input = Signal.map (ActionRouter << PathChange) History.path
Change location hash to history API.
Change location hash to history API.
Elm
mit
yuffiy/mE,yuffiy/mE
8ddf9c70d5965d26ca3f06072c1303f0d09c4215
src/Main.elm
src/Main.elm
import Time exposing (Time,second) import Html exposing (Html,table,tr,td) import Html.Attributes exposing(style,height,width) import Random import Matrix exposing (Matrix) import Conway exposing (Cell(Alive,Dead)) import Neighbors exposing (neighborMap) -- Model type alias Model = Matrix Cell cell : Bool -> Cell...
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) -- Model type alias Location = (Int, Int) type alias Model = { alive : List (Set Location) , width : Int , height : Int} init : (Model, Cmd Msg) init = ({alive = [] , width = 10 , height = 10}, Cm...
Remove all of the matrix specific/dependent code
Remove all of the matrix specific/dependent code
Elm
mit
nafarlee/elm-game-of-life
25a287c4c4f23544567db9a51b2938244ea1c3ec
src/Styles.elm
src/Styles.elm
module Styles exposing (styleString) styleString = """ span { background-color : #aaa; } main { background-color : #DADADA; color : #333; } .selectedLine { background-color: #ADADAD; } #cursor { background-color: red; height: 20px; width: 1em; } """
module Styles exposing (styleString) styleString = """ span { background-color : #aaa; } main { background-color : #DADADA; color : #333; } .selectedLine { background-color: #ADADAD; } #cursor { background-color: red; height: 20px; width: 1em; } * { font-family: monospace, 'Courier'; } """
Make the font actually monospaced.
Make the font actually monospaced.
Elm
mit
macacollins/elm-vim,macacollins/elm-vim,macacollins/elm-vim
553fafe4aa364850a9bd1100295ceb990bc94322
elm-tutorial/Main.elm
elm-tutorial/Main.elm
module App exposing (..) import Html exposing (Html, button, div, program, text) import Html.Events exposing (onClick) -- MODEL type alias Model = Int init : ( Model, Cmd Msg ) init = ( 0, Cmd.none ) -- MESSAGES type Msg = Increment Int | Decrement Int -- VIEW view : Model -> Html Msg v...
module Main exposing (..) import Html exposing (Html, div, program, text) import Mouse import Keyboard -- MODEL type alias Model = Int init : ( Model, Cmd Msg ) init = ( 0, Cmd.none ) -- MESSAGES type Msg = MouseMsg Mouse.Position | KeyMsg Keyboard.KeyCode -- VIEW view : Model -> Html M...
Add my first subscriptions app
:+1: Add my first subscriptions app
Elm
mit
otofu-square/elm-sandbox,otofu-square/elm-sandbox
a7c7b62e073c8a48a3b76ccc172675845719683b
exercises/accumulate/Tests.elm
exercises/accumulate/Tests.elm
port module Main exposing (..) import Test.Runner.Node exposing (run, TestProgram) import Json.Encode exposing (Value) import Test exposing (..) import Expect import Accumulate exposing (accumulate) import String square : Int -> Int square x = x * x tests : Test tests = describe "Accumulate" [ test...
port module Main exposing (..) import Test.Runner.Node exposing (run, TestProgram) import Json.Encode exposing (Value) import Test exposing (..) import Expect import Accumulate exposing (accumulate) import String square : Int -> Int square x = x * x tests : Test tests = describe "Accumulate" [ test...
Fix accumulate test case description
Fix accumulate test case description
Elm
mit
exercism/xelm
64fa1430f5f32678be4e63a1ad6a456870346dcc
src/Parsing.elm
src/Parsing.elm
module Parsing exposing (..) -- External Imports import Navigation import UrlParser exposing (Parser, (</>), map, int, oneOf, s, string) import String -- Internal Imports import Types exposing (Route(..)) -- Parsing urlParser : Navigation.Location -> Route urlParser location = let one = ...
module Parsing exposing (..) -- External Imports import Navigation import UrlParser exposing (Parser, (</>), map, int, oneOf, s, string) import String -- Internal Imports import Types exposing (Route(..)) -- Parsing urlParser : Navigation.Location -> Route urlParser location = case UrlParser.parseHash rout...
Remove logging of hash location
Remove logging of hash location
Elm
apache-2.0
tyrken/alertmanager,GoogleCloudPlatform/alertmanager,stuartnelson3/am-ui,joehandzik/alertmanager,Aloomaio/alertmanager,prometheus/alertmanager,tyrken/alertmanager,Kellel/alertmanager,prometheus/alertmanager,prometheus/alertmanager,joehandzik/alertmanager,prometheus/alertmanager,GoogleCloudPlatform/alertmanager,joehandz...
0693e347f1aa8aa481515e2bbfedc7d579c9aeb1
Licht.elm
Licht.elm
import Html exposing (..) import Html.Events exposing (onClick) import StartApp main = StartApp.start { model = model, view = view, update = update } model = ["first", "second"] view address model = ul [] (List.map (viewLayer address) model ++ [ button [ onClick address Remove ] [ text "-" ] ...
import Html exposing (..) import Html.Events exposing (onClick) import StartApp main = StartApp.start { model = init, view = view, update = update } -- Model type alias AppState = { nextID : Int , layers : List ( ID, String ) } type alias ID = Int init : AppState init = { layers = [(0, "one"), (1, "two"...
Remove individual layers from the list
Remove individual layers from the list
Elm
mit
spiralman/licht,spiralman/licht
04a6f87499325d999c072961860660cf21c1bcfd
Leap/LeapTest.elm
Leap/LeapTest.elm
module LeapTest where -- TODO - remove example inclusion once Problem sets are ready to go live or CI is set up. import LeapExample exposing (isLeap) import ElmTest.Test exposing (test, Test, suite) import ElmTest.Assertion exposing (assert, assertEqual) import ElmTest.Runner.Element exposing (runDisplay) tests : T...
module LeapTest where -- TODO - remove example inclusion once Problem sets are ready to go live or CI is set up. import LeapExample exposing (isLeap) import ElmTest.Test exposing (test, Test, suite) import ElmTest.Assertion exposing (assert, assertEqual) import ElmTest.Runner.Element exposing (runDisplay) tests : T...
Update to use assert instead of assertEqual on boolean tests
Update to use assert instead of assertEqual on boolean tests
Elm
mit
bewatts/xelm,justalisteningman/xelm
22abd72081b9e5bcb12aae700ed0834c19a1a263
src/Main.elm
src/Main.elm
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) -- Model type alias Location = (Int, Int) type alias Model = { alive : List (Set Location) , width : Int , height : Int} init : (Model, Cmd Msg) init = ({alive = [] , width = 10 , height = 10}, Cm...
import Time exposing (Time,second) import Html exposing (Html,text) import Set exposing (Set) -- Model type alias Coordinate = (Int, Int) type alias Model = { alive : Set Coordinate , width : Int , height : Int} init : (Model, Cmd Msg) init = ({alive = Set.empty , width = 10 , height = 10}...
Fix type of cell representation
Fix type of cell representation
Elm
mit
nafarlee/elm-game-of-life
83c1e06a67897506e9eaa0d112ef7245207d8645
web/static/elm/src/View.elm
web/static/elm/src/View.elm
module View exposing (root) import Dict exposing (Dict) import Html exposing (..) import Html.App import Html.Attributes exposing (..) import Helpers import Types exposing (..) import Player.View import User.Types import User.View root : Model -> Html Msg root model = div [ class "container" ] [ div [ class...
module View exposing (root) import Dict exposing (Dict) import Html exposing (..) import Html.App import Html.Attributes exposing (..) import Helpers import Types exposing (..) import Player.View import User.Types import User.View root : Model -> Html Msg root model = div [ class "container" ] [ div [ class...
Add messaging for an empty jam
Add messaging for an empty jam
Elm
mit
jeffcole/loops_with_friends,jeffcole/loops,jeffcole/loops,jeffcole/loops_with_friends
2dc30a7ff72356a2441dde80d43bceb183bff6d6
src/App/View.elm
src/App/View.elm
module App.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import App.Types exposing (..) import App.Input.View as Input import App.Entries.View as Entries import App.Control.View as Control view : Model -> Html Msg view model = div [] [ title , Input.view model...
module App.View exposing (..) import Html exposing (..) import Html.Attributes exposing (..) import App.Types exposing (..) import App.Input.View as Input import App.Entries.View as Entries import App.Control.View as Control view : Model -> Html Msg view model = div [] [ title , Input.view model...
Hide Control if Entries list is empty
Hide Control if Entries list is empty
Elm
mit
jackrzhang/lister-elm,jackrzhang/lister-elm
a5469160305431d314aa8affbf34bedbbf836eb4
examples/ElementExample.elm
examples/ElementExample.elm
module Main where import Test import Text import Graphics.Element exposing (..) import ElmTest.Run as Run import ElmTest.Runner.Element as ElementRunner import ElmTest.Runner.String as StringRunner plainText : String -> Element plainText s = leftAligned (Text.fromString s) prettyOut : Element prettyOut = ...
module Main where import Test import Text import Graphics.Element exposing (..) import ElmTest exposing (..) plainText : String -> Element plainText s = leftAligned (Text.fromString s) prettyOut : Element prettyOut = elementRunner Test.suite3 uglyOut : String uglyOut = stringRunner Test.suite2 u...
Update for new public API
Update for new public API
Elm
bsd-3-clause
elm-community/elm-test,robertjlooby/elm-test
09306eaea6c08efeb7e4fa0aadb3129bb925b1ad
src/Char/Extra.elm
src/Char/Extra.elm
module Char.Extra where {-| Extra functions for working with characters. # Classification @docs isWhitespace -} import String import List {-| True for ASCII whitesapce characters `\b\t\n\v\f\r` -} isWhitespace : Char -> Bool isWhitespace char = List.member char <| String.toList " \t\r\n\v\f"
module Char.Extra exposing (..) {-| Extra functions for working with characters. # Classification @docs isWhitespace -} import String import List {-| True for ASCII whitesapce characters `\b\t\n\v\f\r` -} isWhitespace : Char -> Bool isWhitespace char = List.member char <| String.toList " \t\x0D\n\x0B\x0C"
Upgrade to new module syntax
Upgrade to new module syntax
Elm
bsd-3-clause
zeckalpha/char-extra
294ac0d3baf17d02d3941e6300f394ef34873070
doc/HelloWorld.elm
doc/HelloWorld.elm
module HelloWorld exposing (..) import Html exposing (Html) import Svg exposing (Svg) import OpenSolid.Core.Types exposing (..) import OpenSolid.Core.Point2d as Point2d import OpenSolid.BoundingBox.Types exposing (..) import OpenSolid.Svg as Svg import Svg.Attributes as Attributes angles = [0..24] |> List.map (\...
module HelloWorld exposing (..) import Html exposing (Html) import Svg exposing (Svg) import Svg.Attributes as Attributes import OpenSolid.Core.Types exposing (..) import OpenSolid.Core.Point2d as Point2d import OpenSolid.Core.Frame2d as Frame2d import OpenSolid.BoundingBox.Types exposing (..) import OpenSolid.Svg as ...
Update test doc image to not use Svg.scene2d
Update test doc image to not use Svg.scene2d Being replaced with more flexible Svg.relativeTo
Elm
mpl-2.0
opensolid/geometry
19b6307ca4b210af30cd2a582913dd4e0af4722e
src/Update.elm
src/Update.elm
module Update exposing ( init , update ) ------------------------- -- External dependencies ------------------------- import Http import Json.Decode as Json ------------------------- -- Internal dependencies ------------------------- import Model exposing ( .. ) init : ( AppState, Cmd Msg ) init = ( AppS...
module Update exposing ( init , update ) ------------------------- -- External dependencies ------------------------- import Http import Json.Decode as Json ------------------------- -- Internal dependencies ------------------------- import Model exposing ( .. ) init : ( AppState, Cmd Msg ) init = ( AppS...
Append the user input query to form the full search request
Append the user input query to form the full search request
Elm
mit
southp/is-this-baokaka
123a0acddaeff8cce1ba8acadfee04e1cc235d17
web/elm/IV/View/AboutPage.elm
web/elm/IV/View/AboutPage.elm
module IV.View.AboutPage exposing (view) import Html exposing (..) import Html.Attributes exposing (..) import IV.Msg exposing (Msg(..)) import IV.Pile.HtmlShorthand exposing (..) import IV.View.Layout as Layout view : Html Msg view = row [] [ Layout.headerWith [] , p [] [ text """ ...
module IV.View.AboutPage exposing (view) import Html exposing (..) import Html.Attributes exposing (..) import IV.Msg exposing (Msg(..)) import IV.Pile.HtmlShorthand exposing (..) import IV.View.Layout as Layout view : Html Msg view = row [] [ Layout.headerWith [] , p [] [ text """ ...
Add links to About page
Add links to About page
Elm
mit
marick/eecrit,marick/eecrit,marick/eecrit
ca3dc6c1b51d8bf9facdec20ab2860a9f29b7cc7
src/app/Parser.elm
src/app/Parser.elm
module Parser (toParseTree) where import Tokenizer exposing (Token(..), toTokens) type ParseTree = Node (Token, List ParseTree) | LeafNode Token toParseTree : String -> String toParseTree input = let tokens = Debug.log "tokens" (Tokenizer.toTokens input) parseTree = Debug.log "parse tre...
module Parser (toParseTree) where import Tokenizer exposing (Token(..), toTokens) type ParseTree = Node (Token, List ParseTree) | LeafNode Token toParseTree : String -> String toParseTree input = let tokens = Debug.log "tokens" (Tokenizer.toTokens input) parseTree = Debug.log "parse tre...
Fix weird behavior when parsing descriptions
Fix weird behavior when parsing descriptions
Elm
mit
pancakeCaptain/test-scaffolder-elm
93f154b6199f82196a2dfa91515d48b2b64e30a3
binarySearch/elm/BinarySearch.elm
binarySearch/elm/BinarySearch.elm
module BinarySearch exposing (..) findNumber : List Int -> Int -> Bool findNumber numbers number = case numbers of [] -> False [n] -> let _ = Debug.log "guess" 1 in n == number _ -> let middleIndex = List.length numbers // 2 firstHalf = List.take middleIn...
module BinarySearch exposing (..) -- There is an issue searching a list bigger than ~10000 -- because not tail recursive -- RangeError: Maximum call stack size exceeded findNumber : List Int -> Int -> Bool findNumber numbers numberToFind = let middleIndex = List.length numbers // 2 firstHalf = List.take midd...
Fix implementation so it only searches once/iteration
Fix implementation so it only searches once/iteration
Elm
mit
mikegehard/grokkingAlgorithms
f5353e1863ee2b9a1bceede2b224be82470d856f
src/pages/docs.elm
src/pages/docs.elm
import Html exposing (..) import Html.Attributes exposing (..) import String import Center import TopBar import Outline main = div [] [ TopBar.topBar "docs" , Center.markdown "600px" directions , div [ Center.style "600px" ] [ h1 [id "complete-guide"] [text "Complete Guide"] , ul [class...
import Html exposing (..) import Html.Attributes exposing (..) import String import Center import TopBar import Outline main = div [] [ TopBar.topBar "docs" , Center.markdown "600px" directions , div [ Center.style "600px" ] [ h1 [id "complete-guide"] [text "Complete Guide"] , ul [class...
Add a spot for the style guide
Add a spot for the style guide
Elm
bsd-3-clause
coreyhaines/elm-lang.org,inchingforward/elm-lang.org,amitaibu/elm-lang.org,jazmit/elm-lang.org,kevinrood/elm-lang.org,eeue56/elm-lang.org,rtorr/elm-lang.org,FranklinChen/elm-lang.org,akeeton/elm-lang.org,elm-guides/elm-lang.org,elm-guides/elm-lang.org,jazmit/elm-lang.org,amitaibu/elm-lang.org,kevinrood/elm-lang.org,jvo...
583caf8c27ce11ce49515023ef3dbce27affed0f
frontend/Components/Decoder.elm
frontend/Components/Decoder.elm
module Components.Decoder exposing (decoder) import Json.Decode exposing (Decoder, list, andThen, succeed) import Components.Model exposing (..) import Component.Decoder import Component.Model decoder : Decoder Model decoder = list Component.Decoder.decoder |> andThen decodeModel decodeModel : List Component.M...
module Components.Decoder exposing (decoder) import Json.Decode exposing (Decoder, list, andThen, succeed) import Components.Model exposing (..) import Component.Decoder import Component.Model decoder : Decoder Model decoder = list Component.Decoder.decoder |> andThen decodeModel decodeModel : List Component.M...
Add LOTS of function just to get groupWhile. So sorry.
Add LOTS of function just to get groupWhile. So sorry.
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
d2abba0980f996a29e82a041350fb2c99764a61a
core/Json/Static.elm
core/Json/Static.elm
module Json.Static where import JavaScript as JS import Native.Json as Native fromJSString = Native.recordFromJSString fromString s = Native.recordFromJSString (JS.fromString s) toString r = JS.toString (Native.recordToPrettyJSString "" r) toPrettyString sep r = JS.toString (Native.recordToPrettyJSString sep r) toJ...
module Json.Static where import JavaScript as JS import Native.Json as Native fromString s = Native.recordFromJSString (JS.fromString s) fromJSString = Native.recordFromJSString toString r = JS.toString (Native.recordToPrettyJSString "" r) toPrettyString sep r = JS.toString (Native.recordToPrettyJSString sep r) toJ...
Switch the order of two functions.
Switch the order of two functions.
Elm
bsd-3-clause
mgold/Elm,deadfoxygrandpa/Elm,laszlopandy/elm-compiler,Axure/elm-compiler,pairyo/elm-compiler,5outh/Elm,JoeyEremondi/elm-pattern-effects
0857154cae3e7b65cfb09b2b72ffa8d915e2f471
src/Lists.elm
src/Lists.elm
module Main exposing (..) import Html exposing (text) foo = ["one", "two", 2] main = text <| foo
module Main exposing (..) import Html exposing (text) type alias Person = { name: String , age: Int } people = [ { name = "Legolas", age = 2931} , { name = "Gimli", age = 139 } ] main = text <| toString <| people
Define alias and print list
Define alias and print list We need to define a type alias, and then define the data for printing.
Elm
mit
mtheoryx/elm-hello-world,mtheoryx/elm-hello-world
0f0077f2a89c04a783c77cac386b0fd698df24a7
src/pages/docs.elm
src/pages/docs.elm
import Html exposing (..) import Html.Attributes exposing (..) import String import Center import TopBar import Outline main = div [] [ TopBar.topBar "docs" , Center.markdown "600px" directions , div [ Center.style "600px" ] [ h1 [id "complete-guide"] [text "Complete Guide"] , ul [class...
import Html exposing (..) import Html.Attributes exposing (..) import String import Center import TopBar import Outline main = div [] [ TopBar.topBar "docs" , Center.markdown "600px" directions , div [ Center.style "600px" ] [ h1 [id "complete-guide"] [text "Complete Guide"] , ul [class...
Improve "Quick Start" section a bit
Improve "Quick Start" section a bit
Elm
bsd-3-clause
kevinrood/elm-lang.org,akeeton/elm-lang.org,eeue56/elm-lang.org,frankschmitt/elm-lang.org,inchingforward/elm-lang.org,yang-wei/elm-lang.org,liubko/elm-lang.org,yang-wei/elm-lang.org,rtorr/elm-lang.org,kevinrood/elm-lang.org,elm-guides/elm-lang.org,FranklinChen/elm-lang.org,jazmit/elm-lang.org,elm-guides/elm-lang.org,Fr...
2b5e97e22440a796222c0a1690214a2f1149407d
src/ViewHelpers.elm
src/ViewHelpers.elm
module ViewHelpers exposing (..) import Basics.Extra exposing ((=>)) import Html exposing (..) import Html.Attributes as Attr exposing (href, id, placeholder, src, style, target, title, type_, value) import Html.Events exposing (onClick) import Roster.Presenter import StylesheetHelper exposing (CssClasses(..), class, ...
module ViewHelpers exposing (..) import Html exposing (..) import Html.Attributes as Attr exposing (href, id, placeholder, src, style, target, title, type_, value) import Html.Events exposing (onClick) import Roster.Presenter import StylesheetHelper exposing (CssClasses(..), class, classList, id) blockButton : Strin...
Remove unnecessary bootstrap row wrapper.
Remove unnecessary bootstrap row wrapper.
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
0b3574b2ab55c78f638fd0b91cdc1fd3d8306b2a
tests/test-files/transform/Examples.formatted.elm
tests/test-files/transform/Examples.formatted.elm
module Main (..) where ratio = graphHeight / ( if range == 0 then 0.1 else toFloat range ) myTuple = (,,,) {- yes, this is valid! -} 1 2 3 4 foo = ( case x of True -> 1 False -> ...
module Main (..) where ratio = graphHeight / ( if range == 0 then 0.1 else toFloat range ) myTuple = (,,,) {- yes, this is valid! -} 1 2 3 4 foo = ( case x of True -> 1 False -> ...
Add blankline between case branches
Add blankline between case branches
Elm
bsd-3-clause
avh4/elm-format,nukisman/elm-format-short,fredcy/elm-format,avh4/elm-format,fredcy/elm-format,avh4/elm-format,fredcy/elm-format,avh4/elm-format,nukisman/elm-format-short,nukisman/elm-format-short,nukisman/elm-format-short,nukisman/elm-format-short
b8f132480da397ea7be09726fa68d38366e1563a
elm/new_operators.elm
elm/new_operators.elm
import Graphics.Element exposing (Element) import ElmTest exposing (elementRunner, suite, test, assertEqual) (<-*->): Int -> Int -> Int (<-*->) x y = 2 * x + y (>*<): Int -> Int -> Int (>*<) x y = 2 * x + y infix 8 <-*-> infix 2 >*< main : Element main = elementRunner <| suite "Test own operators with precede...
import Graphics.Element exposing (Element) import ElmTest exposing (elementRunner, suite, test, assertEqual) (<-*->): Int -> Int -> Int (<-*->) x y = 2 * x + y (>*<): Int -> Int -> Int (>*<) x y = 2 * x + y infix 8 <-*-> infix 2 >*< main : Element main = elementRunner <| suite "Test own operators with precede...
Use application operator in tests
Use application operator in tests
Elm
mit
rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,...
d0083ca0440c33a64db8a50949341b03922d2944
src/Views/BreakProgress.elm
src/Views/BreakProgress.elm
module Views.BreakProgress exposing (view) import Break import Element exposing (Device) import Element.Attributes as Attr import Element.Events import Setup.Msg as Msg import Setup.Settings as Settings import Styles exposing (StyleElement) circleView : { model | device : Device } -> Styles.CircleFill -> StyleElemen...
module Views.BreakProgress exposing (view) import Break import Element exposing (Device) import Element.Attributes as Attr import Element.Events import Setup.Msg as Msg import Setup.Settings as Settings import Styles exposing (StyleElement) circleView : { model | device : Device } -> Styles.CircleFill -> StyleElemen...
Adjust break intervals remain dimensions.
Adjust break intervals remain dimensions.
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
83f3b0e4efcc4b88d015d869ef37df87df65cdec
src/Presentation/Subscriptions.elm
src/Presentation/Subscriptions.elm
module Presentation.Subscriptions exposing (presentationSubscriptions) import Keyboard import WebSocket import Presentation.Types exposing (Model, Mode(..), Msg(..)) keyToMsg : Int -> Msg keyToMsg code = case code of 39 -> Next 37 -> Previous _ -> Noop broadCastEndpoint : String broadCastEndpoint = "...
module Presentation.Subscriptions exposing (presentationSubscriptions) import Keyboard import WebSocket import Presentation.Types exposing (Model, Mode(..), Msg(..)) keyToMsg : Int -> Msg keyToMsg code = case code of 39 -> Next 37 -> Previous _ -> Noop broadCastEndpoint : String broadCastEndpoint = "...
Use 'downs' instead of 'presses' for keyboard navigation
Use 'downs' instead of 'presses' for keyboard navigation
Elm
mit
jstrand/anoncisto
bd03c67179913b60c42deeaa71a2bfb6935a19d9
Graphics/ObjParser.elm
Graphics/ObjParser.elm
module Graphics.ObjParser where {-| General types used in loading of OBJ files. @docs toModel, toEntity, emptyModel -} import String import Array import Http import Math.Vector3 (..) import Math.Matrix4 (..) import Graphics.WebGL (..) import Graphics.ObjParserInternal as Internal import Graphics.ObjTypes (..) ...
module Graphics.ObjParser where {-| General types used in loading of OBJ files. @docs toModel, render, emptyModel -} import String import Array import Http import Math.Vector3 (..) import Math.Matrix4 (..) import Graphics.WebGL (..) import Graphics.ObjParserInternal as Internal import Graphics.ObjTypes (..) ...
Add render to exposed functions, hide toEntity
Add render to exposed functions, hide toEntity
Elm
bsd-3-clause
JoeyEremondi/ElmObjParser
1f19df290744fead023ccbd6b387ff45a0fa912d
IdeaFight/Compete.elm
IdeaFight/Compete.elm
module IdeaFight.Compete exposing (Model, Msg, init, update, subscriptions, view) import IdeaFight.Shuffle as Shuffle import Html.App as App import Html exposing (Html, text) import Random import String type alias Model = List String type Msg = ShuffledContents (List String) init : String -> (Model, Cmd Msg) init ...
module IdeaFight.Compete exposing (Model, Msg, init, update, subscriptions, view) import IdeaFight.Shuffle as Shuffle import Html.App as App import Html exposing (Html, text) import Random import String type alias Model = List String type Msg = ShuffledContents (List String) init : String -> (Model, Cmd Msg) init ...
Add main to compete subapp for testing
Add main to compete subapp for testing
Elm
mit
hoelzro/idea-fight
df7e8d3e226850532d571f9c7b30950b553aee2e
src/pages/try-message.elm
src/pages/try-message.elm
import Markdown import Message exposing (report) main = report <| Markdown.toElement """ # Elm 0.15 alpha Check out the change logs: * <a href="/blog/draft-announcement" target="_top">Very rough draft announcement</a> * <a href="https://github.com/elm-lang/elm-compiler/blob/master/changelog.md" target="_top"> ...
import Markdown import Message exposing (report) main = report <| Markdown.toElement """ # Online Editor Write and compile code online! * <a href="/examples/HelloWorld" target="_top">Hello World!</a> * <a href="/examples/Position" target="_top">Mouse</a> * <a href="/examples/Clock" target="_top">Clock</a> Fo...
Use a more realistic try message
Use a more realistic try message
Elm
bsd-3-clause
yang-wei/elm-lang.org,jazmit/elm-lang.org,kevinrood/elm-lang.org,frankschmitt/elm-lang.org,liubko/elm-lang.org,amitaibu/elm-lang.org,coreyhaines/elm-lang.org,coreyhaines/elm-lang.org,elm-guides/elm-lang.org,rtorr/elm-lang.org,frankschmitt/elm-lang.org,akeeton/elm-lang.org,rtorr/elm-lang.org,akeeton/elm-lang.org,kevinro...
c27ce4f4318431ae3192692c5ccb0646a54a2b44
src/Server/Update.elm
src/Server/Update.elm
module Server.Update exposing (update) import Http import Task import User import Server.Json as Json import Server.State exposing (..) import Auth.State exposing (AuthCredentials) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of Register state -> ( { model | status ...
module Server.Update exposing (update) import Http import Task import User import Server.Json as Json import Server.State exposing (..) import Auth.State exposing (AuthCredentials) update : Msg -> Model -> ( Model, Cmd Msg ) update msg model = case msg of Register state -> ( { model | status ...
Use correct register URL in client
Use correct register URL in client
Elm
agpl-3.0
hackathing/tea-and-pronouns,hackathing/tea-and-pronouns,hackathing/tea-and-pronouns
52a5748b1b29f41558c34ddd7fb2bd5088ef2e1e
tests/test-files/good/AllSyntax.elm
tests/test-files/good/AllSyntax.elm
module AllSyntax where import String import Signal exposing (foldp, map) import Json.Decode as Json import List exposing (..) fn = "XYZZY" annotatedFn : String annotatedFn = "XYZZY" inlinePipeline = 1 |> (+) 2 tuple = (1, 2) commentedLiterals = ({- int -} 1, {- float -} 0.1, {- char -} 'c...
module AllSyntax where import String import Signal exposing (foldp, map) import Json.Decode as Json import List exposing (..) fn = "XYZZY" annotatedFn : String annotatedFn = "XYZZY" inlinePipeline = 1 |> (+) 2 tuple = (1, 2) commentedLiterals = ({- int -} 1, {- float -} 0.1, {- char -} 'c...
Add more thorough tests for function/lambda arguments
Add more thorough tests for function/lambda arguments
Elm
bsd-3-clause
nukisman/elm-format-short,avh4/elm-format,nukisman/elm-format-short,nukisman/elm-format-short,avh4/elm-format,avh4/elm-format,fredcy/elm-format,avh4/elm-format,fredcy/elm-format,fredcy/elm-format,nukisman/elm-format-short,nukisman/elm-format-short
8e65684ea7d48a0780f058d4191ef026f8877be2
web/src/Toolbox/Types.elm
web/src/Toolbox/Types.elm
module Toolbox.Types (..) where import Dict type alias Ingredient = { name : String , value : Int , weight : Float , image : String , effects : List String } type alias IngredientID = Int type alias Response = { ingredients : List Ingredient } type alias Model = { ingredients : Dict.Dict In...
module Toolbox.Types (..) where import Dict import Set type alias Ingredient = { name : String , value : Int , weight : Float , image : String , effects : List String } type alias IngredientID = Int type alias Response = { ingredients : List Ingredient } type alias Model = { ingredients : D...
Use set instead of list for selected IDs.
Use set instead of list for selected IDs.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
d64ff838ddd5b1a32c3f74e206c4e18473f185d9
frontend/Component/Package/Search.elm
frontend/Component/Package/Search.elm
module Component.Package.Search (view) where import Graphics.Element (Element) import Html (..) import Html.Attributes (..) import Html.Events (..) import LocalChannel as LC import Markdown view : LC.LocalChannel String -> Int -> String -> Element view fieldChan width fieldContent = toElement width 180 <| div []...
module Component.Package.Search (view) where import Graphics.Element (Element) import Html (..) import Html.Attributes (..) import Html.Events (..) import LocalChannel as LC import Markdown view : LC.LocalChannel String -> Int -> String -> Element view fieldChan width fieldContent = toElement width 150 <| div []...
Make the search box shorter
Make the search box shorter
Elm
bsd-3-clause
mgold/package.elm-lang.org,itsgreggreg/package.elm-lang.org,Dedoig/package.elm-lang.org,jvoigtlaender/package.elm-lang.org
cc077aa4263bb095f5d846662dae24a82a975896
web/src/Toolbox/Views.elm
web/src/Toolbox/Views.elm
module Toolbox.Views (..) where import Html exposing (..) import Html.Attributes exposing (..) import Toolbox.Action exposing (Action) import Toolbox.Types exposing (Ingredient, Model) view : Signal.Address Action -> Model -> Html view address model = case model.response of Just r -> div [ class ...
module Toolbox.Views (..) where import Html exposing (..) import Html.Attributes exposing (..) import Toolbox.Action exposing (Action) import Toolbox.Types exposing (Ingredient, Model) view : Signal.Address Action -> Model -> Html view address model = case model.response of Just r -> div [ class ...
Use Bootstrap 4 cards for ingredient list layout.
Use Bootstrap 4 cards for ingredient list layout.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
ffe92519c68cfeb0cdb0407456b8f011aa09732b
app/src/Views/Menu/List.elm
app/src/Views/Menu/List.elm
module Views.Menu.List exposing (view) import Data.Retro exposing (Id) import EveryDict exposing (EveryDict) import Html exposing (Html) import Html.Attributes as Attr import Html.Events as Event import Page.MenuModel exposing (Model, Retro) import Page.MenuMsg exposing (..) view : Maybe Id -> EveryDict Id Retro -> ...
module Views.Menu.List exposing (view) import Data.Retro exposing (Id) import Date import EveryDict exposing (EveryDict) import Html exposing (Html) import Html.Attributes as Attr import Html.Events as Event import Page.MenuModel exposing (Model, Retro) import Page.MenuMsg exposing (..) view : Maybe Id -> EveryDict ...
Sort list by date created
Sort list by date created
Elm
mit
hawx/retro,hawx/retro,hawx/retro
20ce6e0c3037c9ab14936d9d8b90a77644d6efaf
IdeaFight/PartialForest.elm
IdeaFight/PartialForest.elm
-- a partially ordered forest module IdeaFight.PartialForest exposing (Forest, empty, fromList, getNextPair, isEmpty) type Forest a = Forest (List a) fromList : List a -> Forest a fromList values = Forest values empty : Forest a empty = fromList [] isEmpty : Forest a -> Bool isEmpty (Forest values) = case values ...
-- a partially ordered forest module IdeaFight.PartialForest exposing (Forest, empty, fromList, getNextPair, isEmpty) type Node a = Node a (List (Node a)) type Forest a = Forest (List (Node a)) makeNode : a -> Node a makeNode value = Node value [] fromList : List a -> Forest a fromList values = Forest <| List.map ma...
Rearrange forest to think in nodes
Rearrange forest to think in nodes
Elm
mit
hoelzro/idea-fight
4cbf34e6031d7ada5f6f305e48c02e675ed0566d
app/Caldwell/Header/Styles.elm
app/Caldwell/Header/Styles.elm
module Caldwell.Header.Styles exposing (css) -- Libraries import Css exposing (..) import Css.Elements exposing ( header , span ) -- Source import Caldwell.Helpers exposing (prop) import Caldwell.Constants exposing ( black , gutterSize , titleHeight )...
module Caldwell.Header.Styles exposing (css) -- Libraries import Css exposing (..) import Css.Elements exposing ( header , span ) -- Source import Caldwell.Helpers exposing (prop) import Caldwell.Constants exposing ( black , gutterSize , titleHeight )...
Update Header style a bit...
Update Header style a bit...
Elm
mit
erlandsona/A-Em,erlandsona/A-Em,erlandsona/A-Em
71342722f7df14bfd2162e1748b74bfc2dfb6174
frontend/App/View.elm
frontend/App/View.elm
module App.View exposing (view) import Html exposing (Html, div, text, a) import Html.Attributes exposing (class, href) import Components.View import Detail.View import App.Model exposing (..) import App.Messages exposing (..) import Nav.Model exposing (Page(..)) view : Model -> Html Msg view model = let ...
module App.View exposing (view) import Html exposing (Html, div, text, a) import Html.Attributes exposing (class, href) import Components.View import Detail.View import App.Model exposing (..) import App.Messages exposing (..) import Nav.Model exposing (Page(..)) import Nav.Nav exposing (toHash) view : Model -> Html...
Change link to frontpage to avoid reloading app
Change link to frontpage to avoid reloading app
Elm
apache-2.0
Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon,Espenhh/panopticon
b63d98d7af4117b6027f614857313a4381147f1c
app/Update.elm
app/Update.elm
module Update exposing (update) import Action exposing (Action(..)) import Model exposing (Model) import List exposing (indexedMap) import Types exposing (Piece(..), Player(..)) update : Action -> Model -> (Model, Cmd Action) update action model = case action of -- Place a piece in the given index; assumed the ...
module Update exposing (update) import Action exposing (Action(..)) import Model exposing (Model) import List exposing (indexedMap) import Types exposing (Piece(..), Player(..)) import Zone exposing (Zone) update : Action -> Model -> (Model, Cmd Action) update action model = case action of -- Place a piece in t...
Fix premature player change bug
Fix premature player change bug
Elm
mit
amcsi/elm-tic-tac-toe,amcsi/elm-tic-tac-toe
75dbc85c2ff4e9e57a96c80de9de0e9f60c94fd7
src/elm/Events/EventItem.elm
src/elm/Events/EventItem.elm
module Events.EventItem exposing (view) import Msgs exposing (Msg) import Html exposing (..) import Html.Attributes exposing (..) import Models exposing (EventItem) import Routing exposing (eventPath, onLinkClick) import Markdown view : EventItem -> Html Msg view event = let path = eventPath event.id ...
module Events.EventItem exposing (view) import Msgs exposing (Msg) import Html exposing (..) import Html.Attributes exposing (..) import Models exposing (EventItem) import Routing exposing (eventPath, onLinkClick) import Markdown participantRow : Int -> String -> Html Msg participantRow index participant = tr [] ...
Add styles to events page
Add styles to events page
Elm
mit
Cadiac/kilta-cms-ui,Cadiac/kilta-cms-ui
65673dd8f19ca8f19b484e08e73a2e9bad97af2a
web/src/Toolbox/Action.elm
web/src/Toolbox/Action.elm
module Toolbox.Action (..) where import Dict import Effects exposing (Effects) import Toolbox.Types exposing (Model, Response) type Action = DownloadedIngredients (Maybe Response) | NoOp update : Action -> Model -> ( Model, Effects Action ) update action model = case action of DownloadedIngredients maybe...
module Toolbox.Action (..) where import Dict import Effects exposing (Effects) import Toolbox.Types exposing (Model, Response) type Action = DownloadedIngredients (Maybe Response) | NoOp update : Action -> Model -> ( Model, Effects Action ) update action model = case action of DownloadedIngredients maybe...
Refactor enumerating a list into a separate function.
Refactor enumerating a list into a separate function.
Elm
mit
zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox,zsiciarz/skyrim-alchemy-toolbox
d4b2d81e58a72a5444317e5a72bcdc9956db94ec
src/Display.elm
src/Display.elm
module Display (..) where import Html exposing (Html, div, h1) import Mouse view : Html view = h1 [] [ Html.text "Welcome to Tic Tac Toe"] main = view
module Display (..) where import Html exposing (..) import Html.Attributes exposing (..) import Mouse cell : Attribute cell = style [("margin", "10px") , ("width", "30%") , ("height", "200px") , ("text-align", "center") , ("-webkit-user-select", "none") , ("user-select", "none") , ("font...
Add grid to display page
Add grid to display page
Elm
mit
Bjornkjohnson/elm-TTT
dc877c79d9f42f85c6e332fe58148e1a70d2aa66
src/Internal/TextField/HelperText/Implementation.elm
src/Internal/TextField/HelperText/Implementation.elm
module Internal.TextField.HelperText.Implementation exposing ( Property , helperText , persistent , validationMsg ) import Html exposing (Html) import Internal.Options as Options exposing (cs, css, when) type alias Config = { persistent : Bool , validationMsg : Bool } defaultConfig ...
module Internal.TextField.HelperText.Implementation exposing ( Property , helperText , persistent , validationMsg ) import Html exposing (Html) import Internal.Options as Options exposing (cs, css, when, aria, styled) type alias Config = { persistent : Bool , validationMsg : Bool } ...
Make sure helper text displays again
Make sure helper text displays again
Elm
apache-2.0
aforemny/elm-mdc
502a731e15d7d0da3e006c04481d24885797495c
elm/src/Main.elm
elm/src/Main.elm
module Main exposing (..) import Navigation import View import Update import Model exposing (Model) import Route exposing (Location(Login)) import Msg exposing (Msg(..)) import Material import Util main : Program Never main = Navigation.program (Navigation.makeParser Route.locFor) { init = init ,...
module Main exposing (..) import Navigation import View import Update import Model exposing (Model) import Route exposing (Location(Login)) import Msg exposing (Msg(..)) import Material import Util main : Program Never main = Navigation.program (Navigation.makeParser Route.locFor) { init = init ,...
Handle url redirect for login page
Handle url redirect for login page NOTE: If you don't handle the case where you're already on the login page, super bad things seem to happen w/r/t CPU usage :)
Elm
mit
knewter/time-tracker,knewter/time-tracker
95377d8f50cddd56e58541b5b277efe49802d5b1
src/Models.elm
src/Models.elm
module Models exposing (..) -- Material import Material type alias Model = { mdl : Material.Model , plants : List Plant } initialModel : Model initialModel = { mdl = Material.model , plants = [ { id = 1, name = "Basil", desc = "A green plant." } , { id = 2, name = "Thyme", desc...
module Models exposing (..) -- Material import Material type alias Model = { mdl : Material.Model , plants : List Plant } initialModel : Model initialModel = { mdl = Material.model , plants = [ { id = 1, name = "Basil", desc = "A green plant." } , { id = 2, name = "Thyme", desc...
Use type alias rather than type for PlantId
Use type alias rather than type for PlantId
Elm
mit
lawgsy/plant-db,lawgsy/plant-db
df135b8c9b45638250cd0c309da3579c54637bb6
libraries/Trampoline.elm
libraries/Trampoline.elm
module Trampoline where {-| Trampolining loops for unbounded recursion. Since most javascript implementations lack tail-call elimination, deeply tail-recursive functions will result in a stack overflow. ```haskell fac' : Int -> Int -> Int fac' n acc = if n <= 0 then acc else fac' (n - 1) (n...
module Trampoline where {-| Trampolining loops for unbounded recursion. Since most javascript implementations lack tail-call elimination, deeply tail-recursive functions will result in a stack overflow. ```haskell fac' : Int -> Int -> Int fac' n acc = if n <= 0 then acc else fac' (n - 1) (n...
Update trampoline docs to new interface.
Update trampoline docs to new interface.
Elm
bsd-3-clause
pairyo/elm-compiler,Axure/elm-compiler,laszlopandy/elm-compiler,mgold/Elm,JoeyEremondi/elm-pattern-effects,deadfoxygrandpa/Elm,5outh/Elm
a208d4ff7ba8bb7e5839d034ca6e039b671c6dc3
examples/Test.elm
examples/Test.elm
module Test where import ElmTest.Assertion exposing (..) import ElmTest.Test exposing (..) tests : List Test tests = [ (2^3) `equals` 1 , 3 `equals` 3 , defaultTest (assert True) , test "test head" (assertEqual 1 (Maybe.withDefault 0 (List.head [1..10]))) ] tests2 : List Test tests2 = [ (...
module Test where import ElmTest exposing (..) tests : List Test tests = [ (2^3) `equals` 1 , 3 `equals` 3 , defaultTest (assert True) , test "test head" (assertEqual 1 (Maybe.withDefault 0 (List.head [1..10]))) ] tests2 : List Test tests2 = [ (2^3) `equals` 8 , 3 `equals` 3 , def...
Update examples for new API
Update examples for new API
Elm
bsd-3-clause
elm-community/elm-test,robertjlooby/elm-test
1f4773a4675b32502cd03f97a7a7419b9b3c1383
tests/Tests.elm
tests/Tests.elm
module Main where import List import ElmTest.Assertion as A import ElmTest.Run as R import ElmTest.Runner.Console exposing (runDisplay) import ElmTest.Test exposing (..) import Console exposing (..) import Console.Runner exposing (Request, Response) tests : List Test tests = [ (R.run (0 `equals` 0)) `equals` (R.Pas...
module Main where import List import Task import Console exposing (..) import ElmTest exposing (..) tests : List Test tests = [ 0 `equals` 0 , test "pass" <| assert True , test "fail" <| assertNotEqual True False ] ++ (List.map defaultTest <| assertionList [1..10] [1..10]) consoleTests ...
Update tests for new public API
Update tests for new public API
Elm
bsd-3-clause
elm-community/elm-test,robertjlooby/elm-test
cdca0453228d3d3d7fce82c9bde1639e4d809d62
src/Core/Flags.elm
src/Core/Flags.elm
module Core.Flags exposing (Flags, Mode(..), initFlags, getVersion, getMode, isDev) type Mode = HE1 | HE2 type alias Flags = { apiHttpUrl : String , apiWsUrl : String , version : String , mode : Mode } initFlags : String -> String -> String -> String -> Flags initFlags apiHttpUrl apiWs...
module Core.Flags exposing (Flags, Mode(..), initFlags, getVersion, getMode, isDev, isHE2) type Mode = HE1 | HE2 type alias Flags = { apiHttpUrl : String , apiWsUrl : String , version : String , mode : Mode } initFlags : String -> String -> String -> String -> Flags initFlags apiHttpUr...
Add helper function to check if Game is on HE2 Mode
Add helper function to check if Game is on HE2 Mode
Elm
agpl-3.0
HackerExperience/HEBorn,HackerExperience/HEBorn,HackerExperience/HEBorn
4bdd209503c975b8e654891e02a99ee2eac53c66
app/Main.elm
app/Main.elm
module Main exposing (..) import Html exposing (programWithFlags) import Model exposing (Model) import Data.Wallet exposing (Wallet) import Update exposing (Msg, fetchBalance, update) import View exposing (view) main = programWithFlags { init = init, update = update, view = view, subscriptions = (\_ -> Sub.none)...
module Main exposing (main) import Html exposing (programWithFlags) import Model exposing (Model) import Data.Wallet exposing (Wallet) import Update exposing (Msg, fetchBalance, update) import View exposing (view) main = programWithFlags { init = init, update = update, view = view, subscriptions = (\_ -> Sub.non...
Make main module only expose main
Make main module only expose main
Elm
mit
nilchaos87/cache,nilchaos87/cache
9b77576226b15f1f1cc29d30e4fea51d82529996
elm-tutorial/Main.elm
elm-tutorial/Main.elm
module Main exposing (..) import Html exposing (Html, div, program, text) import Mouse import Keyboard -- MODEL type alias Model = Int init : ( Model, Cmd Msg ) init = ( 0, Cmd.none ) -- MESSAGES type Msg = MouseMsg Mouse.Position | KeyMsg Keyboard.KeyCode -- VIEW view : Model -> Html M...
module Main exposing (..) import Html exposing (Html, button, div, program, text) import Html.Events exposing (onClick) import Random -- MODEL type alias Model = Int init : ( Model, Cmd Msg ) init = ( 0, Cmd.none ) -- MESSAGES type Msg = Roll | OnResult Int -- VIEW view : Model -> Html ...
Implement my fisrt Cmd app
:tada: Implement my fisrt Cmd app
Elm
mit
otofu-square/elm-sandbox,otofu-square/elm-sandbox
45aa05367140c68de6b09efaee1fa6a72ee3a1ae
IdeaFight/Shuffle.elm
IdeaFight/Shuffle.elm
module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : List a -> Int -> List a -> ( a, List a ) extractValueHelper values index accumulator = case ( index, values ) of ( _, [] ) -> Debug.crash "Out of values to extract" ( 0, head :: tail )...
module IdeaFight.Shuffle exposing (shuffle) import Random exposing (Generator) extractValueHelper : a -> List a -> Int -> List a -> ( a, List a ) extractValueHelper first_value rest_values index accumulator = case ( index, rest_values ) of ( 0, _) -> ( first_value, List.append (List.reverse a...
Rearrange types in shuffle to avoid crash
Rearrange types in shuffle to avoid crash Debug.crash was removed from Elm 0.19, so I needed to work around this. In reality, extractValueHelper and extractValue should never get passed empty lists, and the Debug.crash invocation was meant to make things typecheck in this case - so instead we can just use some type ma...
Elm
mit
hoelzro/idea-fight
87eac90d308429ce9285a7435a4f378ef9474e2b
public/Try.elm
public/Try.elm
import Website.Message (report) main = report [markdown| <style type="text/css">p { text-align:justify; }</style> # Try Elm Write and compile code online! You may want to check out: * <a href="/Examples.elm" target="_top">Code Examples</a> * <a href="/Learn.elm" target="_top">Learning Resources</a> |]
import Website.Message (report) main = report [markdown| # Online Editor Write and compile code online! * <a href="/edit/examples/Elements/HelloWorld.elm" target="_top">Hello World!</a> * <a href="/edit/examples/Elements/Image.elm" target="_top">Images</a> * <a href="/edit/examples/Elements/LinearGradient.elm...
Make the try message a bit more helpful
Make the try message a bit more helpful
Elm
bsd-3-clause
avh4/elm-lang.org,frankschmitt/elm-lang.org,jazmit/elm-lang.org,coreyhaines/elm-lang.org,rtorr/elm-lang.org,randomer/elm-lang.org,akeeton/elm-lang.org,kevinrood/elm-lang.org,amitaibu/elm-lang.org,yang-wei/elm-lang.org,FranklinChen/elm-lang.org,akeeton/elm-lang.org,elm-guides/elm-lang.org,randomer/elm-lang.org,semaj/jam...
57abce229f070211d9cf9edb48b17fd556572299
src/app/Main.elm
src/app/Main.elm
module Main where import Html exposing (Html) import Html.Attributes as Attr main : Html main = Html.div [ Attr.class "card-panel teal lighten-2" ] [ Html.h2 [] [ Html.text "Hello World!" ] ]
module Main where import Html exposing (Html) import Html.Attributes as Attr main : Html main = Html.div [] [ Html.nav [ Attr.class "light-green darken-1" ] [ Html.div [ Attr.class "nav-wrapper container" ] [ Html.span [ Attr.cla...
Add basic material-based example layout w/ navbar
Add basic material-based example layout w/ navbar
Elm
mit
pancakeCaptain/test-scaffolder-elm
1af9c645bc05f7f64a9483dabbde6cd783db15ac
src/Example.elm
src/Example.elm
-- Copyright 2015 Ian D. Bollinger -- -- Licensed under the MIT license <LICENSE or -- http://opensource.org/licenses/MIT>. This file may not be copied, modified, -- or distributed except according to those terms. import Skald exposing (..) main = tale "Example" |> by "Ian D. Bollinger" |> thatBeginsIn theRoom ...
-- Copyright 2015 Ian D. Bollinger -- -- Licensed under the MIT license <LICENSE or -- http://opensource.org/licenses/MIT>. This file may not be copied, modified, -- or distributed except according to those terms. import Skald exposing (..) main = tale "Example" |> by "Ian D. Bollinger" |> thatBeginsIn theRoom ...
Update example to use isVisited
Update example to use isVisited
Elm
mit
ianbollinger/skald
800f85b5aabe1bde36aae5713a616bcd18d9d80e
src/Elmer/Value/Native.elm
src/Elmer/Value/Native.elm
module Elmer.Value.Native exposing ( global , cast , nativeType , assign , wrap , unwrap , decode , decoder , field , constructor ) import Json.Decode as Json import Elm.Kernel.Value constructor : Json.Decoder Int constructor = Json.field "$" Json.int field : String -> Json.Decoder a field ...
module Elmer.Value.Native exposing ( global , cast , nativeType , assign , wrap , unwrap , decode , decoder , field , constructor ) import Json.Decode as Json import Elm.Kernel.Value constructor : Json.Decoder Int constructor = Json.field "$" Json.int field : String -> Json.Decoder a field ...
Remove unnecessary calls to cast
Remove unnecessary calls to cast
Elm
mit
bwatkinsPivotal/elmer,brian-watkins/elmer,brian-watkins/elmer
74bb7a0226b664997edf77443a0587d099fee484
src/Game.elm
src/Game.elm
module Game where import List exposing (sum, take) score rolls = case rolls of [first, second, third] -> first + second + third 10::rest -> 10 + strikeBonus rest + score rest first::second::rest -> if | first + second == 10 -> 10 + spareBonus rest + score rest | o...
module Game where import List exposing (sum, take) score rolls = case rolls of [_, _, _] as lastFrame -> sum lastFrame 10::rest -> 10 + strikeBonus rest + score rest first::second::rest -> if | first + second == 10 -> 10 + spareBonus rest + score rest | otherwise ...
Use `as` pattern match on last frame
Use `as` pattern match on last frame
Elm
mit
robertjlooby/elm-bowling-game-kata
136d0c20faed28ffd63b41617e781a43b01095cc
src/app/Scaffolder.elm
src/app/Scaffolder.elm
module Scaffolder (model, view, actions) where import Html exposing (Html) import Signal exposing (Signal, Mailbox, Address) import Html.Attributes as Attr type Action = NoOp type alias Model = { nothing : String } actions : Mailbox Action actions = Signal.mailbox NoOp model : Signal Model model = ...
module Scaffolder (model, view, actions) where import Html exposing (Html, div, nav, span, text, textarea, label, form) import Html.Attributes exposing (class, id, for) import Signal exposing (Signal, Mailbox, Address) type Action = NoOp type alias Model = { nothing : String } actions : Mailbox Action ac...
Add text areas to test parsing input
Add text areas to test parsing input
Elm
mit
pancakeCaptain/test-scaffolder-elm
59b43b8516b59bbdd9986967269b8f634b0297ac
src/User/Commands.elm
src/User/Commands.elm
module User.Commands exposing (..) import Http exposing (..) import Json.Decode as Decode exposing (Decoder, field) import Json.Encode as Encode import User.Models exposing (User) import User.Messages exposing (..) apiUrl : String apiUrl = "http://localhost:3001/" registerUrl : String registerUr...
module User.Commands exposing (..) import Http exposing (..) import Json.Decode as Decode exposing (Decoder, field) import Json.Encode as Encode import User.Models exposing (User) import User.Messages exposing (..) apiUrl : String apiUrl = "http://localhost:3001/" registerUrl : String registerUr...
Modify elm api url's to conform to api changes
Modify elm api url's to conform to api changes
Elm
mit
jnoggle/italian-workflow,jnoggle/italian-workflow
e908e0dd7a59de3c74e70e96dded9108522b2523
exercises/grains/tests/Tests.elm
exercises/grains/tests/Tests.elm
module Tests exposing (..) import Expect import Grains exposing (square) import Json.Encode exposing (Value) import Test exposing (..) tests : Test tests = describe "Grains" [ describe "square" [ test "of 1" <| \() -> Expect.equal (Just 1) (square 1) , test "of 2" ...
module Tests exposing (..) import Expect import Grains exposing (square) import Json.Encode exposing (Value) import Test exposing (..) tests : Test tests = describe "Grains" [ describe "square" [ test "of 1" <| \() -> Expect.equal (Just 1) (square 1) , test "of 2" ...
Add a note about the missing high value grains test cases
Add a note about the missing high value grains test cases
Elm
mit
exercism/xelm
f859d820ad2caaf7d8ce335d49ca2f8dc259af08
src/Setup/Settings.elm
src/Setup/Settings.elm
module Setup.Settings exposing (..) import Basics.Extra exposing ((=>)) import Json.Decode as Decode import Json.Decode.Pipeline exposing (..) import Json.Encode as Encode import Roster.Data exposing (RosterData) type alias Data = { timerDuration : Int , breakDuration : Int , intervalsPerBreak : Int ...
module Setup.Settings exposing (..) import Basics.Extra exposing ((=>)) import Json.Decode as Decode import Json.Decode.Pipeline exposing (..) import Json.Encode as Encode import Roster.Data exposing (RosterData) type alias Data = { timerDuration : Int , breakDuration : Int , intervalsPerBreak : Int ...
Remove support for missing fields from very old versions of app.
Remove support for missing fields from very old versions of app.
Elm
mit
dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster,dillonkearns/mobster
132c4a3220b0863f331b6be30e8735b196035cae
bench/Bencher.elm
bench/Bencher.elm
module Main exposing (main) import Html import Html.App import Bench.Native as Benchmark import Bench.Dict import Bench.Array main : Program Never main = Html.App.beginnerProgram { model = () , update = \_ _ -> () , view = \() -> Html.text "Done!" } |> Benchmark.run ...
module Main exposing (main) import Html import Html.App import Bench.Native as Benchmark import Bench.Dict import Bench.Array main : Program Never main = Html.App.beginnerProgram { model = () , update = \_ _ -> () , view = \() -> Html.text "Done!" } |> Benchmark.run ...
Revert "Lets focus on dict for a while"
Revert "Lets focus on dict for a while" This reverts commit 1848fbc5872f2ffb2d817e6d9c5a9bc6454833b4.
Elm
bsd-3-clause
Skinney/hamt-collections
7a69d7cee3556e4a71dec18c3c4d8a371cc46daa
examples/ScriptExample.elm
examples/ScriptExample.elm
module Main where import IO.IO exposing (..) import IO.Runner exposing (Request, Response) import IO.Runner as Run import Test import ElmTest.Runner.Console as Console sigs : IO () sigs = Console.runDisplay Test.suite3 -- | Can't use a type alias in ports, yet :/ port requests : Signal Request port requests = Run.r...
module Main where import Task import Console exposing (..) import ElmTest.Runner.Console as Console import Test tests : IO () tests = consoleRunner Test.suite3 port runner : Signal (Task.Task x ()) port runner = Console.run sigs
Update for new public API
Update for new public API
Elm
bsd-3-clause
elm-community/elm-test,robertjlooby/elm-test