Compiler.Platform

Functions for working with a project's target platform.

type Platform
= Node
| Browser
| Common

The platform targetted by a project. You'll read this value from a gren.json file.

isCompatible : Platform -> Platform -> Bool

Check if two Platform values are compatible.

Common is compatible with all other platforms.

Value conversion

toString : Platform -> String

Return the String representation for a Platform.

toJson : Platform -> Value

Convert a Platform value to it's JSON representation.

jsonDecoder : Decoder Platform

JSON decoder for Platform.