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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rueshyna/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Product.hs | mpl-2.0 | -- | The size of data disk, in GB. The data disk size minimum is 10GB.
-- Applies only to Second Generation instances.
sDataDiskSizeGb :: Lens' Settings (Maybe Int64)
sDataDiskSizeGb
= lens _sDataDiskSizeGb
(\ s a -> s{_sDataDiskSizeGb = a})
. mapping _Coerce | 273 | sDataDiskSizeGb :: Lens' Settings (Maybe Int64)
sDataDiskSizeGb
= lens _sDataDiskSizeGb
(\ s a -> s{_sDataDiskSizeGb = a})
. mapping _Coerce | 154 | sDataDiskSizeGb
= lens _sDataDiskSizeGb
(\ s a -> s{_sDataDiskSizeGb = a})
. mapping _Coerce | 106 | true | true | 2 | 8 | 56 | 60 | 29 | 31 | null | null |
tjakway/ghcjvm | compiler/main/HeaderInfo.hs | bsd-3-clause | getOptions :: DynFlags
-> StringBuffer -- ^ Input Buffer
-> FilePath -- ^ Source filename. Used for location info.
-> [Located String] -- ^ Parsed options.
getOptions dflags buf filename
= getOptions' dflags (getToks dflags filename buf) | 279 | getOptions :: DynFlags
-> StringBuffer -- ^ Input Buffer
-> FilePath -- ^ Source filename. Used for location info.
-> [Located String]
getOptions dflags buf filename
= getOptions' dflags (getToks dflags filename buf) | 258 | getOptions dflags buf filename
= getOptions' dflags (getToks dflags filename buf) | 85 | true | true | 0 | 9 | 78 | 54 | 28 | 26 | null | null |
rueshyna/gogol | gogol-partners/gen/Network/Google/Partners/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'Money' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'mCurrencyCode'
--
-- * 'mNanos'
--
-- * 'mUnits'
money
:: Money
money =
Money'
{ _mCurrencyCode = Nothing
, _mNanos = Nothing
, _mUnit... | 337 | money
:: Money
money =
Money'
{ _mCurrencyCode = Nothing
, _mNanos = Nothing
, _mUnits = Nothing
} | 122 | money =
Money'
{ _mCurrencyCode = Nothing
, _mNanos = Nothing
, _mUnits = Nothing
} | 103 | true | true | 0 | 7 | 84 | 50 | 30 | 20 | null | null |
hungaikev/learning-haskell | cis194/week2/adts.hs | apache-2.0 | isSmall Cabbage = True | 22 | isSmall Cabbage = True | 22 | isSmall Cabbage = True | 22 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
tolysz/prepare-ghcjs | spec-lts8/aeson/Data/Aeson/Encoding/Internal.hs | bsd-3-clause | scientificText :: Scientific -> Encoding' a
scientificText = Encoding . EB.quote . EB.scientific | 96 | scientificText :: Scientific -> Encoding' a
scientificText = Encoding . EB.quote . EB.scientific | 96 | scientificText = Encoding . EB.quote . EB.scientific | 52 | false | true | 0 | 7 | 12 | 30 | 15 | 15 | null | null |
waterlink/hgo | GenericLexer.hs | mit | commaSep = Tok.commaSep | 23 | commaSep = Tok.commaSep | 23 | commaSep = Tok.commaSep | 23 | false | false | 1 | 6 | 2 | 12 | 4 | 8 | null | null |
flocknroll/haskell_cis194 | H7/Editor.hs | mit | prompt :: Buffer b => Editor b ()
prompt = do
s <- onBuffer value
io $ putStr (show s ++ "> ") | 98 | prompt :: Buffer b => Editor b ()
prompt = do
s <- onBuffer value
io $ putStr (show s ++ "> ") | 98 | prompt = do
s <- onBuffer value
io $ putStr (show s ++ "> ") | 64 | false | true | 0 | 12 | 26 | 61 | 26 | 35 | null | null |
ellis/OnTopOfThings | old-20150308/src/OnTopOfThings/Commands/Import.hs | gpl-3.0 | createItems :: (M.Map String ItemForJson, M.Map FilePath Item) -> Object -> Validation (M.Map String ItemForJson, M.Map FilePath Item)
--createItems uuids projects m | trace ("createItems " ++ show uuids) False = undefined
createItems (db, folders) m = do
uuid <- get "uuid" m
entry' <- get "entry" m
description <... | 3,492 | createItems :: (M.Map String ItemForJson, M.Map FilePath Item) -> Object -> Validation (M.Map String ItemForJson, M.Map FilePath Item)
createItems (db, folders) m = do
uuid <- get "uuid" m
entry' <- get "entry" m
description <- get "description" m
project <- getMaybe "project" m
status' <- getMaybe "status" m... | 3,404 | createItems (db, folders) m = do
uuid <- get "uuid" m
entry' <- get "entry" m
description <- get "description" m
project <- getMaybe "project" m
status' <- getMaybe "status" m
end' <- getMaybe "end" m
tags <- getList "tags" m
created <- (parseTime defaultTimeLocale "%Y%m%dT%H%M%SZ" entry') `maybeToValid... | 3,269 | true | true | 7 | 14 | 971 | 671 | 351 | 320 | null | null |
ocharles/hackage-server | Distribution/Server/Pages/Reverse.hs | bsd-3-clause | reverseFlatRender :: PackageName -> (PackageName -> String) -> ReverseResource -> ReverseCount -> [(PackageName, Int)] -> [Html]
reverseFlatRender pkgname packageLink r (ReverseCount total flat _) pairs =
h2 << (display pkgname ++ ": " ++ num flat "total reverse dependencies" "reverse dependency"):case (total, flat) ... | 2,050 | reverseFlatRender :: PackageName -> (PackageName -> String) -> ReverseResource -> ReverseCount -> [(PackageName, Int)] -> [Html]
reverseFlatRender pkgname packageLink r (ReverseCount total flat _) pairs =
h2 << (display pkgname ++ ": " ++ num flat "total reverse dependencies" "reverse dependency"):case (total, flat) ... | 2,050 | reverseFlatRender pkgname packageLink r (ReverseCount total flat _) pairs =
h2 << (display pkgname ++ ": " ++ num flat "total reverse dependencies" "reverse dependency"):case (total, flat) of
(0, 0) -> [paragraph << [toHtml "No packages depend on ", toPackage pkgname]]
_ ->
[ paragraph << if total == fl... | 1,921 | false | true | 12 | 19 | 472 | 662 | 338 | 324 | null | null |
vito/atomo | src/Atomo/Lexer.hs | bsd-3-clause | lPunctuation :: Lexer Token
lPunctuation = choice
[ liftM TokPunctuation (oneOf "|`'~@")
, liftM TokOpen (oneOf "([{")
, liftM TokClose (oneOf ")]}")
] | 167 | lPunctuation :: Lexer Token
lPunctuation = choice
[ liftM TokPunctuation (oneOf "|`'~@")
, liftM TokOpen (oneOf "([{")
, liftM TokClose (oneOf ")]}")
] | 167 | lPunctuation = choice
[ liftM TokPunctuation (oneOf "|`'~@")
, liftM TokOpen (oneOf "([{")
, liftM TokClose (oneOf ")]}")
] | 139 | false | true | 0 | 9 | 38 | 59 | 29 | 30 | null | null |
google/pull-request-mailer | executables/pull-request-mailer-server/Main.hs | bsd-3-clause | forkWait :: IO () -> IO ()
forkWait f = forkProcess f >>= void . getProcessStatus True False | 92 | forkWait :: IO () -> IO ()
forkWait f = forkProcess f >>= void . getProcessStatus True False | 92 | forkWait f = forkProcess f >>= void . getProcessStatus True False | 65 | false | true | 0 | 7 | 17 | 44 | 20 | 24 | null | null |
maxeler/maxskins | examples/Simple/client/hs/AdvancedStatic/SimpleClient.hs | bsd-2-clause | simpleCPU (x:xs) = x*x+x : simpleCPU (xs) | 42 | simpleCPU (x:xs) = x*x+x : simpleCPU (xs) | 42 | simpleCPU (x:xs) = x*x+x : simpleCPU (xs) | 42 | false | false | 3 | 7 | 7 | 39 | 17 | 22 | null | null |
krapsh/kraps-haskell | src/Spark/Core/Internal/DatasetFunctions.hs | apache-2.0 | -- | (developer) Returns the logical parenst of a node.
nodeLogicalParents :: ComputeNode loc a -> Maybe [UntypedNode]
nodeLogicalParents = (V.toList <$>) . _cnLogicalParents | 174 | nodeLogicalParents :: ComputeNode loc a -> Maybe [UntypedNode]
nodeLogicalParents = (V.toList <$>) . _cnLogicalParents | 118 | nodeLogicalParents = (V.toList <$>) . _cnLogicalParents | 55 | true | true | 0 | 7 | 23 | 37 | 20 | 17 | null | null |
jstolarek/ghc | libraries/base/GHC/Conc/Sync.hs | bsd-3-clause | always :: STM Bool -> STM ()
always i = alwaysSucceeds ( do v <- i
if (v) then return () else ( error "Transactional invariant violation" ) ) | 172 | always :: STM Bool -> STM ()
always i = alwaysSucceeds ( do v <- i
if (v) then return () else ( error "Transactional invariant violation" ) ) | 172 | always i = alwaysSucceeds ( do v <- i
if (v) then return () else ( error "Transactional invariant violation" ) ) | 143 | false | true | 0 | 11 | 59 | 69 | 32 | 37 | null | null |
techlib/netflow | lib/Network/Flow/V9/Flows.hs | mit | getField :: Type -> Get Object
getField (Type number size) = do
bytes <- getBytes (fromIntegral size)
return $ decodeField number bytes | 145 | getField :: Type -> Get Object
getField (Type number size) = do
bytes <- getBytes (fromIntegral size)
return $ decodeField number bytes | 143 | getField (Type number size) = do
bytes <- getBytes (fromIntegral size)
return $ decodeField number bytes | 112 | false | true | 0 | 10 | 31 | 57 | 26 | 31 | null | null |
nevrenato/Hets_Fork | HasCASL/TypeAna.hs | gpl-2.0 | -- | compute all super type ids for several type ids given as second argument
supIds :: TypeMap -> Set.Set Id -> Set.Set Id -> Set.Set Id
supIds tm known new =
if Set.null new then known else
let more = Set.unions $ map ( \ i -> superTypes
$ Map.findWithDefault starTypeInfo i tm)
... | 445 | supIds :: TypeMap -> Set.Set Id -> Set.Set Id -> Set.Set Id
supIds tm known new =
if Set.null new then known else
let more = Set.unions $ map ( \ i -> superTypes
$ Map.findWithDefault starTypeInfo i tm)
$ Set.toList new
newKnown = Set.union known new
... | 367 | supIds tm known new =
if Set.null new then known else
let more = Set.unions $ map ( \ i -> superTypes
$ Map.findWithDefault starTypeInfo i tm)
$ Set.toList new
newKnown = Set.union known new
in supIds tm newKnown (more Set.\\ newKnown) | 307 | true | true | 0 | 17 | 140 | 142 | 68 | 74 | null | null |
winterland1989/mysql-haskell | Database/MySQL/Protocol/MySQLValue.hs | bsd-3-clause | putBinaryField (MySQLInt8U n) = putWord8 n | 47 | putBinaryField (MySQLInt8U n) = putWord8 n | 47 | putBinaryField (MySQLInt8U n) = putWord8 n | 47 | false | false | 0 | 7 | 10 | 18 | 8 | 10 | null | null |
phischu/fragnix | tests/packages/scotty/Network.Wai.Test.hs | bsd-3-clause | extractSetCookieFromSResponse :: SResponse -> Session SResponse
extractSetCookieFromSResponse response = do
let setCookieHeaders =
filter (("Set-Cookie"==) . fst) $ simpleHeaders response
let newClientCookies = map (Cookie.parseSetCookie . snd) setCookieHeaders
modifyClientCookies
(Map.union
(M... | 406 | extractSetCookieFromSResponse :: SResponse -> Session SResponse
extractSetCookieFromSResponse response = do
let setCookieHeaders =
filter (("Set-Cookie"==) . fst) $ simpleHeaders response
let newClientCookies = map (Cookie.parseSetCookie . snd) setCookieHeaders
modifyClientCookies
(Map.union
(M... | 406 | extractSetCookieFromSResponse response = do
let setCookieHeaders =
filter (("Set-Cookie"==) . fst) $ simpleHeaders response
let newClientCookies = map (Cookie.parseSetCookie . snd) setCookieHeaders
modifyClientCookies
(Map.union
(Map.fromList [(Cookie.setCookieName c, c) | c <- newClientCookies... | 342 | false | true | 0 | 15 | 67 | 124 | 60 | 64 | null | null |
alephnil/h99 | 26.hs | apache-2.0 | combinations :: Int -> [a] -> [[a]]
combinations 0 _ = [[]] | 59 | combinations :: Int -> [a] -> [[a]]
combinations 0 _ = [[]] | 59 | combinations 0 _ = [[]] | 23 | false | true | 0 | 8 | 11 | 38 | 21 | 17 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpCanFail NewJDoubleArrayOp = True | 41 | primOpCanFail NewJDoubleArrayOp = True | 41 | primOpCanFail NewJDoubleArrayOp = True | 41 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
patrickherrmann/hearts | src/Hearts.hs | mit | runHeartsWith :: GameIO -> HeartsIO a -> IO a
runHeartsWith gio = flip runReaderT gio . runHearts | 97 | runHeartsWith :: GameIO -> HeartsIO a -> IO a
runHeartsWith gio = flip runReaderT gio . runHearts | 97 | runHeartsWith gio = flip runReaderT gio . runHearts | 51 | false | true | 0 | 7 | 16 | 37 | 17 | 20 | null | null |
brendanhay/gogol | gogol-storage-transfer/gen/Network/Google/Resource/StorageTransfer/TransferJobs/Create.hs | mpl-2.0 | -- | OAuth access token.
tjcAccessToken :: Lens' TransferJobsCreate (Maybe Text)
tjcAccessToken
= lens _tjcAccessToken
(\ s a -> s{_tjcAccessToken = a}) | 160 | tjcAccessToken :: Lens' TransferJobsCreate (Maybe Text)
tjcAccessToken
= lens _tjcAccessToken
(\ s a -> s{_tjcAccessToken = a}) | 135 | tjcAccessToken
= lens _tjcAccessToken
(\ s a -> s{_tjcAccessToken = a}) | 79 | true | true | 0 | 8 | 29 | 49 | 25 | 24 | null | null |
kim/amazonka | amazonka-swf/gen/Network/AWS/SWF/Types.hs | mpl-2.0 | -- | 'ContinueAsNewWorkflowExecutionDecisionAttributes' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'canwedaChildPolicy' @::@ 'Maybe' 'ChildPolicy'
--
-- * 'canwedaExecutionStartToCloseTimeout' @::@ 'Maybe' 'Text'
--
-- * 'canwedaInput' @::@ 'Maybe' 'Text'
--
-- * 'canwedaTagList'... | 1,185 | continueAsNewWorkflowExecutionDecisionAttributes :: ContinueAsNewWorkflowExecutionDecisionAttributes
continueAsNewWorkflowExecutionDecisionAttributes = ContinueAsNewWorkflowExecutionDecisionAttributes
{ _canwedaInput = Nothing
, _canwedaExecutionStartToCloseTimeout = Nothing
, _canwed... | 629 | continueAsNewWorkflowExecutionDecisionAttributes = ContinueAsNewWorkflowExecutionDecisionAttributes
{ _canwedaInput = Nothing
, _canwedaExecutionStartToCloseTimeout = Nothing
, _canwedaTaskList = Nothing
, _canwedaTaskPriority = Nothing
, _c... | 528 | true | true | 0 | 6 | 254 | 81 | 59 | 22 | null | null |
fmapfmapfmap/amazonka | amazonka-config/gen/Network/AWS/Config/Types.hs | mpl-2.0 | -- | The requested action is not valid.
_ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_ValidationException = _ServiceError . hasCode "ValidationException" | 189 | _ValidationException :: AsError a => Getting (First ServiceError) a ServiceError
_ValidationException = _ServiceError . hasCode "ValidationException" | 149 | _ValidationException = _ServiceError . hasCode "ValidationException" | 68 | true | true | 0 | 8 | 23 | 39 | 19 | 20 | null | null |
ibukanov/ahome | dev/bna/SymPoly.hs | unlicense | mkterm n list = Term n (normalize list) where
normalize = filter non_zero_power . fuse_groups_by fuser . sortBy same_symbol
non_zero_power (power, _) = power /= 0
same_symbol (_, symbol_1) (_, symbol_2) = compare symbol_1 symbol_2
fuser (power_1, symbol_1) (power_2, symbol_2)
= if symbol_1 == symbol_2 t... | 409 | mkterm n list = Term n (normalize list) where
normalize = filter non_zero_power . fuse_groups_by fuser . sortBy same_symbol
non_zero_power (power, _) = power /= 0
same_symbol (_, symbol_1) (_, symbol_2) = compare symbol_1 symbol_2
fuser (power_1, symbol_1) (power_2, symbol_2)
= if symbol_1 == symbol_2 t... | 409 | mkterm n list = Term n (normalize list) where
normalize = filter non_zero_power . fuse_groups_by fuser . sortBy same_symbol
non_zero_power (power, _) = power /= 0
same_symbol (_, symbol_1) (_, symbol_2) = compare symbol_1 symbol_2
fuser (power_1, symbol_1) (power_2, symbol_2)
= if symbol_1 == symbol_2 t... | 409 | false | false | 5 | 8 | 84 | 158 | 76 | 82 | null | null |
ezyang/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | isBuiltInSyntax :: Name -> Bool
isBuiltInSyntax (Name {n_sort = WiredIn _ _ BuiltInSyntax}) = True | 98 | isBuiltInSyntax :: Name -> Bool
isBuiltInSyntax (Name {n_sort = WiredIn _ _ BuiltInSyntax}) = True | 98 | isBuiltInSyntax (Name {n_sort = WiredIn _ _ BuiltInSyntax}) = True | 66 | false | true | 3 | 7 | 14 | 43 | 20 | 23 | null | null |
peteg/ADHOC | ADHOC/ModelChecker/CTL.hs | gpl-2.0 | ef = CTLef | 10 | ef = CTLef | 10 | ef = CTLef | 10 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
Cahu/krpc-hs | src/KRPCHS/RemoteTech.hs | gpl-3.0 | getGroundStationsStream :: RPCContext (KRPCStream ([Data.Text.Text]))
getGroundStationsStream = requestStream $ getGroundStationsStreamReq | 139 | getGroundStationsStream :: RPCContext (KRPCStream ([Data.Text.Text]))
getGroundStationsStream = requestStream $ getGroundStationsStreamReq | 139 | getGroundStationsStream = requestStream $ getGroundStationsStreamReq | 69 | false | true | 1 | 10 | 10 | 37 | 18 | 19 | null | null |
mstksg/tensor-ops | src/TensorOps/Backend/BTensor.hs | bsd-3-clause | bRows
:: forall k (v :: k -> Type -> Type) ns ms os b f. (Applicative f, Vec v, BLAS b)
=> Sing ns
-> Length os
-> (BTensor v b ms -> f (BTensor v b os))
-> BTensor v b (ns ++ ms)
-> f (BTensor v b (ns ++ os))
bRows sN lO f = bIxRows sN lO (\_ -> f) | 273 | bRows
:: forall k (v :: k -> Type -> Type) ns ms os b f. (Applicative f, Vec v, BLAS b)
=> Sing ns
-> Length os
-> (BTensor v b ms -> f (BTensor v b os))
-> BTensor v b (ns ++ ms)
-> f (BTensor v b (ns ++ os))
bRows sN lO f = bIxRows sN lO (\_ -> f) | 273 | bRows sN lO f = bIxRows sN lO (\_ -> f) | 39 | false | true | 0 | 16 | 88 | 166 | 86 | 80 | null | null |
44534/reducerabinpairs | src/Reduce.hs | gpl-3.0 | {- | remove redundant pairs
top_irredundant :: (Ord q, Eq l, Ord a) => SingletonDRA q a l -> SingletonDRA q a l
>>> accept $ top_irredundant $ toSDRA $ top_sat $ toDRA $ set_split exdra1
[SingletonRabinpair {infinite = 1, finite = fromList [2]}
,SingletonRabinpair {infinite = 2, finite = fromList [3]}]
-}
top_irredun... | 758 | top_irredundant dra =
let acc = (\p@(SingletonRabinpair q e)
-> (q, [(s_pair dra p, p)]))
<$> accept dra
comparemap = M.fromListWith (++) acc
minmap = M.map ( M.fromListWith min ) comparemap
nm = M.map
(\ps -> M.filterWithKey
(\s... | 449 | top_irredundant dra =
let acc = (\p@(SingletonRabinpair q e)
-> (q, [(s_pair dra p, p)]))
<$> accept dra
comparemap = M.fromListWith (++) acc
minmap = M.map ( M.fromListWith min ) comparemap
nm = M.map
(\ps -> M.filterWithKey
(\s... | 449 | true | false | 1 | 18 | 236 | 188 | 97 | 91 | null | null |
ammanvedi/haskell-nim-game | nim.hs | mit | update_game [0,0,0] _ _ = [] | 28 | update_game [0,0,0] _ _ = [] | 28 | update_game [0,0,0] _ _ = [] | 28 | false | false | 0 | 6 | 5 | 24 | 13 | 11 | null | null |
paulolieuthier/haskell-concurrent-lists | src/Lazy.hs | lgpl-2.1 | add :: (Eq a, Ord a) => LazyList a -> a -> IO ()
add list@(LazyList headPtr) x = do
(prevStuff, currStuff) <- searchUnsafely headPtr x
let (prevPtr, prevMVar) = prevStuff
let (currPtr, currMVar) = currStuff
let
insert prevNode = do
let newNode = Node x currPtr
newPtr <- ... | 1,044 | add :: (Eq a, Ord a) => LazyList a -> a -> IO ()
add list@(LazyList headPtr) x = do
(prevStuff, currStuff) <- searchUnsafely headPtr x
let (prevPtr, prevMVar) = prevStuff
let (currPtr, currMVar) = currStuff
let
insert prevNode = do
let newNode = Node x currPtr
newPtr <- ... | 1,044 | add list@(LazyList headPtr) x = do
(prevStuff, currStuff) <- searchUnsafely headPtr x
let (prevPtr, prevMVar) = prevStuff
let (currPtr, currMVar) = currStuff
let
insert prevNode = do
let newNode = Node x currPtr
newPtr <- newIORef =<< ((,,) newNode) <$> newMVar () <*> ne... | 995 | false | true | 1 | 19 | 311 | 375 | 182 | 193 | null | null |
brendanhay/gogol | gogol-proximitybeacon/gen/Network/Google/ProximityBeacon/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'BeaconAttachment' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'baMaxDistanceMeters'
--
-- * 'baCreationTimeMs'
--
-- * 'baData'
--
-- * 'baAttachmentName'
--
-- * 'baNamespacedType'
beaconAttachment
:: ... | 544 | beaconAttachment
:: BeaconAttachment
beaconAttachment =
BeaconAttachment'
{ _baMaxDistanceMeters = Nothing
, _baCreationTimeMs = Nothing
, _baData = Nothing
, _baAttachmentName = Nothing
, _baNamespacedType = Nothing
} | 248 | beaconAttachment =
BeaconAttachment'
{ _baMaxDistanceMeters = Nothing
, _baCreationTimeMs = Nothing
, _baData = Nothing
, _baAttachmentName = Nothing
, _baNamespacedType = Nothing
} | 207 | true | true | 1 | 7 | 106 | 63 | 41 | 22 | null | null |
spechub/Hets | THF/ParseTHF.hs | gpl-2.0 | formulaData :: CharParser st FormulaData
formulaData = fmap THF_Formula thfFormula | 82 | formulaData :: CharParser st FormulaData
formulaData = fmap THF_Formula thfFormula | 82 | formulaData = fmap THF_Formula thfFormula | 41 | false | true | 1 | 5 | 9 | 25 | 10 | 15 | null | null |
pbl64k/HackerRank-Contests | 2014-06-20-FP/BoleynSalary/bs.qs.hs | bsd-2-clause | arrlst xs = map (xs !) (U.indices xs) | 37 | arrlst xs = map (xs !) (U.indices xs) | 37 | arrlst xs = map (xs !) (U.indices xs) | 37 | false | false | 0 | 8 | 7 | 26 | 13 | 13 | null | null |
narumij/matrix-as-xyz | src/Data/Matrix/AsXYZ/ParseXYZ.hs | bsd-3-clause | -- | Alias of equivalentPositions
--
-- >>> parse (transformQqXYZ integral) "" "x+1,y+2,z+3"
-- Right [[1,0,0,1],[0,1,0,2],[0,0,1,3]]
transformQqXYZ :: Num a => ReadNum a -> CharParser () [[a]]
transformQqXYZ = components xyz | 225 | transformQqXYZ :: Num a => ReadNum a -> CharParser () [[a]]
transformQqXYZ = components xyz | 91 | transformQqXYZ = components xyz | 31 | true | true | 0 | 9 | 30 | 45 | 24 | 21 | null | null |
angler-lang/angler-lang | src/Main.hs | bsd-3-clause | readModule :: Options -> FilePath -> Handle -> IO SymbolTableSpan
readModule options filepath handle = do
-- setting the flags for the import files
let imprtsOpts = options & (opt_stdin .~ False)
. (opt_tokens .~ False)
. (opt_ast .~ ... | 5,420 | readModule :: Options -> FilePath -> Handle -> IO SymbolTableSpan
readModule options filepath handle = do
-- setting the flags for the import files
let imprtsOpts = options & (opt_stdin .~ False)
. (opt_tokens .~ False)
. (opt_ast .~ ... | 5,420 | readModule options filepath handle = do
-- setting the flags for the import files
let imprtsOpts = options & (opt_stdin .~ False)
. (opt_tokens .~ False)
. (opt_ast .~ False)
. (opt_mixfix .~ False)
... | 5,354 | false | true | 0 | 20 | 2,295 | 906 | 420 | 486 | null | null |
fmthoma/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | mkAltExpr (LitAlt _) _ _ = panic "mkAltExpr LitAlt" | 51 | mkAltExpr (LitAlt _) _ _ = panic "mkAltExpr LitAlt" | 51 | mkAltExpr (LitAlt _) _ _ = panic "mkAltExpr LitAlt" | 51 | false | false | 1 | 6 | 8 | 21 | 9 | 12 | null | null |
gridaphobe/ghc | compiler/utils/Util.hs | bsd-3-clause | escapeSpaces :: String -> String
escapeSpaces = foldr (\c s -> if isSpace c then '\\':c:s else c:s) "" | 102 | escapeSpaces :: String -> String
escapeSpaces = foldr (\c s -> if isSpace c then '\\':c:s else c:s) "" | 102 | escapeSpaces = foldr (\c s -> if isSpace c then '\\':c:s else c:s) "" | 69 | false | true | 0 | 10 | 18 | 60 | 29 | 31 | null | null |
seagreen/station | src/Station/Types/Card.hs | mit | cardFromMag
:: (BlobHash -> Maybe ByteString)
-> Card BlobHash
-> Maybe CardBytes
cardFromMag f card = do
front <- f (_cardInstance card)
Just (card { _cardInstance = front }) | 195 | cardFromMag
:: (BlobHash -> Maybe ByteString)
-> Card BlobHash
-> Maybe CardBytes
cardFromMag f card = do
front <- f (_cardInstance card)
Just (card { _cardInstance = front }) | 195 | cardFromMag f card = do
front <- f (_cardInstance card)
Just (card { _cardInstance = front }) | 101 | false | true | 0 | 11 | 48 | 78 | 36 | 42 | null | null |
lucas8/MPSI | ipt/recursive/froot/froot.hs | mit | ewton :: (Double -> Double) -> (Double -> Double) -> Double -> Double -> Double
newton f df xn e = m
where (m,_) = newton_cn f df xn 0 e
------------------------------------------
-- Main ----------------------------------
| 228 | newton :: (Double -> Double) -> (Double -> Double) -> Double -> Double -> Double
newton f df xn e = m
where (m,_) = newton_cn f df xn 0 e
------------------------------------------
-- Main ---------------------------------- | 228 | newton f df xn e = m
where (m,_) = newton_cn f df xn 0 e
------------------------------------------
-- Main ---------------------------------- | 147 | false | true | 0 | 8 | 40 | 77 | 41 | 36 | null | null |
dysinger/consul-haskell | src/Network/Consul.hs | bsd-3-clause | getKeys :: MonadIO m => ConsulClient -> Text -> Maybe Word64 -> Maybe Consistency -> Maybe Datacenter -> m [KeyValue]
getKeys _client@ConsulClient{..} = I.getKeys ccManager (I.hostWithScheme _client) ccPort | 206 | getKeys :: MonadIO m => ConsulClient -> Text -> Maybe Word64 -> Maybe Consistency -> Maybe Datacenter -> m [KeyValue]
getKeys _client@ConsulClient{..} = I.getKeys ccManager (I.hostWithScheme _client) ccPort | 206 | getKeys _client@ConsulClient{..} = I.getKeys ccManager (I.hostWithScheme _client) ccPort | 88 | false | true | 4 | 7 | 27 | 74 | 39 | 35 | null | null |
brendanhay/gogol | gogol-plus-domains/gen/Network/Google/PlusDomains/Types/Product.hs | mpl-2.0 | -- | Whether reshares are disabled for the activity.
aosfvResharingDisabled :: Lens' ActivityObjectStatusForViewer (Maybe Bool)
aosfvResharingDisabled
= lens _aosfvResharingDisabled
(\ s a -> s{_aosfvResharingDisabled = a}) | 231 | aosfvResharingDisabled :: Lens' ActivityObjectStatusForViewer (Maybe Bool)
aosfvResharingDisabled
= lens _aosfvResharingDisabled
(\ s a -> s{_aosfvResharingDisabled = a}) | 178 | aosfvResharingDisabled
= lens _aosfvResharingDisabled
(\ s a -> s{_aosfvResharingDisabled = a}) | 103 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
BerndSchwarzenbacher/cis194-solutions | 08-io/Party.hs | mit | formatGL :: GuestList -> String
formatGL (GL lst fun) = "Total fun: " ++ show fun ++ "\n" ++ unlines employees
where employees = map (\(Emp {empName = name}) -> name) lst | 172 | formatGL :: GuestList -> String
formatGL (GL lst fun) = "Total fun: " ++ show fun ++ "\n" ++ unlines employees
where employees = map (\(Emp {empName = name}) -> name) lst | 172 | formatGL (GL lst fun) = "Total fun: " ++ show fun ++ "\n" ++ unlines employees
where employees = map (\(Emp {empName = name}) -> name) lst | 140 | false | true | 1 | 11 | 33 | 84 | 40 | 44 | null | null |
seereason/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ DoubleNegOp [r] [x] = PrimInline [j| `r` = `jneg x` |] | 74 | genPrim _ _ DoubleNegOp [r] [x] = PrimInline [j| `r` = `jneg x` |] | 74 | genPrim _ _ DoubleNegOp [r] [x] = PrimInline [j| `r` = `jneg x` |] | 74 | false | false | 0 | 6 | 21 | 30 | 17 | 13 | null | null |
newmana/rtree | rtree.hs | apache-2.0 | searchNodes (Inner _ entries) bb = concatMap (\n -> searchNodes n bb) (filteredrNodes)
where
filteredrNodes = filter (\n -> testBoundingBoxOverlap (nodeBb n) bb) entries | 178 | searchNodes (Inner _ entries) bb = concatMap (\n -> searchNodes n bb) (filteredrNodes)
where
filteredrNodes = filter (\n -> testBoundingBoxOverlap (nodeBb n) bb) entries | 178 | searchNodes (Inner _ entries) bb = concatMap (\n -> searchNodes n bb) (filteredrNodes)
where
filteredrNodes = filter (\n -> testBoundingBoxOverlap (nodeBb n) bb) entries | 178 | false | false | 2 | 10 | 32 | 77 | 36 | 41 | null | null |
ivan-m/servant-auth-token | src/Servant/Server/Auth/Token.hs | bsd-3-clause | authUserPut :: AuthHandler m
=> UserId -- ^ User id
-> ReqRegister -- ^ New user
-> MToken' '["auth-update"] -- ^ Authorisation header with token
-> m Unit
authUserPut uid' ReqRegister{..} token = do
guardAuthToken token
guardPassword reqRegPassword
let uid = toKey uid'
let user = UserImpl {
use... | 638 | authUserPut :: AuthHandler m
=> UserId -- ^ User id
-> ReqRegister -- ^ New user
-> MToken' '["auth-update"] -- ^ Authorisation header with token
-> m Unit
authUserPut uid' ReqRegister{..} token = do
guardAuthToken token
guardPassword reqRegPassword
let uid = toKey uid'
let user = UserImpl {
use... | 638 | authUserPut uid' ReqRegister{..} token = do
guardAuthToken token
guardPassword reqRegPassword
let uid = toKey uid'
let user = UserImpl {
userImplLogin = reqRegLogin
, userImplPassword = ""
, userImplEmail = reqRegEmail
}
user' <- setUserPassword reqRegPassword user
replaceUserImpl ... | 474 | false | true | 14 | 7 | 137 | 139 | 74 | 65 | null | null |
energyflowanalysis/efa-2.1 | src/EFA/Flow/Topology/AssignMap.hs | bsd-3-clause | lift1 ::
(Signal node v0 -> Signal node v) ->
AssignMap node v0 ->
AssignMap node v
lift1 f (AssignMap signal0) =
AssignMap (f signal0) | 147 | lift1 ::
(Signal node v0 -> Signal node v) ->
AssignMap node v0 ->
AssignMap node v
lift1 f (AssignMap signal0) =
AssignMap (f signal0) | 147 | lift1 f (AssignMap signal0) =
AssignMap (f signal0) | 54 | false | true | 0 | 8 | 36 | 66 | 31 | 35 | null | null |
robinp/haskell-indexer | kythe-verification/testdata/basic/DataRef.hs | apache-2.0 | f :: D -> Int
-- - @A ref CtorA
f A = 0 | 39 | f :: D -> Int
f A = 0 | 21 | f A = 0 | 7 | true | true | 0 | 7 | 13 | 25 | 11 | 14 | null | null |
Alllex/stm-data-collection | benchmarks/BenchData.hs | bsd-3-clause | benchStamp :: String -> String -> Int -> Int -> Int -> String
benchStamp benchName kindName size rate caps =
intercalate "-" [benchName, kindName, size', rate', caps']
where
size' = "s" ++ show size
rate' = "r" ++ show rate
caps' = "c" ++ show caps | 280 | benchStamp :: String -> String -> Int -> Int -> Int -> String
benchStamp benchName kindName size rate caps =
intercalate "-" [benchName, kindName, size', rate', caps']
where
size' = "s" ++ show size
rate' = "r" ++ show rate
caps' = "c" ++ show caps | 280 | benchStamp benchName kindName size rate caps =
intercalate "-" [benchName, kindName, size', rate', caps']
where
size' = "s" ++ show size
rate' = "r" ++ show rate
caps' = "c" ++ show caps | 218 | false | true | 9 | 11 | 77 | 120 | 53 | 67 | null | null |
Kyly/liquidhaskell | src/Language/Haskell/Liquid/ANFTransform.hs | bsd-3-clause | normalizeForAllTys :: CoreExpr -> CoreExpr
normalizeForAllTys e = case e of
Lam b _ | isTyVar b
-> e
_ -> mkLams tvs (mkTyApps e (map mkTyVarTy tvs))
where
(tvs, _) = splitForAllTys (exprType e) | 206 | normalizeForAllTys :: CoreExpr -> CoreExpr
normalizeForAllTys e = case e of
Lam b _ | isTyVar b
-> e
_ -> mkLams tvs (mkTyApps e (map mkTyVarTy tvs))
where
(tvs, _) = splitForAllTys (exprType e) | 206 | normalizeForAllTys e = case e of
Lam b _ | isTyVar b
-> e
_ -> mkLams tvs (mkTyApps e (map mkTyVarTy tvs))
where
(tvs, _) = splitForAllTys (exprType e) | 163 | false | true | 0 | 12 | 46 | 98 | 45 | 53 | null | null |
spacekitteh/smcghc | compiler/cmm/CLabel.hs | bsd-3-clause | needsCDecl (DynamicLinkerLabel {}) = panic "needsCDecl DynamicLinkerLabel" | 79 | needsCDecl (DynamicLinkerLabel {}) = panic "needsCDecl DynamicLinkerLabel" | 79 | needsCDecl (DynamicLinkerLabel {}) = panic "needsCDecl DynamicLinkerLabel" | 79 | false | false | 0 | 6 | 11 | 20 | 9 | 11 | null | null |
anton-k/language-css | src/Language/Css/Build/Tags.hs | bsd-3-clause | -- | @eventsource@ tag
eventsource :: Sel'
eventsource = ident "eventsource" | 76 | eventsource :: Sel'
eventsource = ident "eventsource" | 53 | eventsource = ident "eventsource" | 33 | true | true | 0 | 6 | 10 | 21 | 9 | 12 | null | null |
shayan-najd/QuickCover | QuickCover/QCPP.hs | bsd-3-clause | -- using the preprocessor ex: ghci Test.hs -F -pgmF pp
main :: IO ()
main = do
args <- getArgs
case args of
(orgfile:infile:outfile:[]) -> do
f <- readFile infile
case parseFileContents f of
ParseOk m -> do
let (m',c) = transM m
m'' = ( addImport "Quic... | 875 | main :: IO ()
main = do
args <- getArgs
case args of
(orgfile:infile:outfile:[]) -> do
f <- readFile infile
case parseFileContents f of
ParseOk m -> do
let (m',c) = transM m
m'' = ( addImport "QuickCover.Log" "LG"
. addImport "Data... | 820 | main = do
args <- getArgs
case args of
(orgfile:infile:outfile:[]) -> do
f <- readFile infile
case parseFileContents f of
ParseOk m -> do
let (m',c) = transM m
m'' = ( addImport "QuickCover.Log" "LG"
. addImport "Data.Typeable" "T... | 806 | true | true | 0 | 27 | 375 | 233 | 108 | 125 | null | null |
SKA-ScienceDataProcessor/RC | MS4/lib/DNA/DSL.hs | apache-2.0 | -- | If one don't want to create new actor it's possible to execute
-- simple 'Actor' inside current actor. For example:
--
-- > do ...
-- > b <- eval someActor 42
-- > ...
eval :: (Serializable a, Serializable b)
=> Actor a b -- ^ Actor to execute
-> a -- ^ Value wh... | 395 | eval :: (Serializable a, Serializable b)
=> Actor a b -- ^ Actor to execute
-> a -- ^ Value which is passed to an actor as parameter
-> DNA b
eval (Actor act) = act | 215 | eval (Actor act) = act | 22 | true | true | 0 | 8 | 130 | 59 | 33 | 26 | null | null |
ku00/aoj-haskell | src/ITP1_7_C.hs | bsd-3-clause | columnSums :: (Monad m) =>Int -> Spreadsheet -> m Row
columnSums n xs = Monad.forM [0..(n-1)] $ \i -> return $ sum $ map (!! i) xs | 130 | columnSums :: (Monad m) =>Int -> Spreadsheet -> m Row
columnSums n xs = Monad.forM [0..(n-1)] $ \i -> return $ sum $ map (!! i) xs | 130 | columnSums n xs = Monad.forM [0..(n-1)] $ \i -> return $ sum $ map (!! i) xs | 76 | false | true | 0 | 9 | 26 | 79 | 41 | 38 | null | null |
emc2/HUnit-Plus | src/Test/HUnitPlus/Reporting.hs | bsd-3-clause | -- | A reporter containing default actions, which are to do nothing
-- and return the user state unmodified.
defaultReporter :: Reporter a
defaultReporter = Reporter {
reporterStart = fail "Must define a reporterStart value",
reporterEnd = \_ _ us -> return us,
reporterStartSuite = \_ us -> return us,
r... | 720 | defaultReporter :: Reporter a
defaultReporter = Reporter {
reporterStart = fail "Must define a reporterStart value",
reporterEnd = \_ _ us -> return us,
reporterStartSuite = \_ us -> return us,
reporterEndSuite = \_ _ us -> return us,
reporterStartCase = \_ us -> return us,
reporterCaseProgress ... | 611 | defaultReporter = Reporter {
reporterStart = fail "Must define a reporterStart value",
reporterEnd = \_ _ us -> return us,
reporterStartSuite = \_ us -> return us,
reporterEndSuite = \_ _ us -> return us,
reporterStartCase = \_ us -> return us,
reporterCaseProgress = \_ _ us -> return us,
re... | 581 | true | true | 0 | 9 | 170 | 228 | 124 | 104 | null | null |
pgj/bead | src/Bead/Persistence/NoSQLDir.hs | bsd-3-clause | assessmentOfScore :: ScoreKey -> Persist AssessmentKey
assessmentOfScore = objectOrError "No assessment was found for " "assessment" AssessmentKey isAssessmentDir | 162 | assessmentOfScore :: ScoreKey -> Persist AssessmentKey
assessmentOfScore = objectOrError "No assessment was found for " "assessment" AssessmentKey isAssessmentDir | 162 | assessmentOfScore = objectOrError "No assessment was found for " "assessment" AssessmentKey isAssessmentDir | 107 | false | true | 0 | 6 | 17 | 27 | 13 | 14 | null | null |
danidiaz/free | src/Control/Monad/Trans/Free.hs | bsd-3-clause | -- | Cuts off a tree of computations at a given depth.
-- If the depth is @0@ or less, no computation nor
-- monadic effects will take place.
--
-- Some examples (@n ≥ 0@):
--
-- @
-- 'cutoff' 0 _ ≡ 'return' 'Nothing'
-- 'cutoff' (n+1) '.' 'return' ≡ 'return' '.' 'Just'
-- 'cutoff' (n+1) '.' 'lift' ≡ 'lift... | 653 | cutoff :: (Functor f, Monad m) => Integer -> FreeT f m a -> FreeT f m (Maybe a)
cutoff n _ | n <= 0 = return Nothing | 116 | cutoff n _ | n <= 0 = return Nothing | 36 | true | true | 0 | 10 | 142 | 92 | 50 | 42 | null | null |
m00nlight/hackerrank | functional/Interpreter-and-Compiler/While-Language/main.hs | gpl-2.0 | evalB (BBinary op e1 e2) env =
case op of
And -> evalB e1 env && evalB e2 env
_ -> evalB e1 env || evalB e2 env | 127 | evalB (BBinary op e1 e2) env =
case op of
And -> evalB e1 env && evalB e2 env
_ -> evalB e1 env || evalB e2 env | 127 | evalB (BBinary op e1 e2) env =
case op of
And -> evalB e1 env && evalB e2 env
_ -> evalB e1 env || evalB e2 env | 127 | false | false | 1 | 9 | 43 | 69 | 30 | 39 | null | null |
allanderek/ipclib | Language/Pepa/Transform/Rules/Syntax.hs | gpl-2.0 | pprintActionPattern (Actions actions) =
angled $ pprintActionList actions | 79 | pprintActionPattern (Actions actions) =
angled $ pprintActionList actions | 79 | pprintActionPattern (Actions actions) =
angled $ pprintActionList actions | 79 | false | false | 0 | 7 | 13 | 22 | 10 | 12 | null | null |
IreneKnapp/Faction | libfaction/Distribution/GetOpt.hs | bsd-3-clause | getOpt :: ArgOrder a -- non-option handling
-> [OptDescr a] -- option descriptors
-> [String] -- the command-line arguments
-> ([a],[String],[String]) -- (options,non-options,error messages)
getOpt ordering optDescr args = (os,xs,es ++ map ... | 578 | getOpt :: ArgOrder a -- non-option handling
-> [OptDescr a] -- option descriptors
-> [String] -- the command-line arguments
-> ([a],[String],[String])
getOpt ordering optDescr args = (os,xs,es ++ map errUnrec us)
where (os,xs,us,es) = getOpt'... | 533 | getOpt ordering optDescr args = (os,xs,es ++ map errUnrec us)
where (os,xs,us,es) = getOpt' ordering optDescr args
{-|
This is almost the same as 'getOpt', but returns a quadruple
consisting of the option arguments, a list of non-options, a list of
unrecognized options, and a list of error messages.
-} | 307 | true | true | 0 | 9 | 157 | 110 | 63 | 47 | null | null |
antalsz/hs-to-coq | examples/ghc/gen-files/Lexer.hs | mit | lex_qquasiquote_tok :: Action
lex_qquasiquote_tok span buf len = do
let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False
quoteStart <- getSrcLoc
quote <- lex_quasiquote quoteStart ""
end <- getSrcLoc
return (L (mkRealSrcSpan (realSrcSpanStart span) end)
(ITqQuasiQuote (qual,
... | 458 | lex_qquasiquote_tok :: Action
lex_qquasiquote_tok span buf len = do
let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False
quoteStart <- getSrcLoc
quote <- lex_quasiquote quoteStart ""
end <- getSrcLoc
return (L (mkRealSrcSpan (realSrcSpanStart span) end)
(ITqQuasiQuote (qual,
... | 458 | lex_qquasiquote_tok span buf len = do
let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False
quoteStart <- getSrcLoc
quote <- lex_quasiquote quoteStart ""
end <- getSrcLoc
return (L (mkRealSrcSpan (realSrcSpanStart span) end)
(ITqQuasiQuote (qual,
quoter,
... | 428 | false | true | 0 | 15 | 147 | 140 | 68 | 72 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_fail/UnnamedConstraintWildcard2.hs | bsd-3-clause | foo :: _ a => a -> String
foo x = show x | 40 | foo :: _ a => a -> String
foo x = show x | 40 | foo x = show x | 14 | false | true | 0 | 6 | 12 | 31 | 14 | 17 | null | null |
lukasepple/spacecookie | src/Network/Gopher.hs | gpl-3.0 | dropPrivileges :: String -> IO Bool
dropPrivileges username = do
uid <- getRealUserID
if (uid /= 0)
then return False
else do
user <- getUserEntryForName username
setGroupID $ userGroupID user
setUserID $ userID user
return True
-- | Auxiliary function that sets up the listeni... | 388 | dropPrivileges :: String -> IO Bool
dropPrivileges username = do
uid <- getRealUserID
if (uid /= 0)
then return False
else do
user <- getUserEntryForName username
setGroupID $ userGroupID user
setUserID $ userID user
return True
-- | Auxiliary function that sets up the listeni... | 388 | dropPrivileges username = do
uid <- getRealUserID
if (uid /= 0)
then return False
else do
user <- getUserEntryForName username
setGroupID $ userGroupID user
setUserID $ userID user
return True
-- | Auxiliary function that sets up the listening socket for
-- 'runGopherManual'... | 352 | false | true | 0 | 12 | 98 | 91 | 41 | 50 | null | null |
tekul/cryptonite | Crypto/Number/Compat.hs | bsd-3-clause | gmpGcde a b =
GmpSupported (s, t, g)
where (# g, s #) = gcdExtInteger a b
t = (g - s * a) `div` b
#else
gmpGcde _ _ = GmpUnsupported
#endif
-- | Compute the binary logarithm of an integer through GMP | 214 | gmpGcde a b =
GmpSupported (s, t, g)
where (# g, s #) = gcdExtInteger a b
t = (g - s * a) `div` b
#else
gmpGcde _ _ = GmpUnsupported
#endif
-- | Compute the binary logarithm of an integer through GMP | 214 | gmpGcde a b =
GmpSupported (s, t, g)
where (# g, s #) = gcdExtInteger a b
t = (g - s * a) `div` b
#else
gmpGcde _ _ = GmpUnsupported
#endif
-- | Compute the binary logarithm of an integer through GMP | 214 | false | false | 2 | 7 | 58 | 77 | 38 | 39 | null | null |
Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Scene/Internal/CustomLogicComponent.hs | mit | customLogicComponentCntx :: C.Context
customLogicComponentCntx = mempty {
C.ctxTypesTable = Map.fromList [
(C.TypeName "CustomLogicComponent", [t| CustomLogicComponent |])
]
} | 192 | customLogicComponentCntx :: C.Context
customLogicComponentCntx = mempty {
C.ctxTypesTable = Map.fromList [
(C.TypeName "CustomLogicComponent", [t| CustomLogicComponent |])
]
} | 191 | customLogicComponentCntx = mempty {
C.ctxTypesTable = Map.fromList [
(C.TypeName "CustomLogicComponent", [t| CustomLogicComponent |])
]
} | 153 | false | true | 0 | 12 | 34 | 56 | 29 | 27 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/CodeGen.hs | apache-2.0 | -- Procedure node. Emits post-call and pre-return code that passes through variables.
codeGen (ASTProc pName astArgs astStat
checkType@(functions, globals, variables,_)) threads
= [ Debug ("**p" ++ pName) ]
++
-- PostCall: Load args in local data area
[ Load (ImmValu... | 4,056 | codeGen (ASTProc pName astArgs astStat
checkType@(functions, globals, variables,_)) threads
= [ Debug ("**p" ++ pName) ]
++
-- PostCall: Load args in local data area
[ Load (ImmValue (1 + proc_arp_argrec_size * (length astArgs))) regA
-- Value to ... | 3,970 | codeGen (ASTProc pName astArgs astStat
checkType@(functions, globals, variables,_)) threads
= [ Debug ("**p" ++ pName) ]
++
-- PostCall: Load args in local data area
[ Load (ImmValue (1 + proc_arp_argrec_size * (length astArgs))) regA
-- Value to ... | 3,970 | true | false | 7 | 14 | 1,783 | 729 | 388 | 341 | null | null |
co-dan/NPNTool | src/NPNTool/NodeMap.hs | bsd-3-clause | -- | Construct a list of nodes and throw away the modified 'NodeMap'.
mkNodes_ :: (Ord a) => NodeMap a -> [a] -> [LNode a]
mkNodes_ m as = fst $ mkNodes m as | 157 | mkNodes_ :: (Ord a) => NodeMap a -> [a] -> [LNode a]
mkNodes_ m as = fst $ mkNodes m as | 87 | mkNodes_ m as = fst $ mkNodes m as | 34 | true | true | 0 | 9 | 33 | 55 | 28 | 27 | null | null |
phischu/fragnix | builtins/base/GHC.List.hs | bsd-3-clause | zipWith _f _as [] = [] | 29 | zipWith _f _as [] = [] | 29 | zipWith _f _as [] = [] | 29 | false | false | 1 | 6 | 12 | 23 | 8 | 15 | null | null |
keithlayne/nothing_to_see_here | third_try_is_a_charm.hs | unlicense | fizzbuzz = Rule (modp 15) (const "fizzbuzz") | 44 | fizzbuzz = Rule (modp 15) (const "fizzbuzz") | 44 | fizzbuzz = Rule (modp 15) (const "fizzbuzz") | 44 | false | false | 1 | 7 | 6 | 27 | 11 | 16 | null | null |
nuttycom/haskoin | Network/Haskoin/Block/Merkle.hs | unlicense | calcTreeWidth :: Int -- ^ Number of transactions (leaf nodes).
-> Int -- ^ Height at which we want to compute the width.
-> Int -- ^ Width of the merkle tree.
calcTreeWidth ntx h = (ntx + (1 `shiftL` h) - 1) `shiftR` h | 246 | calcTreeWidth :: Int -- ^ Number of transactions (leaf nodes).
-> Int -- ^ Height at which we want to compute the width.
-> Int
calcTreeWidth ntx h = (ntx + (1 `shiftL` h) - 1) `shiftR` h | 215 | calcTreeWidth ntx h = (ntx + (1 `shiftL` h) - 1) `shiftR` h | 59 | true | true | 0 | 10 | 72 | 53 | 31 | 22 | null | null |
mettekou/ghc | compiler/types/Coercion.hs | bsd-3-clause | mkKindCo (UnivCo (PhantomProv h) _ _ _) = h | 46 | mkKindCo (UnivCo (PhantomProv h) _ _ _) = h | 46 | mkKindCo (UnivCo (PhantomProv h) _ _ _) = h | 46 | false | false | 0 | 9 | 11 | 27 | 13 | 14 | null | null |
alanz/htelehash | src/Network/TeleHash/Old/Utils.hs | bsd-3-clause | ttelm1 :: Maybe LinkMessage
ttelm1 = Aeson.decode "{\"seed\":false,\"c\":1,\"see\":[]}" | 87 | ttelm1 :: Maybe LinkMessage
ttelm1 = Aeson.decode "{\"seed\":false,\"c\":1,\"see\":[]}" | 87 | ttelm1 = Aeson.decode "{\"seed\":false,\"c\":1,\"see\":[]}" | 59 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
diagrams/diagrams-contrib | src/Diagrams/Color/XKCD.hs | bsd-3-clause | lightLime = fromJust $ readHexColor "#aefd6c" | 57 | lightLime = fromJust $ readHexColor "#aefd6c" | 57 | lightLime = fromJust $ readHexColor "#aefd6c" | 57 | false | false | 0 | 6 | 17 | 13 | 6 | 7 | null | null |
nzok/decimal | ScaledBinaryTest.hs | mit | siGen :: Gen Integer -- signed integer
siGen = choose (-49,49) | 73 | siGen :: Gen Integer
siGen = choose (-49,49) | 44 | siGen = choose (-49,49) | 23 | true | true | 1 | 7 | 21 | 29 | 14 | 15 | null | null |
edgarklerks/document-indexer | IndexAllManPages.hs | bsd-2-clause | main :: IO ()
main = do
xs <- getArgs
when (null xs) $ error "Need man page directories to scan them"
ps <- concat `fmap` forM xs get_man_dirs
withConnection $ process_man_dirs ps | 195 | main :: IO ()
main = do
xs <- getArgs
when (null xs) $ error "Need man page directories to scan them"
ps <- concat `fmap` forM xs get_man_dirs
withConnection $ process_man_dirs ps | 195 | main = do
xs <- getArgs
when (null xs) $ error "Need man page directories to scan them"
ps <- concat `fmap` forM xs get_man_dirs
withConnection $ process_man_dirs ps | 181 | false | true | 0 | 11 | 48 | 76 | 33 | 43 | null | null |
vimus/vimus | src/Vimus/Key.hs | mit | ctrlR = '\DC2' | 14 | ctrlR = '\DC2' | 14 | ctrlR = '\DC2' | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
iliastsi/gac | src/typecheck/TcMonad.hs | mit | getTcProtos :: TcState -> [Prototype]
getTcProtos TcState{prototypes=pts} = pts | 79 | getTcProtos :: TcState -> [Prototype]
getTcProtos TcState{prototypes=pts} = pts | 79 | getTcProtos TcState{prototypes=pts} = pts | 41 | false | true | 0 | 8 | 8 | 30 | 16 | 14 | null | null |
jwiegley/ghc-release | utils/haddock/src/Haddock/Convert.hs | gpl-3.0 | synifyAxBranch :: TyCon -> CoAxBranch -> TyFamInstEqn Name
synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
= let name = synifyName tc
typats = map (synifyType WithinType) args
hs_rhs = synifyType WithinType rhs
(kvs, tvs) = partition isKindVar tkv... | 609 | synifyAxBranch :: TyCon -> CoAxBranch -> TyFamInstEqn Name
synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
= let name = synifyName tc
typats = map (synifyType WithinType) args
hs_rhs = synifyType WithinType rhs
(kvs, tvs) = partition isKindVar tkv... | 609 | synifyAxBranch tc (CoAxBranch { cab_tvs = tkvs, cab_lhs = args, cab_rhs = rhs })
= let name = synifyName tc
typats = map (synifyType WithinType) args
hs_rhs = synifyType WithinType rhs
(kvs, tvs) = partition isKindVar tkvs
in TyFamInstEqn { tfie_tycon = name
... | 550 | false | true | 9 | 11 | 243 | 171 | 88 | 83 | null | null |
chadbrewbaker/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | potentially = fromMaybe (return ()) | 35 | potentially = fromMaybe (return ()) | 35 | potentially = fromMaybe (return ()) | 35 | false | false | 0 | 8 | 4 | 17 | 8 | 9 | null | null |
olorin/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types/Product.hs | mpl-2.0 | -- | The snapshot identifier that is provided in the request.
sSnapshotIdentifier :: Lens' Snapshot (Maybe Text)
sSnapshotIdentifier = lens _sSnapshotIdentifier (\ s a -> s{_sSnapshotIdentifier = a}) | 199 | sSnapshotIdentifier :: Lens' Snapshot (Maybe Text)
sSnapshotIdentifier = lens _sSnapshotIdentifier (\ s a -> s{_sSnapshotIdentifier = a}) | 137 | sSnapshotIdentifier = lens _sSnapshotIdentifier (\ s a -> s{_sSnapshotIdentifier = a}) | 86 | true | true | 0 | 9 | 27 | 46 | 25 | 21 | null | null |
UBMLtonGroup/timberc | src/Syntax.hs | bsd-3-clause | tQual ps t = TQual t ps | 44 | tQual ps t = TQual t ps | 44 | tQual ps t = TQual t ps | 44 | false | false | 0 | 5 | 27 | 16 | 7 | 9 | null | null |
alephcloud/hs-aws-kinesis | src/Aws/Kinesis/Core.hs | apache-2.0 | kinesisTargetVersion :: IsString a => a
kinesisTargetVersion = "Kinesis_20131202" | 81 | kinesisTargetVersion :: IsString a => a
kinesisTargetVersion = "Kinesis_20131202" | 81 | kinesisTargetVersion = "Kinesis_20131202" | 41 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLOptionElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement.label Mozilla HTMLOptionElement.label documentation>
setLabel ::
(MonadDOM m, ToJSString val) => HTMLOptionElement -> val -> m ()
setLabel self val = liftDOM (self ^. jss "label" (toJSVal val)) | 276 | setLabel ::
(MonadDOM m, ToJSString val) => HTMLOptionElement -> val -> m ()
setLabel self val = liftDOM (self ^. jss "label" (toJSVal val)) | 149 | setLabel self val = liftDOM (self ^. jss "label" (toJSVal val)) | 63 | true | true | 0 | 10 | 39 | 66 | 33 | 33 | null | null |
kjgorman/melchior | comparison/pong/resources/melchior/application.hs | mit | scoreg :: Game -> Game
scoreg (Game p1 p2 b) | reset b = Game (score' p1 b (< 10)) (score' p2 b (> 480)) (Ball 350 200 200 200)
| otherwise = Game p1 p2 b | 176 | scoreg :: Game -> Game
scoreg (Game p1 p2 b) | reset b = Game (score' p1 b (< 10)) (score' p2 b (> 480)) (Ball 350 200 200 200)
| otherwise = Game p1 p2 b | 176 | scoreg (Game p1 p2 b) | reset b = Game (score' p1 b (< 10)) (score' p2 b (> 480)) (Ball 350 200 200 200)
| otherwise = Game p1 p2 b | 153 | false | true | 1 | 9 | 58 | 103 | 50 | 53 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Key.hs | bsd-3-clause | showKey RightButtonPress = "RMB-PRESS" | 38 | showKey RightButtonPress = "RMB-PRESS" | 38 | showKey RightButtonPress = "RMB-PRESS" | 38 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
ewestern/geos | src/Data/Geometry/Geos/Geometry.hs | mit | -- | Returns the distance from the origin of LineString to the point projected on the geometry (that is to a point of the line the closest to the given point).
project :: Geometry LineString -> Geometry Point -> Double
project g1 g2 = runGeos $ do
g1' :: R.Geom <- convertGeometryToRaw g1
g2' :: R.Geom <- convertGeo... | 429 | project :: Geometry LineString -> Geometry Point -> Double
project g1 g2 = runGeos $ do
g1' :: R.Geom <- convertGeometryToRaw g1
g2' :: R.Geom <- convertGeometryToRaw g2
R.project g1' g2'
-- | Like @project@, but returns the distance as a Double between 0 and 1. | 269 | project g1 g2 = runGeos $ do
g1' :: R.Geom <- convertGeometryToRaw g1
g2' :: R.Geom <- convertGeometryToRaw g2
R.project g1' g2'
-- | Like @project@, but returns the distance as a Double between 0 and 1. | 210 | true | true | 0 | 11 | 83 | 84 | 37 | 47 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | prop_checkFindExec3 = verify checkFindExec "find / -execdir cat {} | grep lol +" | 80 | false | false | 1 | 5 | 12 | 14 | 5 | 9 | null | null |
achirkin/easytensor | dimensions/test/Numeric/Dimensions/DimTest.hs | bsd-3-clause | prop_stripPrefixDims :: Int -> [Word] -> Property
prop_stripPrefixDims n l
| SomeDims xsys@Dims <- someDimsVal l
, SomeDims xs@Dims <- someDimsVal $ take (n `mod` (length l + 2)) l
, Just ys@Dims <- stripPrefixDims xs xsys
, Dict <- dimsAllEq xs
, Dict <- dimsAllTypeable xs
, Dict <- dimsAllTypeable xsys
... | 616 | prop_stripPrefixDims :: Int -> [Word] -> Property
prop_stripPrefixDims n l
| SomeDims xsys@Dims <- someDimsVal l
, SomeDims xs@Dims <- someDimsVal $ take (n `mod` (length l + 2)) l
, Just ys@Dims <- stripPrefixDims xs xsys
, Dict <- dimsAllEq xs
, Dict <- dimsAllTypeable xs
, Dict <- dimsAllTypeable xsys
... | 616 | prop_stripPrefixDims n l
| SomeDims xsys@Dims <- someDimsVal l
, SomeDims xs@Dims <- someDimsVal $ take (n `mod` (length l + 2)) l
, Just ys@Dims <- stripPrefixDims xs xsys
, Dict <- dimsAllEq xs
, Dict <- dimsAllTypeable xs
, Dict <- dimsAllTypeable xsys
, Just ys'@Dims <- TL.stripPrefix xs xsys
= c... | 566 | false | true | 2 | 15 | 150 | 223 | 107 | 116 | null | null |
spechub/Hets | CommonLogic/Lexer_KIF.hs | gpl-2.0 | oParenT :: CharParser st Token
oParenT = pToken $ string "(" | 60 | oParenT :: CharParser st Token
oParenT = pToken $ string "(" | 60 | oParenT = pToken $ string "(" | 29 | false | true | 1 | 6 | 10 | 26 | 11 | 15 | null | null |
DominikDitoIvosevic/Uni | IRG/src/Irg/Lab2/Geometry/Matrix.hs | mit | get :: Int -> Int -> Matrix -> Number
get i j mat = V.get j (V.get i mat) | 73 | get :: Int -> Int -> Matrix -> Number
get i j mat = V.get j (V.get i mat) | 73 | get i j mat = V.get j (V.get i mat) | 35 | false | true | 0 | 8 | 18 | 47 | 23 | 24 | null | null |
uebayasi/haskell-graphql-schema | src/Data/GraphQL/XXX/Schema/Info.hs | bsd-3-clause | lookupInterfaceByObject :: SchemaInfo -> TypeName -> Maybe TypeName
lookupInterfaceByObject ai t = do
(ObjectDefinition _ i _) <- lookupObject ai t
i | 157 | lookupInterfaceByObject :: SchemaInfo -> TypeName -> Maybe TypeName
lookupInterfaceByObject ai t = do
(ObjectDefinition _ i _) <- lookupObject ai t
i | 157 | lookupInterfaceByObject ai t = do
(ObjectDefinition _ i _) <- lookupObject ai t
i | 89 | false | true | 0 | 9 | 29 | 57 | 25 | 32 | null | null |
roelvandijk/ftdi | System/FTDI/Internal.hs | bsd-3-clause | -- ^Transmitter on \/ Transmitter off
marshalFlowControl ∷ FlowCtrl → Word16
marshalFlowControl f = case f of
RTS_CTS → 0x0100
DTR_DSR → 0x0200
XOnXOff → 0x0400
-- |Set the flow control for the FTDI chip. Use 'Nothing' to disable flow
-- contr... | 323 | marshalFlowControl ∷ FlowCtrl → Word16
marshalFlowControl f = case f of
RTS_CTS → 0x0100
DTR_DSR → 0x0200
XOnXOff → 0x0400
-- |Set the flow control for the FTDI chip. Use 'Nothing' to disable flow
-- control. | 284 | marshalFlowControl f = case f of
RTS_CTS → 0x0100
DTR_DSR → 0x0200
XOnXOff → 0x0400
-- |Set the flow control for the FTDI chip. Use 'Nothing' to disable flow
-- control. | 245 | true | true | 0 | 8 | 118 | 49 | 24 | 25 | null | null |
themoritz/cabal | Cabal/Distribution/Simple/Haddock.hs | bsd-3-clause | -- ------------------------------------------------------------------------------
-- hscolour support.
hscolour :: PackageDescription
-> LocalBuildInfo
-> [PPSuffixHandler]
-> HscolourFlags
-> IO ()
hscolour = hscolour' dieNoVerbosity ForDevelopment | 286 | hscolour :: PackageDescription
-> LocalBuildInfo
-> [PPSuffixHandler]
-> HscolourFlags
-> IO ()
hscolour = hscolour' dieNoVerbosity ForDevelopment | 182 | hscolour = hscolour' dieNoVerbosity ForDevelopment | 50 | true | true | 0 | 10 | 58 | 42 | 22 | 20 | null | null |
suhailshergill/liboleg | Language/TEval/EvalN.hs | bsd-3-clause | -- regarding CBN vs CBV...
-- (x+1)*y = x*y + y
-- | why is this cheating? Try showing the term
tmul1 = L "x" (L "y"
(IFZ vx (I 0)
((tmul1 `A` (vx :+ (I (-1))) `A` vy) :+ vy))) | 202 | tmul1 = L "x" (L "y"
(IFZ vx (I 0)
((tmul1 `A` (vx :+ (I (-1))) `A` vy) :+ vy))) | 103 | tmul1 = L "x" (L "y"
(IFZ vx (I 0)
((tmul1 `A` (vx :+ (I (-1))) `A` vy) :+ vy))) | 103 | true | false | 0 | 20 | 66 | 78 | 44 | 34 | null | null |
narurien/ganeti-ceph | src/Ganeti/Query/Node.hs | gpl-2.0 | getDefaultHypervisorSpec :: ConfigData -> (Hypervisor, HvParams)
getDefaultHypervisorSpec cfg = (hv, getHvParamsFromCluster cfg hv)
where hv = getDefaultHypervisor cfg
-- | Looks up the cluster's hvparams of the given hypervisor | 231 | getDefaultHypervisorSpec :: ConfigData -> (Hypervisor, HvParams)
getDefaultHypervisorSpec cfg = (hv, getHvParamsFromCluster cfg hv)
where hv = getDefaultHypervisor cfg
-- | Looks up the cluster's hvparams of the given hypervisor | 231 | getDefaultHypervisorSpec cfg = (hv, getHvParamsFromCluster cfg hv)
where hv = getDefaultHypervisor cfg
-- | Looks up the cluster's hvparams of the given hypervisor | 166 | false | true | 1 | 8 | 31 | 56 | 26 | 30 | null | null |
trskop/cabal | Cabal/Distribution/Simple/Program/Db.hs | bsd-3-clause | restoreProgramDb :: [Program] -> ProgramDb -> ProgramDb
restoreProgramDb = addKnownPrograms | 91 | restoreProgramDb :: [Program] -> ProgramDb -> ProgramDb
restoreProgramDb = addKnownPrograms | 91 | restoreProgramDb = addKnownPrograms | 35 | false | true | 0 | 8 | 9 | 29 | 13 | 16 | null | null |
airtial/hellolisp.scala | src/Language/Parser.hs | mit | expression :: Parser Expression
expression =
vector <|>
list <|>
string <|>
boolean <|>
character <|>
floating <|>
integer <|>
identifier <|>
quotation <?>
"expression" | 188 | expression :: Parser Expression
expression =
vector <|>
list <|>
string <|>
boolean <|>
character <|>
floating <|>
integer <|>
identifier <|>
quotation <?>
"expression" | 188 | expression =
vector <|>
list <|>
string <|>
boolean <|>
character <|>
floating <|>
integer <|>
identifier <|>
quotation <?>
"expression" | 156 | false | true | 3 | 11 | 44 | 54 | 27 | 27 | null | null |
yjwen/hada | test/Data/TestFixedWidth.hs | lgpl-3.0 | testUIntegral :: Result
testUIntegral = allEqual $ zip ref test
where vs = [(7, 2)]
mref op = map (\ (a, b) -> ubit7 $ op a b)
mtest op = map (\ (a, b) -> op (ubit7 a) (ubit7 b))
ref = (mref div vs) ++ (mref mod vs) ++ (mref quot vs) ++ (mref rem vs)
test = (mtest div vs) ++ (mtest mod... | 361 | testUIntegral :: Result
testUIntegral = allEqual $ zip ref test
where vs = [(7, 2)]
mref op = map (\ (a, b) -> ubit7 $ op a b)
mtest op = map (\ (a, b) -> op (ubit7 a) (ubit7 b))
ref = (mref div vs) ++ (mref mod vs) ++ (mref quot vs) ++ (mref rem vs)
test = (mtest div vs) ++ (mtest mod... | 361 | testUIntegral = allEqual $ zip ref test
where vs = [(7, 2)]
mref op = map (\ (a, b) -> ubit7 $ op a b)
mtest op = map (\ (a, b) -> op (ubit7 a) (ubit7 b))
ref = (mref div vs) ++ (mref mod vs) ++ (mref quot vs) ++ (mref rem vs)
test = (mtest div vs) ++ (mtest mod vs) ++ (mtest quot vs) ... | 337 | false | true | 4 | 16 | 108 | 213 | 110 | 103 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.