Hoogle Search
Within LTS Haskell 24.27 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
NoAutoDeriveTypeable :: Extensionhint Language.Haskell.Interpreter.Extension No documentation available.
-
hint Language.Haskell.Interpreter.Extension No documentation available.
NoDeriveDataTypeable :: Extensionhint Language.Haskell.Interpreter.Extension No documentation available.
-
hint Language.Haskell.Interpreter.Extension No documentation available.
-
hint Language.Haskell.Interpreter.Extension No documentation available.
-
hint Language.Haskell.Interpreter.Extension No documentation available.
-
hint Language.Haskell.Interpreter.Extension No documentation available.
NoDeriveTraversable :: Extensionhint Language.Haskell.Interpreter.Extension No documentation available.
accessorIsLabelDeriver :: Deriverdomain Domain Generates instances of IsLabel for enums, sums and products, providing accessors to their components.
Product Example
Having the following schema:NetworkAddress: product: protocol: TransportProtocol host: Host port: Word16
The following instances will be generated:instance a ~ TransportProtocol => IsLabel "protocol" (NetworkAddress -> a) where fromLabel (NetworkAddress a _ _) = a instance a ~ Host => IsLabel "host" (NetworkAddress -> a) where fromLabel (NetworkAddress _ b _) = b instance a ~ Word16 => IsLabel "port" (NetworkAddress -> a) where fromLabel (NetworkAddress _ _ c) = c
In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.Sum Example
Having the following schema:Host: sum: ip: Ip name: Text
The following instances will be generated:instance a ~ Maybe Ip => IsLabel "ip" (Host -> a) where fromLabel (IpHost a) = Just a fromLabel _ = Nothing instance a ~ Maybe Text => IsLabel "name" (Host -> a) where fromLabel (NameHost a) = Just a fromLabel _ = Nothing
In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.Enum Example
Having the following schema:TransportProtocol: enum: - tcp - udp
The following instances will be generated:instance a ~ Bool => IsLabel "tcp" (TransportProtocol -> a) where fromLabel TcpTransportProtocol = True fromLabel _ = False instance a ~ Bool => IsLabel "udp" (TransportProtocol -> a) where fromLabel UdpTransportProtocol = True fromLabel _ = False
In case you're wondering what this tilde (~) constraint business is about, refer to the Type Equality Constraint section.-
domain Domain Derives Bounded for enums. Requires to have the StandaloneDeriving compiler extension enabled.