!"#$%&'()*+,-./01234 5 6789:;<=>?@ABCDEF GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef g h i j k l m n o p q r s t u v w x y z { | } ~  (C) 2008-2013 Edward KmettBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portable Trustworthy*+0 "A logically uninhabited data type. Since  b values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet". If   is uninhabited then any  that holds only values of type   is holding no values. If   is uninhabited then any  that holds values of type   is holding no values. Reading a  , value is always a parse error, considering  & as a data type with no constructors.    (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portable Safe-Inferred !"'(=HJKMA  about a type a0 is either a proof of existence or a proof that a cannot exist.Proof that no a exists Witness for a,Because we can never create a value of type  ", a function that type-checks at  a -> Void shows that objects of type a% can never exist. Thus, we say that a is  None246BHM((& NoneKPromote every declaration given to the type level, retaining the originals.3Promote each declaration, discarding the originals.HProduce instances for '(:==)' (type-level equality) from the given typesIProduce an instance for '(:==)' (type-level equality) from the given type11-NoneE tGenerate singleton definitions from a type that is already defined. For example, the singletons package itself uses 2$(genSingletons [''Bool, ''Maybe, ''Either, ''[]]))to generate singletons for Prelude types.kMake promoted and singleton versions of all declarations given, retaining the original declarations. See  =http://www.cis.upenn.edu/~eir/packages/singletons/README.html for further explanation.fMake promoted and singleton versions of all declarations given, discarding the original declarations.Create instances of SEq1 and type-level '(:==)' for each type in the listCreate instance of SEq* and type-level '(:==)' for the given typeCreate instances of SEq) (only -- no instance for '(:==)', which SEq0 generally relies on) for each type in the listCreate instances of SEq) (only -- no instance for '(:==)', which SEq) generally relies on) for the given typeCreate instances of SDecide for each type in the list-Create instance of SDecide for the given typeP      !"#$%&'()*P      !"#$%&'()*K      !"#$%&'()*None!"'(234=HJKMW An existentially-quantified singleton. This type is useful when you want a singleton type, but there is no way of knowing, at compile-time, what the type index will be. To make use of this type, you will generally have to use a pattern-match: ofoo :: Bool -> ... foo b = case toSing b of SomeSing sb -> {- fancy dependently-typed code with sb -};An example like the one above may be easier to write using  withSomeSing.!Convenient abbreviation for #: 6type Demote (a :: k) = DemoteRep ('KProxy :: KProxy k)"The " class is essentially a kind class. It classifies all kinds for which singletons are defined. The class supports converting between a singleton type and the base (unrefined) type which it is built from.#BGet a base type from a proxy for the promoted kind. For example, "DemoteRep ('KProxy :: KProxy Bool) will be the type Bool.$-Convert a singleton to its unrefined version.%HConvert an unrefined type to an existentially-quantified singleton type.&A & constraint is essentially an implicitly-passed singleton. If you need to satisfy this constraint with an explicit singleton, please see  withSingI.';Produce the singleton explicitly. You will likely need the ScopedTypeVariables0 extension to use this method the way you want.('The singleton kind-indexed data family.)=Convenient synonym to refer to the kind of a type variable: ,type KindOf (a :: k) = ('KProxy :: KProxy k)*Members of the * "kind" class support decidable equality. Instances of this class are generated alongside singleton definitions for datatypes that derive an + instance.+>Compute a proof or disproof of equality, given two singletons.8 !"#$%&'()*+,-./0123,456-./0123456789:;<=>?@ABCDEFGHIJK- !"#$%&'()*+,-./0123,456-./0123456789:;<=>?@ !"#$%&'()*+,-./0123,456ABC-DEF.G@?>=<;:9876543210/HIJK(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=JK<Conditional over singletons 789:;<=>?@ (6?@789:;<=>?@(6< 987:;=?>@ 789:;<=>?@(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(3=HJKMAThe singleton analogue of +. Unlike the definition for +e, it is required that instances define a body for '(%:==)'. You may also supply a body for '(%:/=)'.BBoolean equality on singletonsC!Boolean disequality on singletonsEA re-export of the type-level (==)4 that conforms to the singletons naming convention.ABCDELABCDEABCEDABCDEL (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone(=KFIProduce a representation and singleton for the collection of types given. A datatype Rep is created, with one constructor per type in the declared universe. When this type is promoted by the singletons library, the constructors become full types in *&, not just promoted data constructors. For example, )$(singletonStar [''Nat, ''Bool, ''Maybe])generates the following: ;data Rep = Nat | Bool | Maybe Rep deriving (Eq, Show, Read)$and its singleton. However, because Rep is promoted to *0, the singleton is perhaps slightly unexpected: {data instance Sing (a :: *) where SNat :: Sing Nat SBool :: Sing Bool SMaybe :: SingRep a => Sing a -> Sing (Maybe a)The unexpected part is that Nat, Bool, and Maybe above are the real Nat, Bool, and Maybe&, not just promoted data constructors."Please note that this function is very$ experimental. Use at your own risk.FA list of Template Haskell Name s for typesMFFFM(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"(24;=HJKM NOPQRSTUVW(P(NOQRSTUVWP(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNoneKG The function G generates a case expression where each right-hand side is identical. This may be useful if the type-checker requires knowledge of which constructor is used to satisfy equality or type-class constraints, but where each constructor is treated the same.G-The head of the type of the scrutinee. (Like ''Maybe or ''Bool.)*The scrutinee, in a Template Haskell quote%The body, in a Template Haskell quote,  !"#$%&'()*+8<ABCG,G(&'"#$%)!<8ABC*+  G(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=HKM HIJKLMNOPQ(,-./012/012345HIJKLMNOPQ(210/.-,LMKNJOIPHQ HIJKLMNOPQ(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone  *+ *+ (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(3;=HKM RThe promotion of XSA S wraps up a & instance for explicit handling.UGet an implicit singleton (a & instance) from an explicit one.VRConvenience function for creating a context with an implicit singleton available.W Convert a normal datatype (like YD) to a singleton for that datatype, passing it into a continuation.XyA convenience function useful when we need to name a singleton value multiple times. Without this function, each use of 'd could potentially refer to a different singleton, and one has to use type signatures (often with ScopedTypeVariables#) to ensure that they are the same.YA convenience function that names a singleton satisfying a certain property. If the singleton does not satisfy the property, then the function returns ZX. The property is expressed in terms of the underlying representation of the singleton.Z7Allows creation of a singleton when a proxy is at hand.[&Allows creation of a singleton when a proxy# is at hand.\GHC 7.8 sometimes warns about incomplete pattern matches when no such patterns are possible, due to GADT constraints. See the bug report at  ,https://ghc.haskell.org/trac/ghc/ticket/3927I. In such cases, it's useful to have a catch-all pattern that then has \ as its right-hand side.]The singleton for XR[\STUVWThe original datatypeFunction expecting a singletonXYZ[\] !"#$%&'()RSTUVWXYZ[\](&'"#$%)!ST UVWZ[XY\R] R[\STUVWXYZ[\](C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=JK ]^_`abcde^ (367^_`abcde (3`_cdab^e ]^_`abcde^ (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(=HKMfg_hijklmno`pq(4;<fghijklmnopq(4kljminhogpfqfg_hijklmno`pq (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(=HKMrstuvwxyz{|}~(5=>rstuvwxyz{|}~(5z{y|x}w~vutsrrstuvwxyz{|}~(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNoneV  !"#$%&'(),-./0123456/0123456789:;<=>?@789:;<ABCDEIJKLMNOPRSTUVWXYZ[\]_`abklz{$(6354210/.-,< 987:;`_abz{klLMKNJOIPa !"#$%&'( ) * + ,-./01234566789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[ \]^_`abcdefghiijklmnopqrstuvwxyz { | } ~            !                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFBCDEFGHGHIJKLMNOPQRSTUVWXYZ[\] ^_`abcdefghijklmn_`op q rssingletons-0.9.0Data.Singletons.THData.Singletons.EqData.SingletonsData.Singletons.BoolData.Singletons.VoidData.Singletons.TypesData.Singletons.TupleData.Singletons.ListData.Singletons.EitherData.Singletons.MaybeData.Singletons.CustomStarData.Singletons.UtilData.Singletons.PromoteData.Singletons.SingletonsData.Singletons.CoreData.Singletons.TypeRepStarData.Singletons.DecideData.Singletons.Preludeghc-primGHC.PrimAnybaseData.Type.EqualityRefl:~:== Data.ProxyProxyKProxyData.Type.BoolIfNotVoidabsurdvacuousvacuousMDecision DisprovedProvedRefutedpromote promoteOnlypromoteEqInstancespromoteEqInstance genSingletons singletonssingletonsOnlysingEqInstancessingEqInstancesingEqInstancesOnlysingEqInstanceOnlysingDecideInstancessingDecideInstanceSomeSingDemoteSingKind DemoteRepfromSingtoSingSingIsingSingKindOfSDecide%~STuple7STuple6STuple5STuple4STuple3STuple2STuple0SListSEitherSMaybeSBool:||:&&sNot%:&&%:||sIfBool_ OtherwisesBool_ sOtherwiseSEq%:==%:/=:/=:== singletonStarcasesSwapUncurryCurrySndFstsFstsSndsCurrysUncurrysSwapError SingInstance singInstance withSingI withSomeSingwithSingsingThat singByProxy singByProxy#bugInGHCsErrorReverseTailHead:++%:++sHeadsTailsReverseIsRightIsLeftPartitionEithersRightsLeftsEither_sEither_sLeftssRightssPartitionEitherssIsLeftsIsRightMapMaybe CatMaybes ListToMaybe MaybeToList FromMaybeFromJust IsNothingIsJustMaybe_sMaybe_sIsJust sIsNothing sFromJust sFromMaybe sMaybeToList sListToMaybe sCatMaybes sMapMaybeGHC.BaseFunctorMonad $fReadVoid$fExceptionVoid$fIxVoid $fShowVoid $fOrdVoid$fEqVoidQWithAuxQWArunQWA mkTyFamInst basicTypes newUniqueNameqReportWarningtupleDegree_maybetupleNameDegree_maybe ctorCases ctor1CaseextractNameArgs reinterpretisUpcaseupcaselocase prefixUCName prefixLCNameextractTvbKindextractTvbNamefoldTypefoldExpisVarK mkTupleExp mkTuplePat orIfEmpty emptyMatches multiCasecomp1comp2evalWithoutAux evalForAux evalForPair addBinding addElement containsName concatMapMlistify$fQuasiQWithAux$fMonadWritermQWithAuxth-desugar-1.4.2 Language.Haskell.TH.Desugar.UtilgetDataDreifyWithWarning QWithDecsTypesQ TopLevelLHSLHS lhsRawNamelhsNamelhsHolePromoteQ PromoteTable TypeTable anyTypeNameboolNameandNametyEqNamerepNameifNameheadNametailName symbolNamefalseTytrueTyboolTyandTyifTyFam headTyFam tailTyFam promoteInfopromoteDataConpromoteValName promoteVal promoteType checkForRepcheckForRepInDecls promoteDecsmkEqTypeInstancetypeSynonymFlag promoteDec promoteDataD promoteDec' promoteClausepromoteTopLevelPat promotePat promoteBody promoteExp promoteLitPatternContext Statement ParameterTopLevel CaseStatement LetBindingExpsQEqualityClassDesc TypeContextTypeFnExpTablesingFamilyName singIName singMethName toSingName fromSingName demoteRepNamesingKindClassName sEqClassName sEqMethNamesIfName undefinedName sconsNamesnilNamekProxyDataNamekProxyTypeNamesomeSingTypeNamesomeSingDataNamenilNameconsNamelistName sListNameeqNamesDecideClassNamesDecideMethName provedName disprovedNamereflName mkTupleName singFamilysingKindConstraintdemotesingDataConName singTyConName singClassName singDataCon singValNamesingVal kindParamsingInfosingCtorsingDecssingDecsingEqualityInstance sEqClassDescsDecideClassDescmkEqualityInstancemkEqMethClausemkDecideMethClause singDataDsingKindsingTypeliftOutForalls singTypeRec singContextsingPred singClausecheckIfBrainWillExplodesingPatsingExpsingLit GHC.ClassesEq SOrderingSSymSNatSConsSNilSGTSEQSLTSRightSLeftSJustSNothingSTrueSFalse$fSingKindSymbolKProxy$fSingISymbolnTFCo:R:SingSymboln$fSingKindNatKProxy $fSingINatnTFCo:R:SingNatnTFCo:R:DemoteRep(,,,,,,)KProxy$fTestEqualitykSing$fSDecideSymbolKProxy$fSDecideNatKProxy$fSDecideBoolKProxy$fSEqBoolKProxymkCustomEqInstancesDIDon'tInstantiateSTypeRepdirty_mk_STypeRep$fTestCoercion*Sing$fSDecide*KProxy $fSEq*KProxy$fSingKind*KProxy $fSingI*a TFCo:R:Sing*aGHC.Errerror GHC.TypesBool Data.MaybeNothing Reverse_aux sReverse_auxPartitionEithers_auxsPartitionEithers_aux