Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RAFIRAF/HASKELL | chessSzymex.hs | mit | --toStr2 l = foldl1 (\acc x -> if isSpace x then x:acc else acc)intersperse ' ' $ map figToChar l
initBoard :: String -> Board
initBoard str = map fromStr (lines str) | 167 | initBoard :: String -> Board
initBoard str = map fromStr (lines str) | 68 | initBoard str = map fromStr (lines str) | 39 | true | true | 0 | 7 | 32 | 30 | 15 | 15 | null | null |
dosenfrucht/mcasm | src/Transform.hs | gpl-2.0 | getSize size (Syntax.RESB : xs) = getSize (size + 1) xs | 62 | getSize size (Syntax.RESB : xs) = getSize (size + 1) xs | 62 | getSize size (Syntax.RESB : xs) = getSize (size + 1) xs | 62 | false | false | 0 | 7 | 17 | 34 | 16 | 18 | null | null |
fultonms/artificial-intelligence | exam/p2.hs | mit | dfs :: [State] -> (State -> [State]) -> State
dfs [] op = loser | 63 | dfs :: [State] -> (State -> [State]) -> State
dfs [] op = loser | 63 | dfs [] op = loser | 17 | false | true | 0 | 10 | 13 | 45 | 22 | 23 | null | null |
kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ReplaceNetworkAclAssociation.hs | mpl-2.0 | rnaaDryRun :: Lens' ReplaceNetworkAclAssociation (Maybe Bool)
rnaaDryRun = lens _rnaaDryRun (\s a -> s { _rnaaDryRun = a }) | 123 | rnaaDryRun :: Lens' ReplaceNetworkAclAssociation (Maybe Bool)
rnaaDryRun = lens _rnaaDryRun (\s a -> s { _rnaaDryRun = a }) | 123 | rnaaDryRun = lens _rnaaDryRun (\s a -> s { _rnaaDryRun = a }) | 61 | false | true | 0 | 9 | 18 | 45 | 24 | 21 | null | null |
atsukotakahashi/wi | src/library/Yi/Mode/Buffers.hs | gpl-2.0 | bufferKeymap :: Keymap -> Keymap
bufferKeymap = important $ choice
[ char 'p' ?>>! lineUp
, oneOf [ char 'n', char ' ' ] >>! lineDown
, oneOf [ spec KEnter, char 'f' ] >>! (switch >> setReadOnly False)
, char 'v' ?>>! (switch >> setReadOnly True)
]
where
... | 370 | bufferKeymap :: Keymap -> Keymap
bufferKeymap = important $ choice
[ char 'p' ?>>! lineUp
, oneOf [ char 'n', char ' ' ] >>! lineDown
, oneOf [ spec KEnter, char 'f' ] >>! (switch >> setReadOnly False)
, char 'v' ?>>! (switch >> setReadOnly True)
]
where
... | 370 | bufferKeymap = important $ choice
[ char 'p' ?>>! lineUp
, oneOf [ char 'n', char ' ' ] >>! lineDown
, oneOf [ spec KEnter, char 'f' ] >>! (switch >> setReadOnly False)
, char 'v' ?>>! (switch >> setReadOnly True)
]
where
setReadOnly = withCurrentBuffer .... | 337 | false | true | 0 | 9 | 119 | 121 | 60 | 61 | null | null |
apyrgio/snf-ganeti | src/Ganeti/Storage/Utils.hs | bsd-2-clause | getExclusiveStorage :: ConfigData -> Node -> Maybe Bool
getExclusiveStorage cfg n = liftM ndpExclusiveStorage (getNodeNdParams cfg n) | 133 | getExclusiveStorage :: ConfigData -> Node -> Maybe Bool
getExclusiveStorage cfg n = liftM ndpExclusiveStorage (getNodeNdParams cfg n) | 133 | getExclusiveStorage cfg n = liftM ndpExclusiveStorage (getNodeNdParams cfg n) | 77 | false | true | 0 | 7 | 16 | 40 | 19 | 21 | null | null |
green-haskell/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | addrPrimTyConName = mkPrimTc (fsLit "Addr#") addrPrimTyConKey addrPrimTyCon | 87 | addrPrimTyConName = mkPrimTc (fsLit "Addr#") addrPrimTyConKey addrPrimTyCon | 87 | addrPrimTyConName = mkPrimTc (fsLit "Addr#") addrPrimTyConKey addrPrimTyCon | 87 | false | false | 0 | 7 | 18 | 19 | 9 | 10 | null | null |
danidiaz/lens | src/Numeric/Lens.hs | bsd-3-clause | -- | A prism that shows and reads integers in base-2 through base-36
--
-- Note: This is an improper prism, since leading 0s are stripped when reading.
--
-- >>> "100" ^? base 16
-- Just 256
--
-- >>> 1767707668033969 ^. re (base 36)
-- "helloworld"
base :: Integral a => Int -> Prism' String a
base b
| b < 2 || b > 3... | 648 | base :: Integral a => Int -> Prism' String a
base b
| b < 2 || b > 36 = error ("base: Invalid base " ++ show b)
| otherwise = prism intShow intRead
where
intShow n = showSigned' (showIntAtBase (toInteger b) intToDigit') (toInteger n) ""
intRead s =
case readSigned' (readInt (fromIntegral b) (... | 398 | base b
| b < 2 || b > 36 = error ("base: Invalid base " ++ show b)
| otherwise = prism intShow intRead
where
intShow n = showSigned' (showIntAtBase (toInteger b) intToDigit') (toInteger n) ""
intRead s =
case readSigned' (readInt (fromIntegral b) (isDigit' b) digitToInt') s of
[(n,"")... | 353 | true | true | 2 | 10 | 159 | 200 | 96 | 104 | null | null |
rickardlindberg/orgapp | src/Bucket/Import.hs | bsd-3-clause | importFile :: Bucket -> FilePath -> IO Bucket
importFile bucket srcPath = do
newItem <- bucketItemFromSrc bucket srcPath
let itemDir = itemPath newItem
prepareDirectory itemDir $ do
writeMeta (itemMeta newItem) (itemDir </> metaFileName)
copyFile srcPath (itemDir </> fileName newItem)
... | 415 | importFile :: Bucket -> FilePath -> IO Bucket
importFile bucket srcPath = do
newItem <- bucketItemFromSrc bucket srcPath
let itemDir = itemPath newItem
prepareDirectory itemDir $ do
writeMeta (itemMeta newItem) (itemDir </> metaFileName)
copyFile srcPath (itemDir </> fileName newItem)
... | 415 | importFile bucket srcPath = do
newItem <- bucketItemFromSrc bucket srcPath
let itemDir = itemPath newItem
prepareDirectory itemDir $ do
writeMeta (itemMeta newItem) (itemDir </> metaFileName)
copyFile srcPath (itemDir </> fileName newItem)
copyTimestamps srcPath (itemDir </> fileName... | 369 | false | true | 0 | 14 | 93 | 135 | 59 | 76 | null | null |
jean-edouard/manager | apptool/Import/Files.hs | gpl-2.0 | cpioExtract src dst = do
inform $ "extracting CPIO " ++ src ++ " -> " ++ dst
mapM_ validateChar src
src' <- canonicalizePath src
safeSpawnShell $ printf "cd %s && (bzcat %s | cpio -idm)" dst src'
return ()
where
validateChar ch | ch `elem` [';'] = error ("bad character in " ++ show src)
... | 347 | cpioExtract src dst = do
inform $ "extracting CPIO " ++ src ++ " -> " ++ dst
mapM_ validateChar src
src' <- canonicalizePath src
safeSpawnShell $ printf "cd %s && (bzcat %s | cpio -idm)" dst src'
return ()
where
validateChar ch | ch `elem` [';'] = error ("bad character in " ++ show src)
... | 347 | cpioExtract src dst = do
inform $ "extracting CPIO " ++ src ++ " -> " ++ dst
mapM_ validateChar src
src' <- canonicalizePath src
safeSpawnShell $ printf "cd %s && (bzcat %s | cpio -idm)" dst src'
return ()
where
validateChar ch | ch `elem` [';'] = error ("bad character in " ++ show src)
... | 347 | false | false | 0 | 10 | 96 | 122 | 55 | 67 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/WebGPUBuffer.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/WebGPUBuffer.contents Mozilla WebGPUBuffer.contents documentation>
getContents :: (MonadDOM m) => WebGPUBuffer -> m ArrayBufferView
getContents self
= liftDOM ((self ^. js "contents") >>= fromJSValUnchecked) | 265 | getContents :: (MonadDOM m) => WebGPUBuffer -> m ArrayBufferView
getContents self
= liftDOM ((self ^. js "contents") >>= fromJSValUnchecked) | 142 | getContents self
= liftDOM ((self ^. js "contents") >>= fromJSValUnchecked) | 77 | true | true | 0 | 10 | 27 | 51 | 26 | 25 | null | null |
fiigii/k-cfa | LabeledAst.hs | mit | allFunction (LetRec binds body _) = let inits = map snd binds
funsList = map allFunction inits
in allFunction body `union` Set.unions funsList | 218 | allFunction (LetRec binds body _) = let inits = map snd binds
funsList = map allFunction inits
in allFunction body `union` Set.unions funsList | 218 | allFunction (LetRec binds body _) = let inits = map snd binds
funsList = map allFunction inits
in allFunction body `union` Set.unions funsList | 218 | false | false | 0 | 9 | 98 | 60 | 28 | 32 | null | null |
ianthehenry/basilica | Main.hs | mit | logCode :: (EmailAddress, Code) -> IO ()
logCode (to, code) = putStrLn (intercalate ": " [to, code]) | 100 | logCode :: (EmailAddress, Code) -> IO ()
logCode (to, code) = putStrLn (intercalate ": " [to, code]) | 100 | logCode (to, code) = putStrLn (intercalate ": " [to, code]) | 59 | false | true | 0 | 8 | 16 | 52 | 28 | 24 | null | null |
shlevy/ghc | compiler/types/Coercion.hs | bsd-3-clause | splitAppCo_maybe _ = Nothing | 28 | splitAppCo_maybe _ = Nothing | 28 | splitAppCo_maybe _ = Nothing | 28 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
erochest/phaedrus | Phaedrus/XML.hs | apache-2.0 | onEvent (EventEndElement n) es@ES { esTagStack=top:ts }
| top == n = ( es { esTagStack = ts }
, [])
| otherwise = (es, []) | 147 | onEvent (EventEndElement n) es@ES { esTagStack=top:ts }
| top == n = ( es { esTagStack = ts }
, [])
| otherwise = (es, []) | 147 | onEvent (EventEndElement n) es@ES { esTagStack=top:ts }
| top == n = ( es { esTagStack = ts }
, [])
| otherwise = (es, []) | 147 | false | false | 0 | 10 | 50 | 76 | 40 | 36 | null | null |
dysinger/amazonka | amazonka-cloudsearch-domains/gen/Network/AWS/CloudSearchDomains/Suggest.hs | mpl-2.0 | -- | Specifies the name of the suggester to use to find suggested matches.
sSuggester :: Lens' Suggest Text
sSuggester = lens _sSuggester (\s a -> s { _sSuggester = a }) | 169 | sSuggester :: Lens' Suggest Text
sSuggester = lens _sSuggester (\s a -> s { _sSuggester = a }) | 94 | sSuggester = lens _sSuggester (\s a -> s { _sSuggester = a }) | 61 | true | true | 1 | 9 | 31 | 45 | 22 | 23 | null | null |
sol/uu-parsinglib | src/Text/ParserCombinators/UU/Derived.hs | mit | pFoldr1Sep :: IsParser p => (a -> b -> b, b) -> p a1 ->p a -> p b
pFoldr1Sep alg@(op,e) sep p = must_be_non_empties "pFoldr1Sep" sep p pfm
where pfm = op <$> p <*> pFoldr alg (sep *> p) | 238 | pFoldr1Sep :: IsParser p => (a -> b -> b, b) -> p a1 ->p a -> p b
pFoldr1Sep alg@(op,e) sep p = must_be_non_empties "pFoldr1Sep" sep p pfm
where pfm = op <$> p <*> pFoldr alg (sep *> p) | 238 | pFoldr1Sep alg@(op,e) sep p = must_be_non_empties "pFoldr1Sep" sep p pfm
where pfm = op <$> p <*> pFoldr alg (sep *> p) | 167 | false | true | 0 | 10 | 93 | 105 | 53 | 52 | null | null |
yangsiwei880813/CS644 | src/TypeLinking.hs | gpl-2.0 | symbolLinkingExpr db imps su expr = error (show expr) | 53 | symbolLinkingExpr db imps su expr = error (show expr) | 53 | symbolLinkingExpr db imps su expr = error (show expr) | 53 | false | false | 0 | 7 | 8 | 24 | 11 | 13 | null | null |
aelve/guide | back/tests/ApiSpec.hs | bsd-3-clause | createItem :: Uid Category -> IO (Uid Item)
createItem (Uid categoryId) = do
request <- makeRequest
(Path $ "item/" <> toString categoryId)
(Method "POST")
let body = object ["name" .= ("testName" :: Text)]
req = setRequestBodyJSON body request
snd <$> runRequest req | 287 | createItem :: Uid Category -> IO (Uid Item)
createItem (Uid categoryId) = do
request <- makeRequest
(Path $ "item/" <> toString categoryId)
(Method "POST")
let body = object ["name" .= ("testName" :: Text)]
req = setRequestBodyJSON body request
snd <$> runRequest req | 287 | createItem (Uid categoryId) = do
request <- makeRequest
(Path $ "item/" <> toString categoryId)
(Method "POST")
let body = object ["name" .= ("testName" :: Text)]
req = setRequestBodyJSON body request
snd <$> runRequest req | 243 | false | true | 0 | 13 | 61 | 113 | 54 | 59 | null | null |
ocramz/sparse-linear-algebra | test/LibSpec.hs | gpl-3.0 | x2, b2 :: SpVector Double
x2 = mkSpVR 3 [3,2,3] | 47 | x2, b2 :: SpVector Double
x2 = mkSpVR 3 [3,2,3] | 47 | x2 = mkSpVR 3 [3,2,3] | 21 | false | true | 3 | 5 | 9 | 38 | 17 | 21 | null | null |
taktoa/derp | src/Text/Derp.hs | bsd-3-clause | compactNum :: Int -> Parser t a -> Parser t a
compactNum 0 p = p | 64 | compactNum :: Int -> Parser t a -> Parser t a
compactNum 0 p = p | 64 | compactNum 0 p = p | 18 | false | true | 0 | 7 | 15 | 34 | 16 | 18 | null | null |
ledyba/language-krkr | lib/Language/TJS/Parser.hs | gpl-3.0 | withSpan :: Parser (SrcSpan -> a) -> Parser a
withSpan m = do
from <- getPosition
c <- m
to <- getPosition
return (c (SrcSpan from to)) | 143 | withSpan :: Parser (SrcSpan -> a) -> Parser a
withSpan m = do
from <- getPosition
c <- m
to <- getPosition
return (c (SrcSpan from to)) | 143 | withSpan m = do
from <- getPosition
c <- m
to <- getPosition
return (c (SrcSpan from to)) | 97 | false | true | 0 | 12 | 34 | 77 | 34 | 43 | null | null |
tittoassini/flat | benchmarks/Data.hs | bsd-3-clause | ggg = encode (Uno,Due,Tre) | 26 | ggg = encode (Uno,Due,Tre) | 26 | ggg = encode (Uno,Due,Tre) | 26 | false | false | 1 | 6 | 3 | 21 | 10 | 11 | null | null |
GaloisInc/mistral | src/Mistral/TypeCheck/Monad.hs | bsd-3-clause | getInsts :: TC [Inst]
getInsts = TC $ do ro <- ask
return (E.getInsts (roEnv ro))
-- Unification -----------------------------------------------------------------
-- | Apply the current substitution to a type. | 233 | getInsts :: TC [Inst]
getInsts = TC $ do ro <- ask
return (E.getInsts (roEnv ro))
-- Unification -----------------------------------------------------------------
-- | Apply the current substitution to a type. | 233 | getInsts = TC $ do ro <- ask
return (E.getInsts (roEnv ro))
-- Unification -----------------------------------------------------------------
-- | Apply the current substitution to a type. | 211 | false | true | 0 | 12 | 51 | 50 | 25 | 25 | null | null |
quchen/prettyprinter | prettyprinter-compat-ansi-wl-pprint/src/Text/PrettyPrint/ANSI/Leijen.hs | bsd-2-clause | yellow = New.annotate (NewT.color NewT.Yellow) | 59 | yellow = New.annotate (NewT.color NewT.Yellow) | 59 | yellow = New.annotate (NewT.color NewT.Yellow) | 59 | false | false | 1 | 8 | 17 | 24 | 10 | 14 | null | null |
dysinger/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/Types.hs | mpl-2.0 | -- | 'ConfigurationOptionSetting' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'cosNamespace' @::@ 'Maybe' 'Text'
--
-- * 'cosOptionName' @::@ 'Maybe' 'Text'
--
-- * 'cosValue' @::@ 'Maybe' 'Text'
--
configurationOptionSetting :: ConfigurationOptionSetting
configurationOptionSettin... | 449 | configurationOptionSetting :: ConfigurationOptionSetting
configurationOptionSetting = ConfigurationOptionSetting
{ _cosNamespace = Nothing
, _cosOptionName = Nothing
, _cosValue = Nothing
} | 211 | configurationOptionSetting = ConfigurationOptionSetting
{ _cosNamespace = Nothing
, _cosOptionName = Nothing
, _cosValue = Nothing
} | 154 | true | true | 0 | 6 | 75 | 41 | 29 | 12 | null | null |
Ferdinand-vW/sessiontypes | src/Control/SessionTypes/Codensity.hs | gpl-3.0 | -- | Transforms an `STTerm` program into a `IxC` representation.
--
-- Note that applying this function to a session typed program and then
-- applying `abs` to the result will not be more efficient.
--
-- This is because applying `rep` already induces quadratic complexity.
rep :: Monad m => STTerm m s r a -> IxC m s ... | 351 | rep :: Monad m => STTerm m s r a -> IxC m s r a
rep m = IxC $ \h -> m >>= h | 75 | rep m = IxC $ \h -> m >>= h | 27 | true | true | 0 | 8 | 72 | 66 | 34 | 32 | null | null |
choener/GrammarProducts | old-BioInf/GrammarProducts/Haskell.hs | gpl-3.0 | mkTSym :: NtT -> [String]
mkTSym nt@Nt{..} = error $ "dying at finding non-terminal symbol in mkTSym: " ++ show nt | 114 | mkTSym :: NtT -> [String]
mkTSym nt@Nt{..} = error $ "dying at finding non-terminal symbol in mkTSym: " ++ show nt | 114 | mkTSym nt@Nt{..} = error $ "dying at finding non-terminal symbol in mkTSym: " ++ show nt | 88 | false | true | 2 | 8 | 20 | 45 | 22 | 23 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs | mpl-2.0 | -- | The details of the volume status.
vsiDetails :: Lens' VolumeStatusInfo [VolumeStatusDetails]
vsiDetails = lens _vsiDetails (\ s a -> s{_vsiDetails = a}) . _Default . _Coerce | 178 | vsiDetails :: Lens' VolumeStatusInfo [VolumeStatusDetails]
vsiDetails = lens _vsiDetails (\ s a -> s{_vsiDetails = a}) . _Default . _Coerce | 139 | vsiDetails = lens _vsiDetails (\ s a -> s{_vsiDetails = a}) . _Default . _Coerce | 80 | true | true | 0 | 11 | 27 | 51 | 28 | 23 | null | null |
amir-sabbaghi/encoder | src/Server.hs | bsd-3-clause | managementServer :: String -> TQueue (FilePath, String, String, Int, [(String, String)]) -> TQueue (String, String, Int, [String]) -> IO ()
managementServer port todo film = serve HostAny port $ \(socket, remoteAddr) ->
do bs <- recvAll socket
let path:name:stream:segmentTime:rest = read $ BSC.unpack bs
... | 1,899 | managementServer :: String -> TQueue (FilePath, String, String, Int, [(String, String)]) -> TQueue (String, String, Int, [String]) -> IO ()
managementServer port todo film = serve HostAny port $ \(socket, remoteAddr) ->
do bs <- recvAll socket
let path:name:stream:segmentTime:rest = read $ BSC.unpack bs
... | 1,899 | managementServer port todo film = serve HostAny port $ \(socket, remoteAddr) ->
do bs <- recvAll socket
let path:name:stream:segmentTime:rest = read $ BSC.unpack bs
codes = convertListToTriple rest
segmentArgs = if segmentTime == "no" then [] else ["-f","segment","-segment_time",segmentTime]
... | 1,759 | false | true | 0 | 20 | 574 | 725 | 376 | 349 | null | null |
matonix/pfds | src/PFDS/Sec9/Ex12.hs | bsd-3-clause | simpleDec (Ones i : ds) = Zero : ones (i - 1) ds | 48 | simpleDec (Ones i : ds) = Zero : ones (i - 1) ds | 48 | simpleDec (Ones i : ds) = Zero : ones (i - 1) ds | 48 | false | false | 0 | 8 | 12 | 35 | 17 | 18 | null | null |
isovector/eden | src/Control/Monad/Jail.hs | bsd-3-clause | runJail :: Jail s s a
-> s
-> Maybe (a, s)
runJail ac = runIdentity . runJailT ac | 97 | runJail :: Jail s s a
-> s
-> Maybe (a, s)
runJail ac = runIdentity . runJailT ac | 97 | runJail ac = runIdentity . runJailT ac | 38 | false | true | 0 | 8 | 34 | 45 | 22 | 23 | null | null |
m1dnight/carte | Setup.hs | gpl-3.0 | main = defaultMain | 18 | main = defaultMain | 18 | main = defaultMain | 18 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Scales.hs | gpl-3.0 | -- five notes scales
minPent :: Fractional a => [a]
minPent = [0,3,5,7,10] | 74 | minPent :: Fractional a => [a]
minPent = [0,3,5,7,10] | 53 | minPent = [0,3,5,7,10] | 22 | true | true | 0 | 8 | 12 | 44 | 23 | 21 | null | null |
tonyfloatersu/solution-haskell-craft-of-FP | Chapter_7_my_note.hs | mit | sublist (x : xs) (y : ys)
| x == y = sublist xs ys
| x /= y = sublist (x : xs) ys | 97 | sublist (x : xs) (y : ys)
| x == y = sublist xs ys
| x /= y = sublist (x : xs) ys | 97 | sublist (x : xs) (y : ys)
| x == y = sublist xs ys
| x /= y = sublist (x : xs) ys | 97 | false | false | 0 | 8 | 40 | 69 | 32 | 37 | null | null |
wavewave/gnuplot | src/Graphics/Gnuplot/Frame/OptionSet.hs | bsd-3-clause | xTicks3d ::
(Atom.C x, Atom.C y, Atom.C z, Tuple.C x) =>
[(String, x)] -> T (Graph3D.T x y z) -> T (Graph3D.T x y z)
xTicks3d = ticks Option.xTickLabels | 158 | xTicks3d ::
(Atom.C x, Atom.C y, Atom.C z, Tuple.C x) =>
[(String, x)] -> T (Graph3D.T x y z) -> T (Graph3D.T x y z)
xTicks3d = ticks Option.xTickLabels | 158 | xTicks3d = ticks Option.xTickLabels | 35 | false | true | 0 | 11 | 34 | 98 | 50 | 48 | null | null |
brendanhay/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'DatabaseInstance' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'datBackendType'
--
-- * 'datSatisfiesPzs'
--
-- * 'datMaxDiskSize'
--
-- * 'datOnPremisesConfiguration'
--
-- * 'datGceZone'
--
-- * 'datEtag'
... | 2,207 | databaseInstance
:: DatabaseInstance
databaseInstance =
DatabaseInstance'
{ _datBackendType = Nothing
, _datSatisfiesPzs = Nothing
, _datMaxDiskSize = Nothing
, _datOnPremisesConfiguration = Nothing
, _datGceZone = Nothing
, _datEtag = Nothing
, _datState = Nothing
, _datIPv6Addres... | 1,174 | databaseInstance =
DatabaseInstance'
{ _datBackendType = Nothing
, _datSatisfiesPzs = Nothing
, _datMaxDiskSize = Nothing
, _datOnPremisesConfiguration = Nothing
, _datGceZone = Nothing
, _datEtag = Nothing
, _datState = Nothing
, _datIPv6Address = Nothing
, _datServerCaCert = Noth... | 1,133 | true | true | 1 | 7 | 430 | 279 | 203 | 76 | null | null |
MichielDerhaeg/stack | src/Stack/Types/Docker.hs | bsd-3-clause | -- | Docker database path argument name.
dockerStackExeArgName :: Text
dockerStackExeArgName = "stack-exe" | 106 | dockerStackExeArgName :: Text
dockerStackExeArgName = "stack-exe" | 65 | dockerStackExeArgName = "stack-exe" | 35 | true | true | 0 | 6 | 12 | 19 | 8 | 11 | null | null |
plow-technologies/ble | src/Bluetooth/Internal/DBus.hs | bsd-3-clause | -- | Registers an application and advertises it. If you would like to have
-- finer-grained control of the advertisement, use @registerApplication@ and
-- @advertise@.
registerAndAdvertiseApplication :: Application -> BluetoothM ApplicationRegistered
registerAndAdvertiseApplication app = do
reg <- registerApplication... | 433 | registerAndAdvertiseApplication :: Application -> BluetoothM ApplicationRegistered
registerAndAdvertiseApplication app = do
reg <- registerApplication app
advertise (advertisementFor app)
return reg
-- | Registers an application (set of services) with Bluez. | 265 | registerAndAdvertiseApplication app = do
reg <- registerApplication app
advertise (advertisementFor app)
return reg
-- | Registers an application (set of services) with Bluez. | 182 | true | true | 0 | 9 | 60 | 53 | 25 | 28 | null | null |
GrooveStomp/yorgey-haskell-course | week-03/Golf.hs | mit | toHistogramMarker :: Bool -> Char
toHistogramMarker True = '*' | 62 | toHistogramMarker :: Bool -> Char
toHistogramMarker True = '*' | 62 | toHistogramMarker True = '*' | 28 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
frantisekfarka/ghc-dsi | compiler/cmm/CmmSink.hs | bsd-3-clause | -- important for PrimOps
regAddr dflags r _ _ | isGcPtrType (cmmRegType dflags r) = HeapMem | 91 | regAddr dflags r _ _ | isGcPtrType (cmmRegType dflags r) = HeapMem | 66 | regAddr dflags r _ _ | isGcPtrType (cmmRegType dflags r) = HeapMem | 66 | true | false | 0 | 10 | 15 | 33 | 15 | 18 | null | null |
dmjio/hadron | examples/WordCount.hs | bsd-3-clause | mapper':: Mapper B.ByteString CompositeKey Int
mapper' = linesConduit =$= C.concatMap f
where
f ln = map (\w -> ([w], 1 :: Int)) $ B.words ln | 151 | mapper':: Mapper B.ByteString CompositeKey Int
mapper' = linesConduit =$= C.concatMap f
where
f ln = map (\w -> ([w], 1 :: Int)) $ B.words ln | 151 | mapper' = linesConduit =$= C.concatMap f
where
f ln = map (\w -> ([w], 1 :: Int)) $ B.words ln | 104 | false | true | 0 | 10 | 34 | 71 | 37 | 34 | null | null |
DavidAlphaFox/yesod | yesod-core/Yesod/Core/Handler.hs | mit | put :: MonadHandler m => GHState -> m ()
put x = liftHandlerT $ HandlerT $ flip I.writeIORef x . handlerState | 109 | put :: MonadHandler m => GHState -> m ()
put x = liftHandlerT $ HandlerT $ flip I.writeIORef x . handlerState | 109 | put x = liftHandlerT $ HandlerT $ flip I.writeIORef x . handlerState | 68 | false | true | 0 | 9 | 20 | 54 | 24 | 30 | null | null |
GaloisInc/mistral | src/Mistral/Driver/Monad.hs | bsd-3-clause | collectMessages :: BaseM drv Driver => drv a -> drv ([Error],[Warning],a)
collectMessages m =
do (es0,ws0) <- inBase (swapMessages [] [])
a <- m
(es,ws) <- inBase (swapMessages es0 ws0)
return (es,ws,a)
where
swapMessages es0 ws0 = Driver $
do ro <- ask
es <- inBase (atomicModifyIORef'... | 506 | collectMessages :: BaseM drv Driver => drv a -> drv ([Error],[Warning],a)
collectMessages m =
do (es0,ws0) <- inBase (swapMessages [] [])
a <- m
(es,ws) <- inBase (swapMessages es0 ws0)
return (es,ws,a)
where
swapMessages es0 ws0 = Driver $
do ro <- ask
es <- inBase (atomicModifyIORef'... | 506 | collectMessages m =
do (es0,ws0) <- inBase (swapMessages [] [])
a <- m
(es,ws) <- inBase (swapMessages es0 ws0)
return (es,ws,a)
where
swapMessages es0 ws0 = Driver $
do ro <- ask
es <- inBase (atomicModifyIORef' (roErrors ro) (\ es -> (es0, es)))
ws <- inBase (atomicModifyIORe... | 432 | false | true | 3 | 14 | 125 | 245 | 121 | 124 | null | null |
randen/cabal | Cabal/Distribution/Simple/GHCJS.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- Registering
hcPkgInfo :: ProgramConfiguration -> HcPkg.HcPkgInfo
hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcjsPkgProg
, HcPkg.noPkgDbStack = False
... | 1,060 | hcPkgInfo :: ProgramConfiguration -> HcPkg.HcPkgInfo
hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcjsPkgProg
, HcPkg.noPkgDbStack = False
, HcPkg.noVerboseFlag = False
, HcPkg.flagPackageConf = False
... | 963 | hcPkgInfo conf = HcPkg.HcPkgInfo { HcPkg.hcPkgProgram = ghcjsPkgProg
, HcPkg.noPkgDbStack = False
, HcPkg.noVerboseFlag = False
, HcPkg.flagPackageConf = False
, HcPkg.supportsDirD... | 910 | true | true | 0 | 8 | 416 | 150 | 85 | 65 | null | null |
GaloisInc/stack | src/Stack/Package.hs | bsd-3-clause | -- | Convenience wrapper around @readPackage@ that first finds the cabal file
-- in the given directory.
readPackageDir :: (MonadLogger m, MonadIO m, MonadThrow m, MonadCatch m)
=> PackageConfig
-> Path Abs Dir
-> m (Path Abs File, Package)
readPackageDir packageConfig dir =... | 618 | readPackageDir :: (MonadLogger m, MonadIO m, MonadThrow m, MonadCatch m)
=> PackageConfig
-> Path Abs Dir
-> m (Path Abs File, Package)
readPackageDir packageConfig dir = do
cabalfp <- getCabalFileName dir
pkg <- readPackage packageConfig cabalfp
name <- parsePac... | 513 | readPackageDir packageConfig dir = do
cabalfp <- getCabalFileName dir
pkg <- readPackage packageConfig cabalfp
name <- parsePackageNameFromFilePath cabalfp
when (packageName pkg /= name)
$ throwM $ MismatchedCabalName cabalfp name
return (cabalfp, pkg)
-- | Resolve a parsed cabal file into ... | 332 | true | true | 0 | 12 | 154 | 146 | 70 | 76 | null | null |
SAdams601/HaRe | old/testing/removeCon/Pat1AST.hs | bsd-3-clause | res = error "x no longer defined for T1 at line: 3" | 51 | res = error "x no longer defined for T1 at line: 3" | 51 | res = error "x no longer defined for T1 at line: 3" | 51 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
fmapfmapfmap/amazonka | amazonka-codepipeline/gen/Network/AWS/CodePipeline/Types.hs | mpl-2.0 | -- | The specified nonce was specified in an invalid format.
_InvalidNonceException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNonceException = _ServiceError . hasCode "InvalidNonceException" | 216 | _InvalidNonceException :: AsError a => Getting (First ServiceError) a ServiceError
_InvalidNonceException = _ServiceError . hasCode "InvalidNonceException" | 155 | _InvalidNonceException = _ServiceError . hasCode "InvalidNonceException" | 72 | true | true | 0 | 8 | 26 | 39 | 19 | 20 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | getContractParameterFailedStreamReq :: KRPCHS.SpaceCenter.ContractParameter -> KRPCStreamReq (Bool)
getContractParameterFailedStreamReq thisArg =
let req = makeRequest "SpaceCenter" "ContractParameter_get_Failed" [makeArgument 0 thisArg]
in makeStream req | 264 | getContractParameterFailedStreamReq :: KRPCHS.SpaceCenter.ContractParameter -> KRPCStreamReq (Bool)
getContractParameterFailedStreamReq thisArg =
let req = makeRequest "SpaceCenter" "ContractParameter_get_Failed" [makeArgument 0 thisArg]
in makeStream req | 264 | getContractParameterFailedStreamReq thisArg =
let req = makeRequest "SpaceCenter" "ContractParameter_get_Failed" [makeArgument 0 thisArg]
in makeStream req | 164 | false | true | 0 | 11 | 29 | 56 | 27 | 29 | null | null |
fmapfmapfmap/amazonka | amazonka-elb/test/Test/AWS/Gen/ELB.hs | mpl-2.0 | testEnableAvailabilityZonesForLoadBalancer :: EnableAvailabilityZonesForLoadBalancer -> TestTree
testEnableAvailabilityZonesForLoadBalancer = req
"EnableAvailabilityZonesForLoadBalancer"
"fixture/EnableAvailabilityZonesForLoadBalancer.yaml" | 248 | testEnableAvailabilityZonesForLoadBalancer :: EnableAvailabilityZonesForLoadBalancer -> TestTree
testEnableAvailabilityZonesForLoadBalancer = req
"EnableAvailabilityZonesForLoadBalancer"
"fixture/EnableAvailabilityZonesForLoadBalancer.yaml" | 248 | testEnableAvailabilityZonesForLoadBalancer = req
"EnableAvailabilityZonesForLoadBalancer"
"fixture/EnableAvailabilityZonesForLoadBalancer.yaml" | 151 | false | true | 0 | 5 | 17 | 21 | 10 | 11 | null | null |
DanielG/cabal-helper | src/CabalHelper/Compiletime/Program/GHC.hs | apache-2.0 | getGhcPkgVersion :: (Verbose, Progs) => IO Version
getGhcPkgVersion =
parseVer . trim . dropWhile (not . isDigit)
<$> readProcess' (ghcPkgProgram ?progs) ["--version"] "" | 176 | getGhcPkgVersion :: (Verbose, Progs) => IO Version
getGhcPkgVersion =
parseVer . trim . dropWhile (not . isDigit)
<$> readProcess' (ghcPkgProgram ?progs) ["--version"] "" | 176 | getGhcPkgVersion =
parseVer . trim . dropWhile (not . isDigit)
<$> readProcess' (ghcPkgProgram ?progs) ["--version"] "" | 125 | false | true | 2 | 8 | 28 | 64 | 32 | 32 | null | null |
gregorias/pixelosolver | src/PixeloSolver/AI/OCR.hs | bsd-3-clause | getRowHints :: (BlackCheckable e, Map m r e)
=> EmptyStripeSpaceTolerance
-> m e
-> PixeloBoard
-> [[((Int, Int), m e)]]
getRowHints tolerance screenshot board =
map (map (fmap trimNonblack) . splitBlackPatchesByColumn)
. map (trimRowHintsStrip tolerance)
$ cutRowHintsStrips screenshot board | 306 | getRowHints :: (BlackCheckable e, Map m r e)
=> EmptyStripeSpaceTolerance
-> m e
-> PixeloBoard
-> [[((Int, Int), m e)]]
getRowHints tolerance screenshot board =
map (map (fmap trimNonblack) . splitBlackPatchesByColumn)
. map (trimRowHintsStrip tolerance)
$ cutRowHintsStrips screenshot board | 306 | getRowHints tolerance screenshot board =
map (map (fmap trimNonblack) . splitBlackPatchesByColumn)
. map (trimRowHintsStrip tolerance)
$ cutRowHintsStrips screenshot board | 177 | false | true | 3 | 14 | 52 | 123 | 59 | 64 | null | null |
phischu/fragnix | builtins/base/GHC.Int.hs | bsd-3-clause | eqInt64, neInt64 :: Int64 -> Int64 -> Bool
eqInt64 (I64# x) (I64# y) = isTrue# (x ==# y) | 88 | eqInt64, neInt64 :: Int64 -> Int64 -> Bool
eqInt64 (I64# x) (I64# y) = isTrue# (x ==# y) | 88 | eqInt64 (I64# x) (I64# y) = isTrue# (x ==# y) | 45 | false | true | 2 | 7 | 17 | 57 | 26 | 31 | null | null |
myuon/FuncFormat | Text/FuncFormat/Internal.hs | bsd-3-clause | buildExp _ [] xs = map (\x -> fst $ toExpQ x 'undefined 'undefined) xs | 70 | buildExp _ [] xs = map (\x -> fst $ toExpQ x 'undefined 'undefined) xs | 70 | buildExp _ [] xs = map (\x -> fst $ toExpQ x 'undefined 'undefined) xs | 70 | false | false | 0 | 9 | 14 | 41 | 21 | 20 | null | null |
copumpkin/vector-static | Data/Vector/Storable/Static.hs | bsd-3-clause | any p (Vec vs) = G.any p vs | 27 | any p (Vec vs) = G.any p vs | 27 | any p (Vec vs) = G.any p vs | 27 | false | false | 0 | 6 | 7 | 26 | 11 | 15 | null | null |
nevrenato/Hets_Fork | CSL/Interpreter.hs | gpl-2.0 | interactiveStepper :: (MonadIO m, AssignmentStore m) => m () -> EvalAtom
-> m Bool
interactiveStepper prog x = do
liftIO $ putStrLn $ "At step " ++ show (prettyEvalAtom x)
b <- evaluateAtom prog x
readEvalPrintLoop stdin stdout "next>" null
return b
-- | The most primitive atom evaluator as ... | 343 | interactiveStepper :: (MonadIO m, AssignmentStore m) => m () -> EvalAtom
-> m Bool
interactiveStepper prog x = do
liftIO $ putStrLn $ "At step " ++ show (prettyEvalAtom x)
b <- evaluateAtom prog x
readEvalPrintLoop stdin stdout "next>" null
return b
-- | The most primitive atom evaluator as ... | 343 | interactiveStepper prog x = do
liftIO $ putStrLn $ "At step " ++ show (prettyEvalAtom x)
b <- evaluateAtom prog x
readEvalPrintLoop stdin stdout "next>" null
return b
-- | The most primitive atom evaluator as expected by 'stepwise'. | 241 | false | true | 0 | 10 | 80 | 102 | 47 | 55 | null | null |
anton-dessiatov/stack | subs/rio/src/RIO/Prelude.hs | bsd-3-clause | fromFirst :: a -> First a -> a
fromFirst x = fromMaybe x . getFirst | 67 | fromFirst :: a -> First a -> a
fromFirst x = fromMaybe x . getFirst | 67 | fromFirst x = fromMaybe x . getFirst | 36 | false | true | 0 | 7 | 14 | 32 | 15 | 17 | null | null |
pparkkin/eta | compiler/ETA/Main/HscTypes.hs | bsd-3-clause | srcErrorMessages :: SourceError -> ErrorMessages
srcErrorMessages (SourceError msgs) = msgs | 91 | srcErrorMessages :: SourceError -> ErrorMessages
srcErrorMessages (SourceError msgs) = msgs | 91 | srcErrorMessages (SourceError msgs) = msgs | 42 | false | true | 0 | 6 | 9 | 28 | 13 | 15 | null | null |
simonmar/alex | src/Data/Ranged/Ranges.hs | bsd-3-clause | rangeSingletonValue (Range _ _) = Nothing | 41 | rangeSingletonValue (Range _ _) = Nothing | 41 | rangeSingletonValue (Range _ _) = Nothing | 41 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
samscott89/tamarin-prover | lib/theory/src/Theory/Tools/IntruderRules.hs | gpl-3.0 | isDRule :: ByteString -> Rule (RuleInfo t IntrRuleACInfo) -> Bool
isDRule ruString ru = case get rInfo ru of
IntrInfo (DestrRule n) | n == ruString -> True
_ -> False | 211 | isDRule :: ByteString -> Rule (RuleInfo t IntrRuleACInfo) -> Bool
isDRule ruString ru = case get rInfo ru of
IntrInfo (DestrRule n) | n == ruString -> True
_ -> False | 211 | isDRule ruString ru = case get rInfo ru of
IntrInfo (DestrRule n) | n == ruString -> True
_ -> False | 145 | false | true | 1 | 9 | 75 | 71 | 34 | 37 | null | null |
AlexanderPankiv/ghc | compiler/deSugar/DsUtils.hs | bsd-3-clause | adjustMatchResultDs :: (CoreExpr -> DsM CoreExpr) -> MatchResult -> MatchResult
adjustMatchResultDs encl_fn (MatchResult can_it_fail body_fn)
= MatchResult can_it_fail (\fail -> encl_fn =<< body_fn fail) | 205 | adjustMatchResultDs :: (CoreExpr -> DsM CoreExpr) -> MatchResult -> MatchResult
adjustMatchResultDs encl_fn (MatchResult can_it_fail body_fn)
= MatchResult can_it_fail (\fail -> encl_fn =<< body_fn fail) | 205 | adjustMatchResultDs encl_fn (MatchResult can_it_fail body_fn)
= MatchResult can_it_fail (\fail -> encl_fn =<< body_fn fail) | 125 | false | true | 0 | 9 | 25 | 62 | 31 | 31 | null | null |
jkr/pandoc-citeproc | src/Text/CSL/Input/Bibutils.hs | bsd-3-clause | metaValueToJSON :: MetaValue -> Value
metaValueToJSON (MetaMap m) = toJSON $ M.map metaValueToJSON m | 100 | metaValueToJSON :: MetaValue -> Value
metaValueToJSON (MetaMap m) = toJSON $ M.map metaValueToJSON m | 100 | metaValueToJSON (MetaMap m) = toJSON $ M.map metaValueToJSON m | 62 | false | true | 0 | 7 | 13 | 35 | 17 | 18 | null | null |
mainland/nikola | src/Data/Array/Nikola/Backend/C/Codegen.hs | bsd-3-clause | compileExp (AppE f es) = do
dialect <- fromLJust fDialect <$> getFlags
ctx <- getContext
tau <- inferExp f
cf <- compileExp f
compileCall dialect ctx ctx tau es $ \maybe_cresult cargs ->
case maybe_cresult of
Nothing -> addStm [cstm|($cf)($args:cargs);|]
... | 382 | compileExp (AppE f es) = do
dialect <- fromLJust fDialect <$> getFlags
ctx <- getContext
tau <- inferExp f
cf <- compileExp f
compileCall dialect ctx ctx tau es $ \maybe_cresult cargs ->
case maybe_cresult of
Nothing -> addStm [cstm|($cf)($args:cargs);|]
... | 382 | compileExp (AppE f es) = do
dialect <- fromLJust fDialect <$> getFlags
ctx <- getContext
tau <- inferExp f
cf <- compileExp f
compileCall dialect ctx ctx tau es $ \maybe_cresult cargs ->
case maybe_cresult of
Nothing -> addStm [cstm|($cf)($args:cargs);|]
... | 382 | false | false | 0 | 12 | 112 | 116 | 56 | 60 | null | null |
ratatosk/learn | Learn/Algorithms.hs | bsd-3-clause | normP :: (Monad m, Shape sh, Source r a, Elt a, Unbox a) => Array r sh a -> a
normP x = dotProductP x x | 103 | normP :: (Monad m, Shape sh, Source r a, Elt a, Unbox a) => Array r sh a -> a
normP x = dotProductP x x | 103 | normP x = dotProductP x x | 25 | false | true | 0 | 8 | 25 | 72 | 33 | 39 | null | null |
ekmett/data-lens | Data/Lens/Lazy.hs | bsd-3-clause | -- | infix modification of a value through a lens into state
-- with a supplemental response
(%%=), (!%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c
Lens f %%= g = StateT $ \a -> case f a of
StoreT (Identity h) b -> case g b of
(c, b') -> return (c, h b') | 275 | (%%=), (!%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c
Lens f %%= g = StateT $ \a -> case f a of
StoreT (Identity h) b -> case g b of
(c, b') -> return (c, h b') | 182 | Lens f %%= g = StateT $ \a -> case f a of
StoreT (Identity h) b -> case g b of
(c, b') -> return (c, h b') | 112 | true | true | 4 | 14 | 70 | 139 | 70 | 69 | null | null |
bamboo/sneerkell | src/Sneer/Protocol.hs | lgpl-3.0 | parseAck :: T.KeyValuePairs -> Maybe FromServer
parseAck kvs =
Ack <$> tryGetFromTransit forKeyword kvs
<*> tryGetFromTransit ackKeyword kvs | 148 | parseAck :: T.KeyValuePairs -> Maybe FromServer
parseAck kvs =
Ack <$> tryGetFromTransit forKeyword kvs
<*> tryGetFromTransit ackKeyword kvs | 148 | parseAck kvs =
Ack <$> tryGetFromTransit forKeyword kvs
<*> tryGetFromTransit ackKeyword kvs | 100 | false | true | 0 | 7 | 25 | 41 | 19 | 22 | null | null |
ideas-edu/ideas | src/Ideas/Common/Rewriting/Confluence.hs | apache-2.0 | defaultConfig :: Config
defaultConfig = Config show (const 0) (==) | 67 | defaultConfig :: Config
defaultConfig = Config show (const 0) (==) | 66 | defaultConfig = Config show (const 0) (==) | 42 | false | true | 0 | 7 | 10 | 33 | 15 | 18 | null | null |
green-haskell/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | Used for 'x etc, but not available to the programmer
mkNameG :: NameSpace -> String -> String -> String -> Name
mkNameG ns pkg modu occ
= Name (mkOccName occ) (NameG ns (mkPkgName pkg) (mkModName modu)) | 209 | mkNameG :: NameSpace -> String -> String -> String -> Name
mkNameG ns pkg modu occ
= Name (mkOccName occ) (NameG ns (mkPkgName pkg) (mkModName modu)) | 151 | mkNameG ns pkg modu occ
= Name (mkOccName occ) (NameG ns (mkPkgName pkg) (mkModName modu)) | 92 | true | true | 0 | 9 | 39 | 70 | 35 | 35 | null | null |
mcschroeder/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | setIdUnfoldingLazily :: Id -> Unfolding -> Id
setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 134 | setIdUnfoldingLazily :: Id -> Unfolding -> Id
setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 134 | setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 88 | false | true | 0 | 6 | 14 | 35 | 19 | 16 | null | null |
pacak/cuddly-bassoon | unordered-containers-0.2.8.0/tests/Regressions.hs | bsd-3-clause | ------------------------------------------------------------------------
-- * Test list
tests :: [Test]
tests =
[
testCase "issue32" issue32
, testCase "issue39a" issue39
, testProperty "issue39b" propEqAfterDelete
] | 239 | tests :: [Test]
tests =
[
testCase "issue32" issue32
, testCase "issue39a" issue39
, testProperty "issue39b" propEqAfterDelete
] | 150 | tests =
[
testCase "issue32" issue32
, testCase "issue39a" issue39
, testProperty "issue39b" propEqAfterDelete
] | 134 | true | true | 0 | 7 | 45 | 47 | 23 | 24 | null | null |
pacak/sqroll | tests/Database/Sqroll/TH/Tests.hs | bsd-3-clause | -- create a function called initializeAllTables
tests :: Test
tests = testGroup "Database.Sqroll.TH.Tests"
[ testCase "testNoInitializer" testNoInitializer
, testCase "testTHInitializer" testTHInitializer
] | 219 | tests :: Test
tests = testGroup "Database.Sqroll.TH.Tests"
[ testCase "testNoInitializer" testNoInitializer
, testCase "testTHInitializer" testTHInitializer
] | 170 | tests = testGroup "Database.Sqroll.TH.Tests"
[ testCase "testNoInitializer" testNoInitializer
, testCase "testTHInitializer" testTHInitializer
] | 156 | true | true | 0 | 7 | 34 | 33 | 17 | 16 | null | null |
ctford/Idris-Elba-dev | src/Idris/Core/ProofState.hs | bsd-3-clause | hole (Guess _ _) = True | 23 | hole (Guess _ _) = True | 23 | hole (Guess _ _) = True | 23 | false | false | 0 | 6 | 5 | 18 | 8 | 10 | null | null |
capn-freako/lambda-ccc | src/LambdaCCC/ReifySimple.hs | bsd-3-clause | -- || isRepMeth name
-- isPrimitiveOp :: Var -> Type -> Bool
-- isPrimitiveOp (fqVarName -> name) ty =
-- name `M.member` primMap
-- || (name `M.member` stdMeths && isPrimitiveTy ty)
-- || isRepMeth name
-- isPrimitiveOp :: Var -> [CoreExpr] -> Bool
-- isPrimitiveOp (fqVarName -> name) args =
-- name `M... | 625 | isPrimitiveTy :: Type -> Bool
isPrimitiveTy ty = any ($ ty) [isUnitTy,isBoolTy,isIntTy,isDoubleTy] | 98 | isPrimitiveTy ty = any ($ ty) [isUnitTy,isBoolTy,isIntTy,isDoubleTy] | 68 | true | true | 0 | 7 | 133 | 60 | 38 | 22 | null | null |
percivalgambit/hasked | src/Data/ListLike/Zipper.hs | bsd-3-clause | -- A safe version of cursor. This wraps the result in a Maybe monad, so if the
-- focus is just past the end of the underlying ListLike, the result is Nothing,
-- otherwise the result is Just the element at the focus
safeCursor :: (LL.ListLike full item) => Zipper full -> Maybe item
safeCursor (Zip _ rs)
| LL.null... | 370 | safeCursor :: (LL.ListLike full item) => Zipper full -> Maybe item
safeCursor (Zip _ rs)
| LL.null rs = Nothing
| otherwise = Just (LL.head rs) | 152 | safeCursor (Zip _ rs)
| LL.null rs = Nothing
| otherwise = Just (LL.head rs) | 85 | true | true | 1 | 9 | 78 | 81 | 39 | 42 | null | null |
oldmanmike/ghc | compiler/utils/FastString.hs | bsd-3-clause | bucket_match :: [FastString] -> Int -> Ptr Word8 -> IO (Maybe FastString)
bucket_match [] _ _ = return Nothing | 110 | bucket_match :: [FastString] -> Int -> Ptr Word8 -> IO (Maybe FastString)
bucket_match [] _ _ = return Nothing | 110 | bucket_match [] _ _ = return Nothing | 36 | false | true | 0 | 10 | 18 | 50 | 24 | 26 | null | null |
GRACeFUL-project/GRACe | examples/QuickCheckTesting.hs | bsd-3-clause | -- assume no overlap
countMatches :: Eq a => [a] -> [a] -> Int
countMatches pat xs | length xs < length pat = 0
| otherwise = (if start == pat then 1 else 0)
+ countMatches pat rest
where (start, rest) = splitAt (length pat) xs | 285 | countMatches :: Eq a => [a] -> [a] -> Int
countMatches pat xs | length xs < length pat = 0
| otherwise = (if start == pat then 1 else 0)
+ countMatches pat rest
where (start, rest) = splitAt (length pat) xs | 264 | countMatches pat xs | length xs < length pat = 0
| otherwise = (if start == pat then 1 else 0)
+ countMatches pat rest
where (start, rest) = splitAt (length pat) xs | 222 | true | true | 0 | 9 | 105 | 112 | 56 | 56 | null | null |
sjakobi/heist | src/Heist/Internal/Types/HeistState.hs | bsd-3-clause | showChunk (RuntimeHtml _) = "RuntimeHtml" | 41 | showChunk (RuntimeHtml _) = "RuntimeHtml" | 41 | showChunk (RuntimeHtml _) = "RuntimeHtml" | 41 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
fredokun/piexplorer | src/Semop.hs | gpl-3.0 | initState:: Process a -> State a
initState p = State (initEnv (allNames p)) p | 77 | initState:: Process a -> State a
initState p = State (initEnv (allNames p)) p | 77 | initState p = State (initEnv (allNames p)) p | 44 | false | true | 0 | 9 | 13 | 41 | 19 | 22 | null | null |
BartAdv/Idris-dev | src/Idris/Docstrings.hs | bsd-3-clause | options = CT.Options { CT.sanitize = True
, CT.allowRawHtml = False
, CT.preserveHardBreaks = True
, CT.debug = False
} | 203 | options = CT.Options { CT.sanitize = True
, CT.allowRawHtml = False
, CT.preserveHardBreaks = True
, CT.debug = False
} | 203 | options = CT.Options { CT.sanitize = True
, CT.allowRawHtml = False
, CT.preserveHardBreaks = True
, CT.debug = False
} | 203 | false | false | 1 | 7 | 103 | 49 | 26 | 23 | null | null |
byorgey/Idris-dev | src/Core/Elaborate.hs | bsd-3-clause | get_type_val :: Raw -> Elab' aux (Term, Type)
get_type_val tm = do ctxt <- get_context
env <- get_env
(val, ty) <- lift $ check ctxt env tm
return (finalise val, finalise ty)
-- get holes we've deferred for later definition | 287 | get_type_val :: Raw -> Elab' aux (Term, Type)
get_type_val tm = do ctxt <- get_context
env <- get_env
(val, ty) <- lift $ check ctxt env tm
return (finalise val, finalise ty)
-- get holes we've deferred for later definition | 287 | get_type_val tm = do ctxt <- get_context
env <- get_env
(val, ty) <- lift $ check ctxt env tm
return (finalise val, finalise ty)
-- get holes we've deferred for later definition | 241 | false | true | 0 | 10 | 103 | 90 | 43 | 47 | null | null |
meiersi/blaze-protobuf | BaseLine.hs | bsd-3-clause | -- 2: media
testImage :: Image
testImage =
Image
"http://javaone.com/keynote_large.jpg"
(Just "Javaone Keynote")
1024
768
LARGE | 162 | testImage :: Image
testImage =
Image
"http://javaone.com/keynote_large.jpg"
(Just "Javaone Keynote")
1024
768
LARGE | 149 | testImage =
Image
"http://javaone.com/keynote_large.jpg"
(Just "Javaone Keynote")
1024
768
LARGE | 130 | true | true | 0 | 6 | 50 | 40 | 16 | 24 | null | null |
Palmik/data-store | src/Data/Store.hs | bsd-3-clause | -- | The expression (@'Data.Store.Selection.lookup' sel store@) is
-- list of (raw key)-element pairs that match the selection.
-- The list is sorted in descending order with respect to the specified dimension.
--
-- NOTE: The function only works (this is ensured on the type level) with when
-- the ordering is based on... | 825 | lookupOrderByD :: (I.DimensionRelation n krs ts ~ I.O, I.GetDimension n (I.IKey krs ts), IsSelection sel)
=> sel tag krs irs ts
-> (tag, n)
-> I.Store tag krs irs ts v
-> [(I.RawKey krs ts, v)]
lookupOrderByD sel (_, n) s = I.genericLookupDesc (resolve sel s) ... | 323 | lookupOrderByD sel (_, n) s = I.genericLookupDesc (resolve sel s) n s | 69 | true | true | 0 | 12 | 196 | 159 | 88 | 71 | null | null |
thomie/vector | Data/Vector/Primitive/Mutable.hs | bsd-3-clause | set = G.set | 11 | set = G.set | 11 | set = G.set | 11 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
nfjinjing/luka | src/Language/ObjectiveC/Luka/Extra.hs | bsd-3-clause | block :: IO () -> IO ID
block io = do
block_ptr <- mk_Block io
class_named "LukaBlock" >>= msg_obj "makeBlock:" [argFunPtr - block_ptr] | 139 | block :: IO () -> IO ID
block io = do
block_ptr <- mk_Block io
class_named "LukaBlock" >>= msg_obj "makeBlock:" [argFunPtr - block_ptr] | 139 | block io = do
block_ptr <- mk_Block io
class_named "LukaBlock" >>= msg_obj "makeBlock:" [argFunPtr - block_ptr] | 115 | false | true | 0 | 10 | 26 | 58 | 26 | 32 | null | null |
Mokosha/HsTetrisAttack | TetrisAttack/Constants.hs | mit | gTileFallTime :: Float
gTileFallTime = 0.035 | 44 | gTileFallTime :: Float
gTileFallTime = 0.035 | 44 | gTileFallTime = 0.035 | 21 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32F427/DMA.hs | bsd-3-clause | ahb1Enable :: BitDataField RCC_AHB1ENR Bit -> Ivory eff ()
ahb1Enable bit = modifyReg regRCC_AHB1ENR (setBit bit) | 113 | ahb1Enable :: BitDataField RCC_AHB1ENR Bit -> Ivory eff ()
ahb1Enable bit = modifyReg regRCC_AHB1ENR (setBit bit) | 113 | ahb1Enable bit = modifyReg regRCC_AHB1ENR (setBit bit) | 54 | false | true | 0 | 8 | 15 | 47 | 20 | 27 | null | null |
maffh92/AFP-ANT | src/Ant.hs | bsd-3-clause | -- | Marker 0
zero :: Marker
zero = Zero | 40 | zero :: Marker
zero = Zero | 26 | zero = Zero | 11 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
fmthoma/ghc | compiler/llvmGen/LlvmCodeGen/CodeGen.hs | bsd-3-clause | -- | Word type expected (usual).
wordOption :: EOption
wordOption = EOption False | 81 | wordOption :: EOption
wordOption = EOption False | 48 | wordOption = EOption False | 26 | true | true | 0 | 6 | 12 | 22 | 9 | 13 | null | null |
shlevy/ghc | compiler/main/DriverPhases.hs | bsd-3-clause | eqPhase Cobjcxx Cobjcxx = True | 37 | eqPhase Cobjcxx Cobjcxx = True | 37 | eqPhase Cobjcxx Cobjcxx = True | 37 | false | false | 0 | 5 | 11 | 11 | 5 | 6 | null | null |
elieux/ghc | compiler/deSugar/DsArrows.hs | bsd-3-clause | -- List of leaf expressions, with set of variables bound in each
leavesMatch :: LMatch Id (Located (body Id)) -> [(Located (body Id), IdSet)]
leavesMatch (L _ (Match _ pats _ (GRHSs grhss (L _ binds))))
= let
defined_vars = mkVarSet (collectPatsBinders pats)
`unionVarSet`
... | 504 | leavesMatch :: LMatch Id (Located (body Id)) -> [(Located (body Id), IdSet)]
leavesMatch (L _ (Match _ pats _ (GRHSs grhss (L _ binds))))
= let
defined_vars = mkVarSet (collectPatsBinders pats)
`unionVarSet`
mkVarSet (collectLocalBinders binds)
in
[(body,... | 438 | leavesMatch (L _ (Match _ pats _ (GRHSs grhss (L _ binds))))
= let
defined_vars = mkVarSet (collectPatsBinders pats)
`unionVarSet`
mkVarSet (collectLocalBinders binds)
in
[(body,
mkVarSet (collectLStmtsBinders stmts)
`unionVarSet` defined_va... | 361 | true | true | 2 | 13 | 145 | 177 | 87 | 90 | null | null |
romanb/amazonka | amazonka-emr/gen/Network/AWS/EMR/Types.hs | mpl-2.0 | -- | The programmatic code for the state change reason.
cscrCode :: Lens' ClusterStateChangeReason (Maybe ClusterStateChangeReasonCode)
cscrCode = lens _cscrCode (\s a -> s { _cscrCode = a }) | 191 | cscrCode :: Lens' ClusterStateChangeReason (Maybe ClusterStateChangeReasonCode)
cscrCode = lens _cscrCode (\s a -> s { _cscrCode = a }) | 135 | cscrCode = lens _cscrCode (\s a -> s { _cscrCode = a }) | 55 | true | true | 0 | 9 | 28 | 46 | 25 | 21 | null | null |
fosskers/colour-hist | Data/Colour/Histogram.hs | gpl-3.0 | bin32x32f :: (Float,Float) -> (Word8,Word8)
bin32x32f (x,y) = bin32x32 (scaleF x, scaleF y) | 91 | bin32x32f :: (Float,Float) -> (Word8,Word8)
bin32x32f (x,y) = bin32x32 (scaleF x, scaleF y) | 91 | bin32x32f (x,y) = bin32x32 (scaleF x, scaleF y) | 47 | false | true | 0 | 7 | 12 | 51 | 28 | 23 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | wayOptP _ WayProf = ["-DPROFILING"] | 39 | wayOptP _ WayProf = ["-DPROFILING"] | 39 | wayOptP _ WayProf = ["-DPROFILING"] | 39 | false | false | 1 | 6 | 8 | 16 | 7 | 9 | null | null |
nevrenato/HetsAlloy | SoftFOL/ProveHyperHyper.hs | gpl-2.0 | hyperCMDLautomaticBatch ::
Bool -- ^ True means include proved theorems
-> Bool -- ^ True means save problem file
-> Concurrent.MVar (Result.Result [ProofStatus ProofTree])
-- ^ used to store the result of the batch run
-> String -- ^ theory name
-> TacticScript -- ... | 1,058 | hyperCMDLautomaticBatch ::
Bool -- ^ True means include proved theorems
-> Bool -- ^ True means save problem file
-> Concurrent.MVar (Result.Result [ProofStatus ProofTree])
-- ^ used to store the result of the batch run
-> String -- ^ theory name
-> TacticScript -- ... | 933 | hyperCMDLautomaticBatch inclProvedThs saveProblem_batch resultMVar
thName defTS th freedefs =
genericCMDLautomaticBatch (atpFun thName) inclProvedThs saveProblem_batch
resultMVar hyperS thName
(parseTacticScript batchTimeLimit [] defTS) th freedefs emptyProofTree | 307 | true | true | 0 | 15 | 280 | 153 | 79 | 74 | null | null |
anttisalonen/freekick2 | src/Listings.hs | gpl-3.0 | showPlayerNation 120 = "India" | 30 | showPlayerNation 120 = "India" | 30 | showPlayerNation 120 = "India" | 30 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
holdenlee/fluidity | SeekWhence/formulas/TreeState.hs | mit | patternMatch :: MTreeState' -> Formula -> Maybe [Formula]
patternMatch mts f =
do
subs <- evalStateT (mts M.empty) f
return $ elems subs | 157 | patternMatch :: MTreeState' -> Formula -> Maybe [Formula]
patternMatch mts f =
do
subs <- evalStateT (mts M.empty) f
return $ elems subs | 156 | patternMatch mts f =
do
subs <- evalStateT (mts M.empty) f
return $ elems subs | 98 | false | true | 0 | 11 | 43 | 60 | 28 | 32 | null | null |
zoomhub/zoomhub | src/ZoomHub/API.hs | mit | webRedirectURI :: BaseURI -> ContentId -> URI
webRedirectURI = redirectURI "/" | 78 | webRedirectURI :: BaseURI -> ContentId -> URI
webRedirectURI = redirectURI "/" | 78 | webRedirectURI = redirectURI "/" | 32 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
kqr/hmenu | X.hs | bsd-2-clause | withXConf :: (XConf -> IO ()) -> IO ()
withXConf proc = do
dpy <- X.openDisplay ""
(_, _, fontData) <- X.createFontSet dpy "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
proc (XConf dpy (X.defaultScreen dpy) fontData (getColor dpy))
X.freeFontSet dpy fontData | 259 | withXConf :: (XConf -> IO ()) -> IO ()
withXConf proc = do
dpy <- X.openDisplay ""
(_, _, fontData) <- X.createFontSet dpy "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
proc (XConf dpy (X.defaultScreen dpy) fontData (getColor dpy))
X.freeFontSet dpy fontData | 259 | withXConf proc = do
dpy <- X.openDisplay ""
(_, _, fontData) <- X.createFontSet dpy "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
proc (XConf dpy (X.defaultScreen dpy) fontData (getColor dpy))
X.freeFontSet dpy fontData | 220 | false | true | 0 | 12 | 42 | 112 | 53 | 59 | null | null |
BenedictEggers/haskell-scheme | interpreter.hs | mit | parseString :: Parser LispVal
parseString = do
char '"'
x <- many (noneOf "\"")
char '"'
return $ String x | 122 | parseString :: Parser LispVal
parseString = do
char '"'
x <- many (noneOf "\"")
char '"'
return $ String x | 122 | parseString = do
char '"'
x <- many (noneOf "\"")
char '"'
return $ String x | 92 | false | true | 0 | 11 | 35 | 58 | 23 | 35 | null | null |
davnils/distr-btc | src/HTrade/Backend/Configuration.hs | bsd-3-clause | -- | Parse a directory containing market configurations.
-- Returns a list of market identifers updated (loaded or refreshed) and any
-- invalid configuration files.
--
loadConfigurations
:: (Functor m, MonadBaseControl IO m, MonadIO m)
=> FilePath
-> MConfigT (PL.MProxyT m) (Maybe ([MarketIdentifier], [FileP... | 2,570 | loadConfigurations
:: (Functor m, MonadBaseControl IO m, MonadIO m)
=> FilePath
-> MConfigT (PL.MProxyT m) (Maybe ([MarketIdentifier], [FilePath]))
loadConfigurations dir = E.runMaybeT $ do
lift' (D.doesDirectoryExist dir) >>= guard
files <- filter (not . L.isPrefixOf ".") <$> lift' (D.getDirectoryContents di... | 2,397 | loadConfigurations dir = E.runMaybeT $ do
lift' (D.doesDirectoryExist dir) >>= guard
files <- filter (not . L.isPrefixOf ".") <$> lift' (D.getDirectoryContents dir)
let withDirPrefix = map ((dir ++ "/") ++) files
parsed <- zip files <$> lift' (mapM parseConfigurationFile withDirPrefix)
let (failedFiles, pars... | 2,243 | true | true | 2 | 17 | 521 | 827 | 399 | 428 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.