implementing fromTyThing.

This commit is contained in:
Kazu Yamamoto
2014-02-06 21:34:40 +09:00
parent 629cf409ae
commit 45154e6eb1
2 changed files with 21 additions and 4 deletions

View File

@@ -27,6 +27,8 @@ module Language.Haskell.GhcMod.Gap (
, module Pretty
#endif
, showDocWith
, GapThing(..)
, fromTyThing
) where
import Control.Applicative hiding (empty)
@@ -329,3 +331,14 @@ deSugar tcm e hs_env = snd <$> deSugarExpr hs_env modu rn_env ty_env e
rn_env = tcg_rdr_env tcgEnv
ty_env = tcg_type_env tcgEnv
#endif
----------------------------------------------------------------
----------------------------------------------------------------
data GapThing = GtI Id | GtD DataCon | GtT TyCon | GtN
fromTyThing :: TyThing -> GapThing
fromTyThing (AnId i) = GtI i
fromTyThing (ADataCon d) = GtD d
fromTyThing (ATyCon t) = GtT t
fromTyThing _ = GtN