This commit is contained in:
@@ -6,10 +6,7 @@
|
||||
{-# LANGUAGE PartialTypeSignatures #-}
|
||||
{-# LANGUAGE TemplateHaskellQuotes #-}
|
||||
module Gyehoek.QBE
|
||||
( GenSym
|
||||
, runGenSym
|
||||
, gensym
|
||||
, module QBE
|
||||
( module QBE
|
||||
, render
|
||||
, fn
|
||||
)
|
||||
@@ -17,10 +14,6 @@ module Gyehoek.QBE
|
||||
|
||||
import Gyehoek.QBE.Parse
|
||||
import Language.QBE as QBE
|
||||
import Effectful.State.Dynamic
|
||||
import Effectful.Dispatch.Dynamic
|
||||
import Effectful
|
||||
import Numeric.Natural
|
||||
import Data.String (IsString(fromString))
|
||||
import Prettyprinter (Pretty(pretty), layoutPretty, defaultLayoutOptions)
|
||||
import Data.Text (Text)
|
||||
@@ -36,18 +29,6 @@ import Data.Kind (Type)
|
||||
render :: Pretty a => a -> Text
|
||||
render = renderStrict . layoutPretty defaultLayoutOptions . pretty
|
||||
|
||||
data GenSym :: Effect where
|
||||
GenSym :: GenSym m (Ident s)
|
||||
|
||||
type instance DispatchOf GenSym = Dynamic
|
||||
|
||||
gensym :: forall s es. GenSym :> es => Eff es (Ident s)
|
||||
gensym = send GenSym
|
||||
|
||||
runGenSym :: Eff (GenSym : es) a -> Eff es a
|
||||
runGenSym = reinterpret (evalStateLocal (0 :: Natural)) \_ GenSym ->
|
||||
state \n -> (Ident . fromString $ '.' : show n, succ n)
|
||||
|
||||
|
||||
|
||||
parseQuoteExp
|
||||
|
||||
Reference in New Issue
Block a user