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 OverloadedStrings #-} | |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
--{-# LANGUAGE RankNTypes #-} | |
--{-# LANGUAGE UndecidableInstances #-} | |
--{-# LANGUAGE AllowAmbiguousTypes #-} | |
--{-# LANGUAGE GADTs #-} | |
import Data.Aeson |
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
(** Either *) | |
module Either : sig | |
type ('a, 'b) t = Left of 'a | Right of 'b | |
val left : 'a -> ('a, 'b) t | |
val right : 'b -> ('a, 'b) t | |
val either : ('a -> 'c) -> ('b -> 'c) -> ('a, 'b) t -> 'c |