Skip to content

Instantly share code, notes, and snippets.

View rgrempel's full-sized avatar

Ryan Rempel rgrempel

View GitHub Profile
@jasonzoladz
jasonzoladz / Main.elm
Last active January 22, 2016 15:08
Client-side Routing in Elm Using Parser Combinators
module Main where
import Combine exposing (Parser, string, parse, end, andThen, many1, while, many, skip, Result (..))
import Combine.Char exposing (noneOf, char)
import Combine.Num exposing (int)
import Combine.Infix exposing ((<$>), (<$), (<*), (*>), (<*>), (<|>))
import Maybe exposing (Maybe)
import History exposing (path, setPath)
import Signal exposing (Signal, (<~), (~), send, message)
import Effects exposing (Effects, task)

Proposal: revised Elm Native format

Right now, Native doesn't play well with dead-code elmination. Additionally, Native review is a big bottleneck for producing and publishing new librairies. Finally, there is no way to unclude JS code which calls ports using the Elm compiler.

Example file

/**
--The top of the file declares the structure of the Native module
--and must be a valid Elm syntax declaration