2020-01-14 21:55:34 +00:00
|
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
|
|
|
|
module GHCup.Types.Optics where
|
|
|
|
|
2020-02-19 19:54:23 +00:00
|
|
|
import Data.ByteString ( ByteString )
|
|
|
|
import GHCup.Types
|
|
|
|
import Optics
|
|
|
|
import URI.ByteString
|
2020-01-16 22:27:38 +00:00
|
|
|
|
|
|
|
makePrisms ''Tool
|
|
|
|
makePrisms ''Architecture
|
|
|
|
makePrisms ''LinuxDistro
|
|
|
|
makePrisms ''Platform
|
|
|
|
|
|
|
|
makeLenses ''PlatformResult
|
|
|
|
makeLenses ''ToolRequest
|
|
|
|
|
2020-01-14 21:55:34 +00:00
|
|
|
|
2020-02-19 19:54:23 +00:00
|
|
|
uriSchemeL' :: Lens' (URIRef Absolute) Scheme
|
|
|
|
uriSchemeL' = lensVL uriSchemeL
|
|
|
|
|
|
|
|
schemeBSL' :: Lens' Scheme ByteString
|
|
|
|
schemeBSL' = lensVL schemeBSL
|
|
|
|
|
|
|
|
authorityL' :: Lens' (URIRef a) (Maybe Authority)
|
|
|
|
authorityL' = lensVL authorityL
|
|
|
|
|
|
|
|
authorityHostL' :: Lens' Authority Host
|
|
|
|
authorityHostL' = lensVL authorityHostL
|
|
|
|
|
|
|
|
authorityPortL' :: Lens' Authority (Maybe Port)
|
|
|
|
authorityPortL' = lensVL authorityPortL
|
|
|
|
|
|
|
|
portNumberL' :: Lens' Port Int
|
|
|
|
portNumberL' = lensVL portNumberL
|
|
|
|
|
|
|
|
hostBSL' :: Lens' Host ByteString
|
|
|
|
hostBSL' = lensVL hostBSL
|
|
|
|
|
|
|
|
pathL' :: Lens' (URIRef a) ByteString
|
|
|
|
pathL' = lensVL pathL
|