Defining an Applicative instance on a GADT

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • GitHub repo ghc

    Mirror of the Glasgow Haskell Compiler. Please submit issues and patches to GHC's Gitlab instance ( First time contributors are encouraged to get started with the newcomers info (

    GHCi, version 8.8.4: :? for help Loaded GHCi configuration from /home/bss/.ghc/ghci.conf GHCi> :set -XGADTs GHCi> :{ GHCi| data Foo a where GHCi| Bar1 :: Int -> Foo Int GHCi| Bar2 :: Float -> Foo Float GHCi| :} type role Foo nominal data Foo a where ... (0.00 secs, 0 bytes) GHCi> :set -XEmptyCase GHCi> :{ GHCi| instance Functor Foo where GHCi| fmap f x = case x of {} GHCi| :} (0.00 secs, 0 bytes)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts