Skip to content

Instantly share code, notes, and snippets.

@deemp
Created February 12, 2023 07:11
Show Gist options
  • Save deemp/a2cdea6d49f4b11f007d77ed665ec911 to your computer and use it in GitHub Desktop.
Save deemp/a2cdea6d49f4b11f007d77ed665ec911 to your computer and use it in GitHub Desktop.
Export constructors to be promoted
module A (P(..)) where
data P = MkP
{-# LANGUAGE DataKinds #-}
module A1 (MkP1) where
import A (P(..))
type MkP1 = MkP
{-# LANGUAGE DataKinds #-}
module A2 (MkP1) where
import A (P(..))
type MkP1 = MkP
module B where
import A1(MkP1)
import A2(MkP1)
-- must disambiguate
type M = A1.MkP1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment