diff --git a/src/Data/Syntax/Algebra.hs b/src/Data/Syntax/Algebra.hs index ed15792ff..e92297c14 100644 --- a/src/Data/Syntax/Algebra.hs +++ b/src/Data/Syntax/Algebra.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DataKinds, GeneralizedNewtypeDeriving, TypeOperators #-} +{-# LANGUAGE DataKinds, GeneralizedNewtypeDeriving, MonoLocalBinds, TypeOperators #-} module Data.Syntax.Algebra ( FAlgebra , RAlgebra diff --git a/src/Language/Python/Syntax.hs b/src/Language/Python/Syntax.hs index 6199d9196..589b79815 100644 --- a/src/Language/Python/Syntax.hs +++ b/src/Language/Python/Syntax.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DataKinds, DeriveAnyClass, RankNTypes, TypeOperators #-} +{-# LANGUAGE DataKinds, DeriveAnyClass, MonoLocalBinds, RankNTypes, TypeOperators #-} module Language.Python.Syntax ( assignment , Syntax diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index e1a5e31aa..2125b3d59 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DataKinds, RankNTypes, TypeOperators #-} +{-# LANGUAGE DataKinds, MonoLocalBinds, RankNTypes, TypeOperators #-} module Language.Ruby.Syntax ( assignment , Syntax @@ -375,7 +375,8 @@ binary = symbol Binary >>= \ loc -> children $ expression >>= \ lexpression -> g <|> mk AnonSlash Expression.DividedBy <|> mk AnonPercent Expression.Modulo <|> mk AnonStarStar Expression.Power - where mk s constr = makeTerm loc <$> (symbol s *> (constr lexpression <$> expression)) + where mk :: f :< Syntax => Grammar -> (Term -> Term -> f Term) -> Assignment + mk s constr = makeTerm loc <$> (symbol s *> (constr lexpression <$> expression)) mkNot s constr = makeTerm loc <$ symbol s <*> (Expression.Not <$> (makeTerm <$> location <*> (constr lexpression <$> expression))) conditional :: Assignment diff --git a/src/Renderer/TOC.hs b/src/Renderer/TOC.hs index fb884f98c..7e8b158ba 100644 --- a/src/Renderer/TOC.hs +++ b/src/Renderer/TOC.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DeriveAnyClass, MultiParamTypeClasses, RankNTypes, TypeOperators #-} +{-# LANGUAGE DeriveAnyClass, MonoLocalBinds, MultiParamTypeClasses, RankNTypes, TypeOperators #-} module Renderer.TOC ( renderToCDiff , renderToCTerm