module FreeC.Backend.Agda.Converter.Arg ( convertTypeVarDecl, convertArg ) where
import qualified FreeC.Backend.Agda.Syntax as Agda
import FreeC.Environment.Renamer
( renameAndDefineAgdaTypeVar, renameAndDefineAgdaVar )
import qualified FreeC.IR.Syntax as IR
import FreeC.Monad.Converter ( Converter )
convertTypeVarDecl :: IR.TypeVarDecl -> Converter Agda.Name
convertTypeVarDecl (IR.TypeVarDecl srcSpan name)
= Agda.unqualify <$> renameAndDefineAgdaTypeVar srcSpan name
convertArg :: IR.VarPat -> Converter Agda.QName
convertArg (IR.VarPat srcSpan ident maybeArgType isStrict)
= renameAndDefineAgdaVar srcSpan isStrict ident maybeArgType