This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveFunctor #-} | |
module Expr where | |
import Data.Monoid | |
data Expr a | |
= Lit a | |
| Neg (Expr a) | |
| Add (Expr a) (Expr a) | |
| Sub (Expr a) (Expr a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, text) | |
import Signal exposing (constant) | |
import Json.Decode as Json exposing ((:=)) | |
type alias Person = | |
{ name : String | |
, age : Int | |
} | |
personDecoder : Json.Decoder Person |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleContexts #-} | |
module Main where | |
import Prelude hiding (id, (.)) | |
import Control.Category | |
import Control.Applicative | |
import Control.Monad | |
import Control.Monad.Trans | |
import Control.Monad.IO.Class |