├── .circleci └── config.yml ├── .dockerignore ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitmodules ├── CONTRIBUTING.md ├── ChangeLog.md ├── Dockerfile ├── LICENSE ├── README.md ├── Setup.hs ├── cabal.ghc.project ├── cabal.nix.project ├── cci.sh ├── cleaninstall.cmd ├── cleaninstall.sh ├── compiler ├── Eta │ ├── Backpack │ │ ├── BkpSyn.hs │ │ ├── DriverBkp.hs │ │ ├── NameShape.hs │ │ └── RnModIface.hs │ ├── BasicTypes │ │ ├── Avail.hs │ │ ├── BasicTypes.hs │ │ ├── ConLike.hs │ │ ├── DataCon.hs │ │ ├── DataCon.hs-boot │ │ ├── Demand.hs │ │ ├── Id.hs │ │ ├── IdInfo.hs │ │ ├── IdInfo.hs-boot │ │ ├── Interop.hs │ │ ├── Lexeme.hs │ │ ├── Literal.hs │ │ ├── MkId.hs │ │ ├── MkId.hs-boot │ │ ├── Module.hs │ │ ├── Module.hs-boot │ │ ├── Name.hs │ │ ├── Name.hs-boot │ │ ├── NameCache.hs │ │ ├── NameEnv.hs │ │ ├── NameSet.hs │ │ ├── OccName.hs │ │ ├── OccName.hs-boot │ │ ├── PatSyn.hs │ │ ├── PatSyn.hs-boot │ │ ├── RdrName.hs │ │ ├── SrcLoc.hs │ │ ├── UniqSupply.hs │ │ ├── Unique.hs │ │ ├── Var.hs │ │ ├── VarEnv.hs │ │ └── VarSet.hs │ ├── CodeGen │ │ ├── ArgRep.hs │ │ ├── Bind.hs │ │ ├── Bind.hs-boot │ │ ├── Closure.hs │ │ ├── Constr.hs │ │ ├── Env.hs │ │ ├── Expr.hs │ │ ├── Foreign.hs │ │ ├── Layout.hs │ │ ├── Main.hs │ │ ├── Monad.hs │ │ ├── Name.hs │ │ ├── Prim.hs │ │ ├── Rts.hs │ │ ├── Types.hs │ │ └── Utils.hs │ ├── Core │ │ ├── CoreArity.hs │ │ ├── CoreFVs.hs │ │ ├── CoreLint.hs │ │ ├── CorePrep.hs │ │ ├── CoreSeq.hs │ │ ├── CoreSubst.hs │ │ ├── CoreSyn.hs │ │ ├── CoreTidy.hs │ │ ├── CoreUnfold.hs │ │ ├── CoreUtils.hs │ │ ├── MkCore.hs │ │ ├── PprCore.hs │ │ └── TrieMap.hs │ ├── DeSugar │ │ ├── Check.hs │ │ ├── Coverage.hs │ │ ├── DeSugar.hs │ │ ├── DsArrows.hs │ │ ├── DsBinds.hs │ │ ├── DsExpr.hs │ │ ├── DsExpr.hs-boot │ │ ├── DsForeign.hs │ │ ├── DsGRHSs.hs │ │ ├── DsListComp.hs │ │ ├── DsMeta.hs │ │ ├── DsMonad.hs │ │ ├── DsUsage.hs │ │ ├── DsUtils.hs │ │ ├── Match.hs │ │ ├── Match.hs-boot │ │ ├── MatchCon.hs │ │ ├── MatchLit.hs │ │ ├── PmExpr.hs │ │ ├── StaticPtrTable.hs │ │ └── TmOracle.hs │ ├── Debug.hs │ ├── HsSyn │ │ ├── Convert.hs │ │ ├── HsBinds.hs │ │ ├── HsDecls.hs │ │ ├── HsDoc.hs │ │ ├── HsExpr.hs │ │ ├── HsExpr.hs-boot │ │ ├── HsImpExp.hs │ │ ├── HsLit.hs │ │ ├── HsPat.hs │ │ ├── HsPat.hs-boot │ │ ├── HsSyn.hs │ │ ├── HsTypes.hs │ │ ├── HsUtils.hs │ │ └── PlaceHolder.hs │ ├── Iface │ │ ├── BinFingerprint.hs │ │ ├── BinIface.hs │ │ ├── BuildTyCl.hs │ │ ├── FlagChecker.hs │ │ ├── IfaceEnv.hs │ │ ├── IfaceEnv.hs-boot │ │ ├── IfaceSyn.hs │ │ ├── IfaceType.hs │ │ ├── LoadIface.hs │ │ ├── LoadIface.hs-boot │ │ ├── MkIface.hs │ │ ├── MkJavaIface.hs │ │ ├── MkJavaIface.hs-boot │ │ ├── TcIface.hs │ │ └── TcIface.hs-boot │ ├── Main │ │ ├── Annotations.hs │ │ ├── CmdLineParser.hs │ │ ├── Constants.hs │ │ ├── DriverMkDepend.hs │ │ ├── DriverPhases.hs │ │ ├── DriverPipeline.hs │ │ ├── DynFlags.hs │ │ ├── DynFlags.hs-boot │ │ ├── ErrUtils.hs │ │ ├── ErrUtils.hs-boot │ │ ├── FileCleanup.hs │ │ ├── Finder.hs │ │ ├── GHC.hs │ │ ├── GhcMake.hs │ │ ├── GhcMonad.hs │ │ ├── GhcPlugins.hs │ │ ├── HeaderInfo.hs │ │ ├── Hooks.hs │ │ ├── Hooks.hs-boot │ │ ├── HscMain.hs │ │ ├── HscStats.hs │ │ ├── HscTypes.hs │ │ ├── InteractiveEval.hs │ │ ├── InteractiveEvalTypes.hs │ │ ├── PackageConfig.hs │ │ ├── PackageConfig.hs-boot │ │ ├── Packages.hs │ │ ├── Packages.hs-boot │ │ ├── PipelineMonad.hs │ │ ├── Plugins.hs │ │ ├── PprTyThing.hs │ │ ├── StaticFlags.hs │ │ ├── StaticFlags.hs-boot │ │ ├── SysTools.hs │ │ └── TidyPgm.hs │ ├── Parser │ │ ├── ApiAnnotation.hs │ │ ├── Ctype.hs │ │ ├── HaddockUtils.hs │ │ ├── Lexer.x │ │ ├── Parse.hs │ │ ├── Parser.y │ │ ├── RdrHsSyn.hs │ │ ├── cutils.c │ │ └── cutils.h │ ├── Prelude │ │ ├── ForeignCall.hs │ │ ├── KnownUniques.hs │ │ ├── KnownUniques.hs-boot │ │ ├── PrelInfo.hs │ │ ├── PrelNames.hs │ │ ├── PrelNames.hs-boot │ │ ├── PrelRules.hs │ │ ├── PrimOp.hs │ │ ├── PrimOp.hs-boot │ │ ├── THNames.hs │ │ ├── TysPrim.hs │ │ ├── TysWiredIn.hs │ │ ├── TysWiredIn.hs-boot │ │ └── primops.txt.pp │ ├── Profiling │ │ ├── CostCentre.hs │ │ ├── NOTES │ │ ├── ProfInit.hs │ │ └── SCCfinal.hs │ ├── REPL.hs │ ├── REPL │ │ ├── Leak.hs │ │ └── Linker.hs │ ├── Rename │ │ ├── RnBinds.hs │ │ ├── RnEnv.hs │ │ ├── RnExpr.hs │ │ ├── RnExpr.hs-boot │ │ ├── RnFixity.hs │ │ ├── RnHsDoc.hs │ │ ├── RnNames.hs │ │ ├── RnPat.hs │ │ ├── RnSource.hs │ │ ├── RnSplice.hs │ │ ├── RnSplice.hs-boot │ │ ├── RnTypes.hs │ │ ├── RnUnbound.hs │ │ └── RnUtils.hs │ ├── SimplCore │ │ ├── CSE.hs │ │ ├── CallArity.hs │ │ ├── CoreMonad.hs │ │ ├── FloatIn.hs │ │ ├── FloatOut.hs │ │ ├── LiberateCase.hs │ │ ├── OccurAnal.hs │ │ ├── SAT.hs │ │ ├── SetLevels.hs │ │ ├── SimplCore.hs │ │ ├── SimplEnv.hs │ │ ├── SimplMonad.hs │ │ ├── SimplUtils.hs │ │ ├── Simplify.hs │ │ └── simplifier.tib │ ├── SimplStg │ │ ├── SimplStg.hs │ │ ├── StgStats.hs │ │ └── UnariseStg.hs │ ├── Specialise │ │ ├── Rules.hs │ │ ├── SpecConstr.hs │ │ └── Specialise.hs │ ├── StgSyn │ │ ├── CoreToStg.hs │ │ ├── StgLint.hs │ │ └── StgSyn.hs │ ├── StrAnal │ │ ├── DmdAnal.hs │ │ ├── WorkWrap.hs │ │ └── WwLib.hs │ ├── SysTools │ │ └── Terminal.hs │ ├── TypeCheck │ │ ├── FamInst.hs │ │ ├── FunDeps.hs │ │ ├── Inst.hs │ │ ├── TcAnnotations.hs │ │ ├── TcArrows.hs │ │ ├── TcBackpack.hs │ │ ├── TcBinds.hs │ │ ├── TcCanonical.hs │ │ ├── TcClassDcl.hs │ │ ├── TcDefaults.hs │ │ ├── TcDeriv.hs │ │ ├── TcEnv.hs │ │ ├── TcEnv.hs-boot │ │ ├── TcErrors.hs │ │ ├── TcEvidence.hs │ │ ├── TcExpr.hs │ │ ├── TcExpr.hs-boot │ │ ├── TcFlatten.hs │ │ ├── TcForeign.hs │ │ ├── TcGenDeriv.hs │ │ ├── TcGenGenerics.hs │ │ ├── TcHsSyn.hs │ │ ├── TcHsType.hs │ │ ├── TcInstDcls.hs │ │ ├── TcInteract.hs │ │ ├── TcMType.hs │ │ ├── TcMatches.hs │ │ ├── TcMatches.hs-boot │ │ ├── TcPat.hs │ │ ├── TcPatSyn.hs │ │ ├── TcPatSyn.hs-boot │ │ ├── TcPluginM.hs │ │ ├── TcRnDriver.hs │ │ ├── TcRnDriver.hs-boot │ │ ├── TcRnMonad.hs │ │ ├── TcRnTypes.hs │ │ ├── TcRules.hs │ │ ├── TcSMonad.hs │ │ ├── TcSimplify.hs │ │ ├── TcSplice.hs │ │ ├── TcSplice.hs-boot │ │ ├── TcTyClsDecls.hs │ │ ├── TcTyDecls.hs │ │ ├── TcType.hs │ │ ├── TcType.hs-boot │ │ ├── TcTypeNats.hs │ │ ├── TcTypeNats.hs-boot │ │ ├── TcUnify.hs │ │ ├── TcUnify.hs-boot │ │ └── TcValidity.hs │ ├── Types │ │ ├── Class.hs │ │ ├── CoAxiom.hs │ │ ├── Coercion.hs │ │ ├── FamInstEnv.hs │ │ ├── InstEnv.hs │ │ ├── Kind.hs │ │ ├── OptCoercion.hs │ │ ├── TyCon.hs │ │ ├── TyCon.hs-boot │ │ ├── Type.hs │ │ ├── Type.hs-boot │ │ ├── TypeRep.hs │ │ ├── TypeRep.hs-boot │ │ └── Unify.hs │ └── Utils │ │ ├── Bag.hs │ │ ├── Binary.hs │ │ ├── BooleanFormula.hs │ │ ├── BufWrite.hs │ │ ├── Digraph.hs │ │ ├── Encoding.hs │ │ ├── EnumSet.hs │ │ ├── Exception.hs │ │ ├── ExtsCompat46.hs │ │ ├── FV.hs │ │ ├── FastBool.hs │ │ ├── FastFunctions.hs │ │ ├── FastMutInt.hs │ │ ├── FastString.hs │ │ ├── FastTypes.hs │ │ ├── Fingerprint.hs │ │ ├── FiniteMap.hs │ │ ├── GraphBase.hs │ │ ├── GraphColor.hs │ │ ├── GraphOps.hs │ │ ├── GraphPpr.hs │ │ ├── IOEnv.hs │ │ ├── JAR.hs │ │ ├── Json.hs │ │ ├── ListSetOps.hs │ │ ├── Maybes.hs │ │ ├── Metrics.hs │ │ ├── MonadUtils.hs │ │ ├── OrdList.hs │ │ ├── Outputable.hs │ │ ├── Outputable.hs-boot │ │ ├── Pair.hs │ │ ├── Panic.hs │ │ ├── Platform.hs │ │ ├── PprColor.hs │ │ ├── Pretty.hs │ │ ├── State.hs │ │ ├── Stream.hs │ │ ├── StringBuffer.hs │ │ ├── UnVarGraph.hs │ │ ├── UniqDFM.hs │ │ ├── UniqDSet.hs │ │ ├── UniqFM.hs │ │ ├── UniqSet.hs │ │ ├── Util.hs │ │ └── md5.h └── cbits │ ├── cutils.c │ └── genSym.c ├── default.nix ├── docker ├── Dockerfile ├── README.md └── circleci-build-container.sh ├── docs ├── 0-user-guides │ ├── 0-eta-user-guide │ │ ├── 0-introduction │ │ │ ├── 0-what-is-eta.md │ │ │ └── intro.md │ │ ├── 1-installation │ │ │ ├── 0-methods.md │ │ │ ├── 1-gradle.md │ │ │ ├── 2-etlas.md │ │ │ ├── 3-source.md │ │ │ ├── 4-docker.md │ │ │ ├── 5-nix.md │ │ │ ├── 6-sbt.md │ │ │ └── intro.md │ │ ├── 2-basics │ │ │ ├── 0-quick-start.md │ │ │ ├── 1-basic-syntax.md │ │ │ ├── 2-coding-conventions.md │ │ │ └── intro.md │ │ ├── 3-java-interop │ │ │ ├── 0-java-interop-basics.md │ │ │ ├── 1-jwts.md │ │ │ ├── 2-java-ffi.md │ │ │ ├── 3-arrays.md │ │ │ ├── 4-subclasses.md │ │ │ ├── 5-java-advanced-ffi.md │ │ │ ├── 6-java-dependencies.md │ │ │ └── intro.md │ │ ├── 4-functions │ │ │ ├── 0-overview.md │ │ │ ├── 1-currying.md │ │ │ ├── 2-composition.md │ │ │ ├── 3-application.md │ │ │ ├── 4-higher-order-functions.md │ │ │ └── intro.md │ │ ├── 5-metaprogramming │ │ │ ├── 0-overview.md │ │ │ ├── 1-haskell-compatibility.md │ │ │ └── intro.md │ │ └── intro.md │ ├── 1-etlas-user-guide │ │ ├── 0-introduction │ │ │ ├── 0-what-is-etlas.md │ │ │ ├── 1-philosophy-of-etlas.md │ │ │ └── intro.md │ │ ├── 1-installation │ │ │ ├── 0-installation.md │ │ │ ├── 1-binary.md │ │ │ ├── 2-source.md │ │ │ └── intro.md │ │ ├── 2-basics │ │ │ ├── 0-initializing.md │ │ │ ├── 1-the-build-process.md │ │ │ ├── 2-build-components.md │ │ │ └── intro.md │ │ ├── 3-configuration │ │ │ ├── 0-workflow-tutorial.md │ │ │ ├── 1-dependency-management.md │ │ │ ├── 2-project-configuration.md │ │ │ └── intro.md │ │ ├── 4-advanced-features │ │ │ ├── 0-cabal-file.md │ │ │ ├── 1-conditional-configuration.md │ │ │ ├── 2-cabal-project-file.md │ │ │ └── intro.md │ │ ├── 5-command-reference │ │ │ ├── 0-global-flags.md │ │ │ ├── 1-build.md │ │ │ ├── 2-freeze.md │ │ │ ├── 3-update.md │ │ │ ├── 4-select.md │ │ │ ├── 5-info.md │ │ │ ├── 6-list.md │ │ │ ├── 7-get.md │ │ │ ├── 8-clean.md │ │ │ └── intro.md │ │ └── intro.md │ ├── 2-gradle-user-guide │ │ ├── 0-introduction │ │ │ ├── 0-what-is-gradle.md │ │ │ ├── 1-philosophy.md │ │ │ └── intro.md │ │ ├── 1-basic-configuration │ │ │ ├── 0-quick-start.md │ │ │ ├── 1-gradle-concepts.md │ │ │ ├── 2-plugin-basics.md │ │ │ └── intro.md │ │ ├── 2-advanced-configuration │ │ │ ├── 0-plugin-management.md │ │ │ ├── 1-global-configuration.md │ │ │ ├── 2-dependency-management.md │ │ │ ├── 3-compiler-configuration.md │ │ │ └── intro.md │ │ └── intro.md │ ├── 3-eta-repl-user-guide │ │ ├── 0-introduction │ │ │ ├── 0-what-is-eta-repl.md │ │ │ ├── 1-philosophy.md │ │ │ └── intro.md │ │ ├── 1-basics │ │ │ ├── 0-quick-start.md │ │ │ ├── 1-repl-flavors.md │ │ │ └── intro.md │ │ ├── 2-eta-repl-reference │ │ │ ├── 0-reference.md │ │ │ └── intro.md │ │ └── intro.md │ ├── 4-sbt-user-guide │ │ ├── 0-introduction │ │ │ ├── 0-what-is-sbt.md │ │ │ ├── 1-philosophy.md │ │ │ └── intro.md │ │ ├── 1-basic-configuration │ │ │ ├── 0-quick-start.md │ │ │ ├── 1-sbt-concepts.md │ │ │ ├── 2-plugin-basics.md │ │ │ └── intro.md │ │ ├── 2-advanced-configuration │ │ │ ├── 0-plugin-management.md │ │ │ ├── 1-global-configuration.md │ │ │ ├── 2-dependency-management.md │ │ │ ├── 3-compiler-configuration.md │ │ │ └── intro.md │ │ └── intro.md │ └── intro.md └── 1-tutorials │ ├── 0-from-loops-to-recursion │ ├── 0-loops.md │ ├── 1-recursion.md │ └── intro.md │ ├── 1-web-services │ ├── 0-overview.md │ ├── 1-the-api.md │ └── intro.md │ └── intro.md ├── eta-serv ├── LICENSE ├── build.gradle ├── cabal.project ├── eta-serv.cabal ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── proguard.txt └── src │ └── main │ ├── eta │ ├── Eta │ │ └── Serv │ │ │ ├── ClassLoader.hs │ │ │ ├── ClassQuery.hs │ │ │ ├── Common.hs │ │ │ └── Run.hs │ ├── Lib.hs │ └── Main.hs │ └── java │ └── eta │ └── serv │ ├── REPLClassLoader.java │ └── Utils.java ├── eta.cabal ├── eta ├── ETA.h ├── Eta │ └── REPL │ │ ├── UI.hs │ │ └── UI │ │ ├── Info.hs │ │ ├── Monad.hs │ │ └── Tags.hs └── Main.hs ├── eta_logo.png ├── examples ├── HelloWorld.hs ├── JavaGenerics.hs └── Lens.hs ├── include ├── Bytecodes.h └── HsVersions.h ├── install.cmd ├── install.sh ├── libraries ├── base │ ├── Control │ │ ├── Applicative.hs │ │ ├── Arrow.hs │ │ ├── Category.hs │ │ ├── Concurrent.hs │ │ ├── Concurrent │ │ │ ├── Chan.hs │ │ │ ├── MVar.hs │ │ │ ├── QSem.hs │ │ │ └── QSemN.hs │ │ ├── Exception.hs │ │ ├── Exception │ │ │ └── Base.hs │ │ ├── Monad.hs │ │ └── Monad │ │ │ ├── Fail.hs │ │ │ ├── Fix.hs │ │ │ ├── IO │ │ │ └── Class.hs │ │ │ ├── Instances.hs │ │ │ ├── ST.hs │ │ │ ├── ST │ │ │ ├── Imp.hs │ │ │ ├── Lazy.hs │ │ │ ├── Lazy │ │ │ │ ├── Imp.hs │ │ │ │ ├── Safe.hs │ │ │ │ └── Unsafe.hs │ │ │ ├── Safe.hs │ │ │ ├── Strict.hs │ │ │ └── Unsafe.hs │ │ │ └── Zip.hs │ ├── Data │ │ ├── Bifoldable.hs │ │ ├── Bifunctor.hs │ │ ├── Bitraversable.hs │ │ ├── Bits.hs │ │ ├── Bool.hs │ │ ├── Char.hs │ │ ├── Coerce.hs │ │ ├── Complex.hs │ │ ├── Data.hs │ │ ├── Dynamic.hs │ │ ├── Either.hs │ │ ├── Eq.hs │ │ ├── Fixed.hs │ │ ├── Foldable.hs │ │ ├── Function.hs │ │ ├── Functor.hs │ │ ├── Functor │ │ │ ├── Classes.hs │ │ │ ├── Compose.hs │ │ │ ├── Const.hs │ │ │ ├── Identity.hs │ │ │ ├── Product.hs │ │ │ ├── Sum.hs │ │ │ └── Utils.hs │ │ ├── IORef.hs │ │ ├── Int.hs │ │ ├── Ix.hs │ │ ├── List.hs │ │ ├── List │ │ │ └── NonEmpty.hs │ │ ├── Maybe.hs │ │ ├── Monoid.hs │ │ ├── OldList.hs │ │ ├── Ord.hs │ │ ├── Proxy.hs │ │ ├── Ratio.hs │ │ ├── STRef.hs │ │ ├── STRef │ │ │ ├── Lazy.hs │ │ │ └── Strict.hs │ │ ├── Semigroup.hs │ │ ├── Semigroup │ │ │ ├── Internal.hs │ │ │ └── Internal.hs-boot │ │ ├── String.hs │ │ ├── Traversable.hs │ │ ├── Tuple.hs │ │ ├── Type │ │ │ ├── Bool.hs │ │ │ ├── Coercion.hs │ │ │ └── Equality.hs │ │ ├── Typeable.hs │ │ ├── Typeable │ │ │ └── Internal.hs │ │ ├── Unique.hs │ │ ├── Version.hs │ │ ├── Void.hs │ │ └── Word.hs │ ├── Debug │ │ └── Trace.hs │ ├── Eta │ │ ├── Interop.hs │ │ ├── Overloadable.hs │ │ └── RTS.hs │ ├── Foreign.hs │ ├── Foreign │ │ ├── C.hs │ │ ├── C │ │ │ ├── Error.hs │ │ │ ├── String.hs │ │ │ └── Types.hs │ │ ├── Concurrent.hs │ │ ├── ForeignPtr.hs │ │ ├── ForeignPtr │ │ │ ├── Imp.hs │ │ │ ├── Safe.hs │ │ │ └── Unsafe.hs │ │ ├── Marshal.hs │ │ ├── Marshal │ │ │ ├── Alloc.hs │ │ │ ├── Array.hs │ │ │ ├── Error.hs │ │ │ ├── Pool.hs │ │ │ ├── Safe.hs │ │ │ ├── Unsafe.hs │ │ │ └── Utils.hs │ │ ├── Ptr.hs │ │ ├── Safe.hs │ │ ├── StablePtr.hs │ │ └── Storable.hs │ ├── GHC │ │ ├── Arr.hs │ │ ├── Base.hs │ │ ├── Base.hs-boot │ │ ├── Char.hs │ │ ├── Conc.hs │ │ ├── Conc │ │ │ ├── IO.hs │ │ │ ├── Signal.hs │ │ │ └── Sync.hs │ │ ├── ConsoleHandler.hs │ │ ├── Constants.hs │ │ ├── Desugar.hs │ │ ├── Enum.hs │ │ ├── Environment.hs │ │ ├── Err.hs │ │ ├── Exception.hs │ │ ├── Exception.hs-boot │ │ ├── Exts.hs │ │ ├── Fingerprint.hs │ │ ├── Fingerprint.hs-boot │ │ ├── Fingerprint │ │ │ └── Type.hs │ │ ├── Float.hs │ │ ├── Float │ │ │ ├── ConversionUtils.hs │ │ │ └── RealFracMethods.hs │ │ ├── Foreign.hs │ │ ├── ForeignPtr.hs │ │ ├── GHCi.hs │ │ ├── Generics.hs │ │ ├── IO.hs │ │ ├── IO.hs-boot │ │ ├── IO │ │ │ ├── Buffer.hs │ │ │ ├── BufferedIO.hs │ │ │ ├── Device.hs │ │ │ ├── Encoding.hs │ │ │ ├── Encoding.hs-boot │ │ │ ├── Encoding │ │ │ │ ├── CodePage.hs │ │ │ │ ├── Failure.hs │ │ │ │ ├── Iconv.hs │ │ │ │ ├── Latin1.hs │ │ │ │ ├── Types.hs │ │ │ │ ├── UTF16.hs │ │ │ │ ├── UTF32.hs │ │ │ │ └── UTF8.hs │ │ │ ├── Exception.hs │ │ │ ├── Exception.hs-boot │ │ │ ├── FD.hs │ │ │ ├── Handle.hs │ │ │ ├── Handle.hs-boot │ │ │ ├── Handle │ │ │ │ ├── FD.hs │ │ │ │ ├── FD.hs-boot │ │ │ │ ├── Internals.hs │ │ │ │ ├── Lock.hs │ │ │ │ ├── Text.hs │ │ │ │ └── Types.hs │ │ │ ├── IOMode.hs │ │ │ └── Unsafe.hs │ │ ├── IOArray.hs │ │ ├── IORef.hs │ │ ├── Int.hs │ │ ├── List.hs │ │ ├── MVar.hs │ │ ├── Maybe.hs │ │ ├── Natural.hs │ │ ├── Num.hs │ │ ├── OldList.hs │ │ ├── OverloadedLabels.hs │ │ ├── PArr.hs │ │ ├── Pack.hs │ │ ├── Profiling.hs │ │ ├── Ptr.hs │ │ ├── RTS │ │ │ └── Flags.hs │ │ ├── Read.hs │ │ ├── Real.hs │ │ ├── Real.hs-boot │ │ ├── ST.hs │ │ ├── STRef.hs │ │ ├── Show.hs │ │ ├── Stable.hs │ │ ├── Stack.hs │ │ ├── Stack │ │ │ ├── CCS.hs │ │ │ ├── CCS.hs-boot │ │ │ └── Types.hs │ │ ├── StaticPtr.hs │ │ ├── Stats.hs │ │ ├── Storable.hs │ │ ├── TopHandler.hs │ │ ├── TypeLits.hs │ │ ├── TypeNats.hs │ │ ├── Unicode.hs │ │ ├── Weak.hs │ │ └── Word.hs │ ├── Java.hs │ ├── Java │ │ ├── Array.hs │ │ ├── Collections.hs │ │ ├── Concurrent.hs │ │ ├── Core.hs │ │ ├── Do.hs │ │ ├── Exception.hs │ │ ├── Math.hs │ │ ├── Primitive.hs │ │ ├── PrimitiveBase.hs │ │ ├── String.hs │ │ ├── StringBase.hs │ │ ├── TopHandler.hs │ │ ├── Utils.hs │ │ └── Wrappers.hs │ ├── LICENSE │ ├── Numeric.hs │ ├── Numeric │ │ └── Natural.hs │ ├── Prelude.hs │ ├── Product.hs │ ├── Sum.hs │ ├── System │ │ ├── CPUTime.hs │ │ ├── Console │ │ │ └── GetOpt.hs │ │ ├── Environment.hs │ │ ├── Environment │ │ │ └── ExecutablePath.hs │ │ ├── Exit.hs │ │ ├── IO.hs │ │ ├── IO │ │ │ ├── Error.hs │ │ │ └── Unsafe.hs │ │ ├── Info.hs │ │ ├── Mem.hs │ │ ├── Mem │ │ │ ├── StableName.hs │ │ │ └── Weak.hs │ │ ├── Posix │ │ │ ├── Internals.hs │ │ │ └── Types.hs │ │ └── Timeout.hs │ ├── Text │ │ ├── ParserCombinators │ │ │ ├── ReadP.hs │ │ │ └── ReadPrec.hs │ │ ├── Printf.hs │ │ ├── Read.hs │ │ ├── Read │ │ │ └── Lex.hs │ │ ├── Show.hs │ │ └── Show │ │ │ └── Functions.hs │ ├── Type │ │ └── Reflection.hs │ ├── Unsafe │ │ └── Coerce.hs │ ├── base.cabal │ ├── include │ │ ├── CTypes.h │ │ └── Signals.h │ └── java-utils │ │ ├── HSIConv.java │ │ ├── StringCAF.java │ │ └── Utils.java ├── eta-boot-meta │ ├── Eta │ │ ├── LanguageExtensions │ │ │ └── Type.hs │ │ ├── Lexeme.hs │ │ └── Location.hs │ ├── LICENSE │ └── eta-boot-meta.cabal ├── eta-boot │ ├── Eta │ │ ├── LanguageExtensions.hs │ │ ├── PackageDb.hs │ │ └── Serialized.hs │ ├── LICENSE │ └── eta-boot.cabal ├── eta-meta │ ├── LICENSE │ ├── Language │ │ └── Eta │ │ │ ├── Meta.hs │ │ │ └── Meta │ │ │ ├── Binary.hs │ │ │ ├── LanguageExtensions.hs │ │ │ ├── Lib.hs │ │ │ ├── Lib │ │ │ └── Map.hs │ │ │ ├── Ppr.hs │ │ │ ├── PprLib.hs │ │ │ ├── Quote.hs │ │ │ ├── Server.hs │ │ │ └── Syntax.hs │ ├── Setup.hs │ └── eta-meta.cabal ├── eta-repl │ ├── Eta │ │ └── REPL │ │ │ ├── ClassInfo.hs │ │ │ ├── Map.hs │ │ │ ├── Message.hs │ │ │ ├── RemoteTypes.hs │ │ │ └── Utils.hs │ ├── LICENSE │ ├── eta-repl.cabal │ └── java │ │ └── Utils.java ├── ghc-prim │ ├── GHC │ │ ├── CString.hs │ │ ├── Classes.hs │ │ ├── Magic.hs │ │ ├── Tuple.hs │ │ └── Types.hs │ ├── LICENSE │ ├── ghc-prim.cabal │ └── java │ │ └── Utils.java ├── integer │ ├── GHC │ │ ├── Integer.hs │ │ └── Integer │ │ │ ├── BigInteger │ │ │ ├── Internals.hs │ │ │ └── Prim.hs │ │ │ ├── Logarithms.hs │ │ │ ├── Logarithms │ │ │ └── Internals.hs │ │ │ └── Type.hs │ ├── LICENSE │ ├── integer.cabal │ └── java │ │ └── Utils.java └── rts │ ├── LICENSE │ ├── MachDeps.h │ ├── Setup.hs │ ├── etaversion.h │ └── rts.cabal ├── proguard └── README.md ├── rts ├── build.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src │ ├── main │ └── java │ │ └── eta │ │ └── runtime │ │ ├── Runtime.java │ │ ├── RuntimeLogging.java │ │ ├── RuntimeOptions.java │ │ ├── apply │ │ ├── Function.java │ │ ├── Function1.java │ │ ├── Function1_1.java │ │ ├── Function1_2.java │ │ ├── Function1_3.java │ │ ├── Function1_4.java │ │ ├── Function2.java │ │ ├── Function2_1.java │ │ ├── Function2_2.java │ │ ├── Function2_3.java │ │ ├── Function2_4.java │ │ ├── Function3.java │ │ ├── Function3_1.java │ │ ├── Function3_2.java │ │ ├── Function3_3.java │ │ ├── Function3_4.java │ │ ├── Function4.java │ │ ├── Function4_1.java │ │ ├── Function4_2.java │ │ ├── Function4_3.java │ │ ├── Function4_4.java │ │ ├── Function5.java │ │ ├── Function5_1.java │ │ ├── Function6.java │ │ ├── Function6_1.java │ │ ├── FunctionId.java │ │ ├── PAP.java │ │ ├── PAP1_1.java │ │ └── PAPSlow.java │ │ ├── concurrent │ │ ├── Concurrent.java │ │ ├── Fiber.java │ │ ├── FutureResult.java │ │ ├── MVar.java │ │ ├── OSThread.java │ │ └── WorkerThread.java │ │ ├── exception │ │ ├── EtaAsyncException.java │ │ ├── EtaException.java │ │ ├── Exception.java │ │ ├── FiberYieldException.java │ │ ├── Raise.java │ │ ├── RetryException.java │ │ ├── RuntimeInternalError.java │ │ ├── StgException.java │ │ └── TrampolineBounceException.java │ │ ├── interpreter │ │ ├── BCO.java │ │ └── Interpreter.java │ │ ├── io │ │ ├── Array.java │ │ ├── ByteArray.java │ │ ├── IO.java │ │ ├── IOManager.java │ │ ├── MemoryManager.java │ │ ├── MutVar.java │ │ └── SizeLock.java │ │ ├── message │ │ ├── Message.java │ │ ├── MessageBlackHole.java │ │ ├── MessageShutdown.java │ │ ├── MessageThrowTo.java │ │ └── MessageWakeup.java │ │ ├── parallel │ │ ├── Parallel.java │ │ └── SparkCounters.java │ │ ├── stg │ │ ├── ArgumentStack.java │ │ ├── Capability.java │ │ ├── Closure.java │ │ ├── Closures.java │ │ ├── DataCon.java │ │ ├── FunPtr.java │ │ ├── JavaFinalizer.java │ │ ├── Print.java │ │ ├── SelectorThunkManager.java │ │ ├── StablePtrTable.java │ │ ├── Stg.java │ │ ├── StgContext.java │ │ ├── TSO.java │ │ ├── Value.java │ │ └── WeakPtr.java │ │ ├── stm │ │ ├── AtomicInvariant.java │ │ ├── InvariantCheck.java │ │ ├── STM.java │ │ ├── TVar.java │ │ ├── TransactionEntry.java │ │ └── TransactionRecord.java │ │ ├── storage │ │ ├── AllocationVector.java │ │ ├── Block.java │ │ ├── BlockStats.java │ │ ├── CachedBlock.java │ │ ├── DefaultLocalHeap.java │ │ ├── HeapStats.java │ │ ├── LocalHeap.java │ │ ├── ManagedHeap.java │ │ ├── Nursery.java │ │ ├── NurseryStats.java │ │ └── Span.java │ │ ├── thunk │ │ ├── Ap1Upd.java │ │ ├── Ap1VUpd.java │ │ ├── Ap2Upd.java │ │ ├── Ap2VUpd.java │ │ ├── Ap3Upd.java │ │ ├── Ap3VUpd.java │ │ ├── Ap4Upd.java │ │ ├── Ap4VUpd.java │ │ ├── Ap5Upd.java │ │ ├── Ap6Upd.java │ │ ├── Ap7Upd.java │ │ ├── ApD.java │ │ ├── ApF.java │ │ ├── ApI.java │ │ ├── ApL.java │ │ ├── ApO.java │ │ ├── ApV.java │ │ ├── BlackHole.java │ │ ├── BlockingQueue.java │ │ ├── CAF.java │ │ ├── SelectorThunk.java │ │ ├── SingleEntryThunk.java │ │ ├── SingleEntryThunk0.java │ │ ├── SingleEntryThunk1.java │ │ ├── SingleEntryThunk2.java │ │ ├── SingleEntryThunk3.java │ │ ├── SingleEntryThunk4.java │ │ ├── SingleEntryThunk5.java │ │ ├── SingleEntryThunk6.java │ │ ├── Thunk.java │ │ ├── UpdatableThunk.java │ │ ├── UpdatableThunk0.java │ │ ├── UpdatableThunk1.java │ │ ├── UpdatableThunk2.java │ │ ├── UpdatableThunk3.java │ │ ├── UpdatableThunk4.java │ │ ├── UpdatableThunk5.java │ │ ├── UpdatableThunk6.java │ │ ├── UpdateInfo.java │ │ ├── UpdateInfoStack.java │ │ └── WhiteHole.java │ │ └── util │ │ ├── CompactReferenceSet.java │ │ ├── Consumer.java │ │ ├── MPSCLongQueue.java │ │ ├── MPSCReferenceQueue.java │ │ ├── Report.java │ │ └── UnsafeUtil.java │ └── test │ └── java │ └── eta │ └── runtime │ ├── TestUtils.java │ ├── io │ ├── ByteArrayTest.java │ └── MemoryManagerTest.java │ ├── storage │ ├── AllocationVectorTest.java │ └── ManagedHeapTest.java │ └── util │ ├── CompactReferenceSetTest.java │ ├── MPSCLongQueueTest.java │ └── MPSCReferenceQueueTest.java ├── runtests.sh ├── shake ├── Build.hs ├── LICENSE ├── Setup.hs └── eta-build.cabal ├── stack.yaml ├── test.sh ├── tests ├── packages │ └── Test.hs ├── suite │ ├── Driver.hs │ ├── IGNORED │ ├── NOTES.md │ ├── annotations │ │ ├── compile │ │ │ ├── T14129.hs │ │ │ ├── ann01.hs │ │ │ └── jann01.hs │ │ ├── fail │ │ │ ├── T10826.hs │ │ │ ├── T10826.stderr │ │ │ ├── annfail01.hs │ │ │ ├── annfail01.stderr │ │ │ ├── annfail02.hs │ │ │ ├── annfail02.stderr │ │ │ ├── annfail03.hs │ │ │ ├── annfail03.stderr │ │ │ ├── annfail04 │ │ │ │ ├── Annfail04.hs │ │ │ │ ├── Annfail04_Help.hs │ │ │ │ ├── annfail04.cabal │ │ │ │ └── annfail04.stderr │ │ │ ├── annfail05 │ │ │ │ ├── Annfail05.hs │ │ │ │ ├── Annfail05_Help.hs │ │ │ │ ├── annfail05.cabal │ │ │ │ └── annfail05.stderr │ │ │ ├── annfail06 │ │ │ │ ├── Annfail06.hs │ │ │ │ ├── Annfail06_Help.hs │ │ │ │ ├── annfail06.cabal │ │ │ │ └── annfail06.stderr │ │ │ ├── annfail07.hs │ │ │ ├── annfail07.stderr │ │ │ ├── annfail08.hs │ │ │ ├── annfail08.stderr │ │ │ ├── annfail09.hs │ │ │ ├── annfail09.stderr │ │ │ ├── annfail10.hs │ │ │ ├── annfail10.stderr │ │ │ ├── annfail11.hs │ │ │ ├── annfail11.stderr │ │ │ ├── annfail12.hs │ │ │ ├── annfail12.stderr │ │ │ ├── annfail13.hs │ │ │ └── annfail13.stderr │ │ └── run │ │ │ └── annrun01 │ │ │ ├── AnnRun01.hs │ │ │ ├── Annrun01_Help.hs │ │ │ ├── annrun01.cabal │ │ │ └── annrun01.stdout │ ├── applicativeDo │ │ ├── compile │ │ │ ├── T13242.hs │ │ │ ├── ado004.hs │ │ │ ├── ado004.stderr │ │ │ ├── ado006.hs │ │ │ └── ado007.hs │ │ ├── fail │ │ │ ├── T13242a.hs │ │ │ ├── T13242a.stderr │ │ │ ├── ado002.hs │ │ │ ├── ado002.stderr │ │ │ ├── ado003.hs │ │ │ ├── ado003.stderr │ │ │ ├── ado005.hs │ │ │ └── ado005.stderr │ │ └── run │ │ │ ├── T13875.hs │ │ │ ├── T14163.hs │ │ │ ├── T14163.stdin │ │ │ ├── T14163.stdout │ │ │ ├── ado-optimal.hs │ │ │ ├── ado-optimal.stdout │ │ │ ├── ado001.hs │ │ │ └── ado001.stdout │ ├── array │ │ ├── run │ │ │ ├── Arr016 │ │ │ │ ├── Arr016.hs │ │ │ │ ├── Arr016.stdout │ │ │ │ └── arr016.cabal │ │ │ ├── arr001.hs │ │ │ ├── arr001.stdout │ │ │ ├── arr002.hs │ │ │ ├── arr002.stdout │ │ │ ├── arr005.hs │ │ │ ├── arr005.stdout │ │ │ ├── arr006.hs │ │ │ ├── arr006.stdout │ │ │ ├── arr009.hs │ │ │ ├── arr009.stdout │ │ │ ├── arr010.hs │ │ │ ├── arr010.stdout │ │ │ ├── arr011.hs │ │ │ ├── arr011.stdout │ │ │ ├── arr012.hs │ │ │ ├── arr012.stdout │ │ │ ├── arr013.hs │ │ │ ├── arr013.stdout │ │ │ ├── arr014.hs │ │ │ ├── arr015.hs │ │ │ └── arr015.stdout │ │ └── run_fail │ │ │ ├── arr003.hs │ │ │ └── arr003.stderr │ ├── backpack │ │ ├── compile │ │ │ ├── T14304 │ │ │ │ ├── cabal.project │ │ │ │ ├── indef │ │ │ │ │ ├── Indef.hs │ │ │ │ │ ├── Sig.hsig │ │ │ │ │ └── indef.cabal │ │ │ │ ├── p │ │ │ │ │ ├── P.hs │ │ │ │ │ └── p.cabal │ │ │ │ └── th │ │ │ │ │ ├── TH.hs │ │ │ │ │ └── th.cabal │ │ │ ├── bkp01.bkp │ │ │ ├── bkp01.stderr │ │ │ ├── bkp02.bkp │ │ │ ├── bkp02.stderr │ │ │ ├── bkp07.bkp │ │ │ ├── bkp07.stderr │ │ │ ├── bkp08.bkp │ │ │ ├── bkp08.stderr │ │ │ ├── bkp09.bkp │ │ │ ├── bkp09.stderr │ │ │ ├── bkp10.bkp │ │ │ ├── bkp10.stderr │ │ │ ├── bkp11.bkp │ │ │ ├── bkp11.stderr │ │ │ ├── bkp12.bkp │ │ │ ├── bkp12.stderr │ │ │ ├── bkp14.bkp │ │ │ ├── bkp14.stderr │ │ │ ├── bkp16.bkp │ │ │ ├── bkp16.stderr │ │ │ ├── bkp17.bkp │ │ │ ├── bkp17.stderr │ │ │ ├── bkp18.bkp │ │ │ ├── bkp18.stderr │ │ │ ├── bkp19.bkp │ │ │ ├── bkp19.stderr │ │ │ ├── bkp20.bkp │ │ │ ├── bkp20.stderr │ │ │ ├── bkp21.bkp │ │ │ ├── bkp21.stderr │ │ │ ├── bkp23.bkp │ │ │ ├── bkp23.stderr │ │ │ ├── bkp24.bkp │ │ │ ├── bkp24.stderr │ │ │ ├── bkp25.bkp │ │ │ ├── bkp25.stderr │ │ │ ├── bkp26.bkp │ │ │ ├── bkp26.stderr │ │ │ ├── bkp27.bkp │ │ │ ├── bkp27.stderr │ │ │ ├── bkp28.bkp │ │ │ ├── bkp28.stderr │ │ │ ├── bkp29.bkp │ │ │ ├── bkp29.stderr │ │ │ ├── bkp30.bkp │ │ │ ├── bkp30.stderr │ │ │ ├── bkp31.bkp │ │ │ ├── bkp31.stderr │ │ │ ├── bkp32.bkp │ │ │ ├── bkp32.stderr │ │ │ ├── bkp33.bkp │ │ │ ├── bkp33.stderr │ │ │ ├── bkp34.bkp │ │ │ ├── bkp34.stderr │ │ │ ├── bkp35.bkp │ │ │ ├── bkp35.stderr │ │ │ ├── bkp36.bkp │ │ │ └── bkp36.stderr │ │ └── run │ │ │ ├── bkprun01.bkp │ │ │ └── bkprun01.stdout │ ├── basic │ │ └── run │ │ │ ├── Echo.hs │ │ │ ├── Echo.stdin │ │ │ ├── Echo.stdout │ │ │ ├── Read01.hs │ │ │ ├── Read01.stdout │ │ │ ├── T01.hs │ │ │ ├── T01.stdout │ │ │ ├── Unicode.hs │ │ │ └── Unicode.stdout │ ├── codegen │ │ └── run │ │ │ ├── RecursionCycle.hs │ │ │ ├── RecursionCycle.stdout │ │ │ ├── RecursiveFib1.hs │ │ │ ├── RecursiveFib1.stdout │ │ │ ├── RecursiveFib2.hs │ │ │ └── RecursiveFib2.stdout │ ├── ffi │ │ └── run │ │ │ ├── FullExportTest.hs │ │ │ ├── FullExportTest.stdout │ │ │ ├── genArrayExport │ │ │ ├── Main.hs │ │ │ ├── Utils.java │ │ │ ├── export │ │ │ │ ├── Export.hs │ │ │ │ └── export.cabal │ │ │ ├── genArrayExport.cabal │ │ │ └── genArrayExport.stdout │ │ │ └── multiArray │ │ │ ├── Utils.java │ │ │ ├── multiArray.cabal │ │ │ ├── multiArray.hs │ │ │ └── multiArray.stdout │ ├── java-imports │ │ ├── fail │ │ │ ├── MissingClass.hs │ │ │ └── MissingClass.stderr │ │ └── run │ │ │ ├── InstanceMethod.hs │ │ │ ├── StaticMethod.hs │ │ │ └── StaticMethod.stdout │ ├── overloadedlabels │ │ ├── fail │ │ │ ├── overloadedlabelsfail01.hs │ │ │ └── overloadedlabelsfail01.stderr │ │ └── run │ │ │ ├── overloadedlabelsrun01.hs │ │ │ ├── overloadedlabelsrun01.stdout │ │ │ ├── overloadedlabelsrun02.hs │ │ │ ├── overloadedlabelsrun02.stdout │ │ │ ├── overloadedlabelsrun03.hs │ │ │ └── overloadedlabelsrun03.stdout │ ├── pmcheck │ │ └── compile │ │ │ ├── T3078.hs │ │ │ ├── T322.hs │ │ │ ├── T366.hs │ │ │ ├── T3927.hs │ │ │ ├── T3927a.hs │ │ │ ├── T4139.hs │ │ │ ├── T6124.hs │ │ │ ├── T7669a.hs │ │ │ ├── T8970.hs │ │ │ ├── T9951.hs │ │ │ ├── T9951b.hs │ │ │ └── T9951b.stderr │ ├── rts │ │ └── run │ │ │ ├── selectorThunks01.hs │ │ │ ├── selectorThunks01.stdin │ │ │ └── selectorThunks01.stdout │ ├── similar-names │ │ ├── compile │ │ │ ├── PassFunctionDataConstructor.hs │ │ │ ├── PassFunctionDataConstructor2.hs │ │ │ ├── PassFunctionType.hs │ │ │ ├── PassPatternFunction.hs │ │ │ ├── PassTypeDataConstructor.hs │ │ │ ├── Sim01.hs │ │ │ └── Sim02.hs │ │ └── fail │ │ │ ├── FailDataConstructor.hs │ │ │ ├── FailDataConstructor.stderr │ │ │ ├── FailDataConstructor2.hs │ │ │ ├── FailDataConstructor2.stderr │ │ │ ├── FailDataVar.hs │ │ │ ├── FailDataVar.stderr │ │ │ ├── FailFunction.hs │ │ │ ├── FailFunction.stderr │ │ │ ├── FailType.hs │ │ │ ├── FailType.stderr │ │ │ ├── simfail01.hs │ │ │ ├── simfail01.stderr │ │ │ ├── simfail02.hs │ │ │ ├── simfail02.stderr │ │ │ ├── simfail03.hs │ │ │ └── simfail03.stderr │ ├── simplCore │ │ └── compile │ │ │ └── T5550.hs │ ├── templateHaskell │ │ ├── compile │ │ │ ├── T13949 │ │ │ │ ├── ASCII.hs │ │ │ │ ├── PatternGenerator.hs │ │ │ │ ├── These.hs │ │ │ │ ├── Tree.hs │ │ │ │ └── t13949.cabal │ │ │ ├── T8025 │ │ │ │ ├── A.hs │ │ │ │ ├── B.hs │ │ │ │ └── t8025.cabal │ │ │ ├── TH_finalizer.hs │ │ │ ├── TH_finalizer.stderr │ │ │ ├── TH_mkName.hs │ │ │ ├── TH_overloadedlabels.hs │ │ │ ├── TH_reifyLocalDefs.hs │ │ │ ├── TH_repGuard.hs │ │ │ ├── TH_repGuard.stdout │ │ │ ├── TH_repPrim.hs │ │ │ ├── TH_repPrim.stdout │ │ │ ├── TH_repPrim2.hs │ │ │ ├── TH_repPrim2.stdout │ │ │ └── TH_spliceGuard.hs │ │ ├── fail │ │ │ ├── TH_1tuple.hs │ │ │ └── TH_1tuple.stderr │ │ └── run │ │ │ ├── TH_finalizer2 │ │ │ ├── TH_finalizer2.cabal │ │ │ ├── TH_finalizer2.hs │ │ │ ├── TH_finalizer2.stdout │ │ │ └── TH_finalizer2M.hs │ │ │ ├── TH_repE2.hs │ │ │ ├── TH_repE2.stdout │ │ │ ├── TH_repGuardOutput.hs │ │ │ ├── TH_repGuardOutput.stdout │ │ │ ├── TH_repPrimOutput.hs │ │ │ ├── TH_repPrimOutput.stdout │ │ │ ├── TH_repPrimOutput2.hs │ │ │ └── TH_repPrimOutput2.stdout │ ├── trace-heap │ │ └── run │ │ │ ├── TraceHeap1.hs │ │ │ └── TraceHeap1.stdout │ ├── trampoline │ │ └── run │ │ │ ├── TrampolineBreak.hs │ │ │ ├── TrampolineBreak.stdout │ │ │ ├── TrampolineConcat.hs │ │ │ ├── TrampolineConcat.stdout │ │ │ ├── tramp01.hs │ │ │ └── tramp01.stdout │ └── typecheck │ │ ├── compile │ │ ├── DfltProb1.hs │ │ ├── DfltProb2.hs │ │ ├── FD4.hs │ │ ├── GivenOverlapping.hs │ │ ├── GivenTypeSynonym.hs │ │ ├── HasKey.hs │ │ ├── HasKey.stderr │ │ ├── LoopOfTheDay1.hs │ │ ├── LoopOfTheDay2.hs │ │ ├── LoopOfTheDay3.hs │ │ ├── PolyRec.hs │ │ ├── PolytypeDecomp.hs │ │ ├── T1123.hs │ │ ├── T1470.hs │ │ ├── T1495.hs │ │ ├── T1634.hs │ │ ├── T2045.hs │ │ ├── T2357.hs │ │ ├── T2412 │ │ │ ├── T2412.hs │ │ │ ├── T2412.hs-boot │ │ │ ├── T2412A.hs │ │ │ └── t2412.cabal │ │ ├── T2433 │ │ │ ├── T2433.hs │ │ │ ├── T2433_Help.hs │ │ │ └── t2433.cabal │ │ ├── T2478.hs │ │ ├── T2478.stderr │ │ ├── T2494-2.hs │ │ ├── T2497.hs │ │ ├── T2497.stderr │ │ ├── T2572.hs │ │ ├── T2683.hs │ │ ├── T2735.hs │ │ ├── T2799.hs │ │ ├── T2846.hs │ │ ├── T3018.hs │ │ ├── T3108.hs │ │ ├── T3219.hs │ │ ├── T3342.hs │ │ ├── T3346.hs │ │ ├── T3409.hs │ │ ├── T3692.hs │ │ ├── T3696.hs │ │ ├── T3696.stderr │ │ ├── T3743.hs │ │ ├── T3955.hs │ │ ├── T4284.hs │ │ ├── T4310.hs │ │ ├── T4355 │ │ │ ├── T4355.cabal │ │ │ ├── T4355.hs │ │ │ └── T4355.stderr │ │ ├── T4361.hs │ │ ├── T4401.hs │ │ ├── T4404.hs │ │ ├── T4418.hs │ │ ├── T4444.hs │ │ ├── T4498.hs │ │ ├── T4524.hs │ │ ├── T4912 │ │ │ ├── T4912.hs │ │ │ ├── T4912.stderr │ │ │ ├── T4912a.hs │ │ │ └── t4912.cabal │ │ ├── T4917.hs │ │ ├── T4952.hs │ │ ├── T5032.hs │ │ ├── T5120.hs │ │ ├── T5481.hs │ │ ├── T5481.stderr │ │ ├── T5490.hs │ │ ├── T5490.stderr │ │ ├── T5514.hs │ │ ├── T5581.hs │ │ ├── T5595.hs │ │ ├── T5643.hs │ │ ├── T5655.hs │ │ ├── T5676.hs │ │ ├── T5792.hs │ │ ├── T6011.hs │ │ ├── T6018 │ │ │ ├── T6018.cabal │ │ │ ├── T6018.hs │ │ │ ├── T6018.hs-boot │ │ │ ├── T6018.stderr │ │ │ └── T6018a.hs │ │ ├── T6055.hs │ │ ├── T6134.hs │ │ ├── T700.hs │ │ ├── T7050.hs │ │ ├── T7050.stderr │ │ ├── T7147.hs │ │ ├── T7171 │ │ │ ├── T7171.cabal │ │ │ ├── T7171.hs │ │ │ └── T7171a.hs │ │ ├── T7173.hs │ │ ├── T7196.hs │ │ ├── T7268.hs │ │ ├── T7312.hs │ │ ├── T7384.hs │ │ ├── T7451.hs │ │ ├── T7541.hs │ │ ├── T7562.hs │ │ ├── T7562.stderr │ │ ├── T7641.hs │ │ ├── T7888.hs │ │ ├── T7891.hs │ │ ├── T7903.hs │ │ ├── T7903.stderr │ │ ├── TcLambdaCase.hs │ │ ├── TcTypeNatSimple.hs │ │ ├── TcTypeSymbolSimple.hs │ │ ├── faxen.hs │ │ ├── mc18.hs │ │ ├── tc001.hs │ │ ├── tc002.hs │ │ ├── tc003.hs │ │ ├── tc004.hs │ │ ├── tc005.hs │ │ ├── tc006.hs │ │ ├── tc007.hs │ │ ├── tc008.hs │ │ ├── tc009.hs │ │ ├── tc010.hs │ │ ├── tc011.hs │ │ ├── tc012.hs │ │ ├── tc013.hs │ │ ├── tc014.hs │ │ ├── tc015.hs │ │ ├── tc016.hs │ │ ├── tc017.hs │ │ ├── tc018.hs │ │ ├── tc019.hs │ │ ├── tc020.hs │ │ ├── tc021.hs │ │ ├── tc022.hs │ │ ├── tc023.hs │ │ ├── tc024.hs │ │ ├── tc025.hs │ │ ├── tc026.hs │ │ ├── tc027.hs │ │ ├── tc028.hs │ │ ├── tc029.hs │ │ ├── tc030.hs │ │ ├── tc031.hs │ │ ├── tc032.hs │ │ ├── tc033.hs │ │ ├── tc034.hs │ │ ├── tc035.hs │ │ ├── tc036.hs │ │ ├── tc037.hs │ │ ├── tc038.hs │ │ ├── tc039.hs │ │ ├── tc040.hs │ │ ├── tc041.hs │ │ ├── tc042.hs │ │ ├── tc043.hs │ │ ├── tc044.hs │ │ ├── tc045.hs │ │ ├── tc046.hs │ │ ├── tc047.hs │ │ ├── tc048.hs │ │ ├── tc049.hs │ │ ├── tc050.hs │ │ ├── tc051.hs │ │ ├── tc052.hs │ │ ├── tc053.hs │ │ ├── tc054.hs │ │ ├── tc055.hs │ │ ├── tc056.hs │ │ ├── tc056.stderr │ │ ├── tc057.hs │ │ ├── tc058.hs │ │ ├── tc059.hs │ │ ├── tc060.hs │ │ ├── tc061.hs │ │ ├── tc062.hs │ │ ├── tc063.hs │ │ ├── tc064.hs │ │ ├── tc065.hs │ │ ├── tc066.hs │ │ ├── tc067.hs │ │ ├── tc068.hs │ │ ├── tc069.hs │ │ ├── tc070.hs │ │ ├── tc073.hs │ │ ├── tc074.hs │ │ ├── tc076.hs │ │ ├── tc077.hs │ │ ├── tc078.hs │ │ ├── tc078.stderr │ │ ├── tc079.hs │ │ ├── tc080.hs │ │ ├── tc081.hs │ │ ├── tc082.hs │ │ ├── tc084.hs │ │ ├── tc085.hs │ │ ├── tc086.hs │ │ ├── tc087.hs │ │ ├── tc088.hs │ │ ├── tc089.hs │ │ ├── tc090.hs │ │ ├── tc091.hs │ │ ├── tc092.hs │ │ ├── tc093.hs │ │ ├── tc094.hs │ │ ├── tc095.hs │ │ ├── tc096.hs │ │ ├── tc097.hs │ │ ├── tc098.hs │ │ ├── tc099.hs │ │ ├── tc100.hs │ │ ├── tc101.hs │ │ ├── tc102.hs │ │ ├── tc104.hs │ │ ├── tc105.hs │ │ ├── tc106.hs │ │ ├── tc107.hs │ │ ├── tc108.hs │ │ ├── tc109.hs │ │ ├── tc111.hs │ │ ├── tc112.hs │ │ ├── tc113.hs │ │ ├── tc114.hs │ │ ├── tc115.hs │ │ ├── tc115.stderr │ │ ├── tc116.hs │ │ ├── tc116.stderr │ │ ├── tc117.hs │ │ ├── tc118.hs │ │ ├── tc119.hs │ │ ├── tc120.hs │ │ ├── tc121.hs │ │ ├── tc122.hs │ │ ├── tc123.hs │ │ ├── tc124.hs │ │ ├── tc125.hs │ │ ├── tc125.stderr │ │ ├── tc126.hs │ │ ├── tc126.stderr │ │ ├── tc127.hs │ │ ├── tc128.hs │ │ ├── tc129.hs │ │ ├── tc130.hs │ │ ├── tc131.hs │ │ ├── tc132.hs │ │ ├── tc133.hs │ │ ├── tc135.hs │ │ ├── tc136.hs │ │ ├── tc137.hs │ │ ├── tc140.hs │ │ ├── tc141.hs │ │ ├── tc141.stderr │ │ ├── tc142.hs │ │ ├── tc143.hs │ │ ├── tc144.hs │ │ ├── tc145.hs │ │ ├── tc146.hs │ │ ├── tc147.hs │ │ ├── tc148.hs │ │ ├── tc149.hs │ │ ├── tc150.hs │ │ ├── tc151.hs │ │ ├── tc152.hs │ │ ├── tc153.hs │ │ ├── tc154.hs │ │ ├── tc155.hs │ │ ├── tc156.hs │ │ ├── tc157.hs │ │ ├── tc158.hs │ │ ├── tc159.hs │ │ ├── tc159.stdout │ │ ├── tc160.hs │ │ ├── tc161.hs │ │ ├── tc161.stderr │ │ ├── tc162.hs │ │ ├── tc163.hs │ │ ├── tc164.hs │ │ ├── tc165.hs │ │ ├── tc166.hs │ │ ├── tc168.hs │ │ ├── tc168.stderr │ │ ├── tc169.hs │ │ ├── tc170 │ │ │ ├── Tc170.hs │ │ │ ├── Tc170_Aux.hs │ │ │ └── tc170.cabal │ │ ├── tc171.hs │ │ ├── tc172.hs │ │ ├── tc173 │ │ │ ├── Tc173a.hs │ │ │ ├── Tc173b.hs │ │ │ └── tc173.cabal │ │ ├── tc174.hs │ │ ├── tc175.hs │ │ ├── tc175.stderr │ │ ├── tc176.hs │ │ ├── tc177.hs │ │ ├── tc178.hs │ │ ├── tc179.hs │ │ ├── tc180.hs │ │ ├── tc181.hs │ │ ├── tc182.hs │ │ ├── tc182.stderr │ │ ├── tc183 │ │ │ ├── Tc183.hs │ │ │ └── tc183.cabal │ │ ├── tc184.hs │ │ ├── tc185.hs │ │ ├── tc186.hs │ │ ├── tc187.hs │ │ ├── tc188.hs │ │ ├── tc189.hs │ │ ├── tc190.hs │ │ ├── tc191 │ │ │ ├── Tc191.hs │ │ │ └── tc191.cabal │ │ ├── tc192.hs │ │ ├── tc193.hs │ │ ├── tc194.hs │ │ ├── tc195.hs │ │ ├── tc196.hs │ │ ├── tc197.hs │ │ ├── tc198.hs │ │ ├── tc199.hs │ │ ├── tc200.hs │ │ ├── tc201.hs │ │ ├── tc202.hs │ │ ├── tc203.hs │ │ ├── tc204.hs │ │ ├── tc205.hs │ │ ├── tc206.hs │ │ ├── tc207.hs │ │ ├── tc208.hs │ │ ├── tc209.hs │ │ ├── tc210.hs │ │ ├── tc211.hs │ │ ├── tc211.stderr │ │ ├── tc212.hs │ │ ├── tc213.hs │ │ ├── tc214.hs │ │ ├── tc215.hs │ │ ├── tc216.hs │ │ ├── tc217 │ │ │ ├── Tc217.hs │ │ │ └── tc217.cabal │ │ ├── tc218.hs │ │ ├── tc219.hs │ │ ├── tc220 │ │ │ ├── Tc220.hs │ │ │ └── tc220.cabal │ │ ├── tc221.hs │ │ ├── tc222.hs │ │ ├── tc223 │ │ │ ├── Tc223.hs │ │ │ └── tc223.cabal │ │ ├── tc224.hs │ │ ├── tc225.hs │ │ ├── tc226.hs │ │ ├── tc227.hs │ │ ├── tc228.hs │ │ ├── tc229.hs │ │ ├── tc230.hs │ │ ├── tc232 │ │ │ ├── Tc232.hs │ │ │ └── tc232.cabal │ │ ├── tc233.hs │ │ ├── tc234.hs │ │ ├── tc235.hs │ │ ├── tc236.hs │ │ ├── tc237.hs │ │ ├── tc238.hs │ │ ├── tc239 │ │ │ ├── Tc239.hs │ │ │ ├── Tc239_Help.hs │ │ │ └── tc239.cabal │ │ ├── tc240.hs │ │ ├── tc241.hs │ │ ├── tc242.hs │ │ ├── tc243.hs │ │ ├── tc243.stderr │ │ ├── tc244.hs │ │ ├── tc245 │ │ │ ├── Tc245.hs │ │ │ ├── Tc245A.hs │ │ │ ├── tc245.cabal │ │ │ └── tc245.stdout │ │ ├── tc246.hs │ │ ├── tc247.hs │ │ ├── tc248.hs │ │ ├── tc249.hs │ │ ├── tc250.hs │ │ ├── tc252.hs │ │ ├── tc253.hs │ │ ├── tc254.hs │ │ ├── tc254.stderr │ │ ├── tc255.hs │ │ ├── tc257.hs │ │ ├── tc258.hs │ │ ├── tc259.hs │ │ ├── tc260.hs │ │ ├── tc261.hs │ │ ├── tc262.hs │ │ ├── tc263 │ │ │ ├── Tc263.hs │ │ │ ├── Tc263_Help.hs │ │ │ └── tc263.cabal │ │ ├── tc264.stderr │ │ ├── tc265.hs │ │ ├── tc265.stderr │ │ ├── tc266 │ │ │ ├── Tc266.hs │ │ │ ├── Tc266.hs-boot │ │ │ ├── Tc266a.hs │ │ │ └── tc266.cabal │ │ ├── tc267 │ │ │ ├── Tc267a.hs │ │ │ ├── Tc267a.hs-boot │ │ │ ├── Tc267b.hs │ │ │ ├── Tc267b.hs-boot │ │ │ └── tc267.cabal │ │ ├── tc268.hs │ │ ├── tc270.hs │ │ ├── tc271 │ │ │ ├── Tc271.hs │ │ │ ├── Tc271.hs-boot │ │ │ ├── Tc271a.hs │ │ │ └── tc271.cabal │ │ ├── tcfail093.hs │ │ ├── tcfail105.hs │ │ ├── tcfail123 │ │ │ ├── Tcfail126.hs │ │ │ └── tcfail126.cabal │ │ ├── tcfail124.hs │ │ ├── tcfail138.hs │ │ ├── tcfail144.hs │ │ ├── tcfail145.hs │ │ ├── tcfail172.hs │ │ ├── tcfail188.hs │ │ └── twins.hs │ │ ├── fail │ │ ├── FD1.hs │ │ ├── FD1.stderr │ │ ├── FD2.hs │ │ ├── FD2.stderr │ │ ├── FD3.hs │ │ ├── FD3.stderr │ │ ├── T2494.hs │ │ ├── T2494.stderr │ │ ├── tcfail001.hs │ │ ├── tcfail001.stderr │ │ ├── tcfail002.hs │ │ ├── tcfail002.stderr │ │ ├── tcfail003.hs │ │ ├── tcfail003.stderr │ │ ├── tcfail004.hs │ │ ├── tcfail004.stderr │ │ ├── tcfail005.hs │ │ ├── tcfail005.stderr │ │ ├── tcfail006.hs │ │ ├── tcfail006.stderr │ │ ├── tcfail007.hs │ │ ├── tcfail007.stderr │ │ ├── tcfail008.hs │ │ ├── tcfail008.stderr │ │ ├── tcfail009.hs │ │ ├── tcfail009.stderr │ │ ├── tcfail010.hs │ │ ├── tcfail010.stderr │ │ ├── tcfail011.hs │ │ ├── tcfail011.stderr │ │ ├── tcfail012.hs │ │ ├── tcfail012.stderr │ │ ├── tcfail013.hs │ │ ├── tcfail013.stderr │ │ ├── tcfail014.hs │ │ ├── tcfail014.stderr │ │ ├── tcfail015.hs │ │ ├── tcfail015.stderr │ │ ├── tcfail016.hs │ │ ├── tcfail016.stderr │ │ ├── tcfail017.hs │ │ ├── tcfail017.stderr │ │ ├── tcfail018.hs │ │ ├── tcfail018.stderr │ │ ├── tcfail019.hs │ │ ├── tcfail019.stderr │ │ ├── tcfail020.hs │ │ ├── tcfail020.stderr │ │ ├── tcfail021.hs │ │ ├── tcfail021.stderr │ │ ├── tcfail023.hs │ │ ├── tcfail023.stderr │ │ ├── tcfail025.stderr │ │ ├── tcfail026.stderr │ │ ├── tcfail027.hs │ │ ├── tcfail027.stderr │ │ ├── tcfail028.hs │ │ ├── tcfail028.stderr │ │ ├── tcfail029.hs │ │ ├── tcfail029.stderr │ │ ├── tcfail030.hs │ │ ├── tcfail030.stderr │ │ ├── tcfail031.hs │ │ ├── tcfail031.stderr │ │ ├── tcfail032.hs │ │ ├── tcfail032.stderr │ │ ├── tcfail033.hs │ │ ├── tcfail033.stderr │ │ ├── tcfail034.hs │ │ ├── tcfail034.stderr │ │ ├── tcfail035.hs │ │ ├── tcfail035.stderr │ │ ├── tcfail036.hs │ │ ├── tcfail036.stderr │ │ ├── tcfail037.hs │ │ ├── tcfail037.stderr │ │ ├── tcfail038.hs │ │ ├── tcfail038.stderr │ │ ├── tcfail040.hs │ │ ├── tcfail040.stderr │ │ ├── tcfail041.hs │ │ ├── tcfail041.stderr │ │ ├── tcfail042.hs │ │ ├── tcfail042.stderr │ │ ├── tcfail043.hs │ │ ├── tcfail043.stderr │ │ ├── tcfail044.hs │ │ ├── tcfail044.stderr │ │ ├── tcfail046.hs │ │ ├── tcfail046.stderr │ │ ├── tcfail047.hs │ │ ├── tcfail047.stderr │ │ ├── tcfail048.hs │ │ ├── tcfail048.stderr │ │ ├── tcfail049.hs │ │ ├── tcfail049.stderr │ │ ├── tcfail050.hs │ │ ├── tcfail050.stderr │ │ ├── tcfail051.hs │ │ ├── tcfail051.stderr │ │ ├── tcfail052.hs │ │ ├── tcfail052.stderr │ │ ├── tcfail053.hs │ │ ├── tcfail053.stderr │ │ ├── tcfail054.hs │ │ ├── tcfail054.stderr │ │ ├── tcfail055.hs │ │ ├── tcfail055.stderr │ │ ├── tcfail056.hs │ │ ├── tcfail056.stderr │ │ ├── tcfail057.hs │ │ ├── tcfail057.stderr │ │ ├── tcfail058.hs │ │ ├── tcfail058.stderr │ │ ├── tcfail061.hs │ │ ├── tcfail061.stderr │ │ ├── tcfail062.hs │ │ ├── tcfail062.stderr │ │ ├── tcfail063.hs │ │ ├── tcfail063.stderr │ │ ├── tcfail065.hs │ │ ├── tcfail065.stderr │ │ ├── tcfail067.hs │ │ ├── tcfail067.stderr │ │ ├── tcfail068.hs │ │ ├── tcfail068.stderr │ │ ├── tcfail069.hs │ │ ├── tcfail069.stderr │ │ ├── tcfail070.hs │ │ ├── tcfail070.stderr │ │ ├── tcfail071.hs │ │ ├── tcfail071.stderr │ │ ├── tcfail072.hs │ │ ├── tcfail072.stderr │ │ ├── tcfail073.hs │ │ ├── tcfail073.stderr │ │ ├── tcfail075.hs │ │ ├── tcfail075.stderr │ │ ├── tcfail076.hs │ │ ├── tcfail076.stderr │ │ ├── tcfail077.hs │ │ ├── tcfail077.stderr │ │ ├── tcfail078.hs │ │ ├── tcfail078.stderr │ │ ├── tcfail079.hs │ │ ├── tcfail079.stderr │ │ ├── tcfail080.hs │ │ ├── tcfail080.stderr │ │ ├── tcfail082.hs │ │ ├── tcfail082.stderr │ │ ├── tcfail083.hs │ │ ├── tcfail083.stderr │ │ ├── tcfail084.hs │ │ ├── tcfail084.stderr │ │ ├── tcfail085.hs │ │ ├── tcfail085.stderr │ │ ├── tcfail086.hs │ │ ├── tcfail086.stderr │ │ ├── tcfail088.hs │ │ ├── tcfail088.stderr │ │ ├── tcfail089.hs │ │ ├── tcfail089.stderr │ │ ├── tcfail090.hs │ │ ├── tcfail090.stderr │ │ ├── tcfail091.stderr │ │ ├── tcfail092.hs │ │ ├── tcfail092.stderr │ │ ├── tcfail094.hs │ │ ├── tcfail094.stderr │ │ ├── tcfail095.hs │ │ ├── tcfail095.stderr │ │ ├── tcfail096.hs │ │ ├── tcfail096.stderr │ │ ├── tcfail097.hs │ │ ├── tcfail097.stderr │ │ ├── tcfail098.hs │ │ ├── tcfail098.stderr │ │ ├── tcfail099.hs │ │ ├── tcfail099.stderr │ │ ├── tcfail100.hs │ │ ├── tcfail100.stderr │ │ ├── tcfail101.hs │ │ ├── tcfail101.stderr │ │ ├── tcfail102.hs │ │ ├── tcfail102.stderr │ │ ├── tcfail103.hs │ │ ├── tcfail103.stderr │ │ ├── tcfail104.hs │ │ ├── tcfail104.stderr │ │ ├── tcfail106.hs │ │ ├── tcfail106.stderr │ │ ├── tcfail107.hs │ │ ├── tcfail107.stderr │ │ ├── tcfail108.hs │ │ ├── tcfail108.stderr │ │ ├── tcfail109.hs │ │ ├── tcfail109.stderr │ │ ├── tcfail110.hs │ │ ├── tcfail110.stderr │ │ ├── tcfail112.hs │ │ ├── tcfail112.stderr │ │ ├── tcfail113.hs │ │ ├── tcfail113.stderr │ │ ├── tcfail114.hs │ │ ├── tcfail114.stderr │ │ ├── tcfail116.hs │ │ ├── tcfail116.stderr │ │ ├── tcfail117.hs │ │ ├── tcfail117.stderr │ │ ├── tcfail118.hs │ │ ├── tcfail118.stderr │ │ ├── tcfail119.hs │ │ ├── tcfail119.stderr │ │ ├── tcfail121.hs │ │ ├── tcfail121.stderr │ │ ├── tcfail122.hs │ │ ├── tcfail122.stderr │ │ ├── tcfail123.hs │ │ ├── tcfail123.stderr │ │ ├── tcfail125.hs │ │ ├── tcfail125.stderr │ │ ├── tcfail127.hs │ │ ├── tcfail127.stderr │ │ ├── tcfail128.hs │ │ ├── tcfail128.stderr │ │ ├── tcfail129.hs │ │ ├── tcfail129.stderr │ │ ├── tcfail130.hs │ │ ├── tcfail130.stderr │ │ ├── tcfail131.hs │ │ ├── tcfail131.stderr │ │ ├── tcfail132.hs │ │ ├── tcfail132.stderr │ │ ├── tcfail133.hs │ │ ├── tcfail133.stderr │ │ ├── tcfail134.hs │ │ ├── tcfail134.stderr │ │ ├── tcfail135.hs │ │ ├── tcfail135.stderr │ │ ├── tcfail136.hs │ │ ├── tcfail136.stderr │ │ ├── tcfail137.hs │ │ ├── tcfail137.stderr │ │ ├── tcfail139.hs │ │ ├── tcfail139.stderr │ │ ├── tcfail140.hs │ │ ├── tcfail140.stderr │ │ ├── tcfail142.hs │ │ ├── tcfail142.stderr │ │ ├── tcfail143.hs │ │ ├── tcfail143.stderr │ │ ├── tcfail146.hs │ │ ├── tcfail146.stderr │ │ ├── tcfail147.hs │ │ ├── tcfail147.stderr │ │ ├── tcfail148.hs │ │ ├── tcfail148.stderr │ │ ├── tcfail150.hs │ │ ├── tcfail150.stderr │ │ ├── tcfail151.hs │ │ ├── tcfail151.stderr │ │ ├── tcfail152.hs │ │ ├── tcfail152.stderr │ │ ├── tcfail153.hs │ │ ├── tcfail153.stderr │ │ ├── tcfail154.hs │ │ ├── tcfail154.stderr │ │ ├── tcfail155.hs │ │ ├── tcfail155.stderr │ │ ├── tcfail156.hs │ │ ├── tcfail156.stderr │ │ ├── tcfail157.hs │ │ ├── tcfail157.stderr │ │ ├── tcfail158.hs │ │ ├── tcfail158.stderr │ │ ├── tcfail159.hs │ │ ├── tcfail159.stderr │ │ ├── tcfail160.hs │ │ ├── tcfail160.stderr │ │ ├── tcfail161.hs │ │ ├── tcfail161.stderr │ │ ├── tcfail162.hs │ │ ├── tcfail162.stderr │ │ ├── tcfail164.hs │ │ ├── tcfail164.stderr │ │ ├── tcfail165.hs │ │ ├── tcfail165.stderr │ │ ├── tcfail166.hs │ │ ├── tcfail166.stderr │ │ ├── tcfail167.hs │ │ ├── tcfail167.stderr │ │ ├── tcfail168.hs │ │ ├── tcfail168.stderr │ │ ├── tcfail169.hs │ │ ├── tcfail169.stderr │ │ ├── tcfail170.hs │ │ ├── tcfail170.stderr │ │ ├── tcfail171.hs │ │ ├── tcfail171.stderr │ │ ├── tcfail173.hs │ │ ├── tcfail173.stderr │ │ ├── tcfail174.hs │ │ ├── tcfail174.stderr │ │ ├── tcfail175.hs │ │ ├── tcfail175.stderr │ │ ├── tcfail176.hs │ │ ├── tcfail176.stderr │ │ ├── tcfail177.hs │ │ ├── tcfail177.stderr │ │ ├── tcfail178.hs │ │ ├── tcfail178.stderr │ │ ├── tcfail179.hs │ │ ├── tcfail179.stderr │ │ ├── tcfail180.hs │ │ ├── tcfail180.stderr │ │ ├── tcfail181.hs │ │ ├── tcfail181.stderr │ │ ├── tcfail182.hs │ │ ├── tcfail182.stderr │ │ ├── tcfail183.hs │ │ ├── tcfail183.stderr │ │ ├── tcfail184.hs │ │ ├── tcfail184.stderr │ │ ├── tcfail185.hs │ │ ├── tcfail185.stderr │ │ ├── tcfail186 │ │ │ ├── Tcfail186.hs │ │ │ ├── Tcfail186_Help.hs │ │ │ ├── tcfail186.cabal │ │ │ └── tcfail186.stderr │ │ ├── tcfail187.hs │ │ ├── tcfail187.stderr │ │ ├── tcfail189.hs │ │ ├── tcfail189.stderr │ │ ├── tcfail190.hs │ │ ├── tcfail190.stderr │ │ ├── tcfail191.hs │ │ ├── tcfail191.stderr │ │ ├── tcfail193.hs │ │ ├── tcfail193.stderr │ │ ├── tcfail195.hs │ │ ├── tcfail195.stderr │ │ ├── tcfail196.hs │ │ ├── tcfail196.stderr │ │ ├── tcfail197.hs │ │ ├── tcfail197.stderr │ │ ├── tcfail198.hs │ │ ├── tcfail198.stderr │ │ ├── tcfail199.hs │ │ ├── tcfail199.stderr │ │ ├── tcfail200.hs │ │ ├── tcfail200.stderr │ │ ├── tcfail201.hs │ │ ├── tcfail201.stderr │ │ ├── tcfail202.hs │ │ ├── tcfail202.stderr │ │ ├── tcfail203 │ │ │ ├── Tcfail203.hs │ │ │ ├── Tcfail203a.hs │ │ │ ├── tcfail203.cabal │ │ │ ├── tcfail203.stderr │ │ │ └── tcfail203a.stderr │ │ ├── tcfail204.hs │ │ ├── tcfail204.stderr │ │ ├── tcfail205.hs │ │ ├── tcfail205.stderr │ │ ├── tcfail206.hs │ │ └── tcfail206.stderr │ │ └── run │ │ ├── tcfail149.hs │ │ └── tcfail149.stdout └── verify │ ├── Main.hs │ ├── verify.sh │ └── win-verify.cmd ├── update.cmd ├── update.sh └── utils ├── class-verifier └── Verify.java ├── coursier ├── README.md └── coursier ├── eta-pkg ├── Main.hs ├── Setup.hs └── eta-pkg.cabal ├── scripts └── circleci-trigger.sh └── trace ├── Filter.hs ├── README.md ├── trace.cmd ├── trace.sh └── tracejars.tar.gz /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "codec-jvm"] 2 | path = codec-jvm 3 | url = https://github.com/rahulmutt/codec-jvm 4 | [submodule "etlas"] 5 | path = etlas 6 | url = https://github.com/typelead/etlas 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Thank you for contributing to Eta 2 | 3 | If you'd like to contribute to this repository, please check the [contributing guidelines](https://eta-lang.org/contribute). 4 | -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /compiler/Eta/BasicTypes/IdInfo.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.BasicTypes.IdInfo where 2 | import Eta.Utils.Outputable 3 | data IdInfo 4 | data IdDetails 5 | 6 | vanillaIdInfo :: IdInfo 7 | coVarDetails :: IdDetails 8 | pprIdDetails :: IdDetails -> SDoc 9 | -------------------------------------------------------------------------------- /compiler/Eta/BasicTypes/Name.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.BasicTypes.Name where 2 | 3 | data Name 4 | -------------------------------------------------------------------------------- /compiler/Eta/BasicTypes/OccName.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.BasicTypes.OccName where 2 | 3 | data OccName 4 | -------------------------------------------------------------------------------- /compiler/Eta/CodeGen/Bind.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.CodeGen.Bind where 2 | 3 | import Eta.CodeGen.Monad( CodeGen ) 4 | import Eta.StgSyn.StgSyn( StgBinding ) 5 | 6 | cgBind :: StgBinding -> CodeGen () -------------------------------------------------------------------------------- /compiler/Eta/Iface/IfaceEnv.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Iface.IfaceEnv where 2 | 3 | import Eta.BasicTypes.Module 4 | import Eta.BasicTypes.OccName 5 | import Eta.TypeCheck.TcRnMonad 6 | import Eta.BasicTypes.Name 7 | import Eta.BasicTypes.SrcLoc 8 | 9 | newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name 10 | -------------------------------------------------------------------------------- /compiler/Eta/Iface/LoadIface.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Iface.LoadIface where 2 | import Eta.BasicTypes.Module (Module) 3 | import Eta.TypeCheck.TcRnMonad (IfM) 4 | import Eta.Main.HscTypes (ModIface) 5 | import Eta.Utils.Outputable (SDoc) 6 | 7 | loadSysInterface :: SDoc -> Module -> IfM lcl ModIface 8 | -------------------------------------------------------------------------------- /compiler/Eta/Iface/MkJavaIface.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Iface.MkJavaIface (mkJavaIface) where 2 | 3 | import Eta.Main.HscTypes (ModIface) 4 | import Eta.TypeCheck.TcRnTypes (TcRnIf) 5 | 6 | mkJavaIface :: String -> TcRnIf gbl lcl ModIface 7 | -------------------------------------------------------------------------------- /compiler/Eta/Main/Hooks.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Main.Hooks where 2 | 3 | data Hooks 4 | 5 | emptyHooks :: Hooks -------------------------------------------------------------------------------- /compiler/Eta/Main/StaticFlags.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Main.StaticFlags where 2 | 3 | opt_PprStyle_Debug :: Bool 4 | opt_NoDebugOutput :: Bool 5 | -------------------------------------------------------------------------------- /compiler/Eta/Prelude/PrelNames.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Prelude.PrelNames where 2 | 3 | import Eta.BasicTypes.Module 4 | import Eta.BasicTypes.Unique 5 | 6 | mAIN :: Module 7 | liftedTypeKindTyConKey :: Unique -------------------------------------------------------------------------------- /compiler/Eta/Prelude/PrimOp.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Prelude.PrimOp where 2 | 3 | data PrimOp 4 | -------------------------------------------------------------------------------- /compiler/Eta/Prelude/TysWiredIn.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Prelude.TysWiredIn where 2 | 3 | import {-# SOURCE #-} Eta.Types.TyCon (TyCon) 4 | import {-# SOURCE #-} Eta.Types.TypeRep (Type) 5 | 6 | 7 | eqTyCon, listTyCon, coercibleTyCon :: TyCon 8 | typeNatKind, typeSymbolKind :: Type 9 | mkBoxedTupleTy :: [Type] -> Type 10 | -------------------------------------------------------------------------------- /compiler/Eta/TypeCheck/TcEnv.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.TypeCheck.TcEnv where 2 | import Eta.TypeCheck.TcRnTypes 3 | 4 | tcExtendIdEnv :: [TcId] -> TcM a -> TcM a -------------------------------------------------------------------------------- /compiler/Eta/TypeCheck/TcType.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.TypeCheck.TcType where 2 | import Eta.Utils.Outputable( SDoc ) 3 | 4 | data MetaDetails 5 | 6 | data TcTyVarDetails 7 | pprTcTyVarDetails :: TcTyVarDetails -> SDoc -------------------------------------------------------------------------------- /compiler/Eta/TypeCheck/TcTypeNats.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.TypeCheck.TcTypeNats where 2 | 3 | import Eta.Types.TyCon (TyCon) 4 | 5 | typeNatTyCons :: [TyCon] 6 | -------------------------------------------------------------------------------- /compiler/Eta/Types/Type.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Types.Type where 2 | import {-# SOURCE #-} Eta.Types.TypeRep( Type, Kind ) 3 | import Eta.BasicTypes.Var 4 | 5 | isPredTy :: Type -> Bool 6 | 7 | typeKind :: Type -> Kind 8 | substKiWith :: [KindVar] -> [Kind] -> Kind -> Kind 9 | eqKind :: Kind -> Kind -> Bool 10 | -------------------------------------------------------------------------------- /compiler/Eta/Types/TypeRep.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Types.TypeRep where 2 | 3 | import Eta.Utils.Outputable (Outputable) 4 | 5 | data Type 6 | data TyThing 7 | 8 | type PredType = Type 9 | type Kind = Type 10 | type SuperKind = Type 11 | 12 | instance Outputable Type 13 | -------------------------------------------------------------------------------- /compiler/Eta/Utils/Outputable.hs-boot: -------------------------------------------------------------------------------- 1 | module Eta.Utils.Outputable where 2 | 3 | data SDoc 4 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/0-introduction/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![icon](/images/startup.svg) 4 | 5 | What is Eta? 6 | 7 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/1-installation/intro.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | ![icon](/images/installation.svg) 4 | 5 | Instructions for installing Eta 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/2-basics/intro.md: -------------------------------------------------------------------------------- 1 | # Basics 2 | 3 | ![icon](/images/basics.svg) 4 | 5 | Learn the basics of Eta 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/3-java-interop/intro.md: -------------------------------------------------------------------------------- 1 | # Java Interop 2 | 3 | ![icon](/images/interact.svg) 4 | 5 | Learn how to work with Java 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/4-functions/intro.md: -------------------------------------------------------------------------------- 1 | # Functions 2 | 3 | ![icon](/images/function.svg) 4 | 5 | Working with functions 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/5-metaprogramming/intro.md: -------------------------------------------------------------------------------- 1 | # Metaprogramming 2 | 3 | ![icon](/images/concurrency.svg) 4 | 5 | Generating Eta code at compile-time 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/0-eta-user-guide/intro.md: -------------------------------------------------------------------------------- 1 | # Eta User Guide 2 | 3 | ![icon](/images/eta-user-guide.svg) 4 | 5 | Learn how to use Eta effectively 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/0-introduction/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![icon](/images/startup.svg) 4 | 5 | Etlas in the Eta ecosystem 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/1-installation/0-installation.md: -------------------------------------------------------------------------------- 1 | # Methods 2 | 3 | ## Overview 4 | 5 | There are two ways you can install Etlas: 6 | 7 | - [Binary](./binary) 8 | - [Source](./source) 9 | 10 | ## Jump To Module 11 | 12 | Click [here](/docs/user-guides/etlas-user-guide/basics/initializing) to go to the basics module. 13 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/1-installation/intro.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | ![icon](/images/installation.svg) 4 | 5 | Install Etlas on your system 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/2-basics/intro.md: -------------------------------------------------------------------------------- 1 | # Basics 2 | 3 | ![icon](/images/basics.svg) 4 | 5 | Learn the basics of Etlas 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/3-configuration/intro.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | ![icon](/images/compiler.svg) 4 | 5 | Learn common build configurations 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/4-advanced-features/intro.md: -------------------------------------------------------------------------------- 1 | # Advanced Features 2 | 3 | ![icon](/images/invoke.svg) 4 | 5 | Dive into features for specialized use cases 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/5-command-reference/intro.md: -------------------------------------------------------------------------------- 1 | # Command Reference 2 | 3 | ![icon](/images/ide.svg) 4 | 5 | Glance through the Etlas command reference 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/1-etlas-user-guide/intro.md: -------------------------------------------------------------------------------- 1 | # Etlas User Guide 2 | 3 | ![icon](/images/etlas-user-guide.svg) 4 | 5 | Understand how to build with Etlas 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /docs/0-user-guides/2-gradle-user-guide/0-introduction/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![icon](/images/startup.svg) 4 | 5 | Why Gradle and the Eta plugin? 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/2-gradle-user-guide/1-basic-configuration/intro.md: -------------------------------------------------------------------------------- 1 | # Basic Configuration 2 | 3 | ![icon](/images/compiler.svg) 4 | 5 | Demonstrate commonly used configurations 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/2-gradle-user-guide/2-advanced-configuration/intro.md: -------------------------------------------------------------------------------- 1 | # Advanced Configuration 2 | 3 | ![icon](/images/compiler.svg) 4 | 5 | Details about advanced configuration options 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/2-gradle-user-guide/intro.md: -------------------------------------------------------------------------------- 1 | # Gradle Plugin User Guide 2 | 3 | ![icon](/images/gradle-user-guide.svg) 4 | 5 | Understand how to build with Eta with Gradle 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /docs/0-user-guides/3-eta-repl-user-guide/0-introduction/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![icon](/images/startup.svg) 4 | 5 | What is Eta REPL? 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/3-eta-repl-user-guide/1-basics/intro.md: -------------------------------------------------------------------------------- 1 | # Basics 2 | 3 | ![icon](/images/basics.svg) 4 | 5 | A quickstart to Eta REPL 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/3-eta-repl-user-guide/2-eta-repl-reference/intro.md: -------------------------------------------------------------------------------- 1 | # Command Reference 2 | 3 | ![icon](/images/ide.svg) 4 | 5 | Eta REPL command reference 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/3-eta-repl-user-guide/intro.md: -------------------------------------------------------------------------------- 1 | # Eta REPL User Guide 2 | 3 | ![icon](/images/eta-repl-user-guide.svg) 4 | 5 | Use the interactive Eta REPL 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /docs/0-user-guides/4-sbt-user-guide/0-introduction/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | ![icon](/images/startup.svg) 4 | 5 | Why Gradle and the Eta plugin? 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/4-sbt-user-guide/1-basic-configuration/intro.md: -------------------------------------------------------------------------------- 1 | # Basic Configuration 2 | 3 | ![icon](/images/compiler.svg) 4 | 5 | Demonstrate commonly used configurations 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/4-sbt-user-guide/2-advanced-configuration/intro.md: -------------------------------------------------------------------------------- 1 | # Advanced Configuration 2 | 3 | ![icon](/images/compiler.svg) 4 | 5 | Details about advanced configuration options 6 | -------------------------------------------------------------------------------- /docs/0-user-guides/4-sbt-user-guide/intro.md: -------------------------------------------------------------------------------- 1 | # Gradle Plugin User Guide 2 | 3 | ![icon](/images/gradle-user-guide.svg) 4 | 5 | Understand how to build with Eta with Gradle 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /docs/0-user-guides/intro.md: -------------------------------------------------------------------------------- 1 | # User Guides 2 | 3 | ![icon](/images/guide.svg) 4 | 5 | Check the core language and structure of Eta 6 | 7 | [type]: recursive 8 | -------------------------------------------------------------------------------- /docs/1-tutorials/0-from-loops-to-recursion/intro.md: -------------------------------------------------------------------------------- 1 | # From Loops to Recursion 2 | 3 | ![icon](/images/loop.svg) 4 | 5 | Learn how to start thinking in terms of recursion. 6 | -------------------------------------------------------------------------------- /docs/1-tutorials/1-web-services/intro.md: -------------------------------------------------------------------------------- 1 | # Web Service 2 | 3 | ![icon](/images/web-server.svg) 4 | 5 | How to set up a simple web service 6 | -------------------------------------------------------------------------------- /docs/1-tutorials/intro.md: -------------------------------------------------------------------------------- 1 | # Tutorials 2 | 3 | ![icon](/images/tuts.svg) 4 | 5 | Check simple use cases and examples in Eta 6 | 7 | [type]: modules 8 | -------------------------------------------------------------------------------- /eta-serv/cabal.project: -------------------------------------------------------------------------------- 1 | packages: . 2 | uberjar-mode: true 3 | -------------------------------------------------------------------------------- /eta-serv/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1g 2 | -------------------------------------------------------------------------------- /eta-serv/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/eta-serv/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /eta-serv/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /eta_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/eta_logo.png -------------------------------------------------------------------------------- /examples/HelloWorld.hs: -------------------------------------------------------------------------------- 1 | -- Name: Hello World! 2 | -- Description: The standard hello world example for Eta. 3 | 4 | main :: IO () -- Note that this line is optional. Written for clarity. 5 | main = putStrLn "Hello World!" 6 | -------------------------------------------------------------------------------- /install.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | stack setup && cleaninstall -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | stack setup 6 | ./cleaninstall.sh "$@" 7 | -------------------------------------------------------------------------------- /libraries/base/Eta/Overloadable.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PolyKinds, DataKinds, MagicHash, ScopedTypeVariables, MultiParamTypeClasses #-} 2 | module Eta.Overloadable(Overloadable(..)) where 3 | 4 | import GHC.Base 5 | import GHC.TypeLits 6 | 7 | -------------------------------------------------------------------------------- /libraries/base/GHC/Base.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | 3 | module GHC.Base (Maybe, Semigroup, Monoid) where 4 | 5 | import GHC.Maybe (Maybe) 6 | import GHC.Types () 7 | 8 | class Semigroup a 9 | class Monoid a 10 | -------------------------------------------------------------------------------- /libraries/base/GHC/IO.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Unsafe #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO where 5 | 6 | import GHC.Types 7 | 8 | failIO :: [Char] -> IO a 9 | mplusIO :: IO a -> IO a -> IO a 10 | -------------------------------------------------------------------------------- /libraries/base/GHC/IO/Encoding.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Encoding where 5 | 6 | import GHC.IO (IO) 7 | import GHC.IO.Encoding.Types 8 | 9 | getLocaleEncoding, getFileSystemEncoding, getForeignEncoding :: IO TextEncoding 10 | -------------------------------------------------------------------------------- /libraries/base/GHC/IO/Encoding/CodePage.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE CPP, BangPatterns, NoImplicitPrelude, 3 | NondecreasingIndentation, MagicHash #-} 4 | 5 | module GHC.IO.Encoding.CodePage () where 6 | 7 | import GHC.Base () -- Build ordering 8 | -------------------------------------------------------------------------------- /libraries/base/GHC/IO/Handle.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle where 5 | 6 | import GHC.IO 7 | import GHC.IO.Handle.Types 8 | 9 | hFlush :: Handle -> IO () 10 | -------------------------------------------------------------------------------- /libraries/base/GHC/IO/Handle/FD.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Trustworthy #-} 2 | {-# LANGUAGE NoImplicitPrelude #-} 3 | 4 | module GHC.IO.Handle.FD where 5 | 6 | import GHC.IO.Handle.Types 7 | 8 | -- used in GHC.Conc, which is below GHC.IO.Handle.FD 9 | stdout :: Handle 10 | -------------------------------------------------------------------------------- /libraries/base/GHC/Real.hs-boot: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoImplicitPrelude #-} 2 | 3 | module GHC.Real where 4 | 5 | import GHC.Types () 6 | 7 | class Integral a 8 | -------------------------------------------------------------------------------- /libraries/eta-meta/Setup.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import Distribution.Simple 4 | 5 | main :: IO () 6 | main = defaultMain 7 | -------------------------------------------------------------------------------- /libraries/rts/Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /rts/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/rts/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /rts/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip 6 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function1_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function1_1 extends Function1 { 6 | public Closure x1; 7 | 8 | public Function1_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function2_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function2_1 extends Function2 { 6 | public Closure x1; 7 | 8 | public Function2_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function3_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function3_1 extends Function3 { 6 | public Closure x1; 7 | 8 | public Function3_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function4_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function4_1 extends Function4 { 6 | public Closure x1; 7 | 8 | public Function4_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function5_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function5_1 extends Function5 { 6 | public Closure x1; 7 | 8 | public Function5_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function6.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | public class Function6 extends Function { 4 | public int arity() { return 6; } 5 | } 6 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/apply/Function6_1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.apply; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public class Function6_1 extends Function6 { 6 | public Closure x1; 7 | 8 | public Function6_1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/exception/FiberYieldException.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.exception; 2 | 3 | public class FiberYieldException extends StgException {} 4 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/exception/RetryException.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.exception; 2 | 3 | public class RetryException extends StgException { 4 | public static RetryException INSTANCE = new RetryException(); 5 | public RetryException() {} 6 | } 7 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/exception/RuntimeInternalError.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.exception; 2 | 3 | public class RuntimeInternalError extends Error { 4 | 5 | public RuntimeInternalError(String message) { 6 | super("\n[Eta Panic] " + message + "\nPlease report this as a bug: https://github.com/typelead/eta/issues"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/exception/StgException.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.exception; 2 | 3 | public class StgException extends RuntimeException { 4 | 5 | /* This makes throwing exceptions fast. */ 6 | @Override 7 | public Throwable fillInStackTrace() { 8 | return null; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/exception/TrampolineBounceException.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.exception; 2 | 3 | public class TrampolineBounceException extends StgException {} 4 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/stm/InvariantCheck.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.stm; 2 | 3 | public class InvariantCheck { 4 | public AtomicInvariant invariant; 5 | public TransactionRecord myExecution; 6 | public InvariantCheck(AtomicInvariant invariant) { 7 | this.invariant = invariant; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/storage/LocalHeap.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.storage; 2 | 3 | public interface LocalHeap { 4 | long allocateLocal(int miniblocks, boolean direct, boolean supr); 5 | void setActiveBlock(Block block, boolean direct, boolean supr); 6 | } 7 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/thunk/SingleEntryThunk0.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.thunk; 2 | 3 | 4 | public abstract class SingleEntryThunk0 extends SingleEntryThunk {} 5 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/thunk/SingleEntryThunk1.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.thunk; 2 | 3 | import eta.runtime.stg.Closure; 4 | 5 | public abstract class SingleEntryThunk1 extends SingleEntryThunk { 6 | public Closure x1; 7 | 8 | public SingleEntryThunk1(Closure x1) { 9 | this.x1 = x1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/thunk/UpdatableThunk0.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.thunk; 2 | 3 | 4 | public abstract class UpdatableThunk0 extends UpdatableThunk { 5 | 6 | @Override 7 | public final void clear() {} 8 | } 9 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/thunk/WhiteHole.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.thunk; 2 | 3 | public class WhiteHole extends BlackHole { 4 | public static WhiteHole closure = new WhiteHole(); 5 | } 6 | -------------------------------------------------------------------------------- /rts/src/main/java/eta/runtime/util/Consumer.java: -------------------------------------------------------------------------------- 1 | package eta.runtime.util; 2 | 3 | public abstract class Consumer { 4 | 5 | public abstract void accept(E e); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /runtests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | (cd rts; ./gradlew test) 4 | stack setup 5 | stack build eta:exe:eta-package-test eta:exe:eta-test-suite 6 | stack exec eta-test-suite 7 | stack exec eta-package-test 8 | -------------------------------------------------------------------------------- /shake/Setup.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | import "Cabal" Distribution.Simple 3 | main = defaultMain 4 | -------------------------------------------------------------------------------- /test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | stack build eta:exe:eta-package-test 6 | stack exec eta-package-test 7 | -------------------------------------------------------------------------------- /tests/suite/IGNORED: -------------------------------------------------------------------------------- 1 | tc141 2 | tc168 3 | tc211 4 | T14163 5 | T4912 6 | T6018 7 | T7541 8 | InstanceMethod 9 | StaticMethod 10 | TcTypeNatSimple 11 | TcTypeSymbolSimple 12 | tcfail150 13 | tcfail205 14 | annrun01 15 | TH_overloadedlabels 16 | TH_reifyLocalDefs 17 | -------------------------------------------------------------------------------- /tests/suite/annotations/compile/T14129.hs: -------------------------------------------------------------------------------- 1 | module T14129 where 2 | 3 | {-# ANN module "KABOOM" #-} 4 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/T10826.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE Safe #-} 2 | module Test (hook) where 3 | 4 | import System.IO.Unsafe 5 | 6 | {-# ANN hook (unsafePerformIO (putStrLn "Woops.")) #-} 7 | hook = undefined 8 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/T10826.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/T10826.hs:6:1: error: 3 | Annotations are not compatible with Safe Haskell. 4 | See https://ghc.haskell.org/trac/ghc/ticket/10826 5 | In the annotation: 6 | {-# ANN hook (unsafePerformIO (putStrLn "Woops.")) #-} 7 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail01.hs: -------------------------------------------------------------------------------- 1 | module Annfail01 where 2 | -- Testing annotating things that don't exist 3 | 4 | {-# ANN type Foo (1 :: Int) #-} 5 | {-# ANN f (1 :: Int) #-} -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail02.hs: -------------------------------------------------------------------------------- 1 | module Annfail02 where 2 | -- Testing annotating things that don't exist in the right namespace 3 | 4 | data Foo = Bar 5 | 6 | {-# ANN Foo (1 :: Int) #-} 7 | {-# ANN type Bar (2 :: Int) #-} -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail03.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/annfail03.hs:17:11: error: 3 | GHC stage restriction: 4 | ‘InModule’ is used in a top-level splice or annotation, 5 | and must be imported, not defined locally 6 | In the annotation: {-# ANN f InModule #-} 7 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail04/Annfail04_Help.hs: -------------------------------------------------------------------------------- 1 | module Annfail04_Help where 2 | 3 | class Thing a where 4 | thing :: a -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail04/annfail04.cabal: -------------------------------------------------------------------------------- 1 | name: annfail04 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Annfail04 9 | Annfail04_Help 10 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail05/Annfail05.hs: -------------------------------------------------------------------------------- 1 | module Annfail05 where 2 | 3 | import Annfail05_Help 4 | -- Testing annotating with a value that is not Typeable or Data-able 5 | 6 | {-# ANN module NoInstances #-} 7 | 8 | {-# ANN type Foo NoInstances #-} 9 | data Foo = Bar 10 | 11 | {-# ANN f NoInstances #-} 12 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail05/Annfail05_Help.hs: -------------------------------------------------------------------------------- 1 | module Annfail05_Help where 2 | 3 | data NoInstances = NoInstances -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail05/annfail05.cabal: -------------------------------------------------------------------------------- 1 | name: annfail05 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Annfail05 9 | Annfail05_Help 10 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail06/Annfail06_Help.hs: -------------------------------------------------------------------------------- 1 | module Annfail06_Help where 2 | 3 | data InstancesInWrongModule = InstancesInWrongModule -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail06/annfail06.cabal: -------------------------------------------------------------------------------- 1 | name: annfail06 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Annfail06 9 | Annfail06_Help 10 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail07.hs: -------------------------------------------------------------------------------- 1 | module Annfail07 where 2 | -- Testing normal type errors in annotations 3 | 4 | {-# ANN module (head True) #-} 5 | 6 | {-# ANN type Foo (head True) #-} 7 | data Foo = Bar 8 | 9 | {-# ANN f (head True) #-} 10 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail07.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/annfail07.hs:9:17: error: 3 | Couldn't match expected type ‘[a0]’ with actual type ‘Bool’ 4 | In the first argument of ‘head’, namely ‘True’ 5 | In the annotation: {-# ANN f (head True) #-} 6 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail08.hs: -------------------------------------------------------------------------------- 1 | module Annfail08 where 2 | -- Testing instance type errors in annotations 3 | 4 | {-# ANN module (id + 1) #-} 5 | 6 | {-# ANN type Foo (id + 1) #-} 7 | data Foo = Bar 8 | 9 | {-# ANN f (id + 1) #-} 10 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail09.hs: -------------------------------------------------------------------------------- 1 | module Annfail09 where 2 | -- Testing that we detect references to ids defined in module being compiled in annotations 3 | 4 | g = 10 5 | 6 | {-# ANN module g #-} 7 | 8 | {-# ANN type Foo g #-} 9 | data Foo = Bar 10 | 11 | {-# ANN f g #-} 12 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail09.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/annfail09.hs:11:11: error: 3 | GHC stage restriction: 4 | ‘g’ is used in a top-level splice or annotation, 5 | and must be imported, not defined locally 6 | In the annotation: {-# ANN f g #-} 7 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail10.hs: -------------------------------------------------------------------------------- 1 | module Annfail10 where 2 | -- Testing ambiguity in annotations 3 | 4 | {-# ANN module 1 #-} 5 | 6 | {-# ANN type Foo 1 #-} 7 | data Foo = Bar 8 | 9 | {-# ANN f 1 #-} 10 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail11.hs: -------------------------------------------------------------------------------- 1 | module Annfail11 where 2 | 3 | {-# ANN length "Cannot annotate other modules yet" #-} 4 | {-# ANN type Integer "Cannot annotate other modules yet" #-} -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail12.hs: -------------------------------------------------------------------------------- 1 | module Annfail12 where 2 | 3 | -- Testing errors hidden in annotations 4 | 5 | {-# ANN f (error "You were meant to see this error!" :: Int) #-} 6 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail12.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/annfail12.hs:5:1: error: 3 | Exception when trying to run compile-time code: 4 | You were meant to see this error! 5 | In the annotation: 6 | {-# ANN f (error "You were meant to see this error!" :: Int) #-} 7 | -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail13.hs: -------------------------------------------------------------------------------- 1 | module Annfail13 where 2 | -- Testing that brackets are mandatory in the ANN syntax 3 | 4 | {-# ANN f id 1 #-} 5 | {-# ANN f 1 :: Int #-} 6 | f x = x -------------------------------------------------------------------------------- /tests/suite/annotations/fail/annfail13.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/annotations/fail/annfail13.hs:4:14: error: 3 | parse error on input ‘1’ 4 | -------------------------------------------------------------------------------- /tests/suite/annotations/run/annrun01/annrun01.cabal: -------------------------------------------------------------------------------- 1 | name: annfail04 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable AnnRun01 7 | main-is: AnnRun01.hs 8 | build-depends: base 9 | exposed-modules: AnnRun01 10 | AnnRun01_Help 11 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/compile/ado006.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ApplicativeDo #-} 2 | module Test where 3 | 4 | -- This exposed a bug in zonking ApplicativeLastStmt 5 | test :: IO Int 6 | test 7 | = do 8 | x <- return () 9 | h <- return (\_ -> 3) 10 | return (h ()) 11 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/fail/ado003.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ApplicativeDo #-} 2 | module ShouldFail where 3 | 4 | g :: IO () 5 | g = do 6 | x <- getChar 7 | 'a' <- return (3::Int) -- type error 8 | return () 9 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/fail/ado005.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ApplicativeDo #-} 2 | {-# OPTIONS_GHC -ddump-types #-} 3 | module Test where 4 | 5 | -- This should fail to typecheck because it needs Monad 6 | test :: Applicative f => (Int -> f Int) -> f Int 7 | test f = do 8 | x <- f 3 9 | y <- f x 10 | return (x + y) 11 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/run/T14163.hs: -------------------------------------------------------------------------------- 1 | {-# language ApplicativeDo #-} 2 | 3 | import GHC.Exts 4 | 5 | readIt :: IO (Int, Int) 6 | readIt = readLn 7 | 8 | main :: IO () 9 | main = do 10 | (_, _) <- readIt 11 | (_, _) <- readIt 12 | (_, _) <- readIt 13 | print "Done" 14 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/run/T14163.stdin: -------------------------------------------------------------------------------- 1 | (1,2) 2 | (3,4) 3 | (5,6) 4 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/run/T14163.stdout: -------------------------------------------------------------------------------- 1 | "Done" 2 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/run/ado-optimal.stdout: -------------------------------------------------------------------------------- 1 | ((a; b) | (c; d)); e 2 | (a | c); ((b | d); e) 3 | -------------------------------------------------------------------------------- /tests/suite/applicativeDo/run/ado001.stdout: -------------------------------------------------------------------------------- 1 | (a | b) 2 | a; g 3 | ((a | (b; g)) | e) 4 | (((a | b); g) | c) 5 | ((a | b) | c); (g | h) 6 | a; (b | (c; (d; (e | (f; g))))) 7 | (a | b); (c | d) 8 | a; ((b | c) | d) 9 | ((a | (b; c)) | d) | e 10 | ((a | b); (c | d)) | e 11 | a | b 12 | a | (b; c) 13 | -------------------------------------------------------------------------------- /tests/suite/array/run/Arr016/arr016.cabal: -------------------------------------------------------------------------------- 1 | name: Arr016 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable Arr016 7 | build-depends: base, random, array 8 | main-is: Arr016.hs 9 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr001.hs: -------------------------------------------------------------------------------- 1 | -- !!! Simple array creation 2 | 3 | import Data.Array 4 | 5 | main = 6 | let a1 = array (1,3) (zip [2,3,1] ['a'..'d']) in 7 | print a1 8 | 9 | -- Result: 10 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr001.stdout: -------------------------------------------------------------------------------- 1 | array (1,3) [(1,'c'),(2,'a'),(3,'b')] 2 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr002.stdout: -------------------------------------------------------------------------------- 1 | 'b' 2 | array (1,3) [(1,'b'),(2,'c'),(3,'d')] 3 | 'b' 4 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr005.hs: -------------------------------------------------------------------------------- 1 | -- !!! Array - recurrences 2 | -- 3 | -- array does not evaluate the elements. 4 | -- 5 | import Data.Array 6 | 7 | main = 8 | let 9 | a1 = array (1,100) ((1,1::Integer):[(i,i*a1!(i-1))|i<-[2..100]]) 10 | in 11 | print a1 12 | 13 | -- 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr006.hs: -------------------------------------------------------------------------------- 1 | -- !!! Array - empty arrays 2 | -- 3 | -- print a couple of them to try to expose empty arrays 4 | -- to a GC or two. 5 | import Data.Array 6 | 7 | main = 8 | let 9 | a1 = array (1,0) [] 10 | in 11 | print (take 300 $ repeat (a1 :: Array Int Int)) 12 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr010.stdout: -------------------------------------------------------------------------------- 1 | array (0,10) [(0,0),(1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,2)] 2 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr011.stdout: -------------------------------------------------------------------------------- 1 | array (0,10) [(0,0),(1,2),(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(8,2),(9,2),(10,2)] 2 | array (0,10) [(0,0),(1,0),(2,2),(3,0),(4,2),(5,0),(6,2),(7,0),(8,2),(9,0),(10,2)] 3 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr012.stdout: -------------------------------------------------------------------------------- 1 | array (0,10) [(0,'a'),(1,'b'),(2,'c'),(3,'d'),(4,'e'),(5,'f'),(6,'g'),(7,'h'),(8,'i'),(9,'j'),(10,'k')] 2 | array (0,10) [(0,'A'),(1,'B'),(2,'C'),(3,'D'),(4,'E'),(5,'F'),(6,'G'),(7,'H'),(8,'I'),(9,'J'),(10,'K')] 3 | array (3,8) [(3,'e'),(4,'f'),(5,'g'),(6,'h'),(7,'i'),(8,'j')] 4 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr013.stdout: -------------------------------------------------------------------------------- 1 | array (102,113) [(102,0.6366197723675814),(103,1.909859317102744),(104,7.639437268410976),(105,38.197186342054884),(106,229.1831180523293),(107,1604.281826366305),(108,12834.25461093044),(109,115508.29149837396),(110,1155082.9149837396),(111,1.2705912064821135e7),(112,1.5247094477785364e8),(113,1.9821222821120973e9)] 2 | -------------------------------------------------------------------------------- /tests/suite/array/run/arr015.stdout: -------------------------------------------------------------------------------- 1 | arr==arrS True 2 | arrS==arr True 3 | bnds arr arrS True 4 | bnds +id arr arrS True 5 | id +bnds arr arrS True 6 | -------------------------------------------------------------------------------- /tests/suite/array/run_fail/arr003.stderr: -------------------------------------------------------------------------------- 1 | Exception in thread "main" eta.runtime.exception.EtaException: Ix{Int}.index: Index (4) out of range ((1,3)) 2 | Caused by: eta.runtime.exception.EtaException: Ix{Int}.index: Index (4) out of range ((1,3)) 3 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/cabal.project: -------------------------------------------------------------------------------- 1 | packages: indef/ p/ th/ 2 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/indef/Indef.hs: -------------------------------------------------------------------------------- 1 | module Indef where 2 | import Sig 3 | data T = MkT B 4 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/indef/Sig.hsig: -------------------------------------------------------------------------------- 1 | signature Sig where 2 | data B 3 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/indef/indef.cabal: -------------------------------------------------------------------------------- 1 | name: indef 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 2.0 5 | 6 | library 7 | build-depends: base 8 | signatures: Sig 9 | exposed-modules: Indef 10 | default-language: Haskell2010 11 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/p/P.hs: -------------------------------------------------------------------------------- 1 | module P where 2 | type B = Foo 3 | newtype Foo = Foo Double 4 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/p/p.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 2.0 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: P 9 | default-language: Haskell2010 10 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/th/TH.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH where 3 | $( return [] ) 4 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/T14304/th/th.cabal: -------------------------------------------------------------------------------- 1 | name: th 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 2.0 5 | 6 | library 7 | build-depends: p, indef, base 8 | mixins: p (P as Sig) 9 | exposed-modules: TH 10 | default-language: Haskell2010 11 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp07.bkp: -------------------------------------------------------------------------------- 1 | unit p where 2 | signature A where 3 | foo :: a -> a 4 | 5 | unit q where 6 | dependency p[A=] 7 | module B where 8 | import A 9 | bar x = foo (x + x) 10 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp07.stderr: -------------------------------------------------------------------------------- 1 | [1 of 2] Processing p 2 | [1 of 1] Compiling A[sig] ( p/A.hsig, nothing ) 3 | [2 of 2] Processing q 4 | [1 of 2] Compiling A[sig] ( q/A.hsig, nothing ) 5 | [2 of 2] Compiling B ( q/B.hs, nothing ) 6 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp08.bkp: -------------------------------------------------------------------------------- 1 | unit q where 2 | module H where 3 | data T = T { x :: Bool } 4 | unit r where 5 | signature H where 6 | data T 7 | unit p where 8 | dependency q 9 | dependency r[H=q:H] 10 | module M where 11 | import H 12 | f = T True 13 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp10.bkp: -------------------------------------------------------------------------------- 1 | unit p where 2 | signature H where 3 | data S 4 | module A where 5 | import H 6 | data T = T S 7 | 8 | unit q where 9 | dependency p[H=

] (A as A2) 10 | module B where 11 | import A2 12 | import H2 13 | t = T :: S -> T 14 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp10.stderr: -------------------------------------------------------------------------------- 1 | [1 of 2] Processing p 2 | [1 of 2] Compiling H[sig] ( p/H.hsig, nothing ) 3 | [2 of 2] Compiling A ( p/A.hs, nothing ) 4 | [2 of 2] Processing q 5 | [1 of 2] Compiling H2[sig] ( q/H2.hsig, nothing ) 6 | [2 of 2] Compiling B ( q/B.hs, nothing ) 7 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp16.bkp: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | unit p where 3 | dependency ghc-prim 4 | signature Int where 5 | import GHC.Prim 6 | data Int = I# Int# 7 | unit q where 8 | dependency p[Int=base:GHC.Exts] 9 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp17.bkp: -------------------------------------------------------------------------------- 1 | unit p where 2 | signature H where 3 | unit q where 4 | module M where 5 | unit r where 6 | dependency p[H=q:M] 7 | -------------------------------------------------------------------------------- /tests/suite/backpack/compile/bkp29.bkp: -------------------------------------------------------------------------------- 1 | unit p where 2 | signature A where 3 | data I 4 | x :: I 5 | unit q where 6 | signature B where 7 | data I 8 | f :: I -> I 9 | unit r where 10 | dependency p[A=] 11 | dependency q[B=] 12 | module M where 13 | import C 14 | g = f x 15 | -------------------------------------------------------------------------------- /tests/suite/backpack/run/bkprun01.stdout: -------------------------------------------------------------------------------- 1 | Hello World 2 | -------------------------------------------------------------------------------- /tests/suite/basic/run/Echo.hs: -------------------------------------------------------------------------------- 1 | main :: IO () 2 | main = getContents >>= putStrLn 3 | -------------------------------------------------------------------------------- /tests/suite/basic/run/Echo.stdin: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /tests/suite/basic/run/Echo.stdout: -------------------------------------------------------------------------------- 1 | Hello World! 2 | 3 | -------------------------------------------------------------------------------- /tests/suite/basic/run/Read01.hs: -------------------------------------------------------------------------------- 1 | data REC = REC {l::Int,r::Int} deriving (Read,Show) 2 | 3 | main = print (read "REC {l=3,r=4}" :: REC) 4 | -------------------------------------------------------------------------------- /tests/suite/basic/run/Read01.stdout: -------------------------------------------------------------------------------- 1 | REC {l = 3, r = 4} 2 | -------------------------------------------------------------------------------- /tests/suite/basic/run/T01.hs: -------------------------------------------------------------------------------- 1 | main = print $ head [1201, 23, 343, 4] 2 | -------------------------------------------------------------------------------- /tests/suite/basic/run/T01.stdout: -------------------------------------------------------------------------------- 1 | 1201 2 | -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursionCycle.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = do 5 | putStrLn $ show $ recursive <$> arr 6 | where 7 | arr = [0..10] 8 | 9 | 10 | recursive' 0 a b = a 11 | recursive' n a b = recursive' (n-1) b a 12 | 13 | recursive n = recursive' n 0 1 14 | -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursionCycle.stdout: -------------------------------------------------------------------------------- 1 | [0,1,0,1,0,1,0,1,0,1,0] 2 | -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursiveFib1.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = do 5 | putStrLn $ show $ fibonacci <$> arr 6 | where 7 | arr = [0..10] 8 | 9 | fibrecursive 0 sum presum = sum 10 | fibrecursive n sum presum = fibrecursive (n-1) (sum+presum) sum 11 | 12 | fibonacci n = fibrecursive n 1 0 -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursiveFib1.stdout: -------------------------------------------------------------------------------- 1 | [1,1,2,3,5,8,13,21,34,55,89] 2 | -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursiveFib2.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | main :: IO () 4 | main = do 5 | putStrLn $ show $ fibonacci <$> arr 6 | where 7 | arr = [0..10] 8 | 9 | fibrecursive 0 presum sum = sum 10 | fibrecursive n presum sum = fibrecursive (n-1) sum (sum+presum) 11 | 12 | fibonacci n = fibrecursive n 0 1 -------------------------------------------------------------------------------- /tests/suite/codegen/run/RecursiveFib2.stdout: -------------------------------------------------------------------------------- 1 | [1,1,2,3,5,8,13,21,34,55,89] 2 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/FullExportTest.stdout: -------------------------------------------------------------------------------- 1 | 89 2 | 89 3 | 144 4 | 144 5 | 233 6 | 233 7 | 377 8 | 377 9 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/genArrayExport/Main.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ForeignFunctionInterface #-} 2 | 3 | foreign import java unsafe "@static Utils.test" test :: IO () 4 | 5 | main :: IO () 6 | main = test 7 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/genArrayExport/export/export.cabal: -------------------------------------------------------------------------------- 1 | name: export 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Export 9 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/genArrayExport/genArrayExport.cabal: -------------------------------------------------------------------------------- 1 | name: genArrayExport 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable genArrayExport 7 | main-is: Main.hs 8 | build-depends: base, export 9 | java-sources: Utils.java 10 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/genArrayExport/genArrayExport.stdout: -------------------------------------------------------------------------------- 1 | [1, 2, 3] 2 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/multiArray/Utils.java: -------------------------------------------------------------------------------- 1 | public class Utils { 2 | public static int[][] getIntIntArray() { 3 | return new int[][] { { 0, 1, 2, 3 }, { 4, 5, 6, 7} }; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/multiArray/multiArray.cabal: -------------------------------------------------------------------------------- 1 | name: multiArray 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable multiArray 7 | main-is: multiArray.hs 8 | build-depends: base 9 | java-sources: Utils.java 10 | -------------------------------------------------------------------------------- /tests/suite/ffi/run/multiArray/multiArray.stdout: -------------------------------------------------------------------------------- 1 | [[0,1,2,3],[4,5,6,7]] 2 | [0,1,2,3] 3 | [4,5,6,7] 4 | -------------------------------------------------------------------------------- /tests/suite/java-imports/fail/MissingClass.hs: -------------------------------------------------------------------------------- 1 | module MissingClass where 2 | 3 | import java "java.lang.Math1" 4 | -------------------------------------------------------------------------------- /tests/suite/java-imports/fail/MissingClass.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/java-imports/fail/MissingClass.hs:3:13: error: 3 | Unable to find class in the classpath. 4 | -------------------------------------------------------------------------------- /tests/suite/java-imports/run/InstanceMethod.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds, FlexibleContexts #-} 2 | import Java 3 | import java "java.nio.ByteBuffer" 4 | 5 | main :: IO () 6 | main = java $ do 7 | buf <- ByteBuffer.allocateDirect 10 8 | result <- buf <.> ByteBuffer.isDirect 9 | io $ print result 10 | -------------------------------------------------------------------------------- /tests/suite/java-imports/run/StaticMethod.hs: -------------------------------------------------------------------------------- 1 | import Java 2 | import java "java.lang.Math" 3 | 4 | main :: IO () 5 | main = 6 | java $ do 7 | d <- Math.sqrt 25.0 8 | io $ print d 9 | -------------------------------------------------------------------------------- /tests/suite/java-imports/run/StaticMethod.stdout: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /tests/suite/overloadedlabels/run/overloadedlabelsrun01.stdout: -------------------------------------------------------------------------------- 1 | True 2 | False 3 | True 4 | -------------------------------------------------------------------------------- /tests/suite/overloadedlabels/run/overloadedlabelsrun02.stdout: -------------------------------------------------------------------------------- 1 | Lam (Var Top) 2 | Lam (Lam (App (Var (Pop Top)) (Var Top))) 3 | App (Var Top) (Var Top) 4 | -------------------------------------------------------------------------------- /tests/suite/overloadedlabels/run/overloadedlabelsrun03.stdout: -------------------------------------------------------------------------------- 1 | x 2 | "xy" 3 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T3078.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PatternGuards #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} 3 | 4 | module T3078 where 5 | 6 | data T = A Int | B Int 7 | 8 | funny :: T -> Int 9 | funny t = n 10 | where 11 | n | A x <- t = x 12 | | B x <- t = x 13 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T366.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XGADTs -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} 2 | 3 | module T366 where 4 | 5 | data T a where 6 | C1 :: T Char 7 | C2 :: T Float 8 | 9 | exhaustive :: T Char -> Char 10 | exhaustive C1 = ' ' 11 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T3927.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} 3 | 4 | module T3927 where 5 | 6 | data T a where 7 | T1 :: T Int 8 | T2 :: T Bool 9 | 10 | -- f1 is exhaustive 11 | f1 :: T a -> T a -> Bool 12 | f1 T1 T1 = True 13 | f1 T2 T2 = False 14 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T6124.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} 3 | 4 | module T6124 where 5 | 6 | newtype A = MkA Int 7 | newtype B = MkB Char 8 | 9 | data T a where 10 | A :: T A 11 | B :: T B 12 | 13 | f :: T A -> A 14 | f A = undefined 15 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T7669a.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE EmptyCase #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} 3 | 4 | module T7669 where 5 | 6 | data Void 7 | 8 | foo :: Void -> () 9 | foo x = case x of {} 10 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T9951.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedLists #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} 3 | 4 | module T9951 where 5 | 6 | f :: [a] -> () 7 | f x = case x of 8 | [] -> () 9 | (_:_) -> () 10 | -------------------------------------------------------------------------------- /tests/suite/pmcheck/compile/T9951b.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE OverloadedStrings #-} 2 | {-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} 3 | 4 | module T9951b where 5 | 6 | f :: String -> Bool 7 | f "ab" = True 8 | -------------------------------------------------------------------------------- /tests/suite/rts/run/selectorThunks01.stdin: -------------------------------------------------------------------------------- 1 | a 2 | -------------------------------------------------------------------------------- /tests/suite/rts/run/selectorThunks01.stdout: -------------------------------------------------------------------------------- 1 | 'a' 2 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/PassFunctionDataConstructor.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | helloWorld :: IO () 5 | helloWorld = print "helloWorld" 6 | 7 | data Hello = HelloWorld deriving ( Show ) 8 | 9 | main = do 10 | helloWorld 11 | print HelloWorld 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/PassFunctionDataConstructor2.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | newtype NoIO a = NoIO { noio :: IO a } 5 | 6 | main = do 7 | let 8 | n = NoIO (print "hello") 9 | noio n 10 | 11 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/PassFunctionType.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | helloWorld :: IO () 5 | helloWorld = print "helloWorld" 6 | 7 | data HelloWorld = A deriving ( Show ) 8 | 9 | main = do 10 | helloWorld 11 | print A 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/PassTypeDataConstructor.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | data HelloWorld = A deriving ( Show ) 5 | data Hello = Helloworld deriving ( Show ) 6 | 7 | main = do 8 | print A 9 | print Helloworld 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/Sim01.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | module Sim01 where 4 | 5 | data family Aab a 6 | type family AAb a 7 | 8 | class AaB a where 9 | -------------------------------------------------------------------------------- /tests/suite/similar-names/compile/Sim02.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | module Sim02 where 4 | 5 | data family RDF a 6 | 7 | class Rdf a where 8 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailDataConstructor.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | data Hello = HelloWorld 5 | | Helloworld 6 | deriving ( Show ) 7 | 8 | main = do 9 | print HelloWorld 10 | print Helloworld 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailDataConstructor.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/FailDataConstructor.hs:5:14: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/FailDataConstructor.hs:4:14 5 | tests/suite/similar-names/fail/FailDataConstructor.hs:5:14 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailDataConstructor2.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | data Hello = HelloWorld deriving ( Show ) 5 | data World = Helloworld deriving ( Show ) 6 | 7 | main = do 8 | print HelloWorld 9 | print Helloworld 10 | 11 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailDataVar.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | data Jojo = Jojo 5 | { fooBar :: String 6 | , foobar :: String 7 | } 8 | 9 | main = do 10 | let 11 | j = Jojo "hello" "world" 12 | print $ fooBar j 13 | print $ foobar j 14 | 15 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailDataVar.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/FailDataVar.hs:6:5: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/FailDataVar.hs:5:5 5 | tests/suite/similar-names/fail/FailDataVar.hs:6:5 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailFunction.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | helloWorld :: IO () 5 | helloWorld = print "helloWorld" 6 | 7 | helloworld :: IO () 8 | helloworld = print "helloworld" 9 | 10 | main = do 11 | helloWorld 12 | helloworld 13 | 14 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailFunction.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/FailFunction.hs:8:1: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/FailFunction.hs:5:1 5 | tests/suite/similar-names/fail/FailFunction.hs:8:1 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailType.hs: -------------------------------------------------------------------------------- 1 | 2 | module Main where 3 | 4 | data HelloWorld = A deriving ( Show ) 5 | data Helloworld = B deriving ( Show ) 6 | 7 | main = do 8 | print A 9 | print B 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/FailType.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/FailType.hs:5:1: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/FailType.hs:4:1 5 | tests/suite/similar-names/fail/FailType.hs:5:1 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/simfail01.hs: -------------------------------------------------------------------------------- 1 | data Person = Person { name :: String } 2 | 3 | nAme :: Int 4 | nAme = 1 5 | 6 | main = do 7 | print nAme 8 | print (name Person { name = "Hello" }) 9 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/simfail01.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/simfail01.hs:4:1: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/simfail01.hs:1:24 5 | tests/suite/similar-names/fail/simfail01.hs:4:1 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/simfail02.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | data family A a 4 | 5 | data instance A Int = Ba Int 6 | 7 | data AB = BA 8 | 9 | main = return () 10 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/simfail02.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/similar-names/fail/simfail02.hs:7:11: error: 3 | Multiple declarations with names differing only in case. 4 | Declared at: tests/suite/similar-names/fail/simfail02.hs:5:23 5 | tests/suite/similar-names/fail/simfail02.hs:7:11 6 | -------------------------------------------------------------------------------- /tests/suite/similar-names/fail/simfail03.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | data family A a 4 | 5 | data instance A Int = Baa Int 6 | data instance A Char = BAa Char 7 | data instance A Double = BAA Double 8 | 9 | data AB = BAA 10 | 11 | main = return () 12 | -------------------------------------------------------------------------------- /tests/suite/simplCore/compile/T5550.hs: -------------------------------------------------------------------------------- 1 | module T5550 where 2 | 3 | import GHC.Exts ( SpecConstrAnnotation(..) ) 4 | 5 | data SPEC = SPEC | SPEC2 6 | {-# ANN type SPEC ForceSpecConstr #-} 7 | 8 | loop :: SPEC -> [Int] -> [Int] -> [Int] 9 | loop SPEC z [] = z 10 | loop SPEC z (x:xs) = loop SPEC (x:z) xs 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T13949/ASCII.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | module ASCII () where 4 | 5 | import Tree 6 | import PatternGenerator 7 | 8 | type EP g = Bool 9 | 10 | templateFoo ''EP ['A'..'Z'] 11 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T13949/PatternGenerator.hs: -------------------------------------------------------------------------------- 1 | module PatternGenerator where 2 | 3 | import Tree 4 | 5 | import Language.Haskell.TH 6 | 7 | templateFoo :: Name -> [Char] -> DecsQ 8 | templateFoo _ _ = return [] 9 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T13949/These.hs: -------------------------------------------------------------------------------- 1 | module These where 2 | 3 | tuc :: t (k, a) 4 | tuc = undefined 5 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T13949/Tree.hs: -------------------------------------------------------------------------------- 1 | module Tree where 2 | 3 | import These 4 | 5 | mp :: Maybe (Int, ()) 6 | mp = tuc 7 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T8025/A.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module A where 3 | a = [|3|] 4 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T8025/B.hs: -------------------------------------------------------------------------------- 1 | -- B.hs 2 | {-# LANGUAGE TemplateHaskell #-} 3 | module B where 4 | import A 5 | x = $(a) 6 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/T8025/t8025.cabal: -------------------------------------------------------------------------------- 1 | name: T8025 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: A 9 | B 10 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/TH_finalizer.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | 3 | module ShouldCompile where 4 | 5 | import Language.Haskell.TH 6 | import Language.Haskell.TH.Syntax 7 | 8 | $( do 9 | addModFinalizer (do b <- getQ; reportWarning (show (b::Maybe Bool))) 10 | return [] ) 11 | $( putQ True >> return [] ) 12 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/TH_finalizer.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/templateHaskell/compile/TH_finalizer.hs:1:1: warning: 3 | Just True 4 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/TH_repGuard.stdout: -------------------------------------------------------------------------------- 1 | foo_0 :: GHC.Types.Int -> GHC.Types.Int 2 | foo_0 x_1 | x_1 GHC.Classes.== 5 = 6 3 | foo_0 x_2 = 7 4 | bar_0 :: GHC.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int 5 | bar_0 x_1 | GHC.Maybe.Just y_2 <- x_1 6 | = y_2 7 | bar_0 _ = 9 8 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/TH_repPrim2.stdout: -------------------------------------------------------------------------------- 1 | LitE (IntPrimL 20) 2 | 20# 3 | LitE (WordPrimL 32) 4 | 32## 5 | LitE (FloatPrimL (123 % 10)) 6 | 12.3# 7 | LitE (DoublePrimL (123 % 5)) 8 | 24.6## 9 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/compile/TH_spliceGuard.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XTemplateHaskell #-} 2 | 3 | -- Trac #2017 4 | 5 | module ShouldCompile where 6 | 7 | import Language.Haskell.TH 8 | 9 | $(do e <- [d| f a b 10 | | a == b = a 11 | | otherwise = b |] 12 | return e) 13 | 14 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/fail/TH_1tuple.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/templateHaskell/fail/TH_1tuple.hs:11:7: error: 3 | Illegal 1-tuple type constructor 4 | When splicing a TH expression: 1 :: () 5 | In the untyped splice: $(sigE [| 1 |] (tupleT 1)) 6 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_finalizer2/TH_finalizer2.cabal: -------------------------------------------------------------------------------- 1 | name: THfinalizer 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable TH_finalizer2 7 | main-is: TH_finalizer2.hs 8 | build-depends: base, template-haskell 9 | other-modules: TH_finalizer2M 10 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_finalizer2/TH_finalizer2.hs: -------------------------------------------------------------------------------- 1 | import TH_finalizer2M 2 | 3 | main = print (f 0) 4 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_finalizer2/TH_finalizer2.stdout: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_finalizer2/TH_finalizer2M.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TemplateHaskell #-} 2 | module TH_finalizer2M where 3 | 4 | import Language.Haskell.TH.Syntax 5 | 6 | g :: IO () 7 | g = $(do addModFinalizer (do d <- [d| f x = (2 :: Int) |]; addTopDecls d) 8 | [| return ()|] 9 | ) 10 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_repE2.stdout: -------------------------------------------------------------------------------- 1 | 42 2 | 42 3 | 98765432123456789876 4 | 'x' 5 | "A String" 6 | 1.2 7 | 1.2 8 | 1.2 9 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_repGuardOutput.stdout: -------------------------------------------------------------------------------- 1 | 6 2 | 7 3 | 2 4 | 9 5 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_repPrimOutput.stdout: -------------------------------------------------------------------------------- 1 | 20 2 | 32 3 | 12.3 4 | 24.6 5 | -------------------------------------------------------------------------------- /tests/suite/templateHaskell/run/TH_repPrimOutput2.stdout: -------------------------------------------------------------------------------- 1 | 20 2 | 32 3 | 12.3 4 | 24.6 5 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/TrampolineBreak.hs: -------------------------------------------------------------------------------- 1 | import Data.List 2 | import Data.Function 3 | 4 | main :: IO () 5 | main = do 6 | let input = replicate 1000000 'c' ++ "defghi" 7 | print $ trampoline $ snd $ break (== 'd') input 8 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/TrampolineBreak.stdout: -------------------------------------------------------------------------------- 1 | "defghi" 2 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/TrampolineConcat.hs: -------------------------------------------------------------------------------- 1 | import Data.List 2 | import Data.Function 3 | 4 | main :: IO () 5 | main = print $ trampoline $ concat (replicate 1000000 []) ++ ["Hello"] 6 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/TrampolineConcat.stdout: -------------------------------------------------------------------------------- 1 | ["Hello"] 2 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/tramp01.hs: -------------------------------------------------------------------------------- 1 | import Data.Function 2 | 3 | main = print $ trampoline ([] :: [Int]) 4 | -------------------------------------------------------------------------------- /tests/suite/trampoline/run/tramp01.stdout: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/DfltProb1.hs: -------------------------------------------------------------------------------- 1 | 2 | module DfltProb1 where 3 | 4 | import Control.Monad.ST 5 | import Prelude hiding (traverse) 6 | 7 | traverse :: a -> ST s [a] 8 | traverse = undefined 9 | 10 | -- WORKS with signature test :: Num a => [a] 11 | test = runST (traverse 1) 12 | 13 | main = print test 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/GivenTypeSynonym.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | module Main where 3 | 4 | data A a 5 | 6 | type T a = A a 7 | 8 | 9 | f :: (A a ~ T Int) => a -> Int 10 | f x = x 11 | 12 | 13 | main :: IO () 14 | main = return () 15 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/HasKey.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/HasKey.hs:22:10: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit implementation for 4 | either ‘compare’ or ‘<=’ 5 | In the instance declaration for ‘Ord (Keyed x)’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T1634.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module T1634 where 4 | 5 | t1 :: a -> (forall b. b -> (a,b)) 6 | t1 = (,) 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2357.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE NoMonomorphismRestriction #-} 2 | 3 | module Foo where 4 | 5 | f :: Read a => a 6 | -- This one needs NoMonomorphismRestriction else f could 7 | -- not get a polymorphic type 8 | (f, _) = (read "3", True) 9 | 10 | g :: Read a => a 11 | g = f 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2412/T2412.hs: -------------------------------------------------------------------------------- 1 | 2 | module T2412 ( Baz ) where 3 | 4 | import T2412A ( Bar ) 5 | 6 | type Spqr = Bar 7 | data Baz = Baz Spqr 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2412/T2412.hs-boot: -------------------------------------------------------------------------------- 1 | 2 | module T2412 where 3 | 4 | data Baz 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2412/T2412A.hs: -------------------------------------------------------------------------------- 1 | 2 | module T2412A where 3 | 4 | import {-# SOURCE #-} T2412 ( Baz ) 5 | 6 | type Bar = Baz 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2412/t2412.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: T2412 9 | T2412A 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2433/T2433.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE StandaloneDeriving #-} 2 | {-# LANGUAGE DeriveDataTypeable #-} 3 | 4 | -- Test Trac #2433 5 | 6 | module T2433 where 7 | 8 | import Data.Typeable(Typeable) 9 | import T2433_Help( T ) 10 | 11 | deriving instance Typeable T 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2433/T2433_Help.hs: -------------------------------------------------------------------------------- 1 | module T2433_Help where 2 | 3 | data T a = MkT a 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2433/t2433.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: T2433 9 | T2433_Help 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2478.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExistentialQuantification, DatatypeContexts #-} 2 | 3 | module ShouldCompile where 4 | 5 | data Eq t => TrafoE t = forall env2 . TrafoE Int t 6 | 7 | newSRef () = TrafoE 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2478.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/T2478.hs:1:41: warning: 3 | -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2497.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/T2497.hs:22:1: warning: [-Wunused-binds (in -Wextra)] 3 | Defined but not used: ‘beq’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2572.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} 2 | 3 | -- Trac #2572 4 | 5 | module Foo where 6 | 7 | type GTypeFun = forall a . a -> () 8 | 9 | gmapType :: Int -> GTypeFun 10 | gmapType _ (_ :: a) = undefined 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2735.hs: -------------------------------------------------------------------------------- 1 | -- Trac #2735 2 | 3 | module Bug where 4 | 5 | data S = S { s1 :: (), s2 :: () } 6 | 7 | f s = s { s1 = (), s2 = s1 s } 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T2846.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImpredicativeTypes, FlexibleContexts #-} 2 | module T2846 where 3 | 4 | x = [1,2,3] :: [Num a => a] 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T3219.hs: -------------------------------------------------------------------------------- 1 | -- Trac #3219. Lint error in GHC 6.10 2 | 3 | module T3219 where 4 | 5 | data T a = A{ m1 :: a } | B{ m1, m2 :: a } | C{ m2 :: a } 6 | 7 | -- bar :: (a -> a) -> T a -> T a 8 | bar f x@(A m) = x{m1 = f m} 9 | 10 | -- foo :: (a -> a) -> T a -> T a 11 | foo f x@(C m) = x{m2 = f m} 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T3692.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | {-# LANGUAGE RankNTypes #-} 3 | 4 | module T3692 where 5 | 6 | type Foo a b = () -> (Bar a => a) 7 | 8 | class Bar a where {} 9 | 10 | foo :: Foo a b 11 | foo = id (undefined :: Foo p q) 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T3696.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS -Wall #-} 2 | 3 | module T3696 where 4 | 5 | class C a where c :: a 6 | 7 | instance C Int where c = 37 8 | 9 | def = c 10 | 11 | use :: Int 12 | use = def 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T3696.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/T3696.hs:9:1: warning: [-Wmissing-signatures (in -Wall)] 3 | Top-level binding with no type signature: def :: Int 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4355/T4355.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , mtl 9 | exposed-modules: T4355 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4355/T4355.stderr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/T4355/T4355.stderr -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4498.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE BangPatterns, NoMonoLocalBinds, NoMonoPatBinds #-} 2 | 3 | module T4498 where 4 | 5 | f x = let !y = (\v -> v) :: a -> a 6 | in (y x, y 'T') 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4912/T4912.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeSynonymInstances #-} 2 | {-# OPTIONS_GHC -fwarn-orphans #-} 3 | module T4912 where 4 | 5 | import T4912a 6 | 7 | 8 | type OurData = TheirData 9 | 10 | instance Foo TheirData where 11 | foo = id 12 | 13 | instance Bar OurData where 14 | bar _ = "Ours" 15 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4912/T4912a.hs: -------------------------------------------------------------------------------- 1 | module T4912a where 2 | 3 | data TheirData = TheirData 4 | 5 | class Foo a where 6 | foo :: a -> a 7 | 8 | class Bar a where 9 | bar :: a -> String 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T4912/t4912.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: T4912 9 | T4912a 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T5120.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImplicitParams #-} 2 | {-# LANGUAGE TypeFamilies #-} 3 | {-# LANGUAGE NoMonomorphismRestriction #-} 4 | 5 | module Test where 6 | 7 | class C t where 8 | type TF t 9 | ttt :: TF t -> t 10 | 11 | b :: (C t, ?x :: TF t) => t 12 | b = ttt ?x 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T5481.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-} 2 | module T5481 where 3 | 4 | class Foo a b where 5 | type X a 6 | type X a = b 7 | type Y b 8 | type Y b = a 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T5481.stderr: -------------------------------------------------------------------------------- 1 | ExitFailure 1 2 | 3 | tests/suite/typecheck/compile/T5481.hs:6:16: error: 4 | Not in scope: type variable ‘b’ 5 | 6 | tests/suite/typecheck/compile/T5481.hs:8:16: error: 7 | Not in scope: type variable ‘a’ 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T5792.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DataKinds, TypeFamilies, UndecidableInstances #-} 2 | 3 | module T5792 where 4 | 5 | 6 | data T = TT 7 | type family Compare (m :: T) :: Ordering 8 | type instance Compare TT = Compare TT 9 | 10 | type Compare' a = Compare a 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T6018/T6018.cabal: -------------------------------------------------------------------------------- 1 | name: T6018 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: T6018 9 | T6018a 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T6134.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | {-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, FunctionalDependencies #-} 3 | 4 | module T6134 where 5 | 6 | class C a b | a -> b 7 | 8 | f :: C Int b => Int -> Int 9 | f = undefined 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T700.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module T700 where 4 | 5 | -- These two should behave the same way 6 | 7 | f,g :: (forall a. Maybe a) -> (forall a. a) 8 | 9 | f x = case x of Just y -> y 10 | g (Just y) = y 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7050.hs: -------------------------------------------------------------------------------- 1 | module T7050 where 2 | 3 | data Foo a = Foo {-# UNPACK #-} !(Foo a) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7050.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/T7050.hs:3:14: warning: 3 | Ignoring unusable UNPACK pragma on the first argument of ‘Foo’ 4 | In the definition of data constructor ‘Foo’ 5 | In the data declaration for ‘Foo’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7171/T7171.cabal: -------------------------------------------------------------------------------- 1 | name: T7171 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , bytestring 9 | exposed-modules: T7171 10 | T7171a 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7268.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MonoLocalBinds, NoMonomorphismRestriction, RankNTypes #-} 2 | module T7268 where 3 | 4 | data X = X { a :: forall a . a -> Bool } 5 | 6 | ida :: forall b. b -> Bool 7 | X { a = ida } = error "urk" 8 | 9 | bar :: c -> Bool 10 | bar = ida 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7312.hs: -------------------------------------------------------------------------------- 1 | module T7312 where 2 | 3 | -- this works 4 | mac :: Double -> (Double->Double) -> (Double-> Double) 5 | mac ac m = \ x -> ac + x * m x 6 | 7 | -- this doesn't 8 | mac2 :: Double -> (->) Double Double -> (->) Double Double 9 | mac2 ac m = \ x -> ac + x * m x 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7384.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FunctionalDependencies, PolyKinds #-} 2 | 3 | module T7384 where 4 | 5 | class Baz a b | a -> b where 6 | bar :: a -> () 7 | 8 | instance Baz Bool Bool where 9 | bar _ = () 10 | 11 | foo = bar False 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7451.hs: -------------------------------------------------------------------------------- 1 | module T6117a where 2 | 3 | -- Tests that Lint does not complain about 4 | -- a mis-match between * and Constraint 5 | 6 | class B a where 7 | b :: a 8 | 9 | newtype Additive a = Additive a 10 | 11 | instance B a => B (Additive a) where 12 | b = Additive b 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7562.hs: -------------------------------------------------------------------------------- 1 | module T7562 where 2 | 3 | data Pair2 = Pair2 {-# UNPACK #-} Int 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7562.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/T7562.hs:3:14: warning: 3 | UNPACK pragma lacks '!' on the first argument of ‘Pair2’ 4 | In the definition of data constructor ‘Pair2’ 5 | In the data declaration for ‘Pair2’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/T7903.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | {-# LANGUAGE KindSignatures #-} 3 | 4 | module T7903 where 5 | 6 | instance Eq (((->) a :: * -> *) b) 7 | instance (Ord b) => Ord (((->) a) b) 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc001.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | a x = y+2 where y = x+3 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc002.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | b = if True then 1 else 2 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc004.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f x = case x of 4 | True -> True 5 | False -> x 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc005.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | g ((x:z),y) = x 4 | g (x,y) = 2 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc006.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | h = 1:h 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc007.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | j = 2 4 | 5 | k = 1:j:l 6 | 7 | l = 0:k 8 | 9 | m = j+j 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc008.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | n True = 1 4 | n False = 0 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc009.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | o (True,x) = x 4 | o (False,y) = y+1 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc010.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | p = [(y+2,True) | y <- [1,2]] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc011.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | x@_ = x 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc012.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | q = \ y -> y 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc013.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | (r,s) = (1,'a') 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc014.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | t = 1+t 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc015.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | u x = \ (y,z) -> x 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc016.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f x@_ y@_ = x 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc017.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | v | True = v+1 4 | | False = v 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc018.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | w = a where a = y 4 | y = 2 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc019.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | (al:am) = [y+1 | (y,z) <- [(1,2)]] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc020.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f x = a where a = x:a 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc021.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f x = a 4 | 5 | a = (x,x) 6 | 7 | x = x 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc022.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | main = iD iD 4 | 5 | iD x = x 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc023.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | main = s k k 4 | 5 | s f g x = f x (g x) 6 | 7 | k x y = x 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc024.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | main x = s k k x 4 | 5 | s f g x = f x (g x) 6 | 7 | k x y = x 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc025.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | g x = f (f True x) x where f x y = if x then y else (f x y) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc026.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | g x = f (f True x) x 4 | f x y = if x then y else (f x y) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc027.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | h x = f (f True x) x 4 | f x y = if x then y else (g y x) 5 | g y x = if x then y else (f x y) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc028.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | type H = (Int,Bool) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc029.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | type G = [Int] 4 | 5 | data K = H Bool | M G 6 | 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc030.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | type H = [Bool] 4 | 5 | type G = (H,Char) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc031.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data Rec = Node Int Rec 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc032.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data AList b = Node b [b] | Other (b,Char) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc033.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data Twine = Twine2 Twist 4 | 5 | data Twist = Twist2 Twine 6 | 7 | type F = Twine 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc034.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data AList a = ANull | ANode a (AList a) 4 | 5 | type IntList = AList Int 6 | 7 | g (ANull) = 2 8 | g (ANode b (ANode c d)) | b = 3 9 | | True = 4 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc035.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | type AnnExpr a = (a,Expr a) 4 | 5 | data Expr a = Var [Char] 6 | | App (AnnExpr a) (AnnExpr a) 7 | 8 | g (a,(Var name)) = [name] 9 | g (a,(App e1 e2)) = (g e1) ++ (g e2) 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc036.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class (Eq a) => A a where 4 | op1 :: a -> a 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc037.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class Eq' a where 4 | deq :: a -> a -> Bool 5 | 6 | instance (Eq' a) => Eq' [a] where 7 | deq [] [] = True 8 | deq (x:xs) (y:ys) = if (x `deq` y) then (deq xs ys) else False 9 | deq other1 other2 = False 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc038.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f (x:xs) = if (x == (fromInteger 2)) then xs else [] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc039.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class (Eq a) => A a where 4 | op1 :: a -> a 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc040.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | -- !!! tests the deduction of contexts. 4 | 5 | f :: (Eq a) => a -> [a] 6 | 7 | f x = g x 8 | where 9 | g y = if (y == x) then [] else [y] 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc041.hs: -------------------------------------------------------------------------------- 1 | -- !!! a very simple test of class and instance declarations 2 | 3 | module ShouldSucceed where 4 | 5 | class H a where 6 | op1 :: a -> a -> a 7 | 8 | instance H Bool where 9 | op1 x y = y 10 | 11 | f :: Bool -> Int -> Bool 12 | f x y = op1 x x 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc044.hs: -------------------------------------------------------------------------------- 1 | -- once produced a bug, here as regression test 2 | 3 | module ShouldSucceed where 4 | 5 | f _ | otherwise = () 6 | 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc046.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class C a where 4 | op1 :: a -> a 5 | 6 | class (C a) => B a where 7 | op2 :: a -> a -> a 8 | 9 | {- Failed hard in new tc with "No match in theta_class" -} 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc052.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | type A a = B a 4 | 5 | type B c = C 6 | 7 | type C = Int 8 | 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc053.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class Eq' a where 4 | deq :: a -> a -> Bool 5 | 6 | instance Eq' Int where 7 | deq x y = True 8 | 9 | instance (Eq' a) => Eq' [a] where 10 | deq (a:as) (b:bs) = if (deq a b) then (deq as bs) else False 11 | 12 | f x = deq x [1] 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc055.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | (x,y) = (\p -> p,\q -> q) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc056.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc056.hs:16:10: warning: [-Wduplicate-constraints (in -Wdefault)] 3 | Duplicate constraint(s): Eq' a 4 | In the context: (Eq' a, Eq' a) 5 | While checking an instance declaration 6 | In the instance declaration for ‘Eq' [a]’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc060.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class Eq2 a where 4 | deq :: a -> a -> Bool 5 | 6 | instance (Eq2 a) => Eq2 [a] where 7 | deq (a:as) (b:bs) = if (deq a b) then (deq as bs) else False 8 | 9 | 10 | instance Eq2 Int where 11 | deq x y = True 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc061.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class Eq1 a where 4 | deq :: a -> a -> Bool 5 | 6 | instance (Eq1 a) => Eq1 [a] where 7 | deq (a:as) (b:bs) = deq a b 8 | 9 | instance Eq1 Int where 10 | deq x y = True 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc062.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | class Eq1 a where 4 | deq :: a -> a -> Bool 5 | 6 | instance Eq1 Int where 7 | deq x y = True 8 | 9 | instance (Eq1 a) => Eq1 [a] where 10 | deq (a:as) (b:bs) = if (deq a b) then (deq as bs) else False 11 | 12 | f x (y:ys) = deq x ys 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc063.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data X a = Tag a 4 | 5 | class Reps r where 6 | f :: r -> r -> r 7 | 8 | instance Reps (X q) where 9 | -- f (Tag x) (Tag y) = Tag y 10 | f x y = y 11 | 12 | instance Reps Bool where 13 | f True True = True 14 | f x y = False 15 | 16 | g x = f x x 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc064.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data Boolean = FF | TT 4 | 5 | idb :: Boolean -> Boolean 6 | idb x = x 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc066.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | data Pair a b = MkPair a b 4 | f x = [ a | (MkPair c a) <- x ] 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc067.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | f [] = [] 4 | f (x:xs) = x : (f xs) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc069.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | x = 'a' 4 | (y:ys) = ['a','b','c'] where p = x 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc070.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | 4 | data Boolean = FF | TT 5 | 6 | 7 | idb :: Boolean -> Boolean 8 | idb x = x 9 | 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc073.hs: -------------------------------------------------------------------------------- 1 | 2 | module ShouldSucceed where 3 | 4 | f [] = [] 5 | f (x:xs) = x : (f xs) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc076.hs: -------------------------------------------------------------------------------- 1 | -- !!! scoping in list comprehensions right way 'round? 2 | -- a bug reported by Jon Hill 3 | -- 4 | module ShouldSucceed where 5 | 6 | x = [[True]] 7 | xs :: [Bool] 8 | xs = [x | x <- x, x <- x] 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc077.hs: -------------------------------------------------------------------------------- 1 | -- !!! make sure context of EQ is minimised in interface file. 2 | -- 3 | module ShouldSucceed where 4 | 5 | data NUM = ONE | TWO 6 | class (Num a) => ORD a 7 | 8 | class (ORD a, Show a) => EQ a where 9 | (===) :: a -> a -> Bool 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc078.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | 3 | -- !!! instance decls with no binds 4 | -- 5 | module ShouldFail where 6 | 7 | data Bar a = MkBar Int a 8 | 9 | instance Eq a => Eq (Bar a) 10 | instance Ord a => Ord (Bar a) 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc082.hs: -------------------------------------------------------------------------------- 1 | -- !!! tc082: an instance for functions 2 | -- 3 | module ShouldSucceed where 4 | 5 | class Normal a 6 | where 7 | normal :: a -> Bool 8 | 9 | instance Normal ( a -> b ) where 10 | normal _ = True 11 | 12 | f x = normal id 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc085.hs: -------------------------------------------------------------------------------- 1 | 2 | -- !!! From a bug report from Satnam. 3 | -- !!! To do with re-exporting importees from PreludeGla* modules. 4 | module ShouldSucceed ( module GHC.Prim ) where 5 | 6 | import GHC.Prim 7 | 8 | type FooType = Int 9 | data FooData = FooData 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc094.hs: -------------------------------------------------------------------------------- 1 | module ShouldSucceed where 2 | 3 | -- From a bug report by Sven Panne. 4 | 5 | foo = bar 6 | where bar = \_ -> (truncate boing, truncate boing) 7 | boing = 0 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc099.hs: -------------------------------------------------------------------------------- 1 | -- !! check if tc type substitutions really do 2 | -- !! clone (or if not, work around it by cloning 3 | -- !! all binders in first pass of the simplifier). 4 | module ShouldCompile where 5 | 6 | f,g :: Eq a => (a,b) 7 | f = g 8 | g = f 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc100.hs: -------------------------------------------------------------------------------- 1 | -- !!! Caused ghc-3.03 and 4.01 tc to enter a 2 | -- !!! a blackhole (as reported by P. Callaghan.) 3 | module ShouldCompile where 4 | 5 | type C a = D a -> a 6 | newtype D a = DD (D_ a) 7 | type D_ a = C (Maybe a) 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc104.hs: -------------------------------------------------------------------------------- 1 | -- !!! Checking that Main.main's type can now be of the form (IO a) 2 | module Main(main) where 3 | 4 | main = putStrLn "Hello" >> return (id) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc107.hs: -------------------------------------------------------------------------------- 1 | -- !!! Kind checking in a recursive situation 2 | -- Exposes a bug in proto-4.09 (black hole) 3 | 4 | module ShouldCompile where 5 | 6 | data ChItem = ChItemX Stream 7 | type Stream = ChItem 8 | 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc115.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc115.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit implementation for 4 | ‘foo’ 5 | In the instance declaration for ‘Foo [m a] (m a)’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc116.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc116.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit implementation for 4 | ‘foo’ 5 | In the instance declaration for ‘Foo [m a] (m a)’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc120.hs: -------------------------------------------------------------------------------- 1 | -- !!! Check that we can have a type for main that is more general than IO a 2 | 3 | -- main :: forall a.a certainly also has type IO a, so it should be fine. 4 | 5 | module Main(main) where 6 | 7 | main :: a 8 | main = error "not much luck" 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc143.hs: -------------------------------------------------------------------------------- 1 | -- These two declarations get their derived instances 2 | -- in two different ways 3 | 4 | module ShouldCompile where 5 | 6 | newtype Bar = Bar Int deriving Eq 7 | data Baz = Baz Bar deriving Eq 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc147.hs: -------------------------------------------------------------------------------- 1 | -- This one sent 5.03 into an infinite loop, because it 2 | -- gazed too deeply into the functional type of PP 3 | 4 | module ShouldCompile where 5 | 6 | newtype PP = PP (Int -> PP) 7 | 8 | foo = PP undefined 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc150.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} 2 | 3 | module ShouldCompile where 4 | 5 | f v = (\ (x :: forall a. a->a) -> True) id -- 'c' 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc153.hs: -------------------------------------------------------------------------------- 1 | -- No ScopedTypeVariables, so (v::a) means (v:: forall a.a) 2 | 3 | module ShouldCompile where 4 | 5 | data T a = T a 6 | 7 | instance Eq (T a) where 8 | (==) x y = let v :: a 9 | v = undefined 10 | in 11 | v 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc154.hs: -------------------------------------------------------------------------------- 1 | -- The type sig mentions a type variable that doesn't appear in 2 | -- the type. This one killed GHC 5.03, in a trivial way. 3 | 4 | module ShouldCompile where 5 | 6 | type T a = () -> () 7 | 8 | f :: T a 9 | f () = () 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc159.stdout: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc161.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc161.hs:17:10: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit implementation for 4 | ‘op’ 5 | In the instance declaration for ‘Foo Int’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc170/tc170.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc170 9 | Tc170_Aux 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc171.hs: -------------------------------------------------------------------------------- 1 | 2 | -- Data types with no constructors 3 | 4 | module ShouldCompile where 5 | 6 | data S 7 | data T a 8 | 9 | f :: [T a] -> Int 10 | f xs = length xs 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc172.hs: -------------------------------------------------------------------------------- 1 | module Test where 2 | 3 | class C s where 4 | foo :: (Int -> Int) -> s -> s 5 | 6 | instance C Int where 7 | foo = undefined --prevent warning 8 | 9 | bar _ = baz where 10 | baz :: C s => s -> s 11 | baz = foo baz 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc173/Tc173b.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UndecidableInstances #-} 2 | module Tc173b where 3 | 4 | import Tc173a 5 | 6 | is :: () 7 | is = isFormValue (Just "") -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc173/tc173.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc173a 9 | Tc173b 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc174.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | 3 | module ShouldCompile where 4 | 5 | f x = (# x, x #) :: (# Int, Int #) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc175.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc175.hs:13:10: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit implementation for 4 | either ‘showsPrec’ or ‘show’ 5 | In the instance declaration for ‘Show (a -> b)’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc182.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc182.hs:1:14: warning: 3 | -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc183/tc183.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , mtl 9 | exposed-modules: Tc183 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc185.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash, BangPatterns #-} 2 | 3 | -- Killed GHC 6.3 HEAD 4 | 5 | module Bug where 6 | import GHC.Base 7 | 8 | foo v = let !(I# x#) = 7 * 7 in "Forty-Two" -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc190.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE CPP, KindSignatures #-} 2 | 3 | -- The record update triggered a kind error in GHC 6.2 4 | 5 | module Foo where 6 | 7 | data HT (ref :: * -> *) 8 | = HT { kcount :: Int } 9 | 10 | set_kcount :: Int -> HT s -> HT s 11 | set_kcount kc ht = ht{kcount=kc} 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc191/tc191.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , syb 9 | , mtl 10 | exposed-modules: Tc191 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc193.hs: -------------------------------------------------------------------------------- 1 | 2 | -- A newtype representation problem crashed GHC 6.4 3 | 4 | module ShouldCompile where 5 | 6 | 7 | newtype Signal a = Signal Symbol 8 | 9 | newtype Symbol = Symbol (S Symbol) 10 | 11 | data S s = Bool Bool 12 | 13 | liftl :: Signal a -> Symbol 14 | liftl (Signal a) = a 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc194.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} 2 | 3 | -- Tests the special case of 4 | -- non-recursive, function binding, 5 | -- with no type signature 6 | 7 | module ShouldCompile where 8 | 9 | f = \ (x :: forall a. a->a) -> (x True, x 'c') 10 | 11 | g (x :: forall a. a->a) = x 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc198.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} 2 | 3 | -- This should work, because the type sig and the type 4 | -- in the pattern match exactly 5 | 6 | module Foo where 7 | 8 | foo :: (forall a. a -> b) -> b 9 | foo (f :: forall a. a -> b) = f undefined :: b 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc202.hs: -------------------------------------------------------------------------------- 1 | 2 | -- Tests that subFunTys works when the argument is a type of form (a ty1 ty2) 3 | 4 | module ShouldCompile where 5 | 6 | newtype StreamArrow a b c = Str (a [b] [c]) 7 | 8 | foo = Str $ (\x -> x) 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc203.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | {-# LANGUAGE RankNTypes #-} 3 | 4 | -- Check that we can have a forall after a forall 5 | 6 | module Foo4 where 7 | 8 | type AnyE a = forall err. Either err a 9 | 10 | foo :: Monad m => AnyE (m t) 11 | foo = undefined 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc209.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | 3 | -- Unboxed tuples; cf tcfail115, tcfail120 4 | 5 | module ShouldFail where 6 | 7 | type T a = Int -> (# Int, Int #) 8 | 9 | -- Should be ok 10 | h t = \x -> case t x of (# r, s #) -> r 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc210.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module ShouldCompile where 4 | 5 | f :: forall a. a -> forall b. b -> Int 6 | f = error "urk" 7 | 8 | -- Both these should be ok, but an early GHC 6.6 failed 9 | 10 | g1 = [ (+) :: Int -> Int -> Int, f ] 11 | g2 = [ f, (+) :: Int -> Int -> Int ] 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc212.hs: -------------------------------------------------------------------------------- 1 | 2 | -- This one crashed the 6.6 release candidate 3 | 4 | module ShouldCompile where 5 | 6 | -- A specialise pragma with no type signature 7 | fac n = fac (n + 1) 8 | {-# SPECIALISE fac :: Int -> Int #-} 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc217/tc217.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , mtl 9 | exposed-modules: Tc217 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc218.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImplicitParams #-} 2 | 3 | module ShouldCompile where 4 | 5 | bar :: (Show a, ?c::a) => String 6 | -- This type should not be reported as ambiguous 7 | -- See the call in 8 | bar = show ?c 9 | 10 | foo = let { ?c = 'x' } in bar 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc219.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImplicitParams, NoMonomorphismRestriction #-} 2 | 3 | module ShouldCompile where 4 | 5 | -- c.f. tc218.hs, only no type signature here 6 | -- Instead, the NoMonomorphismRestriction language 7 | bar = show ?c 8 | 9 | foo1 = let { ?c = 'x' } in bar 10 | foo2 = let { ?c = True } in bar 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc220/tc220.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , syb 9 | , mtl 10 | exposed-modules: Tc220 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc223/tc223.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , mtl 9 | exposed-modules: Tc223 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc225.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | -- Newtype in GADT syntax 4 | 5 | module ShouldCompile where 6 | 7 | newtype Bug a where Bug :: a -> Bug a 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc227.hs: -------------------------------------------------------------------------------- 1 | -- Ensure that tuple instances are brought into scope 2 | -- See Trac #1385 3 | 4 | module ShouldCompile where 5 | 6 | foo = (1,True) == (2,False) 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc230.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | {-# LANGUAGE ImplicitParams, RankNTypes #-} 3 | 4 | -- Trac #1445 5 | 6 | module Bug where 7 | 8 | f :: () -> (?p :: ()) => () -> () 9 | f _ _ = () 10 | 11 | g :: (?p :: ()) => () 12 | g = f () () 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc232/tc232.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | , mtl 9 | exposed-modules: Tc232 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc233.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# LANGUAGE RankNTypes #-} 3 | 4 | module ShouldCompile where 5 | 6 | newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a]) 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc234.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# OPTIONS_GHC -XLiberalTypeSynonyms #-} 3 | 4 | module ShouldCompile where 5 | 6 | type T a b = a 7 | type S m = m () 8 | 9 | f :: S (T Int) 10 | f = undefined 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc239/Tc239.hs: -------------------------------------------------------------------------------- 1 | -- {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} 2 | -- Trac #1072 3 | 4 | module Tc239 where 5 | 6 | import Tc239_Help 7 | 8 | f1 :: Show a => WrapIO e a 9 | f1 = return undefined 10 | 11 | f2 :: Show a => WrapIO2 a 12 | f2 = f1 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc239/tc239.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc239 9 | Tc239_Help 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc241.hs: -------------------------------------------------------------------------------- 1 | {-# OPTIONS_GHC -XGADTs -XRankNTypes -O1 #-} 2 | -- Trac #2018 3 | 4 | module Bug1 where 5 | 6 | data A a where 7 | MkA :: A () 8 | 9 | class C w where 10 | f :: forall a . w a -> Maybe a 11 | 12 | instance C A where 13 | f MkA = Just () 14 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc243.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# OPTIONS_GHC -Wall #-} 3 | 4 | module Bug where 5 | 6 | -- When we warn about this, we give a warning saying 7 | -- Inferred type: (.+.) :: forall a. a 8 | -- but we used to not print the parentheses. 9 | 10 | (.+.) = undefined 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc243.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc243.hs:10:1: warning: [-Wmissing-signatures (in -Wall)] 3 | Top-level binding with no type signature: (.+.) :: forall t. t 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc245/Tc245.hs: -------------------------------------------------------------------------------- 1 | -- Test for trac #2937 2 | 3 | {-# LANGUAGE GADTs, TypeFamilies #-} 4 | 5 | module Tc245 where 6 | 7 | import Tc245A 8 | 9 | instance Foo Int where 10 | data Bar Int x where 11 | Baz :: Bar Int String 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc245/Tc245A.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# LANGUAGE TypeFamilies #-} 3 | module Tc245A where 4 | class Foo a where 5 | data Bar a :: * -> * 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc245/tc245.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc245 9 | Tc245A 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc245/tc245.stdout: -------------------------------------------------------------------------------- 1 | [1 of 2] Compiling Tc245_A ( Tc245_A.hs, Tc245_A.o ) 2 | [2 of 2] Compiling Tc245 ( tc245.hs, tc245.o ) 3 | [2 of 2] Compiling Tc245 ( tc245.hs, tc245.o ) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc246.hs: -------------------------------------------------------------------------------- 1 | -- Test for trac #3066 2 | -- GHC with optimisation off would go into an infinite loop 3 | 4 | module Tc246 () where 5 | 6 | newtype Foo = Foo Foo 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc247.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs, EmptyDataDecls, KindSignatures #-} 2 | 3 | module ShouldCompile where 4 | 5 | -- Various forms of empty data type declarations 6 | 7 | data T1 8 | 9 | data T2 where 10 | 11 | data T3 :: * -> * 12 | 13 | data T4 a :: * -> * 14 | 15 | data T5 a :: * -> * where 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc248.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExplicitForAll #-} 2 | 3 | module ShouldCompile where 4 | 5 | identity :: forall a. a -> a 6 | identity x = x 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc249.hs: -------------------------------------------------------------------------------- 1 | module Ctx where 2 | 3 | f :: (Monad m, Eq (m a)) => a -> m a -> Bool 4 | f x y = (return x == y) 5 | 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc254.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | {-# OPTIONS_GHC -fwarn-missing-methods #-} 3 | module AssocTyDef01 where 4 | 5 | class Cls a where 6 | type Typ a 7 | 8 | instance Cls Int where 9 | -- No default: should get warning -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc254.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc254.hs:8:1: warning: [-Wmissing-methods (in -Wdefault)] 3 | No explicit associated type or default declaration for ‘Typ’ 4 | In the instance declaration for ‘Cls Int’ 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc261.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeOperators #-} 2 | module TcOK where 3 | 4 | newtype (f <.> g) a = Compose (f (g a)) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc263/Tc263_Help.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} 2 | 3 | module Tc263_Help where 4 | 5 | class C a b where foo :: (a,b) 6 | 7 | instance C [Int] b where foo = undefined 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc263/tc263.cabal: -------------------------------------------------------------------------------- 1 | name: tc263 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | executable tc263 7 | main-is: Tc263.hs 8 | build-depends: base 9 | exposed-modules: Tc263_Help 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc264.stderr: -------------------------------------------------------------------------------- 1 | [1 of 1] Compiling ShouldCompile[sig of Data.STRef] ( tc264.hsig, nothing ) 2 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc265.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE TypeFamilies #-} 2 | 3 | module Tc265 where 4 | 5 | data T a = MkT (F a) 6 | type family F a where 7 | F (T a) = a 8 | F (T Int) = Bool 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc265.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/compile/tc265.hs:8:3: warning: 3 | Overlapped type family instance equation: 4 | F (T Int) = Bool 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc266/Tc266.hs: -------------------------------------------------------------------------------- 1 | module Tc266 where 2 | import Tc266a 3 | data T = T 4 | f = T 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc266/Tc266.hs-boot: -------------------------------------------------------------------------------- 1 | module Tc266 where 2 | data T 3 | f :: T 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc266/Tc266a.hs: -------------------------------------------------------------------------------- 1 | module Tc266a where 2 | import {-# SOURCE #-} Tc266 3 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc266/tc266.cabal: -------------------------------------------------------------------------------- 1 | name: tc266 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc266 9 | Tc266a 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc267/Tc267a.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | module Tc267a where 3 | import {-# SOURCE #-} Tc267b 4 | data T = T deriving (Show) 5 | data S = S 6 | x = y 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc267/Tc267a.hs-boot: -------------------------------------------------------------------------------- 1 | module Tc267a where 2 | data T 3 | data S 4 | instance Show T 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc267/Tc267b.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveDataTypeable #-} 2 | module Tc267b where 3 | import Tc267a 4 | y = S 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc267/Tc267b.hs-boot: -------------------------------------------------------------------------------- 1 | module Tc267b where 2 | import {-# SOURCE #-} Tc267a 3 | y :: S 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc267/tc267.cabal: -------------------------------------------------------------------------------- 1 | name: tc267 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc267a 9 | Tc267b 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc268.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE KindSignatures #-} 2 | {-# LANGUAGE ConstraintKinds #-} 3 | module Tc268 where 4 | import GHC.Exts 5 | type A = (() :: Constraint) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc271/Tc271.hs: -------------------------------------------------------------------------------- 1 | module Tc271 where 2 | 3 | import Tc271a 4 | 5 | class K a where 6 | f :: a -> a 7 | g :: a -> a 8 | 9 | h :: K a => a -> a 10 | h = f . g . h2 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc271/Tc271.hs-boot: -------------------------------------------------------------------------------- 1 | module Tc271 where 2 | 3 | class K a where 4 | 5 | h :: K a => a -> a 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc271/Tc271a.hs: -------------------------------------------------------------------------------- 1 | module Tc271a where 2 | import {-# SOURCE #-} Tc271 3 | 4 | h2 :: K a => a -> a 5 | h2 = h 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tc271/tc271.cabal: -------------------------------------------------------------------------------- 1 | name: tc271 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | exposed-modules: Tc271 9 | Tc271a 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/compile/tcfail123/tcfail126.cabal: -------------------------------------------------------------------------------- 1 | name: tc271 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base, 8 | mtl 9 | exposed-modules: Tcfail126 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail001.hs: -------------------------------------------------------------------------------- 1 | -- !!! This should fail with a type error: the instance method 2 | -- !!! has a function type when it should have the type [a]. 3 | module ShouldFail where 4 | 5 | class A a where 6 | op :: a 7 | 8 | instance (A a, A a) => A [a] where 9 | op [] = [] 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail002.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | c (x:y) = x 4 | c z = z 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail003.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | (d:e) = [1,'a'] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail003.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail003.hs:3:10: error: 3 | No instance for (Num Char) arising from the literal ‘1’ 4 | In the expression: 1 5 | In the expression: [1, 'a'] 6 | In a pattern binding: (d : e) = [1, 'a'] 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail004.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | (f,g) = (1,2,3) 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail005.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | (h:i) = (1,'a') 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail006.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | (j,k) = case (if True then True else False) of 4 | True -> (True,1) 5 | False -> (1,True) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail006.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail006.hs:4:24: error: 3 | No instance for (Num Bool) arising from the literal ‘1’ 4 | In the expression: 1 5 | In the expression: (True, 1) 6 | In a case alternative: True -> (True, 1) 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail007.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | n x | True = x+1 4 | | False = True 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail007.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail007.hs:3:15: error: 3 | No instance for (Num Bool) arising from a use of ‘+’ 4 | In the expression: x + 1 5 | In an equation for ‘n’: 6 | n x 7 | | True = x + 1 8 | | False = True 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail008.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | o = 1:2 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail009.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | p = [(1::Int)..(2::Integer)] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail009.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail009.hs:3:17: error: 3 | Couldn't match expected type ‘Int’ with actual type ‘Integer’ 4 | In the expression: (2 :: Integer) 5 | In the expression: [(1 :: Int) .. (2 :: Integer)] 6 | In an equation for ‘p’: p = [(1 :: Int) .. (2 :: Integer)] 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail010.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | q = \ (y:z) -> z+2 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail010.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail010.hs:3:17: error: 3 | No instance for (Num [t0]) arising from a use of ‘+’ 4 | In the expression: z + 2 5 | In the expression: \ (y : z) -> z + 2 6 | In an equation for ‘q’: q = \ (y : z) -> z + 2 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail011.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | z = \y -> x x where x = y 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail011.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail011.hs:3:25: error: 3 | Not in scope: ‘y’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail012.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | True = [] 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail012.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail012.hs:3:8: error: 3 | Couldn't match expected type ‘Bool’ with actual type ‘[t0]’ 4 | In the expression: [] 5 | In a pattern binding: True = [] 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail013.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f [] = 1 4 | f True = 2 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail014.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f x = g+1 4 | where g y = h+2 5 | where h z = z z 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail015.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | data AList a = ANull | ANode a (AList a) 4 | 5 | type IntList = AList Int 6 | 7 | g (ANull) = 2 8 | g (ANode b (ANode c d)) | b = c+1 9 | | otherwise = 4 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail015.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail015.hs:7:13: error: 3 | No instance for (Num Bool) arising from the literal ‘2’ 4 | In the expression: 2 5 | In an equation for ‘g’: g (ANull) = 2 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail016.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | type AnnExpr a = (a,Expr a) 4 | 5 | data Expr a = Var [Char] 6 | | App (AnnExpr a) (AnnExpr a) 7 | 8 | g (Var name) = [name] 9 | g (App e1 e2) = (g e1)++(g e2) 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail017.hs: -------------------------------------------------------------------------------- 1 | 2 | module ShouldFail where 3 | 4 | class C a where 5 | op1 :: a -> a 6 | 7 | class (C a) => B a where 8 | op2 :: a -> a -> a 9 | 10 | instance (B a) => B [a] where 11 | op2 xs ys = xs 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail018.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | module ShouldFail where 4 | 5 | (a:[]) = 1 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail018.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail018.hs:5:10: error: 3 | No instance for (Num [t0]) arising from the literal ‘1’ 4 | In the expression: 1 5 | In a pattern binding: (a : []) = 1 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail019.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail019.hs:18:10: error: 3 | No instance for (C [a]) 4 | arising from the superclasses of an instance declaration 5 | In the instance declaration for ‘D [a]’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail020.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | class A a where 4 | p1 :: a -> a 5 | p2 :: a -> a -> a 6 | 7 | class (A b) => B b where 8 | p3 :: b 9 | 10 | instance (A a) => B [a] where 11 | p3 = [] 12 | 13 | data X = XC --, causes stack dump 14 | 15 | --instance B Bool where 16 | -- p3 = True 17 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail021.hs: -------------------------------------------------------------------------------- 1 | -- !!! Illegally giving methods in a pattern binding (for no v good reason...) 2 | 3 | module ShouldFail where 4 | 5 | data Foo = MkFoo Int 6 | 7 | instance Eq Foo where 8 | ((==), (/=)) = (\x -> \y -> True, \x -> \y -> False) 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail021.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail021.hs:8:5: error: 3 | Pattern bindings (except simple variables) not allowed in instance declarations 4 | ((==), (/=)) = (\ x -> \ y -> True, \ x -> \ y -> False) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail023.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! Duplicate instances 4 | 5 | data B = C 6 | 7 | class A a where 8 | op :: a -> Bool 9 | 10 | instance A B where 11 | op C = True 12 | 13 | instance A B where 14 | op C = True 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail023.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail023.hs:10:10: error: 3 | Duplicate instance declarations: 4 | instance A B 5 | -- Defined at tests/suite/typecheck/fail/tcfail023.hs:10:10 6 | instance A B 7 | -- Defined at tests/suite/typecheck/fail/tcfail023.hs:13:10 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail025.stderr: -------------------------------------------------------------------------------- 1 | 2 | tcfail025.hs:2: 3 | Conflicting exports for local name: A 4 | module Main 5 | module Main 6 | 7 | 8 | Compilation had errors 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail026.stderr: -------------------------------------------------------------------------------- 1 | 2 | tcfail026.hs:2: 3 | Conflicting exports for local name: A 4 | module Main 5 | module Main 6 | 7 | tcfail026.hs:6: 8 | Class type variable ``a'' does not appear in method signature: 9 | op2 :: 10 | `b' -> `b' 11 | 12 | 13 | Compilation had errors 14 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail027.hs: -------------------------------------------------------------------------------- 1 | -- !!! tests for CycleErr in classes 2 | module TcFail where 3 | 4 | class (B a) => A a where 5 | op1 :: a -> a 6 | 7 | class (A a) => B a where 8 | op2 :: a -> a -> a 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail028.hs: -------------------------------------------------------------------------------- 1 | -- !!! tests for ArityErr 2 | module TcFail where 3 | 4 | data A a b = B (A a) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail028.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail028.hs:4:17: error: 3 | Expecting one more argument to ‘A a’ 4 | Expected a type, but ‘A a’ has kind ‘k0 -> *’ 5 | In the type ‘A a’ 6 | In the definition of data constructor ‘B’ 7 | In the data declaration for ‘A’ 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail029.hs: -------------------------------------------------------------------------------- 1 | -- !!! tests for InstOpErr 2 | module ShouldFail where 3 | 4 | data Foo = Bar | Baz 5 | 6 | f x = x > Bar 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail029.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail029.hs:6:9: error: 3 | No instance for (Ord Foo) arising from a use of ‘>’ 4 | In the expression: x > Bar 5 | In an equation for ‘f’: f x = x > Bar 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail030.hs: -------------------------------------------------------------------------------- 1 | -- !!! empty file 2 | 3 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail030.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail030.hs:1:1: error: 3 | The IO action ‘main’ is not defined in module ‘Main’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail031.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f x = if 'a' then 1 else 2 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail031.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail031.hs:3:10: error: 3 | Couldn't match expected type ‘Bool’ with actual type ‘Char’ 4 | In the expression: 'a' 5 | In the expression: if 'a' then 1 else 2 6 | In an equation for ‘f’: f x = if 'a' then 1 else 2 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail033.hs: -------------------------------------------------------------------------------- 1 | -- from Jon Hill 2 | module ShouldFail where 3 | 4 | buglet = [ x | (x,y) <- buglet ] 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail035.hs: -------------------------------------------------------------------------------- 1 | -- !!! instances with empty where parts: duplicate 2 | -- 3 | module ShouldFail where 4 | 5 | data NUM = ONE | TWO 6 | instance Num NUM 7 | instance Num NUM 8 | instance Eq NUM 9 | instance Show NUM 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail035.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail035.hs:6:10: error: 3 | Duplicate instance declarations: 4 | instance Num NUM 5 | -- Defined at tests/suite/typecheck/fail/tcfail035.hs:6:10 6 | instance Num NUM 7 | -- Defined at tests/suite/typecheck/fail/tcfail035.hs:7:10 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail036.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances #-} 2 | 3 | -- !!! prelude class name in an instance-tycon position 4 | -- 5 | module ShouldFail where 6 | 7 | data NUM = ONE | TWO 8 | instance Num NUM 9 | where ONE + ONE = TWO 10 | instance Num NUM 11 | instance Eq Num 12 | --instance Text Num 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail037.hs: -------------------------------------------------------------------------------- 1 | -- !!! PreludeCore entities cannot be redefined at the top-level 2 | -- 3 | module ShouldFail where 4 | 5 | data NUM = ONE | TWO 6 | 7 | f a b = a + b 8 | f :: NUM -> NUM -> NUM 9 | 10 | ONE + ONE = TWO 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail038.hs: -------------------------------------------------------------------------------- 1 | -- !!! duplicate class-method declarations 2 | 3 | module ShouldFail where 4 | 5 | data NUM = ONE | TWO 6 | instance Eq NUM where 7 | a == b = True 8 | a /= b = False 9 | a == b = False 10 | a /= b = True 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail041.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ImplicitParams #-} 2 | 3 | module ShouldFail where 4 | 5 | class (?imp :: Int) => D t where 6 | methodD :: t -> t 7 | 8 | -- Don't repeat implicit parameter constraint on the instance 9 | instance D Int where 10 | methodD x = x + ?imp 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail041.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail041.hs:5:1: error: 3 | Illegal implicit parameter ‘?imp::Int’ 4 | In the context: (?imp::Int) 5 | While checking the super-classes of class ‘D’ 6 | In the class declaration for ‘D’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail047.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | class A a where 4 | op1 :: a -> a 5 | 6 | instance A (a,(b,c)) where 7 | op1 a = a 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail048.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | class (B a) => C a where 4 | op1 :: a -> a 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail048.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail048.hs:3:8: error: 3 | Not in scope: type constructor or class ‘B’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail049.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f x = g x 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail049.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail049.hs:3:7: error: 3 | Not in scope: ‘g’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail050.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f x = B x 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail050.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail050.hs:3:7: error: 3 | Not in scope: data constructor ‘B’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail051.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | instance B Bool where 4 | op1 a = a 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail051.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail051.hs:3:10: error: 3 | Not in scope: type constructor or class ‘B’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail052.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | data C a = B a c 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail052.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail052.hs:3:16: error: 3 | Not in scope: type variable ‘c’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail053.hs: -------------------------------------------------------------------------------- 1 | module TcFail where 2 | 3 | data B = C A 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail053.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail053.hs:3:12: error: 3 | Not in scope: type constructor or class ‘A’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail054.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f (B a) = True 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail054.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail054.hs:3:4: error: 3 | Not in scope: data constructor ‘B’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail055.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | f x = (x + 1 :: Int) :: Float 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail055.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail055.hs:3:8: error: 3 | Couldn't match expected type ‘Float’ with actual type ‘Int’ 4 | In the expression: (x + 1 :: Int) :: Float 5 | In an equation for ‘f’: f x = (x + 1 :: Int) :: Float 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail056.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | data Foo = MkFoo Bool 4 | 5 | instance Eq Foo where 6 | (MkFoo x) == (MkFoo y) = x == y 7 | 8 | instance Eq Foo where 9 | -- forgot to type "Ord" above 10 | (MkFoo x) <= (MkFoo y) = x <= y 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail056.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail056.hs:10:15: error: 3 | ‘<=’ is not a (visible) method of class ‘Eq’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail057.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! inadvertently using -> instead of => 4 | 5 | f :: (RealFrac a) -> a -> a 6 | f x = x 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail057.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail057.hs:5:7: error: 3 | Expected a type, but ‘RealFrac a’ has kind ‘GHC.Prim.Constraint’ 4 | In the type signature for ‘f’: f :: (RealFrac a) -> a -> a 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail058.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | import Data.Array 3 | 4 | -- !!! inadvertently using => instead of -> 5 | 6 | f :: (Array a) => a -> b 7 | f x = x 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail058.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail058.hs:6:7: error: 3 | Expecting one more argument to ‘Array a’ 4 | Expected a constraint, but ‘Array a’ has kind ‘* -> *’ 5 | In the type signature for ‘f’: f :: (Array a) => a -> b 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail061.hs: -------------------------------------------------------------------------------- 1 | -- !! signature bugs exposed by Sigbjorn Finne 2 | -- 3 | module ShouldFail where 4 | 5 | type Flarp a = (b,b) 6 | 7 | --More fun can be had if we change the signature slightly 8 | 9 | type Bob a = a 10 | 11 | type Flarp2 a = Bob (b,b) 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail063.hs: -------------------------------------------------------------------------------- 1 | -- !!! no type variable on a context 2 | -- !!! reported by Sigbjorn Finne 3 | 4 | module ShouldFail where 5 | 6 | moby :: Num => Int -> a -> Int 7 | moby x y = x+y 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail063.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail063.hs:6:9: error: 3 | Expecting one more argument to ‘Num’ 4 | Expected a constraint, 5 | but ‘Num’ has kind ‘* -> GHC.Prim.Constraint’ 6 | In the type signature for ‘moby’: moby :: Num => Int -> a -> Int 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail069.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail069.hs:21:7: error: 3 | Couldn't match expected type ‘([Int], [Int])’ 4 | with actual type ‘[t0]’ 5 | In the pattern: [] 6 | In a case alternative: [] -> error "foo" 7 | In the expression: case (list1, list2) of { [] -> error "foo" } 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail070.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail070.hs:15:15: error: 3 | ‘[Int]’ is applied to too many type arguments 4 | In the type ‘[Int] Bool’ 5 | In the type declaration for ‘State’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail071.stderr: -------------------------------------------------------------------------------- 1 | ExitSuccess 2 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail073.hs: -------------------------------------------------------------------------------- 1 | -- what error do you get if you redefined Prelude instances? 2 | 3 | module ShouldFail where 4 | 5 | f :: (Eq a) => (a,a) -> (a,a) -> Bool 6 | f x y = x == y 7 | 8 | instance Eq a => Eq (a,b) where 9 | (m,n) == (o,p) = m == o 10 | 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail073.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail073.hs:8:10: error: 3 | Duplicate instance declarations: 4 | instance Eq a => Eq (a, b) 5 | -- Defined at tests/suite/typecheck/fail/tcfail073.hs:8:10 6 | instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail075.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail075.hs:10:1: error: 3 | Top-level bindings for unlifted types aren't allowed: x = 1# 4 | 5 | tests/suite/typecheck/fail/tcfail075.hs:13:1: error: 6 | Top-level bindings for unlifted types aren't allowed: y = x +# 1# 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail077.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! declaring a default method in a class that doesn't have that method. 4 | 5 | class Foo a where 6 | op :: a -> a 7 | 8 | op2 x = x -- Bogus declaration 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail077.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail077.hs:8:3: error: 3 | ‘op2’ is not a (visible) method of class ‘Foo’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail078.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! Using a type constructor as a class name 4 | 5 | f :: Integer i => i 6 | f = 0 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail078.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail078.hs:5:6: error: 3 | ‘Integer’ is applied to too many type arguments 4 | In the type signature for ‘f’: f :: Integer i => i 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail079.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | module ShouldFail where 4 | 5 | -- !!! unboxed field in newtype declaration 6 | 7 | import GHC.Exts ( Int# ) 8 | 9 | newtype Unboxed = Unboxed Int# 10 | 11 | f = [ Unboxed 1#, Unboxed 2# ] -- shouldn't be allowed! 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail079.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail079.hs:9:27: error: 3 | Expecting a lifted type, but ‘Int#’ is unlifted 4 | In the type ‘Int#’ 5 | In the definition of data constructor ‘Unboxed’ 6 | In the newtype declaration for ‘Unboxed’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail082.hs: -------------------------------------------------------------------------------- 1 | module Main(main) where 2 | import Data82 3 | import Inst82_1 4 | import Inst82_2 5 | 6 | data Baz = Baz deriving Read 7 | 8 | main = print ((read "FooData")::FooData) 9 | 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail084.hs: -------------------------------------------------------------------------------- 1 | -- !!! Check that using a label belonging to another constructor 2 | -- !!! is flagged as being incorrect. 3 | module ShouldFail where 4 | 5 | data F 6 | = F { x :: Int } 7 | | G { y :: Int } 8 | 9 | z :: F 10 | z = F { y = 2 } 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail084.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail084.hs:10:5: error: 3 | Constructor ‘F’ does not have field ‘y’ 4 | In the expression: F {y = 2} 5 | In an equation for ‘z’: z = F {y = 2} 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail085.hs: -------------------------------------------------------------------------------- 1 | -- !!! Check that not supplying bindings for strict fields 2 | -- !!! is flagged as being incorrect. 3 | module ShouldFail where 4 | 5 | data F 6 | = F { x :: Int, y :: !Int } 7 | 8 | z :: F 9 | z = F { x = 2 } 10 | 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail085.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail085.hs:9:5: error: 3 | Constructor ‘F’ does not have the required strict field(s): y 4 | In the expression: F {x = 2} 5 | In an equation for ‘z’: z = F {x = 2} 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail086.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExistentialQuantification #-} 2 | 3 | -- !!! Check that we can't derive instances of existential types 4 | module ShouldFail where 5 | 6 | data Ex = forall a. Ex [a] deriving( Eq ) 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail086.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail086.hs:6:38: error: 3 | Can't make a derived instance of ‘Eq Ex’: 4 | Constructor ‘Ex’ has existentials or constraints in its type 5 | Possible fix: use a standalone deriving declaration instead 6 | In the data declaration for ‘Ex’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail088.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail088.hs:9:19: error: 3 | Illegal polymorphic or qualified type: forall s. T s a 4 | In the instance declaration for ‘Ord (forall s. T s a)’ 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail089.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | -- !!! Check non-constructors in patterns fail tidily 4 | -- !!! The -O made ghc 4.08 go into a loop! 5 | -- Unfortunately the -O has to go in the Makefile 6 | 7 | module ShouldFail where 8 | 9 | compute :: String -> String 10 | compute ("hd" ++ _) = "_" 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail089.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail089.hs:10:10: error: 3 | Parse error in pattern: "hd" ++ _ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail090.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | module ShouldFail where 4 | 5 | import GHC.Base 6 | 7 | my_undefined :: a -- This one has kind *, not OpenKind 8 | my_undefined = undefined 9 | 10 | die :: Int -> ByteArray# 11 | die _ = my_undefined 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail090.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail090.hs:11:9: error: 3 | Couldn't match kind ‘*’ with ‘#’ 4 | When matching types 5 | a0 :: * 6 | ByteArray# :: # 7 | In the expression: my_undefined 8 | In an equation for ‘die’: die _ = my_undefined 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail091.stderr: -------------------------------------------------------------------------------- 1 | 2 | tcfail091.hs:8:1: 3 | Illegal constraint ?imp::Int 4 | In the context: (?imp::Int) 5 | While checking the super-classes of class `C' 6 | In the class declaration for `C' 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail092.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ParallelListComp #-} 2 | 3 | -- !!! Illegal conflicting parallel bindings 4 | 5 | module ShouldFail where 6 | 7 | xys = [ () | let a = 13 | let a = 17 ] 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail092.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail092.hs:7:27: error: 3 | Duplicate binding in parallel list comprehension for: ‘a’ 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail094.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | module ShouldFail where 4 | 5 | -- This nonsense tickled a missing-kind-check error in ghc5.00.2 6 | 7 | type A = Int 1 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail094.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail094.hs:7:14: error: 3 | Illegal type: ‘1’ Perhaps you intended to use DataKinds 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail095.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | -- !!! Test top-level unboxed types 4 | 5 | module ShouldFail where 6 | 7 | import GHC.Base 8 | 9 | x = 1# 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail095.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail095.hs:9:1: error: 3 | Top-level bindings for unlifted types aren't allowed: x = 1# 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail097.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! Ambiguous constraint in type signature 4 | 5 | f :: Eq a => Int -> Int 6 | f x = x 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail099.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExistentialQuantification #-} 2 | 3 | -- This bogus program slipped past GHC 5.02! 4 | 5 | module ShouldFail where 6 | 7 | data DS = forall a. C (a -> Int) 8 | 9 | call (C f) arg = f arg 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail100.hs: -------------------------------------------------------------------------------- 1 | -- This one broke GHC 5.02, because of the unsaturated 2 | -- uses of type synonyms, which are nevertheless kind-correct. 3 | 4 | module ShouldCompile where 5 | 6 | type A i = i 7 | type B = A 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail100.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail100.hs:7:1: error: 3 | Type synonym ‘A’ should have 1 argument, but has been given none 4 | In the type declaration for ‘B’ 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail101.hs: -------------------------------------------------------------------------------- 1 | -- This one broke GHC 5.02, because of the unsaturated 2 | -- uses of type synonyms, which are nevertheless kind-correct. 3 | 4 | module ShouldCompile where 5 | 6 | type A i = i 7 | data T k = MkT (k Int) 8 | 9 | f :: T A -- BAD! 10 | f = error "foo" 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail101.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail101.hs:9:6: error: 3 | Type synonym ‘A’ should have 1 argument, but has been given none 4 | In the type signature for ‘f’: f :: T A 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail102.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DatatypeContexts #-} 2 | module ShouldFail where 3 | 4 | import Data.Ratio 5 | 6 | data Integral a => P a = P { p :: a } 7 | 8 | f :: Integral a => P (Ratio a) -> P (Ratio a) 9 | f x = x { p = p x } 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail106.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail106.hs:14:10: error: 3 | No instance for (S Int) 4 | arising from the superclasses of an instance declaration 5 | In the instance declaration for ‘D Int’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail107.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail107.hs:13:9: error: 3 | Type synonym ‘Const’ should have 2 arguments, but has been given 1 4 | In the type signature for ‘test’: 5 | test :: Thing (Const Int) -> Thing (Const Int) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail108.hs: -------------------------------------------------------------------------------- 1 | -- The instance decl is illegal without UndecidableInstances 2 | 3 | module ShouldFail where 4 | 5 | data Rec f = In (f (Rec f)) 6 | 7 | instance Eq (f (Rec f)) => Eq (Rec f) where 8 | (In x) == (In y) = x == y 9 | 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail109.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail109.hs:16:10: error: 3 | No instance for (Eq Stupid) 4 | arising from the superclasses of an instance declaration 5 | In the instance declaration for ‘Collects Bool Stupid’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail110.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module ShouldCompile where 4 | 5 | data Foo a b = Foo { foo :: a -> b } 6 | 7 | -- kind error in here 8 | bar :: String -> (forall a . Foo a) -> IO () 9 | bar s _ = putStrLn s 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail110.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail110.hs:8:30: error: 3 | Expecting one more argument to ‘Foo a’ 4 | Expected a type, but ‘Foo a’ has kind ‘* -> *’ 5 | In the type signature for ‘bar’: 6 | bar :: String -> (forall a. Foo a) -> IO () 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail114.hs: -------------------------------------------------------------------------------- 1 | -- Killed GHC 5.04.2 2 | 3 | module ShouldFail where 4 | 5 | class Foo a where 6 | foo :: a -> () 7 | 8 | data Bar = Bar { bar :: () } 9 | 10 | test :: Bar 11 | test = undefined { foo = () } 12 | -- The point is that foo is a class method, 13 | -- but not a record selector 14 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail114.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail114.hs:11:20: error: 3 | ‘foo’ is not a record selector 4 | In the expression: undefined {foo = ()} 5 | In an equation for ‘test’: test = undefined {foo = ()} 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail116.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- in Haskell 98, methods must mention the class variable 4 | -- (SourceForge bug #756454). 5 | class Foo a where 6 | bug :: () 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail116.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail116.hs:5:1: error: 3 | The class method ‘bug’ 4 | mentions none of the type or kind variables of the class ‘Foo a’ 5 | When checking the class method: bug :: () 6 | In the class declaration for ‘Foo’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail117.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- Without any extensions enabled both of these should fail 4 | 5 | newtype N1 = N1 Int deriving ( Enum ) 6 | data N2 = N2 Int deriving ( Enum ) 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail119.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail119.hs:11:8: error: 3 | Couldn't match expected type ‘Bool’ with actual type ‘[Char]’ 4 | In the pattern: "Foo" 5 | In an equation for ‘b’: b x "Foo" = () 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail122.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, KindSignatures #-} 2 | 3 | module ShouldFail where 4 | 5 | -- There should be a kind error, when unifying (a b) against (c d) 6 | 7 | foo = [ undefined :: forall a b. a b, 8 | undefined :: forall (c:: (* -> *) -> *) (d :: * -> *). c d ] 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail123.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | module ShouldFail where 4 | 5 | -- The danger here is getting a type like 6 | -- f :: forall (a::??). a -> Bool 7 | -- and hence allowing the bogus calls that follow 8 | 9 | f x = True 10 | 11 | h v = f 3# 12 | -- h v = (f 3#, f 4.3#, f True) 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail127.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | foo :: IO (Num a => a -> a) 4 | foo = error "urk" 5 | 6 | -- baz :: (Num a => a -> a) -> Int 7 | -- baz = error "urk" 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail127.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail127.hs:3:8: error: 3 | Illegal polymorphic or qualified type: Num a => a -> a 4 | Perhaps you intended to use ImpredicativeTypes 5 | In the type signature for ‘foo’: foo :: IO (Num a => a -> a) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail130.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail130.hs:10:7: error: 3 | Unbound implicit parameter (?x::Int) arising from a use of ‘woggle’ 4 | In the expression: woggle 3 5 | In an equation for ‘foo’: foo = woggle 3 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail131.hs: -------------------------------------------------------------------------------- 1 | -- Error message in monomorphic case 2 | 3 | module ShouldFail where 4 | 5 | f = (*) -- Monomorphic 6 | g :: Num b => b -> b 7 | g x = f x x 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail132.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail132.hs:17:37: error: 3 | The first argument of ‘T’ should have kind ‘* -> * -> * -> *’, 4 | but ‘Object f' f t’ has kind ‘* -> * -> *’ 5 | In the type ‘T (Object f' f t) (DUnit t)’ 6 | In the type declaration for ‘LiftObject’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail134.hs: -------------------------------------------------------------------------------- 1 | -- Class used as a type, recursively 2 | 3 | module ShouldFail where 4 | 5 | class XML a where toXML :: a -> XML -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail134.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail134.hs:5:33: error: 3 | Expecting one more argument to ‘XML’ 4 | Expected a type, but ‘XML’ has kind ‘* -> GHC.Prim.Constraint’ 5 | In the type ‘a -> XML’ 6 | In the class declaration for ‘XML’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail135.hs: -------------------------------------------------------------------------------- 1 | -- A missing kind check made GHC 6.4 crash on this one 2 | 3 | module ShouldFail where 4 | 5 | class Foo f where 6 | baa :: f a -> f 7 | 8 | instance Foo Maybe where 9 | baa z = z 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail135.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail135.hs:6:23: error: 3 | Expecting one more argument to ‘f’ 4 | Expected a type, but ‘f’ has kind ‘k0 -> *’ 5 | In the type ‘f a -> f’ 6 | In the class declaration for ‘Foo’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail136.hs: -------------------------------------------------------------------------------- 1 | -- Kind error message test 2 | 3 | module ShouldFail where 4 | 5 | type IntMap a = [a] 6 | 7 | data SymDict a = SymDict {idcounter:: Int, itot::IntMap a} 8 | 9 | data SymTable = SymTable { dict::SymDict } 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail136.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail136.hs:9:35: error: 3 | Expecting one more argument to ‘SymDict’ 4 | Expected a type, but ‘SymDict’ has kind ‘* -> *’ 5 | In the type ‘SymDict’ 6 | In the definition of data constructor ‘SymTable’ 7 | In the data declaration for ‘SymTable’ 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail137.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DatatypeContexts #-} 2 | -- Test the stupid context on newtypes 3 | -- (GHC 6.4 dropped it on the floor by mistake) 4 | module ShouldFail where 5 | 6 | newtype Floating a => Test a = Test [a] 7 | 8 | x = Test [False, True] 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail139.hs: -------------------------------------------------------------------------------- 1 | -- Should be rejected by Haskell 98 2 | 3 | module Foo where 4 | 5 | type Foo = Double 6 | instance Bounded Foo 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail146.hs: -------------------------------------------------------------------------------- 1 | module Foo1 where 2 | 3 | -- Variant: class used as data 4 | class SClass a where 5 | sFun :: a -> SData a 6 | 7 | data SData a = SCon (SClass a) 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail146.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail146.hs:7:22: error: 3 | Expected a type, but ‘SClass a’ has kind ‘GHC.Prim.Constraint’ 4 | In the type ‘SClass a’ 5 | In the definition of data constructor ‘SCon’ 6 | In the data declaration for ‘SData’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail147.hs: -------------------------------------------------------------------------------- 1 | module Foo1 where 2 | 3 | -- Variant: ill-kinded. 4 | class XClass a where 5 | xFun :: a -> XData 6 | 7 | data XData = XCon XClass 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail148.hs: -------------------------------------------------------------------------------- 1 | -- This one caused a panic in GHC 6.4 2 | 3 | module Foo1 where 4 | 5 | data List elem = Cons elem List | Nil 6 | 7 | t1 :: List 8 | t1 = Cons 1 Nil 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail148.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail148.hs:5:28: error: 3 | Expecting one more argument to ‘List’ 4 | Expected a type, but ‘List’ has kind ‘* -> *’ 5 | In the type ‘List’ 6 | In the definition of data constructor ‘Cons’ 7 | In the data declaration for ‘List’ 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail150.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- !!! constraining the type variable in a class head is illegal 4 | -- Simpler version of tcfail149 5 | class Foo a where 6 | op :: Eq a => a -> a 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail150.stderr: -------------------------------------------------------------------------------- 1 | ExitSuccess 2 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail152.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExistentialQuantification #-} 2 | 3 | -- This test made Hugs fail (Oct 05) because the constraint 4 | -- from the 'toInteger' call escaped from the pattern match 5 | 6 | module ShouldFail where 7 | 8 | data T = forall a. C a 9 | 10 | test (C x) = toInteger x 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail153.hs: -------------------------------------------------------------------------------- 1 | -- Killed a test compiler, so I thought it was worth including 2 | 3 | module ShouldFail where 4 | 5 | f :: a -> [a] 6 | f x = g x 7 | where 8 | g y = if y then [] else [y] 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail154.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail154.hs:12:10: error: 3 | Variable ‘a’ occurs more often than in the instance head 4 | in the constraint: C a a 5 | (Use UndecidableInstances to permit this) 6 | In the instance declaration for ‘Eq (T a)’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail155.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | -- Data type returns the wrong type 4 | 5 | module ShouldFail where 6 | 7 | data T a where 8 | P :: L1 -> L2 9 | 10 | data L1 = L1 11 | data L2 = L2 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail155.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail155.hs:8:6: error: 3 | Data constructor ‘P’ returns type ‘L2’ 4 | instead of an instance of its parent type ‘T a’ 5 | In the definition of data constructor ‘P’ 6 | In the data declaration for ‘T’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail156.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ExistentialQuantification #-} 2 | 3 | -- Illegal existential context on a newtype 4 | 5 | module ShouldFail where 6 | 7 | newtype Foo = forall a . Foo a 8 | 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail156.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail156.hs:7:15: error: 3 | A newtype constructor cannot have existential type variables 4 | Foo :: forall a. a -> Foo 5 | In the definition of data constructor ‘Foo’ 6 | In the newtype declaration for ‘Foo’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail158.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail158.hs:14:19: error: 3 | Expecting one more argument to ‘Val v’ 4 | Expected a type, but ‘Val v’ has kind ‘* -> *’ 5 | In the type signature for ‘bar’: bar :: forall v. Val v 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail159.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE UnboxedTuples #-} 2 | 3 | module ShouldFail where 4 | 5 | h :: Int -> (# Int, Int #) 6 | h x = (# x,x #) 7 | 8 | foo x = case h x of 9 | ~(# p, q #) -> p 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail160.hs: -------------------------------------------------------------------------------- 1 | -- Kind error message 2 | 3 | module ShouldFail where 4 | 5 | data T k = T (k Int) 6 | 7 | g :: T Int 8 | g x = x 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail160.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail160.hs:7:8: error: 3 | The first argument of ‘T’ should have kind ‘* -> *’, 4 | but ‘Int’ has kind ‘*’ 5 | In the type signature for ‘g’: g :: T Int 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail161.hs: -------------------------------------------------------------------------------- 1 | -- Kind error message 2 | 3 | module ShouldFail where 4 | 5 | f :: [Maybe] 6 | f x = x 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail161.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail161.hs:5:7: error: 3 | Expecting one more argument to ‘Maybe’ 4 | Expected kind ‘*’, but ‘Maybe’ has kind ‘* -> *’ 5 | In the type signature for ‘f’: f :: [Maybe] 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail162.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -- Kind error message should not contain bangs 5 | 6 | module ShouldFail where 7 | 8 | import Foreign.ForeignPtr 9 | 10 | data Foo = Foo {-# UNPACK #-} !(ForeignPtr) 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail162.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail162.hs:10:33: error: 3 | Expecting one more argument to ‘ForeignPtr’ 4 | Expected a type, but ‘ForeignPtr’ has kind ‘* -> *’ 5 | In the type ‘ForeignPtr’ 6 | In the definition of data constructor ‘Foo’ 7 | In the data declaration for ‘Foo’ 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail166.hs: -------------------------------------------------------------------------------- 1 | -- Without -XScopedTypeVariables, this should fail 2 | 3 | module ShouldFail where 4 | 5 | destroy :: (forall a. (a -> Maybe (b,a)) -> a -> c) -> [b] -> c 6 | destroy = error "urk" 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail166.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail166.hs:5:21: error: 3 | Illegal symbol '.' in type 4 | Perhaps you intended to use RankNTypes or a similar language 5 | extension to enable explicit-forall syntax: forall . 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail169.hs: -------------------------------------------------------------------------------- 1 | 2 | -- Trac #958 3 | 4 | module ShoulFail where 5 | 6 | data Succ a = S a -- NB: deriving Show omitted 7 | data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show 8 | 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail170.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} 2 | 3 | module ShouldFail where 4 | 5 | class C a b | a -> b 6 | 7 | instance C [p] [q] 8 | -- Coverage condition fails 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail171.hs: -------------------------------------------------------------------------------- 1 | module ShouldFail where 2 | 3 | -- This one made GHC fall over on implication constraints 4 | -- Silly, but one more test does no harm 5 | 6 | import Text.Printf 7 | 8 | phex :: a -> b 9 | phex x = printf "0x%x" x 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail173.hs: -------------------------------------------------------------------------------- 1 | 2 | 3 | module ShouldFail where 4 | 5 | newtype (f <.> g) a = Compose (f (g a)) 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail173.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail173.hs:5:12: error: 3 | Illegal declaration of a type or class operator ‘<.>’ 4 | Use TypeOperators to declare operators in type and declarations 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail175.hs: -------------------------------------------------------------------------------- 1 | 2 | -- Crashed GHC 6.6! 3 | -- Trac #1153 4 | 5 | module ShouldFail where 6 | 7 | eval :: Int -> String -> String -> String 8 | eval 0 root actual = evalRHS 0 root actual 9 | 10 | evalRHS :: Int -> a 11 | evalRHS 0 root actual = eval 0 root actual 12 | 13 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail176.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE GADTs #-} 2 | 3 | -- Newtype in GADT syntax 4 | 5 | module ShouldFail where 6 | 7 | newtype Bug a where Bug :: a -> Maybe a 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail176.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail176.hs:7:21: error: 3 | Data constructor ‘Bug’ returns type ‘Maybe a’ 4 | instead of an instance of its parent type ‘Bug a’ 5 | In the definition of data constructor ‘Bug’ 6 | In the newtype declaration for ‘Bug’ 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail180.hs: -------------------------------------------------------------------------------- 1 | 2 | -- Showed up a bug in bodySplitTyConApp 3 | 4 | module ShouldFail where 5 | 6 | p :: f b 7 | p = error "urk" 8 | 9 | g x = case p of 10 | True -> () 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail180.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail180.hs:10:9: error: 3 | Couldn't match expected type ‘f0 b0’ with actual type ‘Bool’ 4 | In the pattern: True 5 | In a case alternative: True -> () 6 | In the expression: case p of { True -> () } 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail182.hs: -------------------------------------------------------------------------------- 1 | module Foo where 2 | 3 | import qualified Prelude 4 | import Prelude hiding( Maybe ) 5 | 6 | data Maybe a = Foo 7 | 8 | f :: Prelude.Maybe a -> Int 9 | f Foo = 3 10 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail183.hs: -------------------------------------------------------------------------------- 1 | 2 | module ShouldCompile where 3 | 4 | newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a]) 5 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail183.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail183.hs:4:38: error: 3 | Illegal symbol '.' in type 4 | Perhaps you intended to use RankNTypes or a similar language 5 | extension to enable explicit-forall syntax: forall . 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail184.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# OPTIONS_GHC -XScopedTypeVariables #-} 3 | -- We don't actually want scoped type variables, but this flag makes the 4 | -- forall be recognised by the parser 5 | 6 | module ShouldCompile where 7 | 8 | newtype Swizzle = MkSwizzle (forall a. Ord a => [a] -> [a]) 9 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail185.hs: -------------------------------------------------------------------------------- 1 | -- See Trac #1606 2 | 3 | module ShouldFail where 4 | 5 | f :: Int -> Int -> Bool -> Bool -> Int -> Int 6 | f a b = \ x y -> let { y1 = y; y2 = y1; y3 = y2; y4 = y3; y5 = y4; 7 | y6 = y5; y7 = y6 } in x 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail185.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail185.hs:7:46: error: 3 | Couldn't match expected type ‘Int -> Int’ with actual type ‘Bool’ 4 | In the expression: x 5 | In the expression: 6 | let 7 | y1 = y 8 | y2 = y1 9 | y3 = y2 10 | .... 11 | in x 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail186/Tcfail186.hs: -------------------------------------------------------------------------------- 1 | -- Trac #1814 2 | 3 | module Tcfail186 where 4 | 5 | import Tcfail186_Help 6 | 7 | foo = f "hoo" 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail186/Tcfail186_Help.hs: -------------------------------------------------------------------------------- 1 | module Tcfail186_Help where 2 | 3 | type PhantomSyn a = Int 4 | 5 | f = (\_ -> 2) :: PhantomSyn a -> Int 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail186/tcfail186.cabal: -------------------------------------------------------------------------------- 1 | name: p 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | eta-options: -fdiagnostics-color=never 9 | exposed-modules: Tcfail186 10 | Tcfail186_Help 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail187.hs: -------------------------------------------------------------------------------- 1 | -- Trac #1806 2 | 3 | module ShouldFail where 4 | 5 | data Foo = (:::) 6 | 7 | foo (x ::: y) = () 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail187.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail187.hs:7:6: error: 3 | Constructor ‘:::’ should have no arguments, but has been given 2 4 | In the pattern: x ::: y 5 | In an equation for ‘foo’: foo (x ::: y) = () 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail193.hs: -------------------------------------------------------------------------------- 1 | -- Checks that the correct type is used checking the using clause of the transform 2 | 3 | {-# OPTIONS_GHC -XTransformListComp #-} 4 | 5 | module ShouldFail where 6 | 7 | import Data.List(inits) 8 | 9 | z :: [Int] 10 | z = [x | x <- [3, 2, 1], then inits] 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail195.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes, GADTs #-} 2 | 3 | module ShouldFail where 4 | 5 | data Foo a where 6 | Foo :: Int -> Foo (forall a. a) 7 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail195.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail195.hs:6:3: error: 3 | Illegal polymorphic or qualified type: forall a. a 4 | In the definition of data constructor ‘Foo’ 5 | In the data declaration for ‘Foo’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail196.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module ShouldFail where 4 | 5 | bar :: Num (forall a. a) => Int -> Int 6 | bar = error "urk" 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail196.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail196.hs:5:8: error: 3 | Illegal polymorphic or qualified type: forall a. a 4 | In the type signature for ‘bar’: 5 | bar :: Num (forall a. a) => Int -> Int 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail197.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE RankNTypes #-} 2 | 3 | module ShouldFail where 4 | 5 | foo :: [forall a. a] -> Int 6 | foo = error "urk" 7 | 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail197.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail197.hs:5:8: error: 3 | Illegal polymorphic or qualified type: forall a. a 4 | Perhaps you intended to use ImpredicativeTypes 5 | In the type signature for ‘foo’: foo :: [forall a. a] -> Int 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail198.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ScopedTypeVariables #-} 2 | 3 | module ShouldFail where 4 | 5 | f3 :: forall a. [a] -> [a] 6 | Just f3 = Just (\(x:xs) -> xs ++ [ x :: a ]) -- Not OK! 7 | -- The type variable does not scope in a pattern binding 8 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail199.hs: -------------------------------------------------------------------------------- 1 | -- trac #2179 2 | 3 | module Main where 4 | 5 | main = "hi" 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail199.stderr: -------------------------------------------------------------------------------- 1 | 2 | tests/suite/typecheck/fail/tcfail199.hs:5:1: error: 3 | Couldn't match expected type ‘IO t0’ with actual type ‘[Char]’ 4 | In the expression: main 5 | When checking the type of the IO action ‘main’ 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail200.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE MagicHash #-} 2 | 3 | module ShouldFail where 4 | 5 | f = let x = ( 1#, 'c' ) in x 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail203/Tcfail203a.hs: -------------------------------------------------------------------------------- 1 | -- trac #2806 2 | 3 | {-# LANGUAGE MagicHash, UnboxedTuples, BangPatterns #-} 4 | 5 | module Tcfail203a where 6 | 7 | import GHC.Base 8 | 9 | fail10 = 'a' 10 | where !(b, ~(c, (I# x))) = (True, (False, 5)) 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail203/tcfail203.cabal: -------------------------------------------------------------------------------- 1 | name: tcfail203 2 | version: 1.0 3 | build-type: Simple 4 | cabal-version: >= 1.2 5 | 6 | library 7 | build-depends: base 8 | eta-options: -fdiagnostics-color=never 9 | exposed-modules: Tcfail203 10 | Tcfail203a 11 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail203/tcfail203a.stderr: -------------------------------------------------------------------------------- 1 | 2 | tcfail203a.hs:10:17: error: 3 | A lazy (~) pattern cannot bind variables of unlifted type. 4 | Unlifted variables: 5 | x :: Int# 6 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail204.hs: -------------------------------------------------------------------------------- 1 | 2 | {-# OPTIONS_GHC -Wall #-} 3 | {-# OPTIONS_GHC -Werror #-} 4 | 5 | -- Trac #3261 6 | 7 | module Foo where 8 | 9 | foo :: Int 10 | foo = ceiling 6.3 11 | 12 | -------------------------------------------------------------------------------- /tests/suite/typecheck/fail/tcfail205.hs: -------------------------------------------------------------------------------- 1 | module Fail where 2 | 3 | f x = foldl (+) [1 .. x] 'a' 4 | -------------------------------------------------------------------------------- /tests/suite/typecheck/run/tcfail149.stdout: -------------------------------------------------------------------------------- 1 | "1 2" 2 | -------------------------------------------------------------------------------- /tests/verify/Main.hs: -------------------------------------------------------------------------------- 1 | main = putStrLn "Hello World!" 2 | -------------------------------------------------------------------------------- /update.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | git pull 3 | git submodule update --recursive 4 | cleaninstall 5 | etlas update 6 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | _pull=$(git pull) 4 | git submodule sync 5 | _subs=$(git submodule update --recursive) 6 | 7 | if [ "$_pull" = "Already up-to-date." ] && [ -z "$_subs" ]; then 8 | echo "Already up-to-date." 9 | exit 0 10 | fi 11 | 12 | ./cleaninstall.sh 13 | etlas update 14 | -------------------------------------------------------------------------------- /utils/coursier/README.md: -------------------------------------------------------------------------------- 1 | # Version 2 | Coursier Version 1.0.0-M15 3 | 4 | # Command to Generate 5 | 6 | Requires an existing [Coursier](https://github.com/alexarchambault/coursier) installation: 7 | 8 | ```shell 9 | coursier bootstrap io.get-coursier:coursier-cli_2.11:1.0.0-M15 -f -o coursier -M coursier.cli.Coursier 10 | ``` 11 | -------------------------------------------------------------------------------- /utils/coursier/coursier: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/utils/coursier/coursier -------------------------------------------------------------------------------- /utils/eta-pkg/Setup.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE PackageImports #-} 2 | import "Cabal" Distribution.Simple 3 | main = defaultMain 4 | -------------------------------------------------------------------------------- /utils/trace/trace.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | eta -o Out.jar %* && java -javaagent:slf4j-ext-1.7.21.jar=ignore=org/slf4j/:ch/qos/logback/:org/apache/log4j/:cern/colt/:java/ -cp slf4j-api-1.7.21.jar;slf4j-simple-1.7.21.jar;javassist-3.20.0-GA.jar;Out.jar -Djava.compiler=NONE eta.main 3 | -------------------------------------------------------------------------------- /utils/trace/trace.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | eta -o Out.jar "$@" && java -javaagent:slf4j-ext-1.7.21.jar=ignore=org/slf4j/:ch/qos/logback/:org/apache/log4j/:cern/colt/:java/:eta/runtime/ -cp slf4j-api-1.7.21.jar:slf4j-simple-1.7.21.jar:javassist-3.20.0-GA.jar:Out.jar -Djava.compiler=NONE eta.main 4 | -------------------------------------------------------------------------------- /utils/trace/tracejars.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/utils/trace/tracejars.tar.gz --------------------------------------------------------------------------------