!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH I J K L M N O P Q R S T U V W X Y Z[\]^_`abcdefghij 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-portableNone !"'(=HJKMA re-export of the type-level (==)4 that conforms to the singletons naming convention.      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 type00,(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(3;=HKMA  wraps up a % instance for explicit handling.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 +. 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 *.&;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))Get an implicit singleton (a % instance) from an explicit one.*RConvenience function for creating a context with an implicit singleton available.+ Convert a normal datatype (like D) to a singleton for that datatype, passing it into a continuation.,yA 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.-A convenience function that names a singleton satisfying a certain property. If the singleton does not satisfy the property, then the function returns X. The property is expressed in terms of the underlying representation of the singleton..7Allows creation of a singleton when a proxy is at hand./&Allows creation of a singleton when a proxy# is at hand.0GHC 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 0 as its right-hand side. !"#$%&'()*+The original datatypeFunction expecting a singleton,-./0  !"#$%&'()*+,-./0'%&!"#$( )*+./,-0  !"#$%&'()*+,-./0(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(3=HJKM1Members of the 1 "kind" class support decidable equality. Instances of this class are generated alongside singleton definitions for datatypes that derive an  instance.2>Compute a proof or disproof of equality, given two singletons.3A 3 about a type a0 is either a proof of existence or a proof that a cannot exist.4Proof that no a exists5 Witness for a6,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 6123456  123456 12 6354123546NoneE 7tGenerate 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.8kMake 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.9fMake promoted and singleton versions of all declarations given, discarding the original declarations.:Create instances of SEq1 and type-level '(:==)' for each type in the list;Create instance of SEq* and type-level '(:==)' for the given type<Create instances of SEq) (only -- no instance for '(:==)', which SEq0 generally relies on) for each type in the list=Create instances of SEq) (only -- no instance for '(:==)', which SEq) generally relies on) for the given type>Create instances of 1 for each type in the list.{Note that, due to a bug in GHC 7.6.3 (and lower) optimizing instances for SDecide can make GHC hang. You may want to put {-# OPTIONS_GHC -O0 #-} in your file.?Create instance of 1 for the given type.{Note that, due to a bug in GHC 7.6.3 (and lower) optimizing instances for SDecide can make GHC hang. You may want to put {-# OPTIONS_GHC -O0 #-} in your file.P      !"#$%&'7()89*+:;<=>?,-./0123456789:;<=P      !"#$%&'7()89*+:;<=>?,-./0123456789:;<=K      !"#$%&'7()89*+:;<=>?,-./0123456789:;<=None!"'(234=HJKM @ABCDEFGHIJK>?@ABCDEFGHIJKLMNOPQ@ABCDEFGHIJK>?@ABCDEFGHIJKLMNO@ABCDEFGHIJKPONMLKJIHGFEDCBA@?>Q (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=JKQConditional over singletons LMNOPQRSTU'KNOLMNOPQRSTU'KQPMLNORTSU LMNOPQRSTU (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(3=HJKMVThe singleton analogue of . Unlike the definition for e, it is required that instances define a body for '(%:==)'. You may also supply a body for '(%:/=)'.WBoolean equality on singletonsX!Boolean disequality on singletonsY:A type synonym conforming to singletons naming conventionsVWXYR VWXYVWX YVWXYR(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone(=KZIProduce 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.ZA list of Template Haskell Name s for typesSZZZS(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"(24;=HJKM TUVWXYZ[\]'V'TUWXYZ[\]V(C) 2014 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(234=HKM[The promotion of ^\Kind-restricted synonym for ' for Symbols]Kind-restricted synonym for ' for Nats^Given a singleton for Nat, call something requiring a KnownNat instance._Given a singleton for Symbol, call something requiring a  KnownSymbol instance.`The singleton for ^[\]_`^_`abcdefghij [\]^_` ]\^_[`[\]^_`abcdefg_hij`(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=JK kabcdefghl 'GEFabcdefgh 'Gcbfgdeah kabcdefghl(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNoneKi The function i 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.i-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/  !"#$%&'(123456789:;<=>?NOMQVWXi-897:;<=>?i'%&!"#$( QMVWX12 6354i (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(=HKMjklmnopqrstuvwxyz{'JLMjklmnopqrstuvwxyz{'Jrsqtpuovnwmxlykzj{jklmnopqrstuvwxyz{ (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone!"'(=HKM|}m~n'IJK|}~'I~}||}m~n(C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNone !"'(=HKM '@ABCDEF>?@ABCD'FEDCBA@ (C) 2013 Richard EisenbergBSD-style (see LICENSE)%Richard Eisenberg (eir@cis.upenn.edu) experimental non-portableNoneW  !"#$%&'()*+,-./0@ABCDEFGHIJK>?@ABCDEFGHIJKLMNOLMNOPQVWXY[`bcders''KGJIHFEDCBA@QPMLNOcbde[`rso !"#$%&'&'&(&()*)+,-./012345566789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab c d e f g h i j k l m n o pqrstuvwxyz{|}~                ,      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYWXYZ[\]Z[\]^_`abcdef ghijklmnopqrsttuvwxyz{|}~  singletons-0.10.0Data.Singletons.TypeLitsData.Singletons.THData.Singletons.TypesData.Singletons.VoidData.SingletonsData.Singletons.DecideData.Singletons.TupleData.Singletons.ListData.Singletons.PreludeData.Singletons.EitherData.Singletons.MaybeData.Singletons.BoolData.Singletons.EqData.Singletons.CustomStarData.Singletons.UtilData.Singletons.PromoteData.Singletons.SingletonsData.Singletons.InstancesData.Singletons.TypeRepStarbase GHC.TypeLitsKnownNat KnownSymbolghc-primGHC.PrimAnyNatSymbol symbolValnatValData.Type.Equality gcastWithRefl:~: testEquality TestEquality== Data.ProxyProxyKProxyData.Type.BoolIfNotVoidabsurdvacuousvacuousM:==promote promoteOnlypromoteEqInstancespromoteEqInstance SingInstanceSomeSingDemoteSingKind DemoteRepfromSingtoSingSingIsingSingKindOf singInstance withSingI withSomeSingwithSingsingThat singByProxy singByProxy#bugInGHCSDecide%~Decision DisprovedProvedRefuted genSingletons singletonssingletonsOnlysingEqInstancessingEqInstancesingEqInstancesOnlysingEqInstanceOnlysingDecideInstancessingDecideInstanceSTuple7STuple6STuple5STuple4STuple3STuple2STuple0SList SOrderingSEitherSMaybeSBool:||:&&%:&&%:||sNotsIfBool_ OtherwisesBool_ sOtherwiseSEq%:==%:/=:/= singletonStarErrorSSymbolSNat withKnownNatwithKnownSymbolsErrorReverseTailHead:++%:++sHeadsTailsReversecasesMapMaybe CatMaybes ListToMaybe MaybeToList FromMaybeFromJust IsNothingIsJustMaybe_sMaybe_sIsJust sIsNothing sFromJust sFromMaybe sMaybeToList sListToMaybe sCatMaybes sMapMaybeIsRightIsLeftPartitionEithersRightsLeftsEither_sEither_sLeftssRightssPartitionEitherssIsLeftsIsRightSwapUncurryCurrySndFstsFstsSndsCurrysUncurrysSwapGHC.BaseFunctorMonad $fReadVoid$fExceptionVoid$fIxVoid $fShowVoid $fOrdVoid$fEqVoidQWithAuxQWArunQWA mkTyFamInst basicTypes newUniqueNameqReportWarning qReportErrortupleDegree_maybetupleNameDegree_maybe ctorCases ctor1CaseextractNameArgs reinterpretisUpcaseupcaselocase prefixUCName prefixLCNameextractTvbKindextractTvbNamefoldTypefoldExpisVarK mkTupleExp mkTuplePat orIfEmpty emptyMatches multiCasecomp1comp2evalWithoutAux evalForAux evalForPair addBinding addElement concatMapMlistify$fQuasiQWithAux$fMonadWritermQWithAuxth-desugar-1.3.0 Language.Haskell.TH.Desugar.UtilgetDataDreifyWithWarning QWithDecsTypesQ TopLevelLHSLHS lhsRawNamelhsNamelhsHolePromoteQ PromoteTable TypeTable anyTypeNameboolNameandNametyEqNamerepNameifNameheadNametailName symbolNamefalseTytrueTyboolTyandTyifTyFam headTyFam tailTyFam promoteInfopromoteValName promoteVal promoteType checkForRepcheckForRepInDecls promoteDecsmkEqTypeInstancetypeSynonymFlag promoteDec promoteDataD promoteDec' promoteClausepromoteTopLevelPat promotePat promoteBody promoteExp promoteLit GHC.TypesBool Data.MaybeNothingDIDon'tInstantiate GHC.ClassesEq$fTestEqualitykSingPatternContext 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 singClausecheckIfBrainWillExplodesingPatsingExpsingLitSConsSNilSGTSEQSLTSRightSLeftSJustSNothingSTrueSFalseTFCo:R:DemoteRep(,,,,,,)KProxy$fSDecideBoolKProxy$fSEqBoolKProxymkCustomEqInstancesSTypeRepdirty_mk_STypeRep$fTestCoercion*Sing$fSDecide*KProxy $fSEq*KProxy$fSingKind*KProxy $fSingI*a TFCo:R:Sing*aGHC.ErrerrorSSym$fSEqSymbolKProxy$fSEqNatKProxy$fSDecideSymbolKProxy$fSDecideNatKProxy$fSingKindSymbolKProxy$fSingISymbolnTFCo:R:SingSymboln$fSingKindNatKProxy $fSingINatnTFCo:R:SingNatn Reverse_aux sReverse_auxPartitionEithers_auxsPartitionEithers_aux