Consider the following example
module A where
import Control.Lens
data A = A { _aFoo :: Int, _aBar :: String }
makeFields ''A| grecaptcha.enterprise.execute("6LfF1dcZAAAAAOHQX8v16MX5SktDwmQINVD_6mBF", {"action":"www/follow_user"}).then( (token) => { $.ajax('https://www.pixiv.net/bookmark_add.php', { | |
| method: 'POST', | |
| headers: { 'x-csrf-token': g_csrfToken }, | |
| data: 'mode=add&type=user&user_id=' + userId + '&tag=&restrict=0&format=json&recaptcha_enterprise_score_token='+token, | |
| success: () => console.log("success")}) |
| {-# LANGUAGE TemplateHaskell #-} | |
| import VerifySchema | |
| import Hasql.Connection | |
| import System.Environment (getArgs, lookupEnv, getEnvironment) | |
| import qualified Data.ByteString.Char8 as BS | |
| import Kea.Model | |
| import GetSchemas | |
| import Data.Maybe (maybeToList) |
| module GetSchemas where | |
| import GHC | |
| import GHC.Paths | |
| import GHC.Types.Avail | |
| import GHC.Types.Name | |
| import GHC.Driver.Session | |
| import GHC.Driver.Env | |
| import GHC.Utils.Monad | |
| import GHC.Iface.Binary | |
| import GHC.Iface.Syntax |
| {-# language ApplicativeDo #-} | |
| {-# language LambdaCase #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE TypeInType #-} | |
| {-# LANGUAGE AllowAmbiguousTypes #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE InstanceSigs #-} | |
| -- not sure if this is all extensions or all these extensions are needed, just pasting from the file | |
| module VerifySchema where |
| --needs a bunch of extensions | |
| module VerifySchema where | |
| import Prelude hiding ( filter ) | |
| import qualified Data.List as L | |
| import Rel8 hiding (run) | |
| import qualified Rel8 | |
| import Hasql.Connection | |
| import Hasql.Session |
| -- GHC8 | |
| -- the below code is docCommentLine from src/Idris/Parser/Helpers.hs, contentsInner is the do block at lines 202-206 | |
| *Idris.Parser.Helpers> runparser (string "|||" >> many (satisfy (==' ')) >> option "" contentsInner >>= \contents -> eol >> someSpace >> return contents) idrisInit "" "||| foo" | |
| Success "foo" | |
| *Idris.Parser.Helpers> let pars = string "|||" >> many (satisfy (==' ')) >> option "" contentsInner >>= \contents -> eol >> someSpace >> return contents | |
| *Idris.Parser.Helpers> runparser pars idrisInit "" "|||foo" | |
| Failure (ErrInfo {_errDoc = :1:7: error: unexpected | |
| EOF, expected: end of line |