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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opentower/carnap | Carnap/src/Carnap/Languages/PureFirstOrder/Logic/ThomasBolducAndZach.hs | gpl-3.0 | thomasBolducAndZachFOL2019Calc = mkNDCalc
{ ndRenderer = FitchStyle StandardFitch
, ndParseProof = parseThomasBolducAndZachFOL2019Proof
, ndProcessLine = hoProcessLineFitch
, ndProcessLineMemo = Just hoProcessLineFitchMemo
, ndParseSeq = parseSeqOver thomasBolducAndZachFOL2019FormulaParser
, ndP... | 440 | thomasBolducAndZachFOL2019Calc = mkNDCalc
{ ndRenderer = FitchStyle StandardFitch
, ndParseProof = parseThomasBolducAndZachFOL2019Proof
, ndProcessLine = hoProcessLineFitch
, ndProcessLineMemo = Just hoProcessLineFitchMemo
, ndParseSeq = parseSeqOver thomasBolducAndZachFOL2019FormulaParser
, ndP... | 440 | thomasBolducAndZachFOL2019Calc = mkNDCalc
{ ndRenderer = FitchStyle StandardFitch
, ndParseProof = parseThomasBolducAndZachFOL2019Proof
, ndProcessLine = hoProcessLineFitch
, ndProcessLineMemo = Just hoProcessLineFitchMemo
, ndParseSeq = parseSeqOver thomasBolducAndZachFOL2019FormulaParser
, ndP... | 440 | false | false | 0 | 9 | 68 | 68 | 38 | 30 | null | null |
jystic/QuickSpec | experiment/Monomorphise.hs | bsd-3-clause | expName :: Exp -> Name
expName (VarE x) = x | 43 | expName :: Exp -> Name
expName (VarE x) = x | 43 | expName (VarE x) = x | 20 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
benhumphreys/hogbom-haskell | Image.hs | gpl-2.0 | -- | Given an image, a position, and a vale, returns an image with the
-- value at the given position, and all other pixels the same as the
-- input image
setElem :: Image -> Pos -> Float -> Image
setElem (Image vec sh) p val = (Image (vec V.// [(pos1d, val)]) sh)
where pos1d = toIndex p sh
-- | Given a shape and ... | 407 | setElem :: Image -> Pos -> Float -> Image
setElem (Image vec sh) p val = (Image (vec V.// [(pos1d, val)]) sh)
where pos1d = toIndex p sh
-- | Given a shape and a value, returns an image of the given shape with
-- all pixels set to the given value | 252 | setElem (Image vec sh) p val = (Image (vec V.// [(pos1d, val)]) sh)
where pos1d = toIndex p sh
-- | Given a shape and a value, returns an image of the given shape with
-- all pixels set to the given value | 210 | true | true | 0 | 10 | 89 | 81 | 45 | 36 | null | null |
Mahdi89/eTeak | src/Plot.hs | bsd-3-clause | teakOProps :: [PlotOption] -> [DotNVPair]
teakOProps opts = compNodeProps opts ++ maybe [] (\length -> [("maxlabelwidth", show length)]) maxOLength
where
maxOLength = do
found <- findSubOption opts $ PlotOLength undefined
let PlotOLength len = found
... | 332 | teakOProps :: [PlotOption] -> [DotNVPair]
teakOProps opts = compNodeProps opts ++ maybe [] (\length -> [("maxlabelwidth", show length)]) maxOLength
where
maxOLength = do
found <- findSubOption opts $ PlotOLength undefined
let PlotOLength len = found
re... | 328 | teakOProps opts = compNodeProps opts ++ maybe [] (\length -> [("maxlabelwidth", show length)]) maxOLength
where
maxOLength = do
found <- findSubOption opts $ PlotOLength undefined
let PlotOLength len = found
return len | 286 | false | true | 0 | 12 | 108 | 105 | 50 | 55 | null | null |
m-alvarez/jhc | src/FrontEnd/Tc/Type.hs | mit | extractTyVar t = fail $ "not a Var:" ++ show t | 46 | extractTyVar t = fail $ "not a Var:" ++ show t | 46 | extractTyVar t = fail $ "not a Var:" ++ show t | 46 | false | false | 0 | 6 | 10 | 20 | 9 | 11 | null | null |
beni55/cryptol | src/Cryptol/REPL/Monad.hs | bsd-3-clause | getNewtypes :: REPL (Map.Map P.QName T.Newtype)
getNewtypes = do
(decls,_) <- getFocusedEnv
return (keepOne "getNewtypes" `fmap` M.ifNewtypes decls)
-- | Get visible variable names. | 186 | getNewtypes :: REPL (Map.Map P.QName T.Newtype)
getNewtypes = do
(decls,_) <- getFocusedEnv
return (keepOne "getNewtypes" `fmap` M.ifNewtypes decls)
-- | Get visible variable names. | 186 | getNewtypes = do
(decls,_) <- getFocusedEnv
return (keepOne "getNewtypes" `fmap` M.ifNewtypes decls)
-- | Get visible variable names. | 138 | false | true | 2 | 12 | 28 | 72 | 33 | 39 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/Arr.hs | bsd-3-clause | numElementsSTArray :: STArray s i e -> Int
numElementsSTArray (STArray _ _ n _) = n | 83 | numElementsSTArray :: STArray s i e -> Int
numElementsSTArray (STArray _ _ n _) = n | 83 | numElementsSTArray (STArray _ _ n _) = n | 40 | false | true | 0 | 9 | 15 | 43 | 19 | 24 | null | null |
thoughtpolice/hs-nacl | src/Crypto/DH/Curve25519.hs | bsd-3-clause | cryptoDhBYTES :: Int
cryptoDhBYTES = 32 | 39 | cryptoDhBYTES :: Int
cryptoDhBYTES = 32 | 39 | cryptoDhBYTES = 32 | 18 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
bts/mtsbs | Transformers.hs | mit | eval6 (Abs n e) = do tick
env <- ask
return $ FunVal env n e | 102 | eval6 (Abs n e) = do tick
env <- ask
return $ FunVal env n e | 102 | eval6 (Abs n e) = do tick
env <- ask
return $ FunVal env n e | 102 | false | false | 0 | 8 | 57 | 42 | 18 | 24 | null | null |
rvion/stack | src/Stack/Types/Version.hs | bsd-3-clause | -- | Make a package version.
mkVersion :: String -> Q Exp
mkVersion s =
case parseVersionFromString s of
Nothing -> error ("Invalid package version: " ++ show s)
Just pn -> [|pn|]
-- | Display a version range | 219 | mkVersion :: String -> Q Exp
mkVersion s =
case parseVersionFromString s of
Nothing -> error ("Invalid package version: " ++ show s)
Just pn -> [|pn|]
-- | Display a version range | 190 | mkVersion s =
case parseVersionFromString s of
Nothing -> error ("Invalid package version: " ++ show s)
Just pn -> [|pn|]
-- | Display a version range | 161 | true | true | 0 | 11 | 49 | 61 | 31 | 30 | null | null |
urbanslug/ghc | compiler/basicTypes/Lexeme.hs | bsd-3-clause | isLexSym cs = isLexConSym cs || isLexVarSym cs | 46 | isLexSym cs = isLexConSym cs || isLexVarSym cs | 46 | isLexSym cs = isLexConSym cs || isLexVarSym cs | 46 | false | false | 0 | 6 | 7 | 19 | 8 | 11 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/CloudWatchDashboard.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-dashboard.html#cfn-cloudwatch-dashboard-dashboardname
cwdDashboardName :: Lens' CloudWatchDashboard (Maybe (Val Text))
cwdDashboardName = lens _cloudWatchDashboardDashboardName (\s a -> s { _cloudWatchDashboardDashboardName = a }... | 321 | cwdDashboardName :: Lens' CloudWatchDashboard (Maybe (Val Text))
cwdDashboardName = lens _cloudWatchDashboardDashboardName (\s a -> s { _cloudWatchDashboardDashboardName = a }) | 176 | cwdDashboardName = lens _cloudWatchDashboardDashboardName (\s a -> s { _cloudWatchDashboardDashboardName = a }) | 111 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
mlite/hLLVM | src/Llvm/Hir/DataLayoutMetrics.hs | bsd-3-clause | intLayoutMetrics :: M.Map SizeInBit AlignMetrics
intLayoutMetrics = M.fromList [(SizeInBit 1, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 8, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 16, AlignMetrics (AlignInBit 16) (Ju... | 570 | intLayoutMetrics :: M.Map SizeInBit AlignMetrics
intLayoutMetrics = M.fromList [(SizeInBit 1, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 8, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 16, AlignMetrics (AlignInBit 16) (Jus... | 569 | intLayoutMetrics = M.fromList [(SizeInBit 1, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 8, AlignMetrics (AlignInBit 8) (Just (AlignInBit 8)))
,(SizeInBit 16, AlignMetrics (AlignInBit 16) (Just (AlignInBit 16)))
... | 520 | false | true | 0 | 12 | 200 | 196 | 100 | 96 | null | null |
sethfowler/hsbugzilla | src/Web/Bugzilla/Search.hs | bsd-3-clause | (.||.) a b = Or [a, b] | 28 | (.||.) a b = Or [a, b] | 28 | (.||.) a b = Or [a, b] | 28 | false | false | 0 | 6 | 12 | 22 | 12 | 10 | null | null |
TomMD/ghc | compiler/types/TyCon.hs | bsd-3-clause | isDataTyCon :: TyCon -> Bool
-- ^ Returns @True@ for data types that are /definitely/ represented by
-- heap-allocated constructors. These are scrutinised by Core-level
-- @case@ expressions, and they get info tables allocated for them.
--
-- Generally, the function will be true for all @data@ types and false
-- for @... | 912 | isDataTyCon :: TyCon -> Bool
isDataTyCon (AlgTyCon {algTcRhs = rhs})
= case rhs of
TupleTyCon { tup_sort = sort }
-> isBoxed (tupleSortBoxity sort)
DataTyCon {} -> True
NewTyCon {} -> False
DataFamilyTyCon {} -> False
AbstractTyCon {} -... | 366 | isDataTyCon (AlgTyCon {algTcRhs = rhs})
= case rhs of
TupleTyCon { tup_sort = sort }
-> isBoxed (tupleSortBoxity sort)
DataTyCon {} -> True
NewTyCon {} -> False
DataFamilyTyCon {} -> False
AbstractTyCon {} -> False -- We don't know... | 337 | true | true | 0 | 10 | 233 | 114 | 62 | 52 | null | null |
kishoredbn/barrelfish | tools/mackerel/BitFieldDriver.hs | mit | percent_escape :: String -> String
percent_escape s = concat [ if c == '%' then "%%" else [c] | c <- s ] | 104 | percent_escape :: String -> String
percent_escape s = concat [ if c == '%' then "%%" else [c] | c <- s ] | 104 | percent_escape s = concat [ if c == '%' then "%%" else [c] | c <- s ] | 69 | false | true | 0 | 8 | 22 | 47 | 25 | 22 | null | null |
fujiyan/toriaezuzakki | haskell/yesod/persistent/Handler/UserList.hs | bsd-2-clause | postUserListR :: Handler Html
postUserListR = do
((result, _), _) <- runFormPost $ userListForm "" Nothing
case result of
FormSuccess (verb, maybeUserId) ->
case verb of
"delete" ->
case (fromPathPiece =<< maybeUserId) of
Just userI... | 540 | postUserListR :: Handler Html
postUserListR = do
((result, _), _) <- runFormPost $ userListForm "" Nothing
case result of
FormSuccess (verb, maybeUserId) ->
case verb of
"delete" ->
case (fromPathPiece =<< maybeUserId) of
Just userI... | 540 | postUserListR = do
((result, _), _) <- runFormPost $ userListForm "" Nothing
case result of
FormSuccess (verb, maybeUserId) ->
case verb of
"delete" ->
case (fromPathPiece =<< maybeUserId) of
Just userId -> do
... | 510 | false | true | 0 | 22 | 247 | 145 | 70 | 75 | null | null |
lovasko/tabl | src/Text/Tabl/Ascii/Cell.hs | bsd-2-clause | split (AlignText needle) text = (before, match, after)
where
(before, rest) = T.breakOn needle text
(match, after) = T.splitAt (T.length needle) rest | 159 | split (AlignText needle) text = (before, match, after)
where
(before, rest) = T.breakOn needle text
(match, after) = T.splitAt (T.length needle) rest | 159 | split (AlignText needle) text = (before, match, after)
where
(before, rest) = T.breakOn needle text
(match, after) = T.splitAt (T.length needle) rest | 159 | false | false | 1 | 8 | 31 | 73 | 39 | 34 | null | null |
bitemyapp/apply-refact | src/Main.hs | bsd-3-clause | options :: Parser Options
options =
Options <$>
optional (argument str (metavar "TARGET"))
<*>
option (Just <$> str)
(long "refact-file"
<> value Nothing
<> help "A file which specifies which refactorings to perform")
<*>
switch (long "inplace"
<> short 'i'
... | 1,396 | options :: Parser Options
options =
Options <$>
optional (argument str (metavar "TARGET"))
<*>
option (Just <$> str)
(long "refact-file"
<> value Nothing
<> help "A file which specifies which refactorings to perform")
<*>
switch (long "inplace"
<> short 'i'
... | 1,396 | options =
Options <$>
optional (argument str (metavar "TARGET"))
<*>
option (Just <$> str)
(long "refact-file"
<> value Nothing
<> help "A file which specifies which refactorings to perform")
<*>
switch (long "inplace"
<> short 'i'
<> help "Whether to overw... | 1,370 | false | true | 0 | 19 | 527 | 326 | 151 | 175 | null | null |
philopon/memcached-binary | src/Database/Memcached/Binary/Internal.hs | mit | peekWord16be :: Ptr a -> IO Word16
peekWord16be p = peek (castPtr p) >>= \(BE w) -> return w | 92 | peekWord16be :: Ptr a -> IO Word16
peekWord16be p = peek (castPtr p) >>= \(BE w) -> return w | 92 | peekWord16be p = peek (castPtr p) >>= \(BE w) -> return w | 57 | false | true | 0 | 8 | 18 | 55 | 25 | 30 | null | null |
Lemmih/fvg | src/Parser.hs | bsd-3-clause | parseAlt :: Parse Alt
parseAlt = block $ do
pattern <- parsePattern
symbol "->"
expr <- indent $ parseExpr
return $ Alt pattern expr
-- 10
-- 'c'
-- Node a b c | 168 | parseAlt :: Parse Alt
parseAlt = block $ do
pattern <- parsePattern
symbol "->"
expr <- indent $ parseExpr
return $ Alt pattern expr
-- 10
-- 'c'
-- Node a b c | 168 | parseAlt = block $ do
pattern <- parsePattern
symbol "->"
expr <- indent $ parseExpr
return $ Alt pattern expr
-- 10
-- 'c'
-- Node a b c | 146 | false | true | 0 | 9 | 41 | 57 | 27 | 30 | null | null |
nlim/haskell-playground | src/Weird.hs | mit | toStr Baz = "baz" | 17 | toStr Baz = "baz" | 17 | toStr Baz = "baz" | 17 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
sheyll/haskell-kurs-audio-demo | src/Music.hs | bsd-3-clause | tonFis = 6 | 10 | tonFis = 6 | 10 | tonFis = 6 | 10 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
ezyang/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | -- | /O(n^2)/. The 'nub' function removes duplicate elements from a list.
-- In particular, it keeps only the first occurrence of each element.
-- (The name 'nub' means \`essence\'.)
-- It is a special case of 'nubBy', which allows the programmer to supply
-- their own equality test.
--
-- >>> nub [1,2,3,4,3,2,1,2,4,3,... | 423 | nub :: (Eq a) => [a] -> [a]
nub = nubBy (==) | 85 | nub = nubBy (==) | 37 | true | true | 0 | 7 | 108 | 43 | 28 | 15 | null | null |
srsly4/haskgag | test/Spec.hs | bsd-3-clause | main :: IO (Counts, Bool)
main = do
hUnit <-runTestTT tests
quickChecks <- $quickCheckAll
return (hUnit, quickChecks) | 129 | main :: IO (Counts, Bool)
main = do
hUnit <-runTestTT tests
quickChecks <- $quickCheckAll
return (hUnit, quickChecks) | 129 | main = do
hUnit <-runTestTT tests
quickChecks <- $quickCheckAll
return (hUnit, quickChecks) | 103 | false | true | 0 | 9 | 28 | 56 | 25 | 31 | null | null |
Fuuzetsu/yi | yi-keymap-vim/src/Yi/Keymap/Vim/VisualMap.hs | gpl-2.0 | replaceBinding :: VimBinding
replaceBinding = VimBindingE (f . T.unpack . _unEv)
where f evs (VimState { vsMode = (Visual _) }) =
case evs of
"r" -> PartialMatch
('r':c:[]) -> WholeMatch $ do
(Visual style) <- vsMode <$> getEditorDyn
... | 668 | replaceBinding :: VimBinding
replaceBinding = VimBindingE (f . T.unpack . _unEv)
where f evs (VimState { vsMode = (Visual _) }) =
case evs of
"r" -> PartialMatch
('r':c:[]) -> WholeMatch $ do
(Visual style) <- vsMode <$> getEditorDyn
... | 668 | replaceBinding = VimBindingE (f . T.unpack . _unEv)
where f evs (VimState { vsMode = (Visual _) }) =
case evs of
"r" -> PartialMatch
('r':c:[]) -> WholeMatch $ do
(Visual style) <- vsMode <$> getEditorDyn
region <- withCurrentBuff... | 639 | false | true | 1 | 17 | 284 | 188 | 93 | 95 | null | null |
alxemist/TicTacToe | src/Pulti.hs | bsd-3-clause | parseMove (Just (x,y,z)) = Just ("d1:v1:x1:xi" ++ [(intToDigit x)] ++ "e1:yi" ++ [(intToDigit y)] ++"eee") | 107 | parseMove (Just (x,y,z)) = Just ("d1:v1:x1:xi" ++ [(intToDigit x)] ++ "e1:yi" ++ [(intToDigit y)] ++"eee") | 107 | parseMove (Just (x,y,z)) = Just ("d1:v1:x1:xi" ++ [(intToDigit x)] ++ "e1:yi" ++ [(intToDigit y)] ++"eee") | 107 | false | false | 0 | 13 | 15 | 64 | 34 | 30 | null | null |
chrisdone/css | src/Language/CSS/Properties.hs | bsd-3-clause | -- | CSS property: border-top
borderTop :: Text -> CSS (Either Property Rule)
borderTop = prop "border-top" | 107 | borderTop :: Text -> CSS (Either Property Rule)
borderTop = prop "border-top" | 77 | borderTop = prop "border-top" | 29 | true | true | 0 | 8 | 16 | 30 | 15 | 15 | null | null |
rkoeninger/GameCom | src/lib/Memory.hs | mit | zeroBit = 1 | 15 | zeroBit = 1 | 15 | zeroBit = 1 | 15 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
rueshyna/gogol | gogol-freebasesearch/gen/Network/Google/FreebaseSearch/Types/Product.hs | mpl-2.0 | -- | Name of notable category in specified language.
rcnName :: Lens' ReconcileCandidateNotable (Maybe Text)
rcnName = lens _rcnName (\ s a -> s{_rcnName = a}) | 159 | rcnName :: Lens' ReconcileCandidateNotable (Maybe Text)
rcnName = lens _rcnName (\ s a -> s{_rcnName = a}) | 106 | rcnName = lens _rcnName (\ s a -> s{_rcnName = a}) | 50 | true | true | 0 | 9 | 25 | 46 | 25 | 21 | null | null |
sboosali/Haskell-DragonNaturallySpeaking | sources/Commands/OSX/Constants.hs | mit | keycode NKey = 0x2D | 31 | keycode NKey = 0x2D | 31 | keycode NKey = 0x2D | 31 | false | false | 0 | 4 | 15 | 10 | 4 | 6 | null | null |
maoe/ghc-time-alloc-prof | bin/dump.hs | bsd-3-clause | makeAggregateCCName :: AggregatedCostCentre -> String
makeAggregateCCName aggregate = printf
"%s%%\t%s%%\t%s.%s"
(showScientific $ aggregatedCostCentreTime aggregate)
(showScientific $ aggregatedCostCentreAlloc aggregate)
(T.unpack $ aggregatedCostCentreModule aggregate)
(T.unpack $ aggregatedCostCentreName a... | 329 | makeAggregateCCName :: AggregatedCostCentre -> String
makeAggregateCCName aggregate = printf
"%s%%\t%s%%\t%s.%s"
(showScientific $ aggregatedCostCentreTime aggregate)
(showScientific $ aggregatedCostCentreAlloc aggregate)
(T.unpack $ aggregatedCostCentreModule aggregate)
(T.unpack $ aggregatedCostCentreName a... | 329 | makeAggregateCCName aggregate = printf
"%s%%\t%s%%\t%s.%s"
(showScientific $ aggregatedCostCentreTime aggregate)
(showScientific $ aggregatedCostCentreAlloc aggregate)
(T.unpack $ aggregatedCostCentreModule aggregate)
(T.unpack $ aggregatedCostCentreName aggregate) | 275 | false | true | 0 | 7 | 35 | 77 | 36 | 41 | null | null |
haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/logging/structured-log-lines/src/LogData.hs | unlicense | showLogItemText :: String -> T.Text -> String
showLogItemText s x = s ++ " " ++ T.unpack x | 90 | showLogItemText :: String -> T.Text -> String
showLogItemText s x = s ++ " " ++ T.unpack x | 90 | showLogItemText s x = s ++ " " ++ T.unpack x | 44 | false | true | 0 | 8 | 17 | 44 | 20 | 24 | null | null |
NeonGraal/rwh-stack | ch03/BookStore.hs | bsd-3-clause | bookAuthors (Book id title authors) = authors | 45 | bookAuthors (Book id title authors) = authors | 45 | bookAuthors (Book id title authors) = authors | 45 | false | false | 0 | 7 | 6 | 19 | 9 | 10 | null | null |
travitch/dalvik | src/Dalvik/SSA.hs | bsd-3-clause | dexMethods :: DexFile -> [Method]
dexMethods df = [ m
| k <- dexClasses df
, m <- classDirectMethods k ++ classVirtualMethods k
] | 177 | dexMethods :: DexFile -> [Method]
dexMethods df = [ m
| k <- dexClasses df
, m <- classDirectMethods k ++ classVirtualMethods k
] | 177 | dexMethods df = [ m
| k <- dexClasses df
, m <- classDirectMethods k ++ classVirtualMethods k
] | 143 | false | true | 0 | 9 | 71 | 53 | 26 | 27 | null | null |
AlexeyRaga/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo ByteArrayContents_Char = mkGenPrimOp (fsLit "byteArrayContents#") [] [byteArrayPrimTy] (addrPrimTy) | 111 | primOpInfo ByteArrayContents_Char = mkGenPrimOp (fsLit "byteArrayContents#") [] [byteArrayPrimTy] (addrPrimTy) | 111 | primOpInfo ByteArrayContents_Char = mkGenPrimOp (fsLit "byteArrayContents#") [] [byteArrayPrimTy] (addrPrimTy) | 111 | false | false | 0 | 7 | 9 | 33 | 16 | 17 | null | null |
bacher09/darkplaces-demo | src/DarkPlaces/ProtocolConstants.hs | gpl-2.0 | su_punch2_bit :: Int
su_punch2_bit = 3 | 38 | su_punch2_bit :: Int
su_punch2_bit = 3 | 38 | su_punch2_bit = 3 | 17 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
aslatter/blog | Blog/Posts/Core.hs | gpl-3.0 | postDay :: PostLike post => post -> Day
postDay = localDay . zonedTimeToLocalTime . insert_time . toPostInsert | 110 | postDay :: PostLike post => post -> Day
postDay = localDay . zonedTimeToLocalTime . insert_time . toPostInsert | 110 | postDay = localDay . zonedTimeToLocalTime . insert_time . toPostInsert | 70 | false | true | 1 | 8 | 16 | 42 | 18 | 24 | null | null |
SRechenberger/grammata | src/Grammata/Interpreter/Compilation.hs | gpl-3.0 | compileUnaryOperator "-" = return $ \ops -> case ops of
[M.Natural a] -> return . M.Natural . negate $ a
[M.Real a] -> return . M.Real . negate $ a
others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '-'." | 260 | compileUnaryOperator "-" = return $ \ops -> case ops of
[M.Natural a] -> return . M.Natural . negate $ a
[M.Real a] -> return . M.Real . negate $ a
others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '-'." | 260 | compileUnaryOperator "-" = return $ \ops -> case ops of
[M.Natural a] -> return . M.Natural . negate $ a
[M.Real a] -> return . M.Real . negate $ a
others -> fail $ "ERROR " ++ show others ++ " are no valid operands for '-'." | 260 | false | false | 0 | 13 | 81 | 99 | 49 | 50 | null | null |
kylcarte/lnfunctors | src/Data/DependentMess.hs | bsd-3-clause | insertLMap :: forall f i j x found ls ls'.
HasLinks found f i j x ls ls'
=> Link f i j -> LMap f ls
-> LMap f ( '( '(i,j), LinkList f i j (AddNew found x)) ': ls')
insertLMap l lm = case v of
(No,lm') -> InsM t (ConsL l NilL) lm'
(Yes ll,lm') -> InsM t (ConsL l ll) lm'
where
t = Link :: LinkTag f i j
v... | 379 | insertLMap :: forall f i j x found ls ls'.
HasLinks found f i j x ls ls'
=> Link f i j -> LMap f ls
-> LMap f ( '( '(i,j), LinkList f i j (AddNew found x)) ': ls')
insertLMap l lm = case v of
(No,lm') -> InsM t (ConsL l NilL) lm'
(Yes ll,lm') -> InsM t (ConsL l ll) lm'
where
t = Link :: LinkTag f i j
v ... | 378 | insertLMap l lm = case v of
(No,lm') -> InsM t (ConsL l NilL) lm'
(Yes ll,lm') -> InsM t (ConsL l ll) lm'
where
t = Link :: LinkTag f i j
v = view t lm :: (Exist found (LinkList f i j x),LMap f ls') | 208 | false | true | 2 | 17 | 106 | 247 | 123 | 124 | null | null |
jjwchoy/hotdb | tests/OperationTest.hs | mit | assertSequenceInsert :: [N.Node] -> Word32 -> N.Node -> [N.Node] -> Assertion
assertSequenceInsert initial pos child expected = assertEqual "Expected given list" (Just $ N.SequenceNode $ S.fromList expected) $ O.applyPath (O.DirectedOperation "" $ O.SequenceInsert pos child 1) $ N.SequenceNode $ S.fromList initial | 315 | assertSequenceInsert :: [N.Node] -> Word32 -> N.Node -> [N.Node] -> Assertion
assertSequenceInsert initial pos child expected = assertEqual "Expected given list" (Just $ N.SequenceNode $ S.fromList expected) $ O.applyPath (O.DirectedOperation "" $ O.SequenceInsert pos child 1) $ N.SequenceNode $ S.fromList initial | 315 | assertSequenceInsert initial pos child expected = assertEqual "Expected given list" (Just $ N.SequenceNode $ S.fromList expected) $ O.applyPath (O.DirectedOperation "" $ O.SequenceInsert pos child 1) $ N.SequenceNode $ S.fromList initial | 237 | false | true | 0 | 12 | 40 | 116 | 57 | 59 | null | null |
fsestini/stlc-machine | src/Inference.hs | mit | infer :: (Ord a, FreshPickable a)
=> Context a
-> LambdaTerm a
-> Maybe (Context a, Type)
infer ctxt term = do (teC, te) <- runInference (inferTE (contextToTEContext ctxt) term)
let maxmax = maxTEConst te
newCtxt = teContextToContext (maxmax + 1) teC
... | 430 | infer :: (Ord a, FreshPickable a)
=> Context a
-> LambdaTerm a
-> Maybe (Context a, Type)
infer ctxt term = do (teC, te) <- runInference (inferTE (contextToTEContext ctxt) term)
let maxmax = maxTEConst te
newCtxt = teContextToContext (maxmax + 1) teC
... | 430 | infer ctxt term = do (teC, te) <- runInference (inferTE (contextToTEContext ctxt) term)
let maxmax = maxTEConst te
newCtxt = teContextToContext (maxmax + 1) teC
newType = instantiateTypeVar (maxmax +1) te
return (newCtxt, newTyp... | 322 | false | true | 0 | 13 | 160 | 150 | 73 | 77 | null | null |
kaoskorobase/hsc3-server | Sound/SC3/Server/Notification.hs | gpl-2.0 | hasAddress :: String -> Notification Message
hasAddress a = Notification f
where
f p@(Message a' _) | a == a' = Just p
f _ = Nothing
-- | Send an OSC packet and wait for a notification.
--
-- Returns the transformed value. | 243 | hasAddress :: String -> Notification Message
hasAddress a = Notification f
where
f p@(Message a' _) | a == a' = Just p
f _ = Nothing
-- | Send an OSC packet and wait for a notification.
--
-- Returns the transformed value. | 243 | hasAddress a = Notification f
where
f p@(Message a' _) | a == a' = Just p
f _ = Nothing
-- | Send an OSC packet and wait for a notification.
--
-- Returns the transformed value. | 198 | false | true | 1 | 8 | 64 | 69 | 34 | 35 | null | null |
sgillespie/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isTypedSplice _ = False | 40 | isTypedSplice _ = False | 40 | isTypedSplice _ = False | 40 | false | false | 0 | 5 | 20 | 9 | 4 | 5 | null | null |
dobrite/rwh | ch01/WC.hs | mit | -- file: ch01/WC.hs
-- lines beginning with "--" are comments.
main = interact lineCount
where lineCount input = show (length (lines input)) ++ "\n" | 156 | main = interact lineCount
where lineCount input = show (length (lines input)) ++ "\n" | 92 | main = interact lineCount
where lineCount input = show (length (lines input)) ++ "\n" | 92 | true | false | 1 | 10 | 31 | 44 | 20 | 24 | null | null |
input-output-hk/rscoin-haskell | src/RSCoin/Bank/Storage/Queries.hs | gpl-3.0 | -- | Get utxo.
getUtxo :: Query C.Utxo
getUtxo = utxo | 53 | getUtxo :: Query C.Utxo
getUtxo = utxo | 38 | getUtxo = utxo | 14 | true | true | 0 | 6 | 10 | 17 | 9 | 8 | null | null |
AKST/jo | source/lib/JoScript/Data/Config.hs | mit | files' :: Functor f => ([Text] -> f [Text]) -> BuildConfig -> f BuildConfig
files' fn (BuildC d f) = fmap (\f' -> BuildC d f') (fn f) | 133 | files' :: Functor f => ([Text] -> f [Text]) -> BuildConfig -> f BuildConfig
files' fn (BuildC d f) = fmap (\f' -> BuildC d f') (fn f) | 133 | files' fn (BuildC d f) = fmap (\f' -> BuildC d f') (fn f) | 57 | false | true | 0 | 10 | 27 | 86 | 42 | 44 | null | null |
atsukotakahashi/wi | src/library/Yi/Buffer/HighLevel.hs | gpl-2.0 | shapeOfBlockRegionB :: Region -> BufferM (Point, [Int])
shapeOfBlockRegionB reg = savingPointB $ do
(l0, c0) <- getLineAndColOfPoint $ regionStart reg
(l1, c1) <- getLineAndColOfPoint $ regionEnd reg
let (left, top, bottom, right) = (min c0 c1, min l0 l1, max l0 l1, max c0 c1)
lengths <- forM [top .. bo... | 824 | shapeOfBlockRegionB :: Region -> BufferM (Point, [Int])
shapeOfBlockRegionB reg = savingPointB $ do
(l0, c0) <- getLineAndColOfPoint $ regionStart reg
(l1, c1) <- getLineAndColOfPoint $ regionEnd reg
let (left, top, bottom, right) = (min c0 c1, min l0 l1, max l0 l1, max c0 c1)
lengths <- forM [top .. bo... | 824 | shapeOfBlockRegionB reg = savingPointB $ do
(l0, c0) <- getLineAndColOfPoint $ regionStart reg
(l1, c1) <- getLineAndColOfPoint $ regionEnd reg
let (left, top, bottom, right) = (min c0 c1, min l0 l1, max l0 l1, max c0 c1)
lengths <- forM [top .. bottom] $ \l -> do
void $ gotoLn l
moveToC... | 768 | false | true | 0 | 19 | 279 | 272 | 133 | 139 | null | null |
rueshyna/gogol | gogol-deploymentmanager/gen/Network/Google/DeploymentManager/Types/Product.hs | mpl-2.0 | -- | [Output Only] A key that provides more detail on the warning being
-- returned. For example, for warnings where there are no results in a list
-- request for a particular zone, this key might be scope and the key value
-- might be the zone name. Other examples might be a key indicating a
-- deprecated resource and... | 623 | ruwidiKey :: Lens' ResourceUpdateWarningsItemDataItem (Maybe Text)
ruwidiKey
= lens _ruwidiKey (\ s a -> s{_ruwidiKey = a}) | 125 | ruwidiKey
= lens _ruwidiKey (\ s a -> s{_ruwidiKey = a}) | 58 | true | true | 0 | 9 | 108 | 54 | 31 | 23 | null | null |
danr/hipspec | testsuite/prod/zeno_version/PropT03.hs | gpl-3.0 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | subset (x:xs) ys = x `elem` xs && subset xs ys | 46 | false | false | 0 | 7 | 10 | 33 | 17 | 16 | null | null |
gnn/Hets | Comorphisms/SuleCFOL2SoftFOL.hs | gpl-2.0 | makeGenGoals :: SPSign.Sign -> IdTypeSPIdMap -> [Named (FORMULA f)]
-> (SPSign.PredMap, IdTypeSPIdMap, [Named SPTerm])
makeGenGoals sign idMap fs =
let Result _ res = makeGens sign idMap fs
in case res of
Nothing -> (Map.empty, idMap, [])
Just (_, _, idMap', fs') ->
let fs'' = map (\ s -> s ... | 862 | makeGenGoals :: SPSign.Sign -> IdTypeSPIdMap -> [Named (FORMULA f)]
-> (SPSign.PredMap, IdTypeSPIdMap, [Named SPTerm])
makeGenGoals sign idMap fs =
let Result _ res = makeGens sign idMap fs
in case res of
Nothing -> (Map.empty, idMap, [])
Just (_, _, idMap', fs') ->
let fs'' = map (\ s -> s ... | 862 | makeGenGoals sign idMap fs =
let Result _ res = makeGens sign idMap fs
in case res of
Nothing -> (Map.empty, idMap, [])
Just (_, _, idMap', fs') ->
let fs'' = map (\ s -> s {isAxiom = False}) fs'
in (Map.empty, idMap', fs'')
{- Sort_gen_ax as goals only implemented through a hack."
sketch of full i... | 730 | false | true | 0 | 18 | 191 | 173 | 92 | 81 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Delete.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
acdUploadProtocol :: Lens' AccountsContainersDelete (Maybe Text)
acdUploadProtocol
= lens _acdUploadProtocol
(\ s a -> s{_acdUploadProtocol = a}) | 215 | acdUploadProtocol :: Lens' AccountsContainersDelete (Maybe Text)
acdUploadProtocol
= lens _acdUploadProtocol
(\ s a -> s{_acdUploadProtocol = a}) | 153 | acdUploadProtocol
= lens _acdUploadProtocol
(\ s a -> s{_acdUploadProtocol = a}) | 88 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
andorp/bead | src/Bead/Persistence/Persist.hs | bsd-3-clause | -- Loads the test case from the database
loadTestCase :: TestCaseKey -> Persist TestCase
loadTestCase = PersistImpl.loadTestCase | 128 | loadTestCase :: TestCaseKey -> Persist TestCase
loadTestCase = PersistImpl.loadTestCase | 87 | loadTestCase = PersistImpl.loadTestCase | 39 | true | true | 0 | 6 | 16 | 21 | 11 | 10 | null | null |
contivero/hasmin | src/Hasmin/Types/BasicShape.hs | bsd-3-clause | surround :: Builder -> Builder -> Builder
surround func x = func <> "(" <> x <> ")" | 83 | surround :: Builder -> Builder -> Builder
surround func x = func <> "(" <> x <> ")" | 83 | surround func x = func <> "(" <> x <> ")" | 41 | false | true | 0 | 8 | 17 | 42 | 19 | 23 | null | null |
ijt/kdtree | src/Data/Trees/KdTree.hs | bsd-3-clause | toList :: KdTree p -> [p]
toList = F.foldr (:) [] | 49 | toList :: KdTree p -> [p]
toList = F.foldr (:) [] | 49 | toList = F.foldr (:) [] | 23 | false | true | 0 | 8 | 10 | 38 | 18 | 20 | null | null |
sdiehl/ghc | compiler/prelude/THNames.hs | bsd-3-clause | mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey | 59 | mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey | 59 | mkNameG_tcName = thFun (fsLit "mkNameG_tc") mkNameG_tcIdKey | 59 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
sdiehl/ghc | compiler/main/DynFlags.hs | bsd-3-clause | defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
defaultDynFlags mySettings llvmConfig =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTarg... | 7,943 | defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
defaultDynFlags mySettings llvmConfig =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTarg... | 7,943 | defaultDynFlags mySettings llvmConfig =
-- See Note [Updating flag description in the User's Guide]
DynFlags {
ghcMode = CompManager,
ghcLink = LinkBinary,
hscTarget = defaultHscTarget (sTargetPlatform mySettings) (sPlatformMisc mySettings),
... | 7,889 | false | true | 0 | 9 | 3,140 | 1,242 | 776 | 466 | null | null |
christiaanb/clash-compiler | clash-lib/src/CLaSH/Core/Util.hs | bsd-2-clause | -- | Determine the type of a term
termType :: (Functor m, Fresh m)
=> HashMap TyConName TyCon
-> Term
-> m Type
termType m e = case e of
Var t _ -> return t
Data dc -> return $ dcType dc
Literal l -> return $ literalType l
Prim _ t -> return t
Lam b ... | 927 | termType :: (Functor m, Fresh m)
=> HashMap TyConName TyCon
-> Term
-> m Type
termType m e = case e of
Var t _ -> return t
Data dc -> return $ dcType dc
Literal l -> return $ literalType l
Prim _ t -> return t
Lam b -> do (v,e') <- unbind b
... | 893 | termType m e = case e of
Var t _ -> return t
Data dc -> return $ dcType dc
Literal l -> return $ literalType l
Prim _ t -> return t
Lam b -> do (v,e') <- unbind b
mkFunTy (unembed $ varType v) <$> termType m e'
TyLam b -> do (tv,e') <- unbind b... | 788 | true | true | 11 | 12 | 387 | 291 | 148 | 143 | null | null |
lukexi/ghc | ghc/Main.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
-- ABI hash support
{-
ghc --abi-hash Data.Foo System.Bar
Generates a combined hash of the ABI for modules Data.Foo and
System.Bar. The modules must already be compiled, and appropriate -i
options may be necessary in order to fi... | 1,552 | abiHash :: [(String, Maybe Phase)] -> Ghc ()
abiHash strs = do
hsc_env <- getSession
let dflags = hsc_dflags hsc_env
liftIO $ do
let find_it str = do
let modname = mkModuleName str
r <- findImportedModule hsc_env modname Nothing
case r of
Found _ m -> return m
... | 967 | abiHash strs = do
hsc_env <- getSession
let dflags = hsc_dflags hsc_env
liftIO $ do
let find_it str = do
let modname = mkModuleName str
r <- findImportedModule hsc_env modname Nothing
case r of
Found _ m -> return m
_error -> throwGhcException $ CmdLineError... | 922 | true | true | 0 | 20 | 343 | 287 | 132 | 155 | null | null |
FranklinChen/twenty-four-days2015-of-hackage | src/SymbolicDifferentiation/AnsiWlPprint.hs | bsd-3-clause | maybeParens :: Bool -> Doc -> Doc
maybeParens True = parens | 59 | maybeParens :: Bool -> Doc -> Doc
maybeParens True = parens | 59 | maybeParens True = parens | 25 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
solaryeti/riff | src/Riff/Files.hs | bsd-3-clause | -- | Rename the old file in a 'FilePair' to the new name.
rename :: FilePair -> IO ()
rename (FilePair x y) = F.rename x y | 122 | rename :: FilePair -> IO ()
rename (FilePair x y) = F.rename x y | 64 | rename (FilePair x y) = F.rename x y | 36 | true | true | 0 | 9 | 26 | 45 | 20 | 25 | null | null |
rkoeninger/GameCom | src/lib/CPU.hs | mit | decode 0x2c = (bit, absMode, 4) | 31 | decode 0x2c = (bit, absMode, 4) | 31 | decode 0x2c = (bit, absMode, 4) | 31 | false | false | 0 | 5 | 5 | 18 | 10 | 8 | null | null |
brendanhay/gogol | gogol-admin-reports/gen/Network/Google/Reports/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Activities' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aEtag'
--
-- * 'aNextPageToken'
--
-- * 'aKind'
--
-- * 'aItems'
activities
:: Activities
activities =
Activities'
{ _aEtag = Nothing
,... | 418 | activities
:: Activities
activities =
Activities'
{ _aEtag = Nothing
, _aNextPageToken = Nothing
, _aKind = "admin#reports#activities"
, _aItems = Nothing
} | 182 | activities =
Activities'
{ _aEtag = Nothing
, _aNextPageToken = Nothing
, _aKind = "admin#reports#activities"
, _aItems = Nothing
} | 153 | true | true | 0 | 6 | 94 | 48 | 34 | 14 | null | null |
cmball/haskell-saynumber | Text/SayNumber.hs | mit | sayTens 7 = "seventy" | 21 | sayTens 7 = "seventy" | 21 | sayTens 7 = "seventy" | 21 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
maugier/cctk | src/CCTK/SymbolicField.hs | gpl-3.0 | atom :: String -> Expr
atom x = Expr (singleton (Monom (singleton x 1)) 1) | 74 | atom :: String -> Expr
atom x = Expr (singleton (Monom (singleton x 1)) 1) | 74 | atom x = Expr (singleton (Monom (singleton x 1)) 1) | 51 | false | true | 0 | 11 | 14 | 43 | 21 | 22 | null | null |
bitemyapp/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | pprLHsBinds :: (OutputableBndr idL, OutputableBndr idR) => LHsBindsLR idL idR -> SDoc
pprLHsBinds binds
| isEmptyLHsBinds binds = empty
| otherwise = pprDeclList (map ppr (bagToList binds)) | 193 | pprLHsBinds :: (OutputableBndr idL, OutputableBndr idR) => LHsBindsLR idL idR -> SDoc
pprLHsBinds binds
| isEmptyLHsBinds binds = empty
| otherwise = pprDeclList (map ppr (bagToList binds)) | 193 | pprLHsBinds binds
| isEmptyLHsBinds binds = empty
| otherwise = pprDeclList (map ppr (bagToList binds)) | 107 | false | true | 1 | 9 | 30 | 71 | 34 | 37 | null | null |
mitchellwrosen/google-dictionary-api | Network/API/GoogleDictionary/Internal.hs | bsd-3-clause | decodeHex [] = Just [] | 22 | decodeHex [] = Just [] | 22 | decodeHex [] = Just [] | 22 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
Teaspot-Studio/gore-and-ash-game | src/client/Math/Plane.hs | bsd-3-clause | -- | All planes of axis aligned cube
cubePlanes :: V3 Float -> Float -> Vector (Plane, CubeSide)
cubePlanes o d = V.fromList [
(Plane o (V3 1 0 0) (V3 0 0 1), CubeLeft)
, (Plane o (V3 0 0 (-1)) (V3 1 0 0), CubeFront)
, (Plane o (V3 0 1 0) (V3 1 0 0), CubeBottom)
, (Plane (o + vec3 d) (V3 (-1) 0 0) (V3 0 (-1) ... | 463 | cubePlanes :: V3 Float -> Float -> Vector (Plane, CubeSide)
cubePlanes o d = V.fromList [
(Plane o (V3 1 0 0) (V3 0 0 1), CubeLeft)
, (Plane o (V3 0 0 (-1)) (V3 1 0 0), CubeFront)
, (Plane o (V3 0 1 0) (V3 1 0 0), CubeBottom)
, (Plane (o + vec3 d) (V3 (-1) 0 0) (V3 0 (-1) 0), CubeRight)
, (Plane (o + vec3 d... | 426 | cubePlanes o d = V.fromList [
(Plane o (V3 1 0 0) (V3 0 0 1), CubeLeft)
, (Plane o (V3 0 0 (-1)) (V3 1 0 0), CubeFront)
, (Plane o (V3 0 1 0) (V3 1 0 0), CubeBottom)
, (Plane (o + vec3 d) (V3 (-1) 0 0) (V3 0 (-1) 0), CubeRight)
, (Plane (o + vec3 d) (V3 0 0 (-1)) (V3 (-1) 0 0), CubeBack)
, (Plane (o + vec... | 366 | true | true | 0 | 12 | 120 | 323 | 171 | 152 | null | null |
kindohm/tidal-midi | Sound/Tidal/MIDI/System1M.hs | gpl-3.0 | (rpitchdecay, rpitchdecay_p) = pF "rpitchdecay" (Just 0) | 56 | (rpitchdecay, rpitchdecay_p) = pF "rpitchdecay" (Just 0) | 56 | (rpitchdecay, rpitchdecay_p) = pF "rpitchdecay" (Just 0) | 56 | false | false | 0 | 7 | 6 | 24 | 12 | 12 | null | null |
flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SelectOptions/WhereCondition.hs | mit | {- |
Operator alias for 'fieldLessThan'
-}
(.<) :: FieldDef.FieldDefinition nullability a -> a -> WhereCondition
(.<) = fieldLessThan | 135 | (.<) :: FieldDef.FieldDefinition nullability a -> a -> WhereCondition
(.<) = fieldLessThan | 90 | (.<) = fieldLessThan | 20 | true | true | 0 | 8 | 20 | 38 | 19 | 19 | null | null |
brendanhay/gogol | gogol-admin-datatransfer/gen/Network/Google/Resource/DataTransfer/Applications/List.hs | mpl-2.0 | -- | Token to specify next page in the list.
alPageToken :: Lens' ApplicationsList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a}) | 160 | alPageToken :: Lens' ApplicationsList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a}) | 115 | alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a}) | 64 | true | true | 0 | 9 | 28 | 48 | 25 | 23 | null | null |
ronichoudhury/bechtrek | app/startrek/parse.hs | apache-2.0 | parseHTML = readString [withParseHTML yes, withWarnings no] | 59 | parseHTML = readString [withParseHTML yes, withWarnings no] | 59 | parseHTML = readString [withParseHTML yes, withWarnings no] | 59 | false | false | 0 | 7 | 6 | 21 | 10 | 11 | null | null |
gridaphobe/ghc | compiler/simplCore/SetLevels.hs | bsd-3-clause | floatLams :: LevelEnv -> Maybe Int
floatLams le = floatOutLambdas (le_switches le) | 82 | floatLams :: LevelEnv -> Maybe Int
floatLams le = floatOutLambdas (le_switches le) | 82 | floatLams le = floatOutLambdas (le_switches le) | 47 | false | true | 0 | 7 | 11 | 35 | 15 | 20 | null | null |
rblaze/haskell-dbus | lib/DBus/Client.hs | apache-2.0 | clientError :: String -> ClientError
clientError msg = ClientError msg True | 75 | clientError :: String -> ClientError
clientError msg = ClientError msg True | 75 | clientError msg = ClientError msg True | 38 | false | true | 0 | 5 | 10 | 23 | 11 | 12 | null | null |
opentower/carnap | Carnap/src/Carnap/Languages/PureSecondOrder/Logic/Rules.hs | gpl-3.0 | ---------------------
-- 1.3.2 Polyadic --
---------------------
polyadicAbstraction n = [ GammaV 1 :|-: ss' (predScheme (n - 1))]
∴ GammaV 1 :|-: ss' (lambdaScheme (n - 1)) | 200 | polyadicAbstraction n = [ GammaV 1 :|-: ss' (predScheme (n - 1))]
∴ GammaV 1 :|-: ss' (lambdaScheme (n - 1)) | 133 | polyadicAbstraction n = [ GammaV 1 :|-: ss' (predScheme (n - 1))]
∴ GammaV 1 :|-: ss' (lambdaScheme (n - 1)) | 133 | true | false | 1 | 13 | 53 | 68 | 33 | 35 | null | null |
andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Util/Log.hs | gpl-3.0 | -
| Initialize the log file
initialize prio file term
If file is True, log all messages >= prio to the log file.
If term is True, also log all messages >= prio to stdout.
We set two handlers under the global logger. The file handler logs to
a file. Its priority is set at DEBUG. Thus, it will get all messages
tha... | 1,577 | initialize :: Priority -> Bool -> Bool -> IO ()
initialize prio file term =
let update = Log.updateGlobalLogger Log.rootLoggerName in
do -- Erase the default stderr handler.
update $ Log.setHandlers ([] :: [Handler])
-- Create the terminal handler.
let termprio = if term then prio else defaultPrio... | 1,022 | initialize prio file term =
let update = Log.updateGlobalLogger Log.rootLoggerName in
do -- Erase the default stderr handler.
update $ Log.setHandlers ([] :: [Handler])
-- Create the terminal handler.
let termprio = if term then prio else defaultPrio
tout <- S.streamHandler IO.stdout termprio... | 974 | true | true | 3 | 15 | 393 | 464 | 224 | 240 | null | null |
NobbZ/pager | src/Pager/PaperFormat.hs | mit | mm2minch :: MilliMeters -- ^ a value in 'MilliMeters'
-> MilliInches -- ^ the value in 'MilliInches'
mm2minch (MilliMeters mm) = MilliInches (round (39.370079 * fromIntegral mm)) | 187 | mm2minch :: MilliMeters -- ^ a value in 'MilliMeters'
-> MilliInches
mm2minch (MilliMeters mm) = MilliInches (round (39.370079 * fromIntegral mm)) | 155 | mm2minch (MilliMeters mm) = MilliInches (round (39.370079 * fromIntegral mm)) | 77 | true | true | 0 | 10 | 35 | 45 | 23 | 22 | null | null |
shepheb/go10c | Compiler.hs | bsd-3-clause | exportedStatements :: String -> [Statement] -> [Statement]
exportedStatements _ [] = [] | 87 | exportedStatements :: String -> [Statement] -> [Statement]
exportedStatements _ [] = [] | 87 | exportedStatements _ [] = [] | 28 | false | true | 0 | 7 | 11 | 34 | 18 | 16 | null | null |
ezyang/ghc | testsuite/tests/gadt/nbe.hs | bsd-3-clause | enumE (Arr s t) = tmap (lamE s) (mkEnumE (questionsE s) (enumE t))
where
mkEnumE [] t = tmap const t
mkEnumE (q:qs) es = do
f1 <- mkEnumE qs es
f2 <- mkEnumE qs es
return (\d -> ifE (q d) (f1 d) (f2 d)) | 281 | enumE (Arr s t) = tmap (lamE s) (mkEnumE (questionsE s) (enumE t))
where
mkEnumE [] t = tmap const t
mkEnumE (q:qs) es = do
f1 <- mkEnumE qs es
f2 <- mkEnumE qs es
return (\d -> ifE (q d) (f1 d) (f2 d)) | 281 | enumE (Arr s t) = tmap (lamE s) (mkEnumE (questionsE s) (enumE t))
where
mkEnumE [] t = tmap const t
mkEnumE (q:qs) es = do
f1 <- mkEnumE qs es
f2 <- mkEnumE qs es
return (\d -> ifE (q d) (f1 d) (f2 d)) | 281 | false | false | 1 | 13 | 124 | 154 | 70 | 84 | null | null |
fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ConfirmProductInstance.hs | mpl-2.0 | -- | The AWS account ID of the instance owner. This is only present if the
-- product code is attached to the instance.
cpirsOwnerId :: Lens' ConfirmProductInstanceResponse (Maybe Text)
cpirsOwnerId = lens _cpirsOwnerId (\ s a -> s{_cpirsOwnerId = a}) | 251 | cpirsOwnerId :: Lens' ConfirmProductInstanceResponse (Maybe Text)
cpirsOwnerId = lens _cpirsOwnerId (\ s a -> s{_cpirsOwnerId = a}) | 131 | cpirsOwnerId = lens _cpirsOwnerId (\ s a -> s{_cpirsOwnerId = a}) | 65 | true | true | 0 | 9 | 40 | 47 | 26 | 21 | null | null |
sebug/tpg_sandbox | test_tpg.hs | bsd-3-clause | maybeShow (Just o) = show o | 27 | maybeShow (Just o) = show o | 27 | maybeShow (Just o) = show o | 27 | false | false | 0 | 7 | 5 | 18 | 8 | 10 | null | null |
steve-chavez/postgrest | test/SpecHelper.hs | mit | testProxyCfg :: Text -> AppConfig
testProxyCfg testDbConn = (testCfg testDbConn) { configOpenApiServerProxyUri = Just "https://postgrest.com/openapi.json" } | 156 | testProxyCfg :: Text -> AppConfig
testProxyCfg testDbConn = (testCfg testDbConn) { configOpenApiServerProxyUri = Just "https://postgrest.com/openapi.json" } | 156 | testProxyCfg testDbConn = (testCfg testDbConn) { configOpenApiServerProxyUri = Just "https://postgrest.com/openapi.json" } | 122 | false | true | 0 | 7 | 15 | 35 | 18 | 17 | null | null |
kmate/HaRe | old/testing/moveDefBtwMods/C2_TokOut.hs | bsd-3-clause | myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x] | 50 | myFringe:: Tree a -> [a]
myFringe (Leaf x ) = [x] | 49 | myFringe (Leaf x ) = [x] | 24 | false | true | 0 | 9 | 11 | 40 | 18 | 22 | null | null |
matthiasgoergens/redgrep | src/DDup.hs | bsd-3-clause | prop_or' (Shield (run -> rx)) (Shield (run -> ry)) s =
case (dd s rx, dd s ry, dd s (alt rx ry)) of
(Left _, Left _, Left (Cut _ _)) -> True
(Right _, _, Right (AltL _)) -> True
(_, Right y, Right (AltR _)) -> True
otherwise -> False | 269 | prop_or' (Shield (run -> rx)) (Shield (run -> ry)) s =
case (dd s rx, dd s ry, dd s (alt rx ry)) of
(Left _, Left _, Left (Cut _ _)) -> True
(Right _, _, Right (AltL _)) -> True
(_, Right y, Right (AltR _)) -> True
otherwise -> False | 269 | prop_or' (Shield (run -> rx)) (Shield (run -> ry)) s =
case (dd s rx, dd s ry, dd s (alt rx ry)) of
(Left _, Left _, Left (Cut _ _)) -> True
(Right _, _, Right (AltL _)) -> True
(_, Right y, Right (AltR _)) -> True
otherwise -> False | 269 | false | false | 0 | 11 | 88 | 167 | 85 | 82 | null | null |
silkapp/tagsoup | Text/HTML/TagSoup/Implementation.hs | bsd-3-clause | isTag _ = False | 15 | isTag _ = False | 15 | isTag _ = False | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jamshidh/ethereum-vm | src/Blockchain/VM/VMM.hs | bsd-3-clause | addLog::Log->VMM ()
addLog newLog = do
state' <- lift get
lift $ put state'{logs=newLog:logs state'} | 104 | addLog::Log->VMM ()
addLog newLog = do
state' <- lift get
lift $ put state'{logs=newLog:logs state'} | 104 | addLog newLog = do
state' <- lift get
lift $ put state'{logs=newLog:logs state'} | 84 | false | true | 0 | 12 | 18 | 58 | 27 | 31 | null | null |
dcreager/cabal | Distribution/Simple/BuildPaths.hs | bsd-3-clause | exeExtension :: String
exeExtension = case buildOS of
Windows -> "exe"
_ -> ""
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files. For GHC and NHC the extension is @\"o\"@.
-- Hugs uses either @\"o\"@ or @\"obj\"@ depending on the use... | 333 | exeExtension :: String
exeExtension = case buildOS of
Windows -> "exe"
_ -> ""
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files. For GHC and NHC the extension is @\"o\"@.
-- Hugs uses either @\"o\"@ or @\"obj\"@ depending on the use... | 333 | exeExtension = case buildOS of
Windows -> "exe"
_ -> ""
-- ToDo: This should be determined via autoconf (AC_OBJEXT)
-- | Extension for object files. For GHC and NHC the extension is @\"o\"@.
-- Hugs uses either @\"o\"@ or @\"obj\"@ depending on the used C compiler. | 310 | false | true | 0 | 7 | 94 | 30 | 17 | 13 | null | null |
facebookincubator/duckling | Duckling/Distance/KM/Rules.hs | bsd-3-clause | ruleIntervalDash :: Rule
ruleIntervalDash = Rule
{ name = "<dist> - <dist>"
, pattern =
[ Predicate isSimpleDistance
, regex "-"
, Predicate isSimpleDistance
]
, prod = \case
(Token Distance DistanceData{TDistance.value = Just from,
TDistance.unit = Just u1... | 586 | ruleIntervalDash :: Rule
ruleIntervalDash = Rule
{ name = "<dist> - <dist>"
, pattern =
[ Predicate isSimpleDistance
, regex "-"
, Predicate isSimpleDistance
]
, prod = \case
(Token Distance DistanceData{TDistance.value = Just from,
TDistance.unit = Just u1... | 586 | ruleIntervalDash = Rule
{ name = "<dist> - <dist>"
, pattern =
[ Predicate isSimpleDistance
, regex "-"
, Predicate isSimpleDistance
]
, prod = \case
(Token Distance DistanceData{TDistance.value = Just from,
TDistance.unit = Just u1}:
_:
Token... | 561 | false | true | 0 | 19 | 209 | 193 | 96 | 97 | null | null |
kojiromike/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized) | 61 | intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized) | 61 | intTyName (ITFixed sized) = "B" ++ show (nativeTyWidth sized) | 61 | false | false | 0 | 8 | 8 | 29 | 13 | 16 | null | null |
Rydgel/advent-of-code | src/Day1.hs | bsd-3-clause | getCharValue z _ = z | 22 | getCharValue z _ = z | 22 | getCharValue z _ = z | 22 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
CalumMcCall/hokey | src/Hokey/Card.hs | gpl-3.0 | getCardsOfSuit :: Suit -> [Card] -> [Card]
getCardsOfSuit _ [] = [] | 67 | getCardsOfSuit :: Suit -> [Card] -> [Card]
getCardsOfSuit _ [] = [] | 67 | getCardsOfSuit _ [] = [] | 24 | false | true | 0 | 9 | 11 | 40 | 19 | 21 | null | null |
dorchard/gram_lang | frontend/src/Language/Granule/Checker/Checker.hs | bsd-3-clause | flipPol Negative = Positive | 27 | flipPol Negative = Positive | 27 | flipPol Negative = Positive | 27 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
polarina/sdl2 | Graphics/UI/SDL/Video.hs | bsd-3-clause | renderCopyEx :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr Rect -> CDouble -> Ptr Point -> RendererFlip -> m CInt
renderCopyEx v1 v2 v3 v4 v5 v6 v7 = liftIO $ renderCopyEx' v1 v2 v3 v4 v5 v6 v7 | 202 | renderCopyEx :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr Rect -> CDouble -> Ptr Point -> RendererFlip -> m CInt
renderCopyEx v1 v2 v3 v4 v5 v6 v7 = liftIO $ renderCopyEx' v1 v2 v3 v4 v5 v6 v7 | 202 | renderCopyEx v1 v2 v3 v4 v5 v6 v7 = liftIO $ renderCopyEx' v1 v2 v3 v4 v5 v6 v7 | 79 | false | true | 0 | 13 | 42 | 92 | 43 | 49 | null | null |
lambdageek/insomnia | src/Insomnia/Typecheck/Module.hs | bsd-3-clause | checkFunDecl :: Field -> Maybe Type -> Function -> TC CheckedValueDecl
checkFunDecl fname mty_ (Function eg) = do
e <- case eg of
Left e -> return e
Right {} -> typeError ("internal error - did not expect a function with a generalization annotation")
res <- solveUnification $ do
(ecls, tinf) <- openAbst... | 1,278 | checkFunDecl :: Field -> Maybe Type -> Function -> TC CheckedValueDecl
checkFunDecl fname mty_ (Function eg) = do
e <- case eg of
Left e -> return e
Right {} -> typeError ("internal error - did not expect a function with a generalization annotation")
res <- solveUnification $ do
(ecls, tinf) <- openAbst... | 1,278 | checkFunDecl fname mty_ (Function eg) = do
e <- case eg of
Left e -> return e
Right {} -> typeError ("internal error - did not expect a function with a generalization annotation")
res <- solveUnification $ do
(ecls, tinf) <- openAbstract mty_ $ \tvks mty -> do
((e_, tu), us) <- listenUnconstrained... | 1,207 | false | true | 1 | 23 | 384 | 442 | 205 | 237 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/Types/PredType.hs | bsd-3-clause | substPred :: String -> (RPVar, SpecProp) -> SpecType -> SpecType
-------------------------------------------------------------------------------
substPred _ (π, RProp ss (RVar a1 r1)) t@(RVar a2 r2)
| isPredInReft && a1 == a2 = RVar a1 $ meetListWithPSubs πs ss r1 r2'
| isPredInReft = errorstar... | 511 | substPred :: String -> (RPVar, SpecProp) -> SpecType -> SpecType
substPred _ (π, RProp ss (RVar a1 r1)) t@(RVar a2 r2)
| isPredInReft && a1 == a2 = RVar a1 $ meetListWithPSubs πs ss r1 r2'
| isPredInReft = errorstar ("substPred RVar Var Mismatch" ++ show (a1, a2))
| otherwise ... | 430 | substPred _ (π, RProp ss (RVar a1 r1)) t@(RVar a2 r2)
| isPredInReft && a1 == a2 = RVar a1 $ meetListWithPSubs πs ss r1 r2'
| isPredInReft = errorstar ("substPred RVar Var Mismatch" ++ show (a1, a2))
| otherwise = t
where
(r2', πs) = splitRPvar π r2
... | 365 | true | true | 3 | 9 | 153 | 162 | 83 | 79 | null | null |
ghcjs/ghcjs | src/Gen2/GHC/Digraph.hs | mit | asVertexG :: Graph node -> node -> Bool
hasVertexG graph node = isJust $ gr_node_to_vertex graph node
| 102 | hasVertexG :: Graph node -> node -> Bool
hasVertexG graph node = isJust $ gr_node_to_vertex graph node | 102 | hasVertexG graph node = isJust $ gr_node_to_vertex graph node | 61 | false | true | 0 | 6 | 17 | 36 | 17 | 19 | null | null |
dkandalov/katas | haskell/p99/src/p9x/p50/P50.hs | unlicense | toList (Node value left right) = value : (toList left) ++ (toList right) | 72 | toList (Node value left right) = value : (toList left) ++ (toList right) | 72 | toList (Node value left right) = value : (toList left) ++ (toList right) | 72 | false | false | 0 | 8 | 12 | 39 | 19 | 20 | null | null |
samvher/translatethenews | app/TTN/Controller/Article.hs | mit | editArticle :: Key Article -> TTNAction ctx a
editArticle aID = do
art <- runSQL $ get aID
let articleForm = mkArticleForm art
renderer = renderArticleForm $ S.renderRoute editArticleR aID
processArticle a = do runSQL . replace aID $ a
gotoViewArticle a... | 411 | editArticle :: Key Article -> TTNAction ctx a
editArticle aID = do
art <- runSQL $ get aID
let articleForm = mkArticleForm art
renderer = renderArticleForm $ S.renderRoute editArticleR aID
processArticle a = do runSQL . replace aID $ a
gotoViewArticle a... | 411 | editArticle aID = do
art <- runSQL $ get aID
let articleForm = mkArticleForm art
renderer = renderArticleForm $ S.renderRoute editArticleR aID
processArticle a = do runSQL . replace aID $ a
gotoViewArticle aID
serveForm "article" articleForm rendere... | 365 | false | true | 0 | 14 | 123 | 109 | 49 | 60 | null | null |
typedrat/typedrat-site | app/Typedrat/DB/Slug.hs | gpl-3.0 | pgSlug :: Slug -> Column PGSlug
pgSlug = unsafeCoerceColumn . pgStrictText . unSlug | 83 | pgSlug :: Slug -> Column PGSlug
pgSlug = unsafeCoerceColumn . pgStrictText . unSlug | 83 | pgSlug = unsafeCoerceColumn . pgStrictText . unSlug | 51 | false | true | 0 | 6 | 12 | 26 | 13 | 13 | null | null |
tbepler/haskell-syntax.vim | test.hs | mit | -- ---------------------------------------------------------------------------
-- Rendering
-- | Render the @Doc@ to a String using the default @Style@.
render :: Doc -> String
render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter "" | 286 | render :: Doc -> String
render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter "" | 132 | render = fullRender (mode style) (lineLength style) (ribbonsPerLine style)
txtPrinter "" | 108 | true | true | 0 | 7 | 52 | 47 | 25 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.