diff --git a/djinn-ghc.cabal b/djinn-ghc.cabal
--- a/djinn-ghc.cabal
+++ b/djinn-ghc.cabal
@@ -1,5 +1,5 @@
 name:           djinn-ghc
-version:        0.0.2
+version:        0.0.2.1
 synopsis:       Generate Haskell code from a type. Bridge from Djinn to GHC API.
 description:    Djinn uses an theorem prover for intuitionistic propositional logic
                 to generate a Haskell expression when given a type.
diff --git a/src/Djinn/GHC.hs b/src/Djinn/GHC.hs
--- a/src/Djinn/GHC.hs
+++ b/src/Djinn/GHC.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PatternGuards, BangPatterns #-}
+{-# LANGUAGE CPP, PatternGuards, BangPatterns #-}
 module Djinn.GHC (Environment, MaxSolutions(..), djinn) where
 
 import Control.Concurrent
@@ -67,7 +67,11 @@
     Just (G.ATyCon tycon) | G.isSynTyCon tycon -> do
       -- Get information for this type synonym
       let tyconName = toHSymbol $ G.tyConName tycon
+#if __GLASGOW_HASKELL__ >= 708
           Just (vars, defn) = G.synTyConDefn_maybe tycon
+#else
+          (vars, defn) = G.synTyConDefn tycon
+#endif
           varsH = map toHSymbol vars
           htype = hType defn
       -- Recursively obtain it for the environment of the type
