Skip to content

Instantly share code, notes, and snippets.

@RyanGlScott
Created February 8, 2016 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanGlScott/3fa71c22738f7295ada1 to your computer and use it in GitHub Desktop.
Save RyanGlScott/3fa71c22738f7295ada1 to your computer and use it in GitHub Desktop.
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -ddump-splices #-}
module FreeTH where
import Control.Monad.Free
import Control.Monad.Free.TH
deriving instance Functor (Foo a)
data Foo a b where
Foo1, Foo2 :: d -> Foo Int d
Foo3 :: Foo Char f
$(makeFree ''Foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment