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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
exercism/xhaskell | exercises/practice/binary-search-tree/src/BST.hs | mit | bstValue :: BST a -> Maybe a
bstValue tree = error "You need to implement this function." | 89 | bstValue :: BST a -> Maybe a
bstValue tree = error "You need to implement this function." | 89 | bstValue tree = error "You need to implement this function." | 60 | false | true | 0 | 6 | 16 | 27 | 12 | 15 | null | null |
input-output-hk/pos-haskell-prototype | wallet/test/unit/Wallet/Inductive/Generator.hs | mit | -- | Generate event tree
--
-- NOTE: Rollbacks are implicit in the tree structure.
genEventTree :: forall h a. (Hash h a, Ord a)
=> GenEventsParams h a
-> GenEvents h a (Tree (WalletEvent h a))
genEventTree GenEventsParams{..} =
unfoldTreeM buildTree initLocalState
where
buildTree ::... | 8,013 | genEventTree :: forall h a. (Hash h a, Ord a)
=> GenEventsParams h a
-> GenEvents h a (Tree (WalletEvent h a))
genEventTree GenEventsParams{..} =
unfoldTreeM buildTree initLocalState
where
buildTree :: GenSeeds h a (WalletEvent h a)
buildTree ls = do
prevForks <- use gegs... | 7,930 | genEventTree GenEventsParams{..} =
unfoldTreeM buildTree initLocalState
where
buildTree :: GenSeeds h a (WalletEvent h a)
buildTree ls = do
prevForks <- use gegsPrevForks
-- We cannot submit pending transactions until a switch-to-fork is
-- complete (a rollback of @N@ blocks and th... | 7,793 | true | true | 0 | 18 | 2,643 | 1,553 | 792 | 761 | null | null |
bos/statistics | tests/Tests/Distribution.hs | bsd-2-clause | ----------------------------------------------------------------
-- Tests
----------------------------------------------------------------
-- Tests for continuous distribution
contDistrTests :: (Param d, ContDistr d, QC.Arbitrary d, Typeable d, Show d) => T d -> TestTree
contDistrTests t = testGroup ("Tests for: " ++ ... | 748 | contDistrTests :: (Param d, ContDistr d, QC.Arbitrary d, Typeable d, Show d) => T d -> TestTree
contDistrTests t = testGroup ("Tests for: " ++ typeName t) $
cdfTests t ++
[ testProperty "PDF sanity" $ pdfSanityCheck t
] ++
[ (if quantileIsInvCDF_enabled t then id else ignoreTest)
$ testProper... | 571 | contDistrTests t = testGroup ("Tests for: " ++ typeName t) $
cdfTests t ++
[ testProperty "PDF sanity" $ pdfSanityCheck t
] ++
[ (if quantileIsInvCDF_enabled t then id else ignoreTest)
$ testProperty "Quantile is CDF inverse" $ quantileIsInvCDF t
, testProperty "quantile fails p<0||p>1" $ q... | 475 | true | true | 0 | 11 | 143 | 171 | 85 | 86 | null | null |
mariusae/sstable | test/BinarySearchTest.hs | bsd-3-clause | toArray l = listArray (0, (length l) - 1) l | 50 | toArray l = listArray (0, (length l) - 1) l | 50 | toArray l = listArray (0, (length l) - 1) l | 50 | false | false | 0 | 9 | 16 | 30 | 15 | 15 | null | null |
jqpeterson/roc-translator | src/Protocol/ROC/PointTypes/PointType118.hs | bsd-3-clause | pointType118Parser :: Get PointType118
pointType118Parser = do
tagID <- getByteString 10
startRegister1 <- getWord16le
endRegister1 <- getWord16le
rOCParametersRegRange1 <- getTLP
indexingRegRange1 <- anyButNull
conversionCodeRegRange... | 5,000 | pointType118Parser :: Get PointType118
pointType118Parser = do
tagID <- getByteString 10
startRegister1 <- getWord16le
endRegister1 <- getWord16le
rOCParametersRegRange1 <- getTLP
indexingRegRange1 <- anyButNull
conversionCodeRegRange... | 5,000 | pointType118Parser = do
tagID <- getByteString 10
startRegister1 <- getWord16le
endRegister1 <- getWord16le
rOCParametersRegRange1 <- getTLP
indexingRegRange1 <- anyButNull
conversionCodeRegRange1 <- getWord8
commPortRegRange1 <- ge... | 4,961 | false | true | 0 | 8 | 686 | 844 | 375 | 469 | null | null |
oldmanmike/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickLHsExprNever :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprNever (L pos e0) = do
e1 <- addTickHsExpr e0
return $ L pos e1
-- general heuristic: expressions which do not denote values are good
-- break points | 224 | addTickLHsExprNever :: LHsExpr Id -> TM (LHsExpr Id)
addTickLHsExprNever (L pos e0) = do
e1 <- addTickHsExpr e0
return $ L pos e1
-- general heuristic: expressions which do not denote values are good
-- break points | 224 | addTickLHsExprNever (L pos e0) = do
e1 <- addTickHsExpr e0
return $ L pos e1
-- general heuristic: expressions which do not denote values are good
-- break points | 171 | false | true | 0 | 8 | 45 | 62 | 29 | 33 | null | null |
testexplode/testexplode | src/TestExplode/TestExplode.hs | lgpl-3.0 | generate :: L.Text -- ^ how a text is coomented, ("# " or "-- ")
-> [cnf] -- ^ a list of the testvalues
-> locals -- ^ the initial value of the variables that the
-- testcases change
-> (cnf -> L.Text) -- ^ "prelude" of a testcase, i.e. 'show' of ... | 1,232 | generate :: L.Text -- ^ how a text is coomented, ("# " or "-- ")
-> [cnf] -- ^ a list of the testvalues
-> locals -- ^ the initial value of the variables that the
-- testcases change
-> (cnf -> L.Text) -- ^ "prelude" of a testcase, i.e. 'show' of ... | 1,171 | generate commentString cnfList locals cnfShow graph =
[L.concat[mkComment(L.concat[(cnfShow cnf),"\n", desc]) commentString,
DF.fold $ snd $ runWriter (stringFkt cnf locals)
] |
cnf <- cnfList,
-- Casepart stringFkt cond <- c... | 738 | true | true | 0 | 13 | 517 | 201 | 109 | 92 | null | null |
kovach/web2 | src/Reflection.hs | mit | withR = withL (rlens) | 21 | withR = withL (rlens) | 21 | withR = withL (rlens) | 21 | false | false | 0 | 6 | 3 | 12 | 6 | 6 | null | null |
Mahdi89/eTeak | src/Misc.hs | bsd-3-clause | capitalise cs = cs | 18 | capitalise cs = cs | 18 | capitalise cs = cs | 18 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
circuithub/haskell-filepicker-policy | tests/Network/Filepicker/PolicySpec.hs | mit | spec :: Spec
spec = do
describe "policy json" $ do
it "read policy" $ do
(A.encode . setHandle "AAAAAAAAAAAAAAAAAAAA" . addCall Read . expiryToPolicy $ expiryDate)
`shouldBe`
[RAW.r|{"expiry":1577836800,"handle":"AAAAAAAAAAAAAAAAAAAA","call":["read"]}|]
describe "signed policy URL paramet... | 696 | spec :: Spec
spec = do
describe "policy json" $ do
it "read policy" $ do
(A.encode . setHandle "AAAAAAAAAAAAAAAAAAAA" . addCall Read . expiryToPolicy $ expiryDate)
`shouldBe`
[RAW.r|{"expiry":1577836800,"handle":"AAAAAAAAAAAAAAAAAAAA","call":["read"]}|]
describe "signed policy URL paramet... | 696 | spec = do
describe "policy json" $ do
it "read policy" $ do
(A.encode . setHandle "AAAAAAAAAAAAAAAAAAAA" . addCall Read . expiryToPolicy $ expiryDate)
`shouldBe`
[RAW.r|{"expiry":1577836800,"handle":"AAAAAAAAAAAAAAAAAAAA","call":["read"]}|]
describe "signed policy URL parameters" $ do
... | 683 | false | true | 0 | 19 | 111 | 143 | 69 | 74 | null | null |
Cahu/krpc-hs | src/KRPCHS/SpaceCenter.hs | gpl-3.0 | {-
- The maximum amount of thrust that can be produced by the engine in a
- vacuum, in Newtons. This is the amount of thrust produced by the engine
- when activated, <see cref="M:SpaceCenter.Engine.ThrustLimit" /> is set to 100%, the main
- vessel's throttle is set to 100% and the engine is in a vacuum.
-}
getEngi... | 567 | getEngineMaxVacuumThrust :: KRPCHS.SpaceCenter.Engine -> RPCContext (Float)
getEngineMaxVacuumThrust thisArg = do
let r = makeRequest "SpaceCenter" "Engine_get_MaxVacuumThrust" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 254 | getEngineMaxVacuumThrust thisArg = do
let r = makeRequest "SpaceCenter" "Engine_get_MaxVacuumThrust" [makeArgument 0 thisArg]
res <- sendRequest r
processResponse res | 178 | true | true | 0 | 13 | 98 | 73 | 33 | 40 | null | null |
urbanslug/ghc | compiler/prelude/THNames.hs | bsd-3-clause | -- data TyVarBndr = ...
plainTVIdKey, kindedTVIdKey :: Unique
plainTVIdKey = mkPreludeMiscIdUnique 397 | 108 | plainTVIdKey, kindedTVIdKey :: Unique
plainTVIdKey = mkPreludeMiscIdUnique 397 | 84 | plainTVIdKey = mkPreludeMiscIdUnique 397 | 46 | true | true | 2 | 6 | 18 | 27 | 11 | 16 | null | null |
christiaanb/DepCore | Test.hs | bsd-2-clause | evalCase _ _ _ = throwError "evalCase: Label expected" | 54 | evalCase _ _ _ = throwError "evalCase: Label expected" | 54 | evalCase _ _ _ = throwError "evalCase: Label expected" | 54 | false | false | 1 | 5 | 8 | 16 | 6 | 10 | null | null |
shayan-najd/QFeldspar | QFeldspar/Environment/Typed.hs | gpl-3.0 | foldl :: (forall t. b -> tfa t -> b) -> b -> Env tfa r -> b
foldl _ z Emp = z | 84 | foldl :: (forall t. b -> tfa t -> b) -> b -> Env tfa r -> b
foldl _ z Emp = z | 84 | foldl _ z Emp = z | 24 | false | true | 0 | 11 | 30 | 60 | 28 | 32 | null | null |
tanimoto/orc | src/Control/Concurrent/Hierarchical.hs | bsd-3-clause | -- set to False to disable reporting
threadCount :: TVar Integer
threadCount = unsafePerformIO $ newTVar 0 | 135 | threadCount :: TVar Integer
threadCount = unsafePerformIO $ newTVar 0 | 69 | threadCount = unsafePerformIO $ newTVar 0 | 41 | true | true | 0 | 6 | 45 | 22 | 11 | 11 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.Prim.hs | bsd-3-clause | -- | Read a vector from specified index of immutable array.
indexInt16X32Array# :: ByteArray# -> Int# -> Int16X32#
indexInt16X32Array# = indexInt16X32Array# | 158 | indexInt16X32Array# :: ByteArray# -> Int# -> Int16X32#
indexInt16X32Array# = indexInt16X32Array# | 96 | indexInt16X32Array# = indexInt16X32Array# | 41 | true | true | 0 | 6 | 22 | 20 | 11 | 9 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Install.hs | bsd-3-clause | pruneInstallPlan :: Package targetpkg
=> [PackageSpecifier targetpkg]
-> InstallPlan
-> Progress String String InstallPlan
pruneInstallPlan pkgSpecifiers =
-- TODO: this is a general feature and should be moved to D.C.Dependency
-- Also, the InstallPlan.remove shou... | 1,525 | pruneInstallPlan :: Package targetpkg
=> [PackageSpecifier targetpkg]
-> InstallPlan
-> Progress String String InstallPlan
pruneInstallPlan pkgSpecifiers =
-- TODO: this is a general feature and should be moved to D.C.Dependency
-- Also, the InstallPlan.remove shou... | 1,525 | pruneInstallPlan pkgSpecifiers =
-- TODO: this is a general feature and should be moved to D.C.Dependency
-- Also, the InstallPlan.remove should return info more precise to the
-- problem, rather than the very general PlanProblem type.
either (Fail . explain) Done
. InstallPlan.remove (\pkg -> packageName pkg... | 1,351 | false | true | 4 | 16 | 410 | 249 | 128 | 121 | null | null |
k0001/gtk2hs | gtk/demo/unicode/Arabic.hs | gpl-3.0 | arabic :: String
arabic = markSpan [FontSize (SizePoint 36)] $
--"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++
-- Do you find Haskell a fantastic language? (language has a grammatical
-- mistake in it)
map chr [0x647,0x644,32,0x62A,0x62C,0x62F,0x646,32]++
markSpan [FontForeground ... | 452 | arabic :: String
arabic = markSpan [FontSize (SizePoint 36)] $
--"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++
-- Do you find Haskell a fantastic language? (language has a grammatical
-- mistake in it)
map chr [0x647,0x644,32,0x62A,0x62C,0x62F,0x646,32]++
markSpan [FontForeground ... | 452 | arabic = markSpan [FontSize (SizePoint 36)] $
--"Is Haskell a "++markSpan [FontForeground "red"] "fantastic"++" language?"++
-- Do you find Haskell a fantastic language? (language has a grammatical
-- mistake in it)
map chr [0x647,0x644,32,0x62A,0x62C,0x62F,0x646,32]++
markSpan [FontForeground "red"]
(map c... | 435 | false | true | 0 | 10 | 59 | 154 | 86 | 68 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/enumFromTo_3.hs | mit | not MyFalse = MyTrue | 20 | not MyFalse = MyTrue | 20 | not MyFalse = MyTrue | 20 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
phischu/fragnix | builtins/base/GHC.IO.Handle.Types.hs | bsd-3-clause | isReadableHandleType :: HandleType -> Bool
isReadableHandleType ReadHandle = True | 89 | isReadableHandleType :: HandleType -> Bool
isReadableHandleType ReadHandle = True | 89 | isReadableHandleType ReadHandle = True | 46 | false | true | 0 | 5 | 16 | 18 | 9 | 9 | null | null |
mettekou/ghc | libraries/base/Data/List/NonEmpty.hs | bsd-3-clause | -- | Compute n-ary logic exclusive OR operation on 'NonEmpty' list.
xor :: NonEmpty Bool -> Bool
xor (x :| xs) = foldr xor' x xs
where xor' True y = not y
xor' False y = y
-- | 'unfold' produces a new stream by repeatedly applying the unfolding
-- function to the seed value to produce an element of type @... | 443 | xor :: NonEmpty Bool -> Bool
xor (x :| xs) = foldr xor' x xs
where xor' True y = not y
xor' False y = y
-- | 'unfold' produces a new stream by repeatedly applying the unfolding
-- function to the seed value to produce an element of type @b@ and a new
-- seed value. When the unfolding function returns 'No... | 375 | xor (x :| xs) = foldr xor' x xs
where xor' True y = not y
xor' False y = y
-- | 'unfold' produces a new stream by repeatedly applying the unfolding
-- function to the seed value to produce an element of type @b@ and a new
-- seed value. When the unfolding function returns 'Nothing' instead of
-- a new se... | 346 | true | true | 1 | 7 | 99 | 65 | 34 | 31 | null | null |
ksaveljev/hake-2 | src/Render/RenderAPIConstants.hs | bsd-3-clause | glRendererPCX1 = 0x00000010 :: Int | 40 | glRendererPCX1 = 0x00000010 :: Int | 40 | glRendererPCX1 = 0x00000010 :: Int | 40 | false | false | 0 | 4 | 10 | 9 | 5 | 4 | null | null |
sanjoy/echoes | src/Codegen/RegAlloc.hs | gpl-3.0 | nullRegAlloc :: Graph LNode C C -> M (Graph (RegInfNode RgLNode) C C, Int)
nullRegAlloc graph =
let (frameSize, varMaps) = foldGraphNodes accSSAVar graph (wordSize, M.empty)
in liftM (, frameSize) $
mapConcatGraph (spillCO, spillOO varMaps, spillOC varMaps) graph
where
accSSAVar :: forall e x. LNode e x ... | 3,843 | nullRegAlloc :: Graph LNode C C -> M (Graph (RegInfNode RgLNode) C C, Int)
nullRegAlloc graph =
let (frameSize, varMaps) = foldGraphNodes accSSAVar graph (wordSize, M.empty)
in liftM (, frameSize) $
mapConcatGraph (spillCO, spillOO varMaps, spillOC varMaps) graph
where
accSSAVar :: forall e x. LNode e x ... | 3,843 | nullRegAlloc graph =
let (frameSize, varMaps) = foldGraphNodes accSSAVar graph (wordSize, M.empty)
in liftM (, frameSize) $
mapConcatGraph (spillCO, spillOO varMaps, spillOC varMaps) graph
where
accSSAVar :: forall e x. LNode e x -> (Int, M.Map SSAVar Int) ->
(Int, M.Map SSAVar Int)
... | 3,768 | false | true | 95 | 11 | 1,112 | 1,094 | 585 | 509 | null | null |
daewon/til | exercism/haskell/meetup/src/Meetup.hs | mpl-2.0 | offset :: Weekday -> Weekday -> Int
offset from to = delta `mod` 7 where
delta = fromEnum to - fromEnum from | 110 | offset :: Weekday -> Weekday -> Int
offset from to = delta `mod` 7 where
delta = fromEnum to - fromEnum from | 110 | offset from to = delta `mod` 7 where
delta = fromEnum to - fromEnum from | 74 | false | true | 0 | 8 | 23 | 47 | 24 | 23 | null | null |
brendanhay/gogol | gogol-analyticsreporting/gen/Network/Google/AnalyticsReporting/Types/Product.hs | mpl-2.0 | -- | A continuation token to get the next page of the results. Adding this to
-- the request will return the rows after the pageToken. The pageToken
-- should be the value returned in the nextPageToken parameter in the
-- response to the [SearchUserActivityRequest](#SearchUserActivityRequest)
-- request.
suarPageToken ... | 444 | suarPageToken :: Lens' SearchUserActivityRequest (Maybe Text)
suarPageToken
= lens _suarPageToken
(\ s a -> s{_suarPageToken = a}) | 138 | suarPageToken
= lens _suarPageToken
(\ s a -> s{_suarPageToken = a}) | 76 | true | true | 1 | 9 | 71 | 56 | 29 | 27 | null | null |
Courseography/courseography | app/WebParsing/ReqParser.hs | gpl-3.0 | completionPrefix :: Parser ()
completionPrefix = Parsec.choice (map (Parsec.try . Parsec.string) [
"Completion of at least",
"Completion of a minimum of",
"Completion of"
])
>> Parsec.spaces | 210 | completionPrefix :: Parser ()
completionPrefix = Parsec.choice (map (Parsec.try . Parsec.string) [
"Completion of at least",
"Completion of a minimum of",
"Completion of"
])
>> Parsec.spaces | 210 | completionPrefix = Parsec.choice (map (Parsec.try . Parsec.string) [
"Completion of at least",
"Completion of a minimum of",
"Completion of"
])
>> Parsec.spaces | 180 | false | true | 2 | 10 | 45 | 57 | 29 | 28 | null | null |
arybczak/happstack-server | src/Happstack/Server/SURI.hs | bsd-3-clause | render :: (ToSURI a) => a -> String
render = show . suri . toSURI | 65 | render :: (ToSURI a) => a -> String
render = show . suri . toSURI | 65 | render = show . suri . toSURI | 29 | false | true | 2 | 8 | 14 | 41 | 18 | 23 | null | null |
5outh/fievel | Parser.hs | gpl-2.0 | fievelType =
liftA (foldr1 TLam)
( (constType <|> T.parens lexer fievelType)
`sepBy`
(T.reservedOp lexer "->") ) | 127 | fievelType =
liftA (foldr1 TLam)
( (constType <|> T.parens lexer fievelType)
`sepBy`
(T.reservedOp lexer "->") ) | 127 | fievelType =
liftA (foldr1 TLam)
( (constType <|> T.parens lexer fievelType)
`sepBy`
(T.reservedOp lexer "->") ) | 127 | false | false | 0 | 10 | 30 | 51 | 26 | 25 | null | null |
kapilash/ccs2cs | src/Language/CCS/Printer.hs | apache-2.0 | nativeTxtToC (StructOffset s f) = offsetPrintStmt s f | 53 | nativeTxtToC (StructOffset s f) = offsetPrintStmt s f | 53 | nativeTxtToC (StructOffset s f) = offsetPrintStmt s f | 53 | false | false | 0 | 7 | 7 | 22 | 10 | 12 | null | null |
andreasabel/helf | src/DatastrucImpl/SimpleDynArray.hs | mit | -- injects a given value at the given places
-- O(k*log n), n = size of the DynArray, k = number of the position where a value has to be injected
multiinsert:: a -> [Int] -> DynArray a -> DynArray a
multiinsert _ [] dyn = dyn | 225 | multiinsert:: a -> [Int] -> DynArray a -> DynArray a
multiinsert _ [] dyn = dyn | 79 | multiinsert _ [] dyn = dyn | 26 | true | true | 0 | 8 | 46 | 43 | 22 | 21 | null | null |
glguy/5puzzle | Palisade/Regions.hs | isc | mapRegion :: (Coord -> Coord) -> Region -> Region
mapRegion f (Region r) = Region (Set.map f r) | 95 | mapRegion :: (Coord -> Coord) -> Region -> Region
mapRegion f (Region r) = Region (Set.map f r) | 95 | mapRegion f (Region r) = Region (Set.map f r) | 45 | false | true | 0 | 8 | 17 | 50 | 25 | 25 | null | null |
kovach/web | res2/Syntax.hs | gpl-2.0 | alphaNum = all isAlphaNum | 25 | alphaNum = all isAlphaNum | 25 | alphaNum = all isAlphaNum | 25 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
karamellpelle/grid | designer/source/Game/Values.hs | gpl-3.0 | valueGridPathSpeed :: Float
valueGridPathSpeed =
1.6 | 57 | valueGridPathSpeed :: Float
valueGridPathSpeed =
1.6 | 56 | valueGridPathSpeed =
1.6 | 28 | false | true | 0 | 4 | 10 | 11 | 6 | 5 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/DynamicsCompressorNode.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/DynamicsCompressorNode.ratio Mozilla DynamicsCompressorNode.ratio documentation>
getRatio :: (MonadDOM m) => DynamicsCompressorNode -> m AudioParam
getRatio self
= liftDOM ((self ^. js "ratio") >>= fromJSValUnchecked) | 275 | getRatio :: (MonadDOM m) => DynamicsCompressorNode -> m AudioParam
getRatio self
= liftDOM ((self ^. js "ratio") >>= fromJSValUnchecked) | 138 | getRatio self
= liftDOM ((self ^. js "ratio") >>= fromJSValUnchecked) | 71 | true | true | 0 | 10 | 27 | 56 | 27 | 29 | null | null |
JacquesCarette/literate-scientific-software | People/Dan/Thesis Proposal/Presentation/HeatTransfer.hs | bsd-2-clause | --------------- --------------- --------------- ---------------
{--------------- Begin tau_c ---------------}
--------------- --------------- --------------- ---------------
tau_c :: VarChunk
tau_c = makeVC "tau_c" "clad thickness" ((Special Tau_L) `sub` lC) | 258 | tau_c :: VarChunk
tau_c = makeVC "tau_c" "clad thickness" ((Special Tau_L) `sub` lC) | 84 | tau_c = makeVC "tau_c" "clad thickness" ((Special Tau_L) `sub` lC) | 66 | true | true | 0 | 9 | 24 | 36 | 21 | 15 | null | null |
bmsherman/magma-gpu | Foreign/CUDA/Magma/TH.hs | bsd-3-clause | funArgs :: CDeclarator a -> Maybe [CDeclaration a]
funArgs (CDeclr _ [(CFunDeclr (Right (ys,_)) _ _)] _ _ _) = Just ys | 118 | funArgs :: CDeclarator a -> Maybe [CDeclaration a]
funArgs (CDeclr _ [(CFunDeclr (Right (ys,_)) _ _)] _ _ _) = Just ys | 118 | funArgs (CDeclr _ [(CFunDeclr (Right (ys,_)) _ _)] _ _ _) = Just ys | 67 | false | true | 0 | 12 | 21 | 76 | 37 | 39 | null | null |
bgold-cosmos/Tidal | src/Sound/Tidal/Tempo.hs | gpl-3.0 | listenTempo :: O.UDP -> MVar Tempo -> IO ()
listenTempo udp tempoMV = forever $ do pkt <- O.recvPacket udp
act Nothing pkt
return ()
where act _ (O.Packet_Bundle (O.Bundle ts ms)) = mapM_ (act (Just ts) . O.Packet_Message) ms
act (J... | 1,128 | listenTempo :: O.UDP -> MVar Tempo -> IO ()
listenTempo udp tempoMV = forever $ do pkt <- O.recvPacket udp
act Nothing pkt
return ()
where act _ (O.Packet_Bundle (O.Bundle ts ms)) = mapM_ (act (Just ts) . O.Packet_Message) ms
act (J... | 1,128 | listenTempo udp tempoMV = forever $ do pkt <- O.recvPacket udp
act Nothing pkt
return ()
where act _ (O.Packet_Bundle (O.Bundle ts ms)) = mapM_ (act (Just ts) . O.Packet_Message) ms
act (Just ts) (O.Packet_Message (O.Message "/cps/c... | 1,084 | false | true | 2 | 14 | 661 | 260 | 127 | 133 | null | null |
edsko/cabal | Cabal/src/Distribution/PackageDescription.hs | bsd-3-clause | knownTestTypes :: [TestType]
knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 130 | knownTestTypes :: [TestType]
knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 130 | knownTestTypes = [ TestTypeExe (Version [1,0] [])
, TestTypeLib (Version [0,9] []) ] | 101 | false | true | 0 | 9 | 32 | 58 | 32 | 26 | null | null |
spechub/Hets | Temporal/NuSmv.hs | gpl-2.0 | showBasicExpr (Next expr) outer = concat [ "next(",
showBasicExpr expr True, ")" ] | 125 | showBasicExpr (Next expr) outer = concat [ "next(",
showBasicExpr expr True, ")" ] | 125 | showBasicExpr (Next expr) outer = concat [ "next(",
showBasicExpr expr True, ")" ] | 125 | false | false | 1 | 7 | 55 | 36 | 17 | 19 | null | null |
keera-studios/hsQt | Qtc/Core/QSettings.hs | bsd-2-clause | qSettings_deleteLater :: QSettings a -> IO ()
qSettings_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSettings_deleteLater cobj_x0 | 143 | qSettings_deleteLater :: QSettings a -> IO ()
qSettings_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSettings_deleteLater cobj_x0 | 143 | qSettings_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QSettings_deleteLater cobj_x0 | 97 | false | true | 2 | 7 | 22 | 42 | 19 | 23 | null | null |
rmallermartins/sudoku-haskell | sudoku.hs | gpl-2.0 | blockConflits :: Index -> Int -> SudokuGrid -> Int
blockConflits (x,y) number grid = (length (filter (\(x',y') -> number == (getElem x' y' grid)) blockIndexs))
where
blockX = ((div (x - 1) 3) * 3) + 1
blockY = ((div (y - 1) 3) * 3) + 1
... | 409 | blockConflits :: Index -> Int -> SudokuGrid -> Int
blockConflits (x,y) number grid = (length (filter (\(x',y') -> number == (getElem x' y' grid)) blockIndexs))
where
blockX = ((div (x - 1) 3) * 3) + 1
blockY = ((div (y - 1) 3) * 3) + 1
... | 409 | blockConflits (x,y) number grid = (length (filter (\(x',y') -> number == (getElem x' y' grid)) blockIndexs))
where
blockX = ((div (x - 1) 3) * 3) + 1
blockY = ((div (y - 1) 3) * 3) + 1
blockIndexs = [(x',y') | x' <- [blockX..(b... | 358 | false | true | 0 | 13 | 150 | 196 | 108 | 88 | null | null |
haskell/haddock | haddock-api/src/Haddock/Interface/Rename.hs | bsd-2-clause | renameLThing :: (a GhcRn -> RnM (a DocNameI)) -> LocatedAn an (a GhcRn) -> RnM (Located (a DocNameI))
renameLThing fn (L loc x) = return . L (locA loc) =<< fn x | 160 | renameLThing :: (a GhcRn -> RnM (a DocNameI)) -> LocatedAn an (a GhcRn) -> RnM (Located (a DocNameI))
renameLThing fn (L loc x) = return . L (locA loc) =<< fn x | 160 | renameLThing fn (L loc x) = return . L (locA loc) =<< fn x | 58 | false | true | 0 | 11 | 31 | 97 | 46 | 51 | null | null |
sol/aeson | Data/Aeson/TH.hs | bsd-3-clause | jsonClassName :: JSONClass -> Name
jsonClassName (JSONClass To Arity0) = ''ToJSON | 83 | jsonClassName :: JSONClass -> Name
jsonClassName (JSONClass To Arity0) = ''ToJSON | 83 | jsonClassName (JSONClass To Arity0) = ''ToJSON | 48 | false | true | 0 | 7 | 12 | 28 | 14 | 14 | null | null |
urbanslug/ghc | compiler/llvmGen/Llvm/Types.hs | bsd-3-clause | -- | Print a literal value. No type.
ppLit :: LlvmLit -> SDoc
ppLit (LMIntLit i (LMInt 32)) = ppr (fromInteger i :: Int32) | 123 | ppLit :: LlvmLit -> SDoc
ppLit (LMIntLit i (LMInt 32)) = ppr (fromInteger i :: Int32) | 86 | ppLit (LMIntLit i (LMInt 32)) = ppr (fromInteger i :: Int32) | 61 | true | true | 0 | 8 | 24 | 49 | 24 | 25 | null | null |
audreyt/stringtable-atom | src/StringTable/AtomMap.hs | bsd-3-clause | fromListWith :: (a -> a -> a) -> [(Atom, a)] -> AtomMap a
fromListWith f ps = MkAtomMap $ IM.fromListWith f [ (fromAtom l, x) | (l, x) <- ps ] | 142 | fromListWith :: (a -> a -> a) -> [(Atom, a)] -> AtomMap a
fromListWith f ps = MkAtomMap $ IM.fromListWith f [ (fromAtom l, x) | (l, x) <- ps ] | 142 | fromListWith f ps = MkAtomMap $ IM.fromListWith f [ (fromAtom l, x) | (l, x) <- ps ] | 84 | false | true | 0 | 10 | 30 | 84 | 45 | 39 | null | null |
bgamari/icalendar | Data/ICalendar/Pretty.hs | bsd-3-clause | iCalProperty prop = text "P:" <> text (icpName prop)
<+> (if null (icpParams prop)
then empty
else parens (hcat $ punctuate (char ',') (map iCalParam $ icpParams prop)))
<+> char '='
<+> text (icpValue prop) | 301 | iCalProperty prop = text "P:" <> text (icpName prop)
<+> (if null (icpParams prop)
then empty
else parens (hcat $ punctuate (char ',') (map iCalParam $ icpParams prop)))
<+> char '='
<+> text (icpValue prop) | 301 | iCalProperty prop = text "P:" <> text (icpName prop)
<+> (if null (icpParams prop)
then empty
else parens (hcat $ punctuate (char ',') (map iCalParam $ icpParams prop)))
<+> char '='
<+> text (icpValue prop) | 301 | false | false | 0 | 16 | 128 | 103 | 49 | 54 | null | null |
mattias-lundell/timber-llvm | src/Syntax.hs | bsd-3-clause | rAp (RGrd gs) es = RGrd [ GExp qs (eAp e es) | GExp qs e <- gs ] | 79 | rAp (RGrd gs) es = RGrd [ GExp qs (eAp e es) | GExp qs e <- gs ] | 79 | rAp (RGrd gs) es = RGrd [ GExp qs (eAp e es) | GExp qs e <- gs ] | 79 | false | false | 0 | 9 | 33 | 49 | 23 | 26 | null | null |
Noeda/caramia-extras | lib/Caramia/Extras/ShaderEffects.hs | mit | stepShaderEffects :: ShaderEffects -> IO ()
stepShaderEffects (ShaderEffects {..}) = do
tm <- getMonotonicTime
((tex_src, fbuf), (tex_dst, _)) <- atomicModifyIORef' texes $ \(t1, t2) ->
( (t2, t1), (t1, t2) )
setUniform (tm :: Float) monotonicLoc sePipeline
draw drawCommand
{ primitive... | 960 | stepShaderEffects :: ShaderEffects -> IO ()
stepShaderEffects (ShaderEffects {..}) = do
tm <- getMonotonicTime
((tex_src, fbuf), (tex_dst, _)) <- atomicModifyIORef' texes $ \(t1, t2) ->
( (t2, t1), (t1, t2) )
setUniform (tm :: Float) monotonicLoc sePipeline
draw drawCommand
{ primitive... | 960 | stepShaderEffects (ShaderEffects {..}) = do
tm <- getMonotonicTime
((tex_src, fbuf), (tex_dst, _)) <- atomicModifyIORef' texes $ \(t1, t2) ->
( (t2, t1), (t1, t2) )
setUniform (tm :: Float) monotonicLoc sePipeline
draw drawCommand
{ primitiveType = TriangleStrip
, primitivesVA... | 916 | false | true | 0 | 13 | 302 | 279 | 161 | 118 | null | null |
ssaavedra/liquidhaskell | tests/pos/alphaconvert-List.hs | bsd-3-clause | maxs ([]) = 0 | 15 | maxs ([]) = 0 | 15 | maxs ([]) = 0 | 15 | false | false | 0 | 6 | 5 | 15 | 7 | 8 | null | null |
tpltnt/Tidal | Sound/Tidal/Strategies.hs | gpl-3.0 | echo = stutter 2 | 18 | echo = stutter 2 | 18 | echo = stutter 2 | 18 | false | false | 1 | 5 | 5 | 13 | 4 | 9 | null | null |
yu-i9/thih | src/Thih/Static/Thih.hs | bsd-3-clause | tLiteral = TCon (Tycon "Literal" Star) | 38 | tLiteral = TCon (Tycon "Literal" Star) | 38 | tLiteral = TCon (Tycon "Literal" Star) | 38 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
urbanslug/ghc | compiler/stgSyn/CoreToStg.hs | bsd-3-clause | coreTopBindToStg
:: DynFlags
-> Module
-> IdEnv HowBound
-> FreeVarsInfo -- Info about the body
-> CoreBind
-> (IdEnv HowBound, FreeVarsInfo, StgBinding)
coreTopBindToStg dflags this_mod env body_fvs (NonRec id rhs)
= let
env' = extendVarEnv env id... | 913 | coreTopBindToStg
:: DynFlags
-> Module
-> IdEnv HowBound
-> FreeVarsInfo -- Info about the body
-> CoreBind
-> (IdEnv HowBound, FreeVarsInfo, StgBinding)
coreTopBindToStg dflags this_mod env body_fvs (NonRec id rhs)
= let
env' = extendVarEnv env id ... | 912 | coreTopBindToStg dflags this_mod env body_fvs (NonRec id rhs)
= let
env' = extendVarEnv env id how_bound
how_bound = LetBound TopLet $! manifestArity rhs
(stg_rhs, fvs') =
initLne env $ do
(stg_rhs, fvs') <- coreToTopStgRhs dflags this_mod body_fvs (id,rhs)
... | 702 | false | true | 0 | 14 | 297 | 213 | 109 | 104 | null | null |
lpeterse/koka | src/Type/Assumption.hs | apache-2.0 | gammaSingle :: Name -> NameInfo -> Gamma
gammaSingle name tp
= gammaNew [(name,tp)] | 85 | gammaSingle :: Name -> NameInfo -> Gamma
gammaSingle name tp
= gammaNew [(name,tp)] | 85 | gammaSingle name tp
= gammaNew [(name,tp)] | 44 | false | true | 0 | 7 | 14 | 36 | 19 | 17 | null | null |
msakai/ptq | src/ParserTest.hs | lgpl-2.1 | ex_2 = "Every woman loves a unicorn." | 37 | ex_2 = "Every woman loves a unicorn." | 37 | ex_2 = "Every woman loves a unicorn." | 37 | false | false | 0 | 4 | 6 | 6 | 3 | 3 | null | null |
osa1/chsc | Supercompile/Match.hs | bsd-3-clause | -- NB: if there are dead bindings in the left PureHeap then the output Renaming will not contain a renaming for their binders.
matchHeap :: PureHeap -> PureHeap -> ([(Var, Var)], [(Var, Var)]) -> Match Renaming
matchHeap init_h_l init_h_r (bound_eqs, free_eqs) = do
-- 1) Find the initial matching by simply recursiv... | 1,063 | matchHeap :: PureHeap -> PureHeap -> ([(Var, Var)], [(Var, Var)]) -> Match Renaming
matchHeap init_h_l init_h_r (bound_eqs, free_eqs) = do
-- 1) Find the initial matching by simply recursively matching used bindings from the Left
-- heap against those from the Right heap (if any)
eqs <- matchEnvironmentE... | 936 | matchHeap init_h_l init_h_r (bound_eqs, free_eqs) = do
-- 1) Find the initial matching by simply recursively matching used bindings from the Left
-- heap against those from the Right heap (if any)
eqs <- matchEnvironmentExact matchIdSupply bound_eqs free_eqs init_h_l init_h_r
-- 2) Perhaps we violate... | 852 | true | true | 0 | 11 | 227 | 109 | 59 | 50 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs | mpl-2.0 | -- | Whether the creative is SSL-compliant. This is a read-only field.
-- Applicable to all creative types.
creSSLCompliant :: Lens' Creative (Maybe Bool)
creSSLCompliant
= lens _creSSLCompliant
(\ s a -> s{_creSSLCompliant = a}) | 237 | creSSLCompliant :: Lens' Creative (Maybe Bool)
creSSLCompliant
= lens _creSSLCompliant
(\ s a -> s{_creSSLCompliant = a}) | 129 | creSSLCompliant
= lens _creSSLCompliant
(\ s a -> s{_creSSLCompliant = a}) | 82 | true | true | 1 | 9 | 42 | 52 | 26 | 26 | null | null |
Leonti/haskell-memory-so | src/PriceParsing.hs | bsd-3-clause | parsePrice :: String -> Maybe Int
parsePrice textPrice =
if null prices then Nothing else Just $ last prices
where
maybeRawRegularPrice :: Maybe Int
maybeRawRegularPrice = (\p -> read p :: Int) <$> extractPrice "\\$([0-9][0-9][0-9],[0-9][0-9][0-9])" textPrice
maybeRawPriceWithK :: Maybe... | 537 | parsePrice :: String -> Maybe Int
parsePrice textPrice =
if null prices then Nothing else Just $ last prices
where
maybeRawRegularPrice :: Maybe Int
maybeRawRegularPrice = (\p -> read p :: Int) <$> extractPrice "\\$([0-9][0-9][0-9],[0-9][0-9][0-9])" textPrice
maybeRawPriceWithK :: Maybe... | 537 | parsePrice textPrice =
if null prices then Nothing else Just $ last prices
where
maybeRawRegularPrice :: Maybe Int
maybeRawRegularPrice = (\p -> read p :: Int) <$> extractPrice "\\$([0-9][0-9][0-9],[0-9][0-9][0-9])" textPrice
maybeRawPriceWithK :: Maybe Int
maybeRawPriceWithK = ... | 503 | false | true | 11 | 8 | 120 | 146 | 76 | 70 | null | null |
cyruscousins/HarmLang | src/HarmLang/InitialBasis.hs | mit | interpretNamedInterval "fifth" = Interval 7 | 43 | interpretNamedInterval "fifth" = Interval 7 | 43 | interpretNamedInterval "fifth" = Interval 7 | 43 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
jystic/lambdasim | src/Lambdasim/Simulation.hs | bsd-3-clause | updateFirstVessel :: (Vessel -> Vessel) -> Simulation -> Simulation
updateFirstVessel f = updateVessels update
where
update [] = []
update (v:vs) = f v : vs | 166 | updateFirstVessel :: (Vessel -> Vessel) -> Simulation -> Simulation
updateFirstVessel f = updateVessels update
where
update [] = []
update (v:vs) = f v : vs | 166 | updateFirstVessel f = updateVessels update
where
update [] = []
update (v:vs) = f v : vs | 98 | false | true | 1 | 8 | 35 | 68 | 34 | 34 | null | null |
nukisman/elm-format-short | src/ElmFormat.hs | bsd-3-clause | determineDestination :: Maybe FilePath -> Bool -> Either ErrorMessage Destination
determineDestination output validate =
case ( output, validate ) of
( Nothing, True ) -> Right ValidateOnly
( Nothing, False ) -> Right UpdateInPlace
( Just path, False ) -> Right $ ToFile path
( Just _... | 354 | determineDestination :: Maybe FilePath -> Bool -> Either ErrorMessage Destination
determineDestination output validate =
case ( output, validate ) of
( Nothing, True ) -> Right ValidateOnly
( Nothing, False ) -> Right UpdateInPlace
( Just path, False ) -> Right $ ToFile path
( Just _... | 354 | determineDestination output validate =
case ( output, validate ) of
( Nothing, True ) -> Right ValidateOnly
( Nothing, False ) -> Right UpdateInPlace
( Just path, False ) -> Right $ ToFile path
( Just _, True ) -> Left OutputAndValidate | 272 | false | true | 0 | 9 | 87 | 116 | 58 | 58 | null | null |
dmbarbour/awelon | hsrc/AO/AOFile.hs | bsd-3-clause | -- | Load an AO dictionary and additionally precompile it, i.e. such
-- that if we define `compile!fibonacci` then the word `fibonacci`
-- will be compiled into a separate ABC resource. Uses same location
-- as `saveRscFile`.
loadAODict :: (AOFileRoot s, MonadIO m)
=> s -> (String -> m ()) -> m (AODict AOF... | 502 | loadAODict :: (AOFileRoot s, MonadIO m)
=> s -> (String -> m ()) -> m (AODict AOFMeta)
loadAODict src warnOp =
loadAODict0 src warnOp >>= \ d0 ->
let (df,(_prcd,secd)) = preCompileDict d0 in
mapM_ (uncurry saveRscFile) (M.toList secd) >>
return df | 275 | loadAODict src warnOp =
loadAODict0 src warnOp >>= \ d0 ->
let (df,(_prcd,secd)) = preCompileDict d0 in
mapM_ (uncurry saveRscFile) (M.toList secd) >>
return df | 176 | true | true | 0 | 13 | 107 | 131 | 67 | 64 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/ImpGen.hs | isc | defCompileBasicOp (Pat [pe]) (Index src slice)
| Just idxs <- sliceIndices slice =
copyDWIM (patElemName pe) [] (Var src) $ map (DimFix . toInt64Exp) idxs | 160 | defCompileBasicOp (Pat [pe]) (Index src slice)
| Just idxs <- sliceIndices slice =
copyDWIM (patElemName pe) [] (Var src) $ map (DimFix . toInt64Exp) idxs | 160 | defCompileBasicOp (Pat [pe]) (Index src slice)
| Just idxs <- sliceIndices slice =
copyDWIM (patElemName pe) [] (Var src) $ map (DimFix . toInt64Exp) idxs | 160 | false | false | 0 | 9 | 30 | 86 | 39 | 47 | null | null |
Oscarzhao/haskell | functional_program_design/ch03/natural_number.hs | apache-2.0 | m + Succ n = Succ (m + n) | 31 | m + Succ n = Succ (m + n) | 31 | m + Succ n = Succ (m + n) | 31 | false | false | 2 | 7 | 14 | 25 | 11 | 14 | null | null |
devyn/haPaws | Language/HaPaws/CPaws.hs | bsd-3-clause | lexWhitespace :: Text -> SourcePosition -> [(Token, SourcePosition)]
lexWhitespace text (line, column) =
(Whitespace, (line, column)) : consumeSpaces text (line, column)
where consumeSpaces text (line, column) =
case Text.uncons text of
Just ('\n', rest) -> consumeSpaces rest (line + 1, 1)
... | 692 | lexWhitespace :: Text -> SourcePosition -> [(Token, SourcePosition)]
lexWhitespace text (line, column) =
(Whitespace, (line, column)) : consumeSpaces text (line, column)
where consumeSpaces text (line, column) =
case Text.uncons text of
Just ('\n', rest) -> consumeSpaces rest (line + 1, 1)
... | 692 | lexWhitespace text (line, column) =
(Whitespace, (line, column)) : consumeSpaces text (line, column)
where consumeSpaces text (line, column) =
case Text.uncons text of
Just ('\n', rest) -> consumeSpaces rest (line + 1, 1)
Just (ch, rest)
| isSpace ch -> ... | 623 | false | true | 0 | 11 | 208 | 206 | 109 | 97 | null | null |
ComputationWithBoundedResources/tct-core | src/Tct/Core/Common/Error.hs | bsd-3-clause | liftEither :: Either e a -> ErroneousIO e a
liftEither = ExceptT . return | 73 | liftEither :: Either e a -> ErroneousIO e a
liftEither = ExceptT . return | 73 | liftEither = ExceptT . return | 29 | false | true | 0 | 6 | 13 | 29 | 14 | 15 | null | null |
Rydgel/advent-of-code-2016 | src/Day1.hs | bsd-3-clause | day1' :: IO ()
day1' = do
parseS <- T.pack <$> readFile "resources/day1.txt"
let (Right moves) = parseOnly parseMoves parseS
let visitesTwice = filter ((==2) . length) $ groupPositionsByVisits moves
let Position (x, y) _ : _ = head visitesTwice
print $ abs x + abs y | 276 | day1' :: IO ()
day1' = do
parseS <- T.pack <$> readFile "resources/day1.txt"
let (Right moves) = parseOnly parseMoves parseS
let visitesTwice = filter ((==2) . length) $ groupPositionsByVisits moves
let Position (x, y) _ : _ = head visitesTwice
print $ abs x + abs y | 276 | day1' = do
parseS <- T.pack <$> readFile "resources/day1.txt"
let (Right moves) = parseOnly parseMoves parseS
let visitesTwice = filter ((==2) . length) $ groupPositionsByVisits moves
let Position (x, y) _ : _ = head visitesTwice
print $ abs x + abs y | 261 | false | true | 2 | 13 | 56 | 115 | 56 | 59 | null | null |
skogsbaer/HTF | tests/TestHTF.hs | lgpl-2.1 | test_pendingTest_PENDING = unitTestPending "This test is pending" | 65 | test_pendingTest_PENDING = unitTestPending "This test is pending" | 65 | test_pendingTest_PENDING = unitTestPending "This test is pending" | 65 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
stefan-j/ProjectEuler | q36.hs | mit | to_binary n = to_binary (n `div` 2) ++ [n `mod` 2] | 50 | to_binary n = to_binary (n `div` 2) ++ [n `mod` 2] | 50 | to_binary n = to_binary (n `div` 2) ++ [n `mod` 2] | 50 | false | false | 0 | 8 | 10 | 34 | 19 | 15 | null | null |
emk/haskell-probability-monads | Control/Monad/MonoidValue.hs | bsd-3-clause | joinMV :: (Monoid w) => MV w (MV w a) -> MV w a
joinMV (MV w1 (MV w2 v)) = MV (w1 `mappend` w2) v | 97 | joinMV :: (Monoid w) => MV w (MV w a) -> MV w a
joinMV (MV w1 (MV w2 v)) = MV (w1 `mappend` w2) v | 97 | joinMV (MV w1 (MV w2 v)) = MV (w1 `mappend` w2) v | 49 | false | true | 0 | 9 | 25 | 75 | 38 | 37 | null | null |
mettekou/ghc | compiler/utils/Outputable.hs | bsd-3-clause | hang :: SDoc -- ^ The header
-> Int -- ^ Amount to indent the hung body
-> SDoc -- ^ The hung body, indented and placed below the header
-> SDoc
hang d1 n d2 = SDoc $ \sty -> Pretty.hang (runSDoc d1 sty) n (runSDoc d2 sty) | 244 | hang :: SDoc -- ^ The header
-> Int -- ^ Amount to indent the hung body
-> SDoc -- ^ The hung body, indented and placed below the header
-> SDoc
hang d1 n d2 = SDoc $ \sty -> Pretty.hang (runSDoc d1 sty) n (runSDoc d2 sty) | 244 | hang d1 n d2 = SDoc $ \sty -> Pretty.hang (runSDoc d1 sty) n (runSDoc d2 sty) | 79 | false | true | 0 | 9 | 70 | 72 | 36 | 36 | null | null |
barrucadu/search-party | tests/Main.hs | mit | streams1 :: IO Bool
streams1 = dejafus (as @! const True >>= readStream) $ cases "streams1" (`elem` as) where
as = [0,1]
--------------------------------------------------------------------------------
-- (streams2): Checking stream ordering works | 250 | streams1 :: IO Bool
streams1 = dejafus (as @! const True >>= readStream) $ cases "streams1" (`elem` as) where
as = [0,1]
--------------------------------------------------------------------------------
-- (streams2): Checking stream ordering works | 250 | streams1 = dejafus (as @! const True >>= readStream) $ cases "streams1" (`elem` as) where
as = [0,1]
--------------------------------------------------------------------------------
-- (streams2): Checking stream ordering works | 230 | false | true | 0 | 10 | 31 | 60 | 34 | 26 | null | null |
prb/perpubplat | src/Blog/Widgets/StreamOfConsciousness/TwitterNanny.hs | bsd-3-clause | start_twitter_nanny :: SoCController -> [(Worker,Int)] -> String -> String -> IO Worker
start_twitter_nanny socc kids user password = do { let req = build_request user password
; p <- start_poller log_handle req (handle_throttle kids) nanny_period
... | 372 | start_twitter_nanny :: SoCController -> [(Worker,Int)] -> String -> String -> IO Worker
start_twitter_nanny socc kids user password = do { let req = build_request user password
; p <- start_poller log_handle req (handle_throttle kids) nanny_period
... | 372 | start_twitter_nanny socc kids user password = do { let req = build_request user password
; p <- start_poller log_handle req (handle_throttle kids) nanny_period
; return $ Worker socc p } | 284 | false | true | 0 | 11 | 139 | 105 | 51 | 54 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/FetchUtils.hs | bsd-3-clause | fetchPackage :: Verbosity
-> PackageLocation (Maybe FilePath)
-> IO (PackageLocation FilePath)
fetchPackage verbosity loc = case loc of
LocalUnpackedPackage dir ->
return (LocalUnpackedPackage dir)
LocalTarballPackage file ->
return (LocalTarballPackage file)
RemoteT... | 1,106 | fetchPackage :: Verbosity
-> PackageLocation (Maybe FilePath)
-> IO (PackageLocation FilePath)
fetchPackage verbosity loc = case loc of
LocalUnpackedPackage dir ->
return (LocalUnpackedPackage dir)
LocalTarballPackage file ->
return (LocalTarballPackage file)
RemoteT... | 1,106 | fetchPackage verbosity loc = case loc of
LocalUnpackedPackage dir ->
return (LocalUnpackedPackage dir)
LocalTarballPackage file ->
return (LocalTarballPackage file)
RemoteTarballPackage uri (Just file) ->
return (RemoteTarballPackage uri file)
RepoTarballPackage repo pkgid (Just fil... | 985 | false | true | 0 | 12 | 269 | 301 | 137 | 164 | null | null |
csrhodes/pandoc | src/Text/Pandoc/Writers/DokuWiki.hs | gpl-2.0 | isSimpleListItem [x, y] | isPlainOrPara x =
case y of
BulletList _ -> isSimpleList y
OrderedList _ _ -> isSimpleList y
DefinitionList _ -> isSimpleList y
_ -> False | 218 | isSimpleListItem [x, y] | isPlainOrPara x =
case y of
BulletList _ -> isSimpleList y
OrderedList _ _ -> isSimpleList y
DefinitionList _ -> isSimpleList y
_ -> False | 218 | isSimpleListItem [x, y] | isPlainOrPara x =
case y of
BulletList _ -> isSimpleList y
OrderedList _ _ -> isSimpleList y
DefinitionList _ -> isSimpleList y
_ -> False | 218 | false | false | 5 | 8 | 82 | 65 | 32 | 33 | null | null |
jac3km4/haskit | src/Haskit/Parser.hs | mit | expr :: Parser Expr
expr = aExpr <|> bExpr <|> binding | 54 | expr :: Parser Expr
expr = aExpr <|> bExpr <|> binding | 54 | expr = aExpr <|> bExpr <|> binding | 34 | false | true | 0 | 6 | 10 | 22 | 11 | 11 | null | null |
michaxm/task-distribution | src/Control/Distributed/Task/Util/SerializationUtil.hs | bsd-3-clause | deserializeTimeDiff :: Rational -> NominalDiffTime
deserializeTimeDiff = fromRational | 85 | deserializeTimeDiff :: Rational -> NominalDiffTime
deserializeTimeDiff = fromRational | 85 | deserializeTimeDiff = fromRational | 34 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
leksah/yi | src/library/Yi/Buffer/HighLevel.hs | gpl-2.0 | getMaybeNextLineB :: Direction -> BufferM (Maybe YiString)
getMaybeNextLineB dir = listToMaybe <$> lineStreamB dir | 114 | getMaybeNextLineB :: Direction -> BufferM (Maybe YiString)
getMaybeNextLineB dir = listToMaybe <$> lineStreamB dir | 114 | getMaybeNextLineB dir = listToMaybe <$> lineStreamB dir | 55 | false | true | 0 | 9 | 13 | 38 | 17 | 21 | null | null |
ganeti/htools | test.hs | gpl-2.0 | incIORef :: IORef Int -> IO ()
incIORef ir = atomicModifyIORef ir (\x -> (x + 1, ())) | 85 | incIORef :: IORef Int -> IO ()
incIORef ir = atomicModifyIORef ir (\x -> (x + 1, ())) | 85 | incIORef ir = atomicModifyIORef ir (\x -> (x + 1, ())) | 54 | false | true | 0 | 9 | 17 | 51 | 26 | 25 | null | null |
rfranek/duckling | Duckling/Time/DA/Rules.hs | bsd-3-clause | ruleQuarterTotillbeforeIntegerHourofday :: Rule
ruleQuarterTotillbeforeIntegerHourofday = Rule
{ name = "quarter to|till|before <integer> (hour-of-day)"
, pattern =
[ regex "(et|\x00e9t)? ?kvart(er)? i"
, Predicate isAnHourOfDay
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) -> do
... | 399 | ruleQuarterTotillbeforeIntegerHourofday :: Rule
ruleQuarterTotillbeforeIntegerHourofday = Rule
{ name = "quarter to|till|before <integer> (hour-of-day)"
, pattern =
[ regex "(et|\x00e9t)? ?kvart(er)? i"
, Predicate isAnHourOfDay
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) -> do
... | 399 | ruleQuarterTotillbeforeIntegerHourofday = Rule
{ name = "quarter to|till|before <integer> (hour-of-day)"
, pattern =
[ regex "(et|\x00e9t)? ?kvart(er)? i"
, Predicate isAnHourOfDay
]
, prod = \tokens -> case tokens of
(_:Token Time td:_) -> do
t <- minutesBefore 15 td
Just $ Toke... | 351 | false | true | 0 | 15 | 99 | 108 | 55 | 53 | null | null |
jfischoff/Sharpen | src/Numeric/MaxEnt/Deconvolution/Internal.hs | bsd-3-clause | testInput1 :: [[Double]]
testInput1 = [[0, 0, 0, 0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 0, 0, 0, 0]] | 257 | testInput1 :: [[Double]]
testInput1 = [[0, 0, 0, 0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 0, 0, 0, 0]] | 257 | testInput1 = [[0, 0, 0, 0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 1.0/9.0, 1.0/9.0, 1.0/9.0, 0],
[0, 0, 0, 0, 0]] | 232 | false | true | 0 | 7 | 109 | 143 | 88 | 55 | null | null |
ledyba/Jinzamomi | src/Jinzamomi/Driver/IR.hs | gpl-3.0 | --
compile' indent (PreUni op node) =
T.concat [indent, op, "(", compile' "" node,")"] | 90 | compile' indent (PreUni op node) =
T.concat [indent, op, "(", compile' "" node,")"] | 87 | compile' indent (PreUni op node) =
T.concat [indent, op, "(", compile' "" node,")"] | 87 | true | false | 0 | 6 | 17 | 47 | 24 | 23 | null | null |
facebookincubator/duckling | Duckling/Ranking/Classifiers/ZH_MO.hs | bsd-3-clause | classifiers :: Classifiers
classifiers
= HashMap.fromList
[("\25490\28783\33410",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.6094379124341003,
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
koData =
... | 93,221 | classifiers :: Classifiers
classifiers
= HashMap.fromList
[("\25490\28783\33410",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.6094379124341003,
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
koData =
... | 93,221 | classifiers
= HashMap.fromList
[("\25490\28783\33410",
Classifier{okData =
ClassData{prior = 0.0, unseen = -1.6094379124341003,
likelihoods = HashMap.fromList [("", 0.0)], n = 3},
koData =
ClassData{prior = -infi... | 93,194 | false | true | 0 | 15 | 43,539 | 18,831 | 11,681 | 7,150 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsUtils.hs | bsd-3-clause | -------------
collect_lpat :: LPat name -> [name] -> [name]
collect_lpat (L _ pat) bndrs
= go pat
where
go (VarPat (L _ var)) = var : bndrs
go (WildPat _) = bndrs
go (LazyPat pat) = collect_lpat pat bndrs
go (BangPat pat) = collect_lpat pat bndrs
... | 2,381 | collect_lpat :: LPat name -> [name] -> [name]
collect_lpat (L _ pat) bndrs
= go pat
where
go (VarPat (L _ var)) = var : bndrs
go (WildPat _) = bndrs
go (LazyPat pat) = collect_lpat pat bndrs
go (BangPat pat) = collect_lpat pat bndrs
go (AsPat (L _... | 2,367 | collect_lpat (L _ pat) bndrs
= go pat
where
go (VarPat (L _ var)) = var : bndrs
go (WildPat _) = bndrs
go (LazyPat pat) = collect_lpat pat bndrs
go (BangPat pat) = collect_lpat pat bndrs
go (AsPat (L _ a) pat) = a : collect_lpat pat bndrs
... | 2,321 | true | true | 0 | 9 | 668 | 480 | 236 | 244 | null | null |
atzeus/reflectionwithoutremorse | Fixed/Eff.hs | mit | guard' :: Member Choose r => Bool -> Eff r ()
guard' True = return () | 70 | guard' :: Member Choose r => Bool -> Eff r ()
guard' True = return () | 70 | guard' True = return () | 24 | false | true | 0 | 8 | 16 | 39 | 18 | 21 | null | null |
haskell-distributed/distributed-process-tests | src/Control/Distributed/Process/Tests/Closure.hs | bsd-3-clause | isPrime :: Integer -> Process Bool
isPrime n = return . (n `elem`) . takeWhile (<= n) . sieve $ [2..]
where
sieve :: [Integer] -> [Integer]
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
sieve [] = error "Uh oh -- we've run out of primes"
-- | First argument indicates empty closure environment | 318 | isPrime :: Integer -> Process Bool
isPrime n = return . (n `elem`) . takeWhile (<= n) . sieve $ [2..]
where
sieve :: [Integer] -> [Integer]
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
sieve [] = error "Uh oh -- we've run out of primes"
-- | First argument indicates empty closure environment | 318 | isPrime n = return . (n `elem`) . takeWhile (<= n) . sieve $ [2..]
where
sieve :: [Integer] -> [Integer]
sieve (p : xs) = p : sieve [x | x <- xs, x `mod` p > 0]
sieve [] = error "Uh oh -- we've run out of primes"
-- | First argument indicates empty closure environment | 283 | false | true | 0 | 10 | 79 | 132 | 71 | 61 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Coll/UnbalancedSet.hs | mit | foldr _ e E = e | 15 | foldr _ e E = e | 15 | foldr _ e E = e | 15 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
c089/haskell-craft3e | Chapter4Exercises.hs | mit | -- solution from book
allEqual m n p = ((m + n + p) == 3*p) | 59 | allEqual m n p = ((m + n + p) == 3*p) | 37 | allEqual m n p = ((m + n + p) == 3*p) | 37 | true | false | 0 | 10 | 15 | 38 | 19 | 19 | null | null |
albertoruiz/hTensor | lib/Numeric/LinearAlgebra/Array/Decomposition.hs | bsd-3-clause | truncateFactors ns (c:rs) = ttake ns c : zipWith f rs ns
where f r n = onIndex (take n) (head (namesR r)) r
------------------------------------------------------------------------ | 185 | truncateFactors ns (c:rs) = ttake ns c : zipWith f rs ns
where f r n = onIndex (take n) (head (namesR r)) r
------------------------------------------------------------------------ | 185 | truncateFactors ns (c:rs) = ttake ns c : zipWith f rs ns
where f r n = onIndex (take n) (head (namesR r)) r
------------------------------------------------------------------------ | 185 | false | false | 0 | 11 | 29 | 72 | 35 | 37 | null | null |
nevrenato/HetsAlloy | OMDoc/XmlInterface.hs | gpl-2.0 | -- * Monad and Maybe interaction
justReturn :: Monad m => a -> m (Maybe a)
justReturn = return . Just | 102 | justReturn :: Monad m => a -> m (Maybe a)
justReturn = return . Just | 68 | justReturn = return . Just | 26 | true | true | 0 | 10 | 21 | 42 | 19 | 23 | null | null |
MaxGabriel/yesod | yesod-core/Yesod/Core/Handler.hs | mit | sendFile :: MonadHandler m => ContentType -> FilePath -> m a
sendFile ct fp = handlerError $ HCSendFile ct fp Nothing | 117 | sendFile :: MonadHandler m => ContentType -> FilePath -> m a
sendFile ct fp = handlerError $ HCSendFile ct fp Nothing | 117 | sendFile ct fp = handlerError $ HCSendFile ct fp Nothing | 56 | false | true | 0 | 8 | 20 | 45 | 21 | 24 | null | null |
garious/diffdump | DiffDump.hs | bsd-3-clause | expectedFileType :: String -> FilterPredicate
expectedFileType "" = return True | 79 | expectedFileType :: String -> FilterPredicate
expectedFileType "" = return True | 79 | expectedFileType "" = return True | 33 | false | true | 0 | 5 | 9 | 21 | 10 | 11 | null | null |
ml9951/ThreadScope | Events/EventTree.hs | bsd-3-clause | -------------------------------------------------------------------------------
durationTreeMaxDepth :: DurationTree -> Int
durationTreeMaxDepth (DurationSplit _ _ _ lhs rhs _ _)
= 1 + durationTreeMaxDepth lhs `max` durationTreeMaxDepth rhs | 243 | durationTreeMaxDepth :: DurationTree -> Int
durationTreeMaxDepth (DurationSplit _ _ _ lhs rhs _ _)
= 1 + durationTreeMaxDepth lhs `max` durationTreeMaxDepth rhs | 162 | durationTreeMaxDepth (DurationSplit _ _ _ lhs rhs _ _)
= 1 + durationTreeMaxDepth lhs `max` durationTreeMaxDepth rhs | 118 | true | true | 2 | 7 | 25 | 54 | 27 | 27 | null | null |
vt5491/haskell | projects/test/main.hs | mit | toRomanDigit "X" = X | 20 | toRomanDigit "X" = X | 20 | toRomanDigit "X" = X | 20 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
michalkonecny/polypaver | src/Numeric/ER/RnToRm/Approx/Derivatives.hs | bsd-3-clause | derivsLift1 op (ERFnDerivatives fa derivs) =
ERFnDerivatives (op fa) (Map.map (derivsLift1 op) derivs) | 107 | derivsLift1 op (ERFnDerivatives fa derivs) =
ERFnDerivatives (op fa) (Map.map (derivsLift1 op) derivs) | 107 | derivsLift1 op (ERFnDerivatives fa derivs) =
ERFnDerivatives (op fa) (Map.map (derivsLift1 op) derivs) | 107 | false | false | 0 | 8 | 17 | 49 | 22 | 27 | null | null |
DougBurke/swish | src/Swish/Commands.hs | lgpl-2.1 | swishReadScript :: Maybe String -> SwishStateIO [SwishStateIO ()]
swishReadScript = swishReadFile swishParseScript [] | 117 | swishReadScript :: Maybe String -> SwishStateIO [SwishStateIO ()]
swishReadScript = swishReadFile swishParseScript [] | 117 | swishReadScript = swishReadFile swishParseScript [] | 51 | false | true | 0 | 10 | 12 | 42 | 18 | 24 | null | null |
brendanhay/gogol | gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/AdClients/CustomChannels/List.hs | mpl-2.0 | -- | Creates a value of 'AccountsAdClientsCustomChannelsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aaccclParent'
--
-- * 'aaccclXgafv'
--
-- * 'aaccclUploadProtocol'
--
-- * 'aaccclAccessToken'
--
-- * 'aaccclUploadType'
--... | 872 | accountsAdClientsCustomChannelsList
:: Text -- ^ 'aaccclParent'
-> AccountsAdClientsCustomChannelsList
accountsAdClientsCustomChannelsList pAaccclParent_ =
AccountsAdClientsCustomChannelsList'
{ _aaccclParent = pAaccclParent_
, _aaccclXgafv = Nothing
, _aaccclUploadProtocol = Nothing
, _aacccl... | 478 | accountsAdClientsCustomChannelsList pAaccclParent_ =
AccountsAdClientsCustomChannelsList'
{ _aaccclParent = pAaccclParent_
, _aaccclXgafv = Nothing
, _aaccclUploadProtocol = Nothing
, _aaccclAccessToken = Nothing
, _aaccclUploadType = Nothing
, _aaccclPageToken = Nothing
, _aaccclPageSize ... | 367 | true | true | 0 | 6 | 152 | 88 | 62 | 26 | null | null |
plaprade/haskoin-wallet | Network/Haskoin/Wallet/Transaction.hs | unlicense | isCoinbaseTx :: Tx -> Bool
isCoinbaseTx (Tx _ tin _ _) =
length tin == 1 && outPointHash (prevOutput $ head tin) ==
"0000000000000000000000000000000000000000000000000000000000000000" | 194 | isCoinbaseTx :: Tx -> Bool
isCoinbaseTx (Tx _ tin _ _) =
length tin == 1 && outPointHash (prevOutput $ head tin) ==
"0000000000000000000000000000000000000000000000000000000000000000" | 194 | isCoinbaseTx (Tx _ tin _ _) =
length tin == 1 && outPointHash (prevOutput $ head tin) ==
"0000000000000000000000000000000000000000000000000000000000000000" | 167 | false | true | 0 | 10 | 35 | 58 | 28 | 30 | null | null |
mariefarrell/Hets | Maude/PreComorphism.hs | gpl-2.0 | getLeftApp _ = Nothing | 22 | getLeftApp _ = Nothing | 22 | getLeftApp _ = Nothing | 22 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
mineo/mpch | MPCH/Commands.hs | mit | random :: CommandFunc
random = statusWrapper $ stToggleWrapper MPD.stRandom MPD.random | 86 | random :: CommandFunc
random = statusWrapper $ stToggleWrapper MPD.stRandom MPD.random | 86 | random = statusWrapper $ stToggleWrapper MPD.stRandom MPD.random | 64 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
dsorokin/aivika-lattice | Simulation/Aivika/Lattice/Internal/Ref/Strict.hs | bsd-3-clause | newRef :: a -> Simulation LIO (Ref a)
newRef = Simulation . const . newRef0 | 75 | newRef :: a -> Simulation LIO (Ref a)
newRef = Simulation . const . newRef0 | 75 | newRef = Simulation . const . newRef0 | 37 | false | true | 0 | 8 | 14 | 34 | 17 | 17 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.