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 #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE DerivingVia #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE NoStarIsType #-} | |
{-# LANGUAGE PatternSynonyms #-} |
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
-- A variant of https://gist.github.com/gelisam/d9b067a1ef78670d6e4c67b18740bbea | |
-- which suports ExceptT. Kind of. | |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, PolyKinds, RankNTypes, TupleSections, TypeOperators, UndecidableInstances #-} | |
module Main where | |
import Test.DocTest | |
import Control.Monad.Except | |
import Control.Monad.Reader | |
import Control.Monad.State | |
import Control.Monad.Writer |
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
-- A concrete use case for the type which is to '(->)' as 'Day' is to '(,)'. | |
-- I call it "FunDay", but I don't know what its proper name is. I've been | |
-- trying to find a use for 'FunDay', and I think I've found a pretty neat one. | |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, PolyKinds, RankNTypes, TypeSynonymInstances #-} | |
module Main where | |
import Test.DocTest | |
import Control.Monad.Except | |
import Control.Monad.Reader |