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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nevrenato/Hets_Fork | Taxonomy/MMiSSOntologyGraph.hs | gpl-2.0 | getPureClassGraph :: ClassGraph -> ClassGraph
getPureClassGraph g =
let classNodeList = map fst
$ getTypedNodes [OntoClass, OntoPredicate] g
in nfilter (`elem` classNodeList) g | 194 | getPureClassGraph :: ClassGraph -> ClassGraph
getPureClassGraph g =
let classNodeList = map fst
$ getTypedNodes [OntoClass, OntoPredicate] g
in nfilter (`elem` classNodeList) g | 194 | getPureClassGraph g =
let classNodeList = map fst
$ getTypedNodes [OntoClass, OntoPredicate] g
in nfilter (`elem` classNodeList) g | 148 | false | true | 0 | 11 | 40 | 58 | 30 | 28 | null | null |
notae/haskell-exercise | cp/CFPFD1.hs | bsd-3-clause | modifyFDStat :: (FDStat -> FDStat) -> FD s ()
modifyFDStat f = modify $ \s -> s { fdStat = f (fdStat s) } | 105 | modifyFDStat :: (FDStat -> FDStat) -> FD s ()
modifyFDStat f = modify $ \s -> s { fdStat = f (fdStat s) } | 105 | modifyFDStat f = modify $ \s -> s { fdStat = f (fdStat s) } | 59 | false | true | 0 | 11 | 23 | 58 | 30 | 28 | null | null |
junjihashimoto/persistent | persistent/Database/Persist/Sql/Orphan/PersistQuery.hs | mit | updatePersistValue :: Update v -> PersistValue
updatePersistValue (Update _ v _) = toPersistValue v | 99 | updatePersistValue :: Update v -> PersistValue
updatePersistValue (Update _ v _) = toPersistValue v | 99 | updatePersistValue (Update _ v _) = toPersistValue v | 52 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Common/Vector.hs | bsd-3-clause | -- Ascending list; includes the origin.
movesSquare :: [VectorI]
movesSquare = map (fromEnum . uncurry Vector)
[ (-1, -1), (0, -1), (1, -1)
, (-1, 0), (0, 0), (1, 0)
, (-1, 1), (0, 1), (1, 1) ] | 247 | movesSquare :: [VectorI]
movesSquare = map (fromEnum . uncurry Vector)
[ (-1, -1), (0, -1), (1, -1)
, (-1, 0), (0, 0), (1, 0)
, (-1, 1), (0, 1), (1, 1) ] | 207 | movesSquare = map (fromEnum . uncurry Vector)
[ (-1, -1), (0, -1), (1, -1)
, (-1, 0), (0, 0), (1, 0)
, (-1, 1), (0, 1), (1, 1) ] | 182 | true | true | 0 | 7 | 91 | 130 | 77 | 53 | null | null |
conal/shaped-types | src/ShapedTypes/ScanF.hs | bsd-3-clause | lParities :: LScan f => f Bool -> And1 f Bool
lParities = lscanAla Parity | 73 | lParities :: LScan f => f Bool -> And1 f Bool
lParities = lscanAla Parity | 73 | lParities = lscanAla Parity | 27 | false | true | 0 | 8 | 14 | 39 | 16 | 23 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/encodeFloat_1.hs | mit | primFloatEncode :: Integer -> MyInt -> Float;
primFloatEncode x y = srFloat (fromIntegerFloat x) (primFloatEncodePower (Pos (Succ (Succ Zero))) y) | 150 | primFloatEncode :: Integer -> MyInt -> Float
primFloatEncode x y = srFloat (fromIntegerFloat x) (primFloatEncodePower (Pos (Succ (Succ Zero))) y) | 149 | primFloatEncode x y = srFloat (fromIntegerFloat x) (primFloatEncodePower (Pos (Succ (Succ Zero))) y) | 100 | false | true | 0 | 13 | 23 | 62 | 31 | 31 | null | null |
google/codeworld | codeworld-api/src/CodeWorld/Sketches.hs | apache-2.0 | sketchedAirplane :: HasCallStack => Picture
sketchedAirplane =
Sketch
(getDebugSrcLoc callStack)
"sketchedAirplane"
$(embedAsUrl "image/svg+xml" "data/AirplaneTransparency70.svg")
10
10 | 207 | sketchedAirplane :: HasCallStack => Picture
sketchedAirplane =
Sketch
(getDebugSrcLoc callStack)
"sketchedAirplane"
$(embedAsUrl "image/svg+xml" "data/AirplaneTransparency70.svg")
10
10 | 207 | sketchedAirplane =
Sketch
(getDebugSrcLoc callStack)
"sketchedAirplane"
$(embedAsUrl "image/svg+xml" "data/AirplaneTransparency70.svg")
10
10 | 163 | false | true | 0 | 7 | 37 | 46 | 20 | 26 | null | null |
Icelandjack/lens | src/Data/Vector/Generic/Lens.hs | bsd-3-clause | -- | Indexed vector traversal for a generic vector.
vectorTraverse :: (V.Vector v a, V.Vector w b) => IndexedTraversal Int (v a) (w b) a b
vectorTraverse f v = V.fromListN (V.length v) <$> traversed f (V.toList v) | 213 | vectorTraverse :: (V.Vector v a, V.Vector w b) => IndexedTraversal Int (v a) (w b) a b
vectorTraverse f v = V.fromListN (V.length v) <$> traversed f (V.toList v) | 161 | vectorTraverse f v = V.fromListN (V.length v) <$> traversed f (V.toList v) | 74 | true | true | 0 | 9 | 37 | 93 | 46 | 47 | null | null |
phischu/fragnix | builtins/ghc-prim/GHC.PrimopWrappers.hs | bsd-3-clause | writeInt8Array# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
writeInt8Array# a1 a2 a3 a4 = (GHC.Prim.writeInt8Array#) a1 a2 a3 a4 | 147 | writeInt8Array# :: MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
writeInt8Array# a1 a2 a3 a4 = (GHC.Prim.writeInt8Array#) a1 a2 a3 a4 | 147 | writeInt8Array# a1 a2 a3 a4 = (GHC.Prim.writeInt8Array#) a1 a2 a3 a4 | 68 | false | true | 0 | 9 | 24 | 60 | 29 | 31 | null | null |
hferreiro/replay | testsuite/tests/th/TH_tf1.hs | bsd-3-clause | bar :: S Int -> Int
bar c = if c then 1 else 2 | 46 | bar :: S Int -> Int
bar c = if c then 1 else 2 | 46 | bar c = if c then 1 else 2 | 26 | false | true | 0 | 7 | 14 | 35 | 16 | 19 | null | null |
abailly/hsgames | game-server/src/GameServer/Log.hs | apache-2.0 | logEnd :: (ToJSON a, MonadIO m) => Logger -> Text -> UTCTime -> UTCTime -> a -> m ()
logEnd chan logId ts en outcome = liftIO $ writeChan chan $ LBS.toStrict $ encode $
object [ "timestamp" .= en
, "durationMs" .= ((diffUTCTime en ts) * 10... | 502 | logEnd :: (ToJSON a, MonadIO m) => Logger -> Text -> UTCTime -> UTCTime -> a -> m ()
logEnd chan logId ts en outcome = liftIO $ writeChan chan $ LBS.toStrict $ encode $
object [ "timestamp" .= en
, "durationMs" .= ((diffUTCTime en ts) * 10... | 502 | logEnd chan logId ts en outcome = liftIO $ writeChan chan $ LBS.toStrict $ encode $
object [ "timestamp" .= en
, "durationMs" .= ((diffUTCTime en ts) * 1000)
, "servicer" .= logId
... | 417 | false | true | 0 | 12 | 269 | 129 | 66 | 63 | null | null |
google/codeworld | codeworld-requirements/src/CodeWorld/Requirements/Framework.hs | apache-2.0 | formatLocation :: SrcSpanInfo -> String
formatLocation spn@(SrcSpanInfo (SrcSpan fn l1 c1 l2 c2) _)
| spn == noSrcSpan = ""
| l1 /= l2 =
fn ++ ":(" ++ show l1 ++ "," ++ show c1 ++ ")-("
++ show l2
++ ","
++ show (max 1 (c2 - 1))
++ ")"
| c1 < c2 - 1 =
fn ++ ":" ++ show l1 ++ ":" ++... | 421 | formatLocation :: SrcSpanInfo -> String
formatLocation spn@(SrcSpanInfo (SrcSpan fn l1 c1 l2 c2) _)
| spn == noSrcSpan = ""
| l1 /= l2 =
fn ++ ":(" ++ show l1 ++ "," ++ show c1 ++ ")-("
++ show l2
++ ","
++ show (max 1 (c2 - 1))
++ ")"
| c1 < c2 - 1 =
fn ++ ":" ++ show l1 ++ ":" ++... | 421 | formatLocation spn@(SrcSpanInfo (SrcSpan fn l1 c1 l2 c2) _)
| spn == noSrcSpan = ""
| l1 /= l2 =
fn ++ ":(" ++ show l1 ++ "," ++ show c1 ++ ")-("
++ show l2
++ ","
++ show (max 1 (c2 - 1))
++ ")"
| c1 < c2 - 1 =
fn ++ ":" ++ show l1 ++ ":" ++ show c1 ++ "-"
++ show (max 1 (c2... | 381 | false | true | 34 | 9 | 138 | 253 | 111 | 142 | null | null |
synsem/texhs | src/Text/TeX/Lexer/TokenParser/Basic.hs | gpl-3.0 | -- | Skip optional intra-paragraph whitespace.
--
-- However, on encountering a paragraph break,
-- push a Par token back into the stream.
skipSpaceExceptPar :: Monad m => LexerT m ()
skipSpaceExceptPar = optional (anyWhite >>= injectParTok)
where
injectParTok xs@(w:_) = when (w == parTok) (prependTokens xs)
... | 418 | skipSpaceExceptPar :: Monad m => LexerT m ()
skipSpaceExceptPar = optional (anyWhite >>= injectParTok)
where
injectParTok xs@(w:_) = when (w == parTok) (prependTokens xs)
injectParTok _ = return ()
-------------------- Unit parsers
-- | Parse an optional equals sign. | 279 | skipSpaceExceptPar = optional (anyWhite >>= injectParTok)
where
injectParTok xs@(w:_) = when (w == parTok) (prependTokens xs)
injectParTok _ = return ()
-------------------- Unit parsers
-- | Parse an optional equals sign. | 234 | true | true | 1 | 8 | 73 | 104 | 50 | 54 | null | null |
ganeti/ganeti | src/Ganeti/OpCodes.hs | bsd-2-clause | -- | Sets the priority on a meta opcode.
setOpPriority :: OpSubmitPriority -> MetaOpCode -> MetaOpCode
setOpPriority prio (MetaOpCode common op) =
MetaOpCode (common { opPriority = prio }) op | 193 | setOpPriority :: OpSubmitPriority -> MetaOpCode -> MetaOpCode
setOpPriority prio (MetaOpCode common op) =
MetaOpCode (common { opPriority = prio }) op | 152 | setOpPriority prio (MetaOpCode common op) =
MetaOpCode (common { opPriority = prio }) op | 90 | true | true | 0 | 8 | 31 | 49 | 26 | 23 | null | null |
simonmichael/hledger | hledger-lib/Hledger/Data/Balancing.hs | gpl-3.0 | -- | Infer any missing amounts (to satisfy balance assignments and
-- to balance transactions) and check that all transactions balance
-- and (optional) all balance assertions pass. Or return an error message
-- (just the first error encountered).
--
-- Assumes journalInferCommodityStyles has been called, since those
-... | 3,531 | journalBalanceTransactions :: BalancingOpts -> Journal -> Either String Journal
journalBalanceTransactions bopts' j' =
let
-- ensure transactions are numbered, so we can store them by number
j@Journal{jtxns=ts} = journalNumberTransactions j'
-- display precisions used in balanced checking
styles = Jus... | 3,032 | journalBalanceTransactions bopts' j' =
let
-- ensure transactions are numbered, so we can store them by number
j@Journal{jtxns=ts} = journalNumberTransactions j'
-- display precisions used in balanced checking
styles = Just $ journalCommodityStyles j
bopts = bopts'{commodity_styles_=styles}
--... | 2,952 | true | true | 0 | 27 | 754 | 438 | 222 | 216 | null | null |
phischu/fragnix | tests/packages/scotty/Data.Aeson.TH.hs | bsd-3-clause | argsToValue jc tjs opts multiCons (ForallC _ _ con) =
argsToValue jc tjs opts multiCons con | 95 | argsToValue jc tjs opts multiCons (ForallC _ _ con) =
argsToValue jc tjs opts multiCons con | 95 | argsToValue jc tjs opts multiCons (ForallC _ _ con) =
argsToValue jc tjs opts multiCons con | 95 | false | false | 0 | 7 | 19 | 44 | 18 | 26 | null | null |
keera-studios/hsQt | Qtc/Gui/QTextFrame.hs | bsd-2-clause | qTextFrame_deleteLater :: QTextFrame a -> IO ()
qTextFrame_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextFrame_deleteLater cobj_x0 | 147 | qTextFrame_deleteLater :: QTextFrame a -> IO ()
qTextFrame_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextFrame_deleteLater cobj_x0 | 147 | qTextFrame_deleteLater x0
= withObjectPtr x0 $ \cobj_x0 ->
qtc_QTextFrame_deleteLater cobj_x0 | 99 | false | true | 0 | 7 | 22 | 41 | 19 | 22 | null | null |
ehlemur/HLearn | src/HLearn/Models/Distributions/Univariate/Binomial.hs | bsd-3-clause | bin_n :: Binomial Double Int -> Int
bin_n (Binomial dist) = round $ ((fromIntegral $ m1 dist :: Double) / (fromIntegral $ m0 dist)) / (bin_p $ Binomial dist) | 157 | bin_n :: Binomial Double Int -> Int
bin_n (Binomial dist) = round $ ((fromIntegral $ m1 dist :: Double) / (fromIntegral $ m0 dist)) / (bin_p $ Binomial dist) | 157 | bin_n (Binomial dist) = round $ ((fromIntegral $ m1 dist :: Double) / (fromIntegral $ m0 dist)) / (bin_p $ Binomial dist) | 121 | false | true | 0 | 11 | 28 | 77 | 39 | 38 | null | null |
fmapfmapfmap/amazonka | amazonka-ds/gen/Network/AWS/DirectoryService/ConnectDirectory.hs | mpl-2.0 | -- | Creates a value of 'ConnectDirectory' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cdShortName'
--
-- * 'cdDescription'
--
-- * 'cdName'
--
-- * 'cdPassword'
--
-- * 'cdSize'
--
-- * 'cdConnectSettings'
connectDirectory
::... | 770 | connectDirectory
:: Text -- ^ 'cdName'
-> Text -- ^ 'cdPassword'
-> DirectorySize -- ^ 'cdSize'
-> DirectoryConnectSettings -- ^ 'cdConnectSettings'
-> ConnectDirectory
connectDirectory pName_ pPassword_ pSize_ pConnectSettings_ =
ConnectDirectory'
{ _cdShortName = Nothing
, _cdDescripti... | 473 | connectDirectory pName_ pPassword_ pSize_ pConnectSettings_ =
ConnectDirectory'
{ _cdShortName = Nothing
, _cdDescription = Nothing
, _cdName = pName_
, _cdPassword = _Sensitive # pPassword_
, _cdSize = pSize_
, _cdConnectSettings = pConnectSettings_
} | 284 | true | true | 0 | 8 | 162 | 97 | 64 | 33 | null | null |
gridaphobe/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | bindNonRec :: Id -> CoreExpr -> CoreExpr -> CoreExpr
-- ^ @bindNonRec x r b@ produces either:
--
-- > let x = r in b
--
-- or:
--
-- > case r of x { _DEFAULT_ -> b }
--
-- depending on whether we have to use a @case@ or @let@
-- binding for the expression (see 'needsCaseBinding').
-- It's used by the desugarer to avoid... | 662 | bindNonRec :: Id -> CoreExpr -> CoreExpr -> CoreExpr
bindNonRec bndr rhs body
| needsCaseBinding (idType bndr) rhs = Case rhs bndr (exprType body) [(DEFAULT, [], body)]
| otherwise = Let (NonRec bndr rhs) body | 238 | bindNonRec bndr rhs body
| needsCaseBinding (idType bndr) rhs = Case rhs bndr (exprType body) [(DEFAULT, [], body)]
| otherwise = Let (NonRec bndr rhs) body | 185 | true | true | 1 | 10 | 147 | 110 | 62 | 48 | null | null |
airobert/yices_haskell | Math/SMT/Yices/Syntax.hs | bsd-3-clause | showBinding ((x,Nothing),e) = paren $ showString x . space . showsPrec 0 e | 74 | showBinding ((x,Nothing),e) = paren $ showString x . space . showsPrec 0 e | 74 | showBinding ((x,Nothing),e) = paren $ showString x . space . showsPrec 0 e | 74 | false | false | 0 | 8 | 12 | 41 | 21 | 20 | null | null |
aufheben/lambda-arduino | packages/hArduino-0.9/System/Hardware/Arduino/Parts/LCD.hs | mit | updateDisplayControl :: String -> (Word8 -> Word8) -> LCD -> Arduino ()
updateDisplayControl what f = updateDisplayData what (f, id) | 132 | updateDisplayControl :: String -> (Word8 -> Word8) -> LCD -> Arduino ()
updateDisplayControl what f = updateDisplayData what (f, id) | 132 | updateDisplayControl what f = updateDisplayData what (f, id) | 60 | false | true | 0 | 10 | 19 | 55 | 27 | 28 | null | null |
olive/antiqua-prime | src/Antiqua/Graphics/Colors.hs | mit | brown :: Color
brown = rgb 150 75 0 | 35 | brown :: Color
brown = rgb 150 75 0 | 35 | brown = rgb 150 75 0 | 20 | false | true | 0 | 6 | 8 | 27 | 10 | 17 | null | null |
hpacheco/HAAP | examples/xterm/Haskassonne.hs | mit | fechado b p Knight = let Just t = findTile b p
in all (exists b) $ concat $ map (flip adjacentes Knight) $ connected b t Knight | 149 | fechado b p Knight = let Just t = findTile b p
in all (exists b) $ concat $ map (flip adjacentes Knight) $ connected b t Knight | 149 | fechado b p Knight = let Just t = findTile b p
in all (exists b) $ concat $ map (flip adjacentes Knight) $ connected b t Knight | 149 | false | false | 0 | 12 | 49 | 72 | 32 | 40 | null | null |
termite2/tsl | CodeGen/AbsSim.hs | bsd-3-clause | ----------------------------------------------------------
-- Interface
----------------------------------------------------------
-- Generate condition that holds whenever the magic block specified by
-- mbpos is active.
mbToStateConstraint :: (RM s u t) => Spec -> C.DDManager s u -> DB s u AbsVar AbsVar -> Pos -> t... | 849 | mbToStateConstraint :: (RM s u t) => Spec -> C.DDManager s u -> DB s u AbsVar AbsVar -> Pos -> t (ST s) (DDNode s u)
mbToStateConstraint spec m pdb mbpos = do
let Ops{..} = constructOps m
let ?spec = spec
?m = m
?db = pdb
let mblocs = specLookupMB spec mbpos
compileExpr $ I.conj [mk... | 625 | mbToStateConstraint spec m pdb mbpos = do
let Ops{..} = constructOps m
let ?spec = spec
?m = m
?db = pdb
let mblocs = specLookupMB spec mbpos
compileExpr $ I.conj [mkMagicVar, I.disj $ map (\(pid, mbloc, _) -> let cfa = specGetCFA spec (EPIDProc pid)
... | 508 | true | true | 0 | 21 | 277 | 230 | 114 | 116 | null | null |
jschaf/hudson-dev | src/Language/Hudson/Scanner.hs | bsd-3-clause | newlinetok = mkToken newline (return NewlineTok) | 48 | newlinetok = mkToken newline (return NewlineTok) | 48 | newlinetok = mkToken newline (return NewlineTok) | 48 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
ethercrow/yi-config | modules/FuzzyFile.hs | gpl-2.0 | ufferItem :: BufferId -> FuzzyItem
bufferItem bufId = FuzzyItem
{ fiAction = withEditor $ do
bufs <- gets (M.assocs . buffers)
case filter ((== bufId) . ident . attributes . snd) bufs of
[] -> error ("Couldn't find buffer" <> show bufId)
(bufRef, _) : _ -> switchToBufferE buf... | 439 | bufferItem :: BufferId -> FuzzyItem
bufferItem bufId = FuzzyItem
{ fiAction = withEditor $ do
bufs <- gets (M.assocs . buffers)
case filter ((== bufId) . ident . attributes . snd) bufs of
[] -> error ("Couldn't find buffer" <> show bufId)
(bufRef, _) : _ -> switchToBufferE bu... | 439 | bufferItem bufId = FuzzyItem
{ fiAction = withEditor $ do
bufs <- gets (M.assocs . buffers)
case filter ((== bufId) . ident . attributes . snd) bufs of
[] -> error ("Couldn't find buffer" <> show bufId)
(bufRef, _) : _ -> switchToBufferE bufRef
, fiToText = T.pack "Buffer... | 403 | false | true | 6 | 14 | 137 | 158 | 80 | 78 | null | null |
kmcallister/concorde | Algorithms/Concorde/LinKern.hs | bsd-3-clause | tsp
:: Config -- ^ Configuration.
-> (a -> R2) -- ^ Gives the rectangular coordinates of each point; see below.
-> [a] -- ^ List of points to visit.
-> IO [a] -- ^ Produces points permuted in tour order.
tsp cfg getCoord xs =
-- Log to a temp file if not verbose.
-- On Unix we co... | 2,468 | tsp
:: Config -- ^ Configuration.
-> (a -> R2) -- ^ Gives the rectangular coordinates of each point; see below.
-> [a] -- ^ List of points to visit.
-> IO [a]
tsp cfg getCoord xs =
-- Log to a temp file if not verbose.
-- On Unix we could open /dev/null, but this is not portable.
... | 2,419 | tsp cfg getCoord xs =
-- Log to a temp file if not verbose.
-- On Unix we could open /dev/null, but this is not portable.
withSystemTempFile "log" $ \_ logHdl ->
withSystemTempFile "coords" $ \coordsPath coordsHdl ->
withSystemTempFile "tour" $ \tourPath tourHdl -> do
-... | 2,232 | true | true | 0 | 22 | 938 | 637 | 319 | 318 | null | null |
brendanhay/gogol | gogol-dlp/gen/Network/Google/DLP/Types/Product.hs | mpl-2.0 | -- | Required. The relative frequency column must contain a floating-point
-- number between 0 and 1 (inclusive). Null values are assumed to be zero.
gpdvatRelativeFrequency :: Lens' GooglePrivacyDlpV2AuxiliaryTable (Maybe GooglePrivacyDlpV2FieldId)
gpdvatRelativeFrequency
= lens _gpdvatRelativeFrequency
(\ s a... | 356 | gpdvatRelativeFrequency :: Lens' GooglePrivacyDlpV2AuxiliaryTable (Maybe GooglePrivacyDlpV2FieldId)
gpdvatRelativeFrequency
= lens _gpdvatRelativeFrequency
(\ s a -> s{_gpdvatRelativeFrequency = a}) | 206 | gpdvatRelativeFrequency
= lens _gpdvatRelativeFrequency
(\ s a -> s{_gpdvatRelativeFrequency = a}) | 106 | true | true | 0 | 9 | 49 | 49 | 26 | 23 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F19.hs | bsd-3-clause | -- glNormalFormatNV ------------------------------------------------------------
glNormalFormatNV
:: MonadIO m
=> GLenum -- ^ @type@.
-> GLsizei -- ^ @stride@.
-> m ()
glNormalFormatNV v1 v2 = liftIO $ dyn247 ptr_glNormalFormatNV v1 v2 | 244 | glNormalFormatNV
:: MonadIO m
=> GLenum -- ^ @type@.
-> GLsizei -- ^ @stride@.
-> m ()
glNormalFormatNV v1 v2 = liftIO $ dyn247 ptr_glNormalFormatNV v1 v2 | 162 | glNormalFormatNV v1 v2 = liftIO $ dyn247 ptr_glNormalFormatNV v1 v2 | 67 | true | true | 0 | 10 | 38 | 54 | 26 | 28 | null | null |
mihaimaruseac/hirst-v00 | src/Main.hs | mit | main = mainH | 12 | main = mainH | 12 | main = mainH | 12 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
nightscape/platform | shared/src/Unison/Symbol.hs | mit | symbol :: View op => Text -> Symbol op
symbol n = Symbol 0 n View.prefix | 72 | symbol :: View op => Text -> Symbol op
symbol n = Symbol 0 n View.prefix | 72 | symbol n = Symbol 0 n View.prefix | 33 | false | true | 0 | 7 | 15 | 37 | 17 | 20 | null | null |
jthornber/xdrgen | Data/XDR/PrettyPrintJava.hs | gpl-3.0 | declToPair :: Decl -> Maybe DeclPair
declToPair (Decl n di) = Just $ DeclPair n di | 82 | declToPair :: Decl -> Maybe DeclPair
declToPair (Decl n di) = Just $ DeclPair n di | 82 | declToPair (Decl n di) = Just $ DeclPair n di | 45 | false | true | 0 | 7 | 15 | 38 | 18 | 20 | null | null |
teleshoes/taffybar | src/System/Taffybar/Widget/XDGMenu/MenuWidget.hs | bsd-3-clause | menuWidgetNew
:: MonadIO m
=> Maybe String -- ^ menu name, must end with a dash, e.g. "mate-" or "gnome-"
-> m GI.Gtk.Widget
menuWidgetNew mMenuPrefix = liftIO $ do
mb <- menuBarNew
m <- buildMenu mMenuPrefix
addMenu mb m
widgetShowAll mb
toWidget mb | 266 | menuWidgetNew
:: MonadIO m
=> Maybe String -- ^ menu name, must end with a dash, e.g. "mate-" or "gnome-"
-> m GI.Gtk.Widget
menuWidgetNew mMenuPrefix = liftIO $ do
mb <- menuBarNew
m <- buildMenu mMenuPrefix
addMenu mb m
widgetShowAll mb
toWidget mb | 266 | menuWidgetNew mMenuPrefix = liftIO $ do
mb <- menuBarNew
m <- buildMenu mMenuPrefix
addMenu mb m
widgetShowAll mb
toWidget mb | 135 | false | true | 0 | 10 | 58 | 81 | 34 | 47 | null | null |
Heather/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | tldeclared (PImplementation _ _ _ _ _ _ _ _ _ _ _ _ _ mn _)
= case mn of
Nothing -> []
Just n -> [n] | 126 | tldeclared (PImplementation _ _ _ _ _ _ _ _ _ _ _ _ _ mn _)
= case mn of
Nothing -> []
Just n -> [n] | 126 | tldeclared (PImplementation _ _ _ _ _ _ _ _ _ _ _ _ _ mn _)
= case mn of
Nothing -> []
Just n -> [n] | 126 | false | false | 0 | 8 | 53 | 67 | 33 | 34 | null | null |
dmpots/fibon | tools/fibon-init/Main.hs | bsd-3-clause | getName :: PackageDescription -> String
getName pkg = upCase $ toS $ (packageName . package) pkg
where
toS (PackageName p) = p | 131 | getName :: PackageDescription -> String
getName pkg = upCase $ toS $ (packageName . package) pkg
where
toS (PackageName p) = p | 131 | getName pkg = upCase $ toS $ (packageName . package) pkg
where
toS (PackageName p) = p | 91 | false | true | 0 | 8 | 26 | 53 | 26 | 27 | null | null |
rueshyna/gogol | gogol-adexchange-buyer/gen/Network/Google/AdExchangeBuyer/Types/Product.hs | mpl-2.0 | -- | List of deals added (in the same proposal as passed in the request)
aodrDeals :: Lens' AddOrderDealsResponse [MarketplaceDeal]
aodrDeals
= lens _aodrDeals (\ s a -> s{_aodrDeals = a}) .
_Default
. _Coerce | 223 | aodrDeals :: Lens' AddOrderDealsResponse [MarketplaceDeal]
aodrDeals
= lens _aodrDeals (\ s a -> s{_aodrDeals = a}) .
_Default
. _Coerce | 150 | aodrDeals
= lens _aodrDeals (\ s a -> s{_aodrDeals = a}) .
_Default
. _Coerce | 91 | true | true | 2 | 10 | 48 | 57 | 28 | 29 | null | null |
josefs/sbv | Data/SBV/Examples/Polynomials/Polynomials.hs | bsd-3-clause | testGF28 :: IO ()
testGF28 = do
print =<< prove multUnit
print =<< prove multComm
-- print =<< prove multAssoc -- takes too long; see above note..
print =<< prove polyDivMod | 181 | testGF28 :: IO ()
testGF28 = do
print =<< prove multUnit
print =<< prove multComm
-- print =<< prove multAssoc -- takes too long; see above note..
print =<< prove polyDivMod | 181 | testGF28 = do
print =<< prove multUnit
print =<< prove multComm
-- print =<< prove multAssoc -- takes too long; see above note..
print =<< prove polyDivMod | 163 | false | true | 0 | 8 | 38 | 47 | 21 | 26 | null | null |
Helkafen/cabal | cabal-install/Distribution/Client/Dependency/TopDown.hs | bsd-3-clause | addPackageSelectConstraint :: PackageId -> Constraints
-> Satisfiable Constraints
[PackageId] ExclusionReason
addPackageSelectConstraint pkgid =
Constraints.constrain pkgname constraint reason
where
pkgname = packageName pkgid
constraint ... | 398 | addPackageSelectConstraint :: PackageId -> Constraints
-> Satisfiable Constraints
[PackageId] ExclusionReason
addPackageSelectConstraint pkgid =
Constraints.constrain pkgname constraint reason
where
pkgname = packageName pkgid
constraint ... | 398 | addPackageSelectConstraint pkgid =
Constraints.constrain pkgname constraint reason
where
pkgname = packageName pkgid
constraint ver _ = ver == packageVersion pkgid
reason = SelectedOther pkgid | 229 | false | true | 1 | 9 | 129 | 82 | 38 | 44 | null | null |
brendanhay/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/InAppProducts/List.hs | mpl-2.0 | -- | The index of the first element to return.
iaplStartIndex :: Lens' InAppProductsList (Maybe Word32)
iaplStartIndex
= lens _iaplStartIndex
(\ s a -> s{_iaplStartIndex = a})
. mapping _Coerce | 207 | iaplStartIndex :: Lens' InAppProductsList (Maybe Word32)
iaplStartIndex
= lens _iaplStartIndex
(\ s a -> s{_iaplStartIndex = a})
. mapping _Coerce | 160 | iaplStartIndex
= lens _iaplStartIndex
(\ s a -> s{_iaplStartIndex = a})
. mapping _Coerce | 103 | true | true | 0 | 10 | 43 | 55 | 28 | 27 | null | null |
evanrinehart/lowgl | Graphics/GL/Low/Stencil.hs | bsd-2-clause | disableStencil :: IO ()
disableStencil = glDisable GL_STENCIL_TEST | 66 | disableStencil :: IO ()
disableStencil = glDisable GL_STENCIL_TEST | 66 | disableStencil = glDisable GL_STENCIL_TEST | 42 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
tsiliakis/xmobar | src/Plugins/Utils.hs | bsd-3-clause | expandHome p = return p | 36 | expandHome p = return p | 36 | expandHome p = return p | 36 | false | false | 0 | 5 | 17 | 12 | 5 | 7 | null | null |
csabahruska/quake3 | game-engine/GameEngine/Data/Material.hs | bsd-3-clause | defaultCommonAttrs :: CommonAttrs
defaultCommonAttrs = CommonAttrs
{ caSkyParms = ()
, caFogParms = ()
, caPortal = False
, caSort = 0
, caEntityMergable = False
, caFogOnly = False
, caCull = CT_FrontSided
, caDeformVertexes = []
... | 448 | defaultCommonAttrs :: CommonAttrs
defaultCommonAttrs = CommonAttrs
{ caSkyParms = ()
, caFogParms = ()
, caPortal = False
, caSort = 0
, caEntityMergable = False
, caFogOnly = False
, caCull = CT_FrontSided
, caDeformVertexes = []
... | 448 | defaultCommonAttrs = CommonAttrs
{ caSkyParms = ()
, caFogParms = ()
, caPortal = False
, caSort = 0
, caEntityMergable = False
, caFogOnly = False
, caCull = CT_FrontSided
, caDeformVertexes = []
, caNoMipMaps = False
... | 414 | false | true | 0 | 8 | 188 | 97 | 60 | 37 | null | null |
shadwstalkr/fox_and_geese | Game.hs | gpl-3.0 | initBoard = Map.fromList . concat $
[zip (filter (\(x, y) -> y < 4) validPositions) (repeat Goose),
zip (zip [0, 1, 5, 6] (repeat 4)) (repeat Goose),
[((2, 5), Fox), ((4, 5), Fox)]] | 219 | initBoard = Map.fromList . concat $
[zip (filter (\(x, y) -> y < 4) validPositions) (repeat Goose),
zip (zip [0, 1, 5, 6] (repeat 4)) (repeat Goose),
[((2, 5), Fox), ((4, 5), Fox)]] | 219 | initBoard = Map.fromList . concat $
[zip (filter (\(x, y) -> y < 4) validPositions) (repeat Goose),
zip (zip [0, 1, 5, 6] (repeat 4)) (repeat Goose),
[((2, 5), Fox), ((4, 5), Fox)]] | 219 | false | false | 0 | 12 | 70 | 129 | 74 | 55 | null | null |
charleso/intellij-haskforce | tests/gold/parser/InternalLexer.hs | apache-2.0 | lexWhiteSpace_ :: Bool -> Lex a ()
lexWhiteSpace_ bol = do _ <- lexWhiteSpace bol
return () | 117 | lexWhiteSpace_ :: Bool -> Lex a ()
lexWhiteSpace_ bol = do _ <- lexWhiteSpace bol
return () | 117 | lexWhiteSpace_ bol = do _ <- lexWhiteSpace bol
return () | 82 | false | true | 0 | 8 | 42 | 43 | 19 | 24 | null | null |
reuk/rayverb | flattener/Flattener.hs | gpl-2.0 | spk :: [Speaker]
spk = [Speaker (Vec3 0 1 0) 0.5, Speaker (Vec3 1 0 0) 0.5] | 75 | spk :: [Speaker]
spk = [Speaker (Vec3 0 1 0) 0.5, Speaker (Vec3 1 0 0) 0.5] | 75 | spk = [Speaker (Vec3 0 1 0) 0.5, Speaker (Vec3 1 0 0) 0.5] | 58 | false | true | 0 | 8 | 16 | 50 | 26 | 24 | null | null |
uuhan/Idris-dev | src/Idris/CaseSplit.hs | bsd-3-clause | mergePat' ist x y t = return y | 30 | mergePat' ist x y t = return y | 30 | mergePat' ist x y t = return y | 30 | false | false | 1 | 5 | 7 | 24 | 8 | 16 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs | lgpl-2.1 | rulelt = getRulesetRule ruleXsdIntegerLt xsdIntRules | 64 | rulelt = getRulesetRule ruleXsdIntegerLt xsdIntRules | 64 | rulelt = getRulesetRule ruleXsdIntegerLt xsdIntRules | 64 | false | false | 0 | 5 | 16 | 11 | 5 | 6 | null | null |
joshuaunderwood7/sayNumber | Saynumber.hs | gpl-3.0 | say 5 = "five" | 14 | say 5 = "five" | 14 | say 5 = "five" | 14 | false | false | 0 | 4 | 3 | 10 | 4 | 6 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | tileWidth SpecialCrashedNoradII = 3 | 35 | tileWidth SpecialCrashedNoradII = 3 | 35 | tileWidth SpecialCrashedNoradII = 3 | 35 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
revnull/crashboard | src/App.hs | gpl-2.0 | newPostSplice :: Splice (Handler App App)
newPostSplice = do
user <- lift $ getUser
runChildrenWithText $ do
"user" ## user | 139 | newPostSplice :: Splice (Handler App App)
newPostSplice = do
user <- lift $ getUser
runChildrenWithText $ do
"user" ## user | 139 | newPostSplice = do
user <- lift $ getUser
runChildrenWithText $ do
"user" ## user | 97 | false | true | 2 | 11 | 35 | 54 | 22 | 32 | null | null |
a143753/AOJ | 0087.hs | apache-2.0 | ans s [] = head s | 17 | ans s [] = head s | 17 | ans s [] = head s | 17 | false | false | 1 | 5 | 5 | 21 | 7 | 14 | null | null |
agentm/project-m36 | examples/blog.hs | unlicense | handleError :: Show e => Either e a -> IO a
handleError eErr = case eErr of
Left err -> print err >> error "Died due to errors."
Right v -> pure v | 154 | handleError :: Show e => Either e a -> IO a
handleError eErr = case eErr of
Left err -> print err >> error "Died due to errors."
Right v -> pure v | 154 | handleError eErr = case eErr of
Left err -> print err >> error "Died due to errors."
Right v -> pure v | 110 | false | true | 0 | 9 | 40 | 72 | 31 | 41 | null | null |
adinapoli/Shelly.hs | src/Shelly.hs | bsd-3-clause | -- | add the filepath onto the PATH env variable
appendToPath :: FilePath -> Sh ()
appendToPath = traceAbsPath ("appendToPath: " <>) >=> \filepath -> do
tp <- toTextWarn filepath
pe <- get_env_text path_env
setPath $ pe <> T.singleton searchPathSeparator <> tp | 266 | appendToPath :: FilePath -> Sh ()
appendToPath = traceAbsPath ("appendToPath: " <>) >=> \filepath -> do
tp <- toTextWarn filepath
pe <- get_env_text path_env
setPath $ pe <> T.singleton searchPathSeparator <> tp | 217 | appendToPath = traceAbsPath ("appendToPath: " <>) >=> \filepath -> do
tp <- toTextWarn filepath
pe <- get_env_text path_env
setPath $ pe <> T.singleton searchPathSeparator <> tp | 183 | true | true | 0 | 12 | 47 | 77 | 37 | 40 | null | null |
emptylambda/BLT | src/Boogie/Parser.hs | gpl-3.0 | parens = P.parens lexer | 23 | parens = P.parens lexer | 23 | parens = P.parens lexer | 23 | false | false | 1 | 5 | 3 | 15 | 5 | 10 | null | null |
romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateAssumeRolePolicy.hs | mpl-2.0 | -- | The policy that grants an entity permission to assume the role.
uarpPolicyDocument :: Lens' UpdateAssumeRolePolicy Text
uarpPolicyDocument =
lens _uarpPolicyDocument (\s a -> s { _uarpPolicyDocument = a }) | 214 | uarpPolicyDocument :: Lens' UpdateAssumeRolePolicy Text
uarpPolicyDocument =
lens _uarpPolicyDocument (\s a -> s { _uarpPolicyDocument = a }) | 145 | uarpPolicyDocument =
lens _uarpPolicyDocument (\s a -> s { _uarpPolicyDocument = a }) | 89 | true | true | 1 | 9 | 34 | 46 | 22 | 24 | null | null |
ony/Yampa-core | tests/AFRPTestsFirstSecond.hs | bsd-3-clause | first_tr = and first_trs | 24 | first_tr = and first_trs | 24 | first_tr = and first_trs | 24 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Assoc/PatriciaLoMap.hs | mit | unionSeqWith :: S.Sequence seq => (a -> a -> a) -> seq (FM a) -> FM a
unionSeqWith = unionSeqWithUsingReduce | 108 | unionSeqWith :: S.Sequence seq => (a -> a -> a) -> seq (FM a) -> FM a
unionSeqWith = unionSeqWithUsingReduce | 108 | unionSeqWith = unionSeqWithUsingReduce | 38 | false | true | 0 | 10 | 19 | 51 | 25 | 26 | null | null |
dagit/helisp | src/Parser.hs | bsd-3-clause | run :: Show a => Parser a -> String -> IO ()
run p input
= case (parse p "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x | 244 | run :: Show a => Parser a -> String -> IO ()
run p input
= case (parse p "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x | 244 | run p input
= case (parse p "" input) of
Left err -> do{ putStr "parse error at "
; print err
}
Right x -> print x | 199 | false | true | 0 | 10 | 124 | 89 | 41 | 48 | null | null |
bobjflong/hspec-slow | src/Test/Hspec/Slow.hs | bsd-3-clause | configure :: Int -> IO SlowConfiguration
configure x =
newTVarIO [] >>= \t ->
return (SlowConfiguration x t) | 114 | configure :: Int -> IO SlowConfiguration
configure x =
newTVarIO [] >>= \t ->
return (SlowConfiguration x t) | 114 | configure x =
newTVarIO [] >>= \t ->
return (SlowConfiguration x t) | 73 | false | true | 0 | 9 | 23 | 46 | 22 | 24 | null | null |
zachsully/hakaru | haskell/Language/Hakaru/Pretty/Maple.hs | bsd-3-clause | intercalate :: F.Foldable f => ShowS -> f ShowS -> ShowS
intercalate sep = F.foldr1 (\a b -> a . sep . b) | 105 | intercalate :: F.Foldable f => ShowS -> f ShowS -> ShowS
intercalate sep = F.foldr1 (\a b -> a . sep . b) | 105 | intercalate sep = F.foldr1 (\a b -> a . sep . b) | 48 | false | true | 0 | 9 | 22 | 57 | 28 | 29 | null | null |
olsner/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | isTypeArg _ = False | 27 | isTypeArg _ = False | 27 | isTypeArg _ = False | 27 | false | false | 0 | 5 | 11 | 9 | 4 | 5 | null | null |
headprogrammingczar/cabal | Cabal/Distribution/PackageDescription/Configuration.hs | bsd-3-clause | transformAllCondTrees :: (Library -> Library)
-> (Executable -> Executable)
-> (TestSuite -> TestSuite)
-> (Benchmark -> Benchmark)
-> ([Dependency] -> [Dependency])
-> GenericPackageDescription -> GenericPacka... | 1,255 | transformAllCondTrees :: (Library -> Library)
-> (Executable -> Executable)
-> (TestSuite -> TestSuite)
-> (Benchmark -> Benchmark)
-> ([Dependency] -> [Dependency])
-> GenericPackageDescription -> GenericPacka... | 1,255 | transformAllCondTrees onLibrary onExecutable
onTestSuite onBenchmark onDepends gpd = gpd'
where
gpd' = gpd {
condLibraries = condLibs',
condExecutables = condExes',
condTestSuites = condTests',
condBenchmarks = condBenchs'
}
condLibs = condLibraries g... | 921 | false | true | 7 | 12 | 402 | 362 | 178 | 184 | null | null |
yesodweb/persistent | persistent-test/src/MaybeFieldDefsTest.hs | mit | specsWith :: (Runner backend m) => RunDb backend m -> Spec
specsWith runDb = describe "Maybe Field Definitions" $ do
it "runs appropriate migrations" $ runDb $ do
emptyEntity <- insert $ MaybeFieldDefEntity Nothing Nothing
emptyResult <- get emptyEntity
liftIO $ emptyResult @?= Just (MaybeFieldDefEntity N... | 536 | specsWith :: (Runner backend m) => RunDb backend m -> Spec
specsWith runDb = describe "Maybe Field Definitions" $ do
it "runs appropriate migrations" $ runDb $ do
emptyEntity <- insert $ MaybeFieldDefEntity Nothing Nothing
emptyResult <- get emptyEntity
liftIO $ emptyResult @?= Just (MaybeFieldDefEntity N... | 536 | specsWith runDb = describe "Maybe Field Definitions" $ do
it "runs appropriate migrations" $ runDb $ do
emptyEntity <- insert $ MaybeFieldDefEntity Nothing Nothing
emptyResult <- get emptyEntity
liftIO $ emptyResult @?= Just (MaybeFieldDefEntity Nothing Nothing)
populatedEntity <- insert $ MaybeFieldD... | 477 | false | true | 0 | 16 | 95 | 175 | 80 | 95 | null | null |
jeremyevans/hs-SubsetSum | SubsetSum.hs | mit | -- Split a single list int a tuple of two lists of roughly equal length.
splitList :: [a] -> ([a], [a])
splitList xs = (everyOther xs, everyOther (tail xs)) | 156 | splitList :: [a] -> ([a], [a])
splitList xs = (everyOther xs, everyOther (tail xs)) | 83 | splitList xs = (everyOther xs, everyOther (tail xs)) | 52 | true | true | 0 | 9 | 28 | 58 | 30 | 28 | null | null |
sinelaw/fresh | test/Spec.hs | gpl-2.0 | prop_selfEquivalenceNormalized :: Type -> Bool
prop_selfEquivalenceNormalized t = isRight $ equivalent t (Types.normalize t) | 124 | prop_selfEquivalenceNormalized :: Type -> Bool
prop_selfEquivalenceNormalized t = isRight $ equivalent t (Types.normalize t) | 124 | prop_selfEquivalenceNormalized t = isRight $ equivalent t (Types.normalize t) | 77 | false | true | 0 | 9 | 13 | 38 | 18 | 20 | null | null |
meiersi-11ce/stack | src/Stack/Options.hs | bsd-3-clause | abstractResolverOptsParser :: Parser AbstractResolver
abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 224 | abstractResolverOptsParser :: Parser AbstractResolver
abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 224 | abstractResolverOptsParser =
option readAbstractResolver
(long "resolver" <>
metavar "RESOLVER" <>
help "Override resolver in project file") | 170 | false | true | 0 | 9 | 49 | 39 | 18 | 21 | null | null |
JohnLato/iteratee | tests/testIteratee.hs | bsd-3-clause | prop_mapChunksMPT f i =
mk_prop_pt_id (mapChunksM (return . f)) (mapChunksMPT (return . f))
where types = (i :: Itee)
-- would like to test with arbitrary iteratees, but we need to guarantee
-- that they will return a value from the stream, which isn't always true
-- for the arbitrary instance.
-- could use a newty... | 341 | prop_mapChunksMPT f i =
mk_prop_pt_id (mapChunksM (return . f)) (mapChunksMPT (return . f))
where types = (i :: Itee)
-- would like to test with arbitrary iteratees, but we need to guarantee
-- that they will return a value from the stream, which isn't always true
-- for the arbitrary instance.
-- could use a newty... | 341 | prop_mapChunksMPT f i =
mk_prop_pt_id (mapChunksM (return . f)) (mapChunksMPT (return . f))
where types = (i :: Itee)
-- would like to test with arbitrary iteratees, but we need to guarantee
-- that they will return a value from the stream, which isn't always true
-- for the arbitrary instance.
-- could use a newty... | 341 | false | false | 0 | 9 | 63 | 60 | 33 | 27 | null | null |
codemiller/wubble | src/Client/Css.hs | apache-2.0 | gametext :: Css
gametext = "#gametext" ? do
fontSize (px 26)
textAlign (alignSide sideCenter)
fontWeight bold
paddingTop (px 40)
paddingBottom (px 40)
background $ rgb 86 208 255 | 203 | gametext :: Css
gametext = "#gametext" ? do
fontSize (px 26)
textAlign (alignSide sideCenter)
fontWeight bold
paddingTop (px 40)
paddingBottom (px 40)
background $ rgb 86 208 255 | 203 | gametext = "#gametext" ? do
fontSize (px 26)
textAlign (alignSide sideCenter)
fontWeight bold
paddingTop (px 40)
paddingBottom (px 40)
background $ rgb 86 208 255 | 187 | false | true | 0 | 10 | 52 | 83 | 36 | 47 | null | null |
sordina/Deadpan-DDP | src/Data/EJson.hs | mit | isEJBool (EJBool _) = True | 32 | isEJBool (EJBool _) = True | 32 | isEJBool (EJBool _) = True | 32 | false | false | 0 | 7 | 10 | 15 | 7 | 8 | null | null |
LambdaHack/LambdaHack | definition-src/Game/LambdaHack/Definition/Flavour.hs | bsd-3-clause | colorToStoryName Brown = "mundane" | 38 | colorToStoryName Brown = "mundane" | 38 | colorToStoryName Brown = "mundane" | 38 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
Mahdi89/eTeak | src/Dot.hs | bsd-3-clause | dotIdChar :: Lexer (Pos, Char)
dotIdChar = makeCharParser "dot unquoted name character" match where
match chr = isAlphaNum chr || chr `elem` "._:" | 158 | dotIdChar :: Lexer (Pos, Char)
dotIdChar = makeCharParser "dot unquoted name character" match where
match chr = isAlphaNum chr || chr `elem` "._:" | 154 | dotIdChar = makeCharParser "dot unquoted name character" match where
match chr = isAlphaNum chr || chr `elem` "._:" | 123 | false | true | 0 | 7 | 34 | 47 | 25 | 22 | null | null |
adamschoenemann/simple-frp | test/FRP/TestFunctions.hs | mit | -- should not type-check!
frp_fib_wrong :: Decl ()
frp_fib_wrong = Decl () ty name body where
ty = tystream tyalloc |-> tystream tynat
name = "fib"
body =
"us" -->
tmlet (PCons "u" $ PDelay "us'") "us" $
tmlet "fibfun" fibfn $
tmlet (PStable "fibfn") (tmpromote "fibfun") $
"unfold" <| "us" <| tms... | 665 | frp_fib_wrong :: Decl ()
frp_fib_wrong = Decl () ty name body where
ty = tystream tyalloc |-> tystream tynat
name = "fib"
body =
"us" -->
tmlet (PCons "u" $ PDelay "us'") "us" $
tmlet "fibfun" fibfn $
tmlet (PStable "fibfn") (tmpromote "fibfun") $
"unfold" <| "us" <| tmstable ("fibfn" <| "u") <| ... | 639 | frp_fib_wrong = Decl () ty name body where
ty = tystream tyalloc |-> tystream tynat
name = "fib"
body =
"us" -->
tmlet (PCons "u" $ PDelay "us'") "us" $
tmlet "fibfun" fibfn $
tmlet (PStable "fibfn") (tmpromote "fibfun") $
"unfold" <| "us" <| tmstable ("fibfn" <| "u") <| tmtup 0 1
fibfn = tmlam... | 614 | true | true | 0 | 17 | 179 | 277 | 134 | 143 | null | null |
DavidAlphaFox/ghc | utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-3-clause | processExports (decl : es)
| Just sig <- isSimpleSig decl
= multiDecl [ ppTypeSig (map getName names) typ False
| (names,typ) <- sig:sigs ] $$
processExports es'
where (sigs, es') = spanWith isSimpleSig es | 229 | processExports (decl : es)
| Just sig <- isSimpleSig decl
= multiDecl [ ppTypeSig (map getName names) typ False
| (names,typ) <- sig:sigs ] $$
processExports es'
where (sigs, es') = spanWith isSimpleSig es | 229 | processExports (decl : es)
| Just sig <- isSimpleSig decl
= multiDecl [ ppTypeSig (map getName names) typ False
| (names,typ) <- sig:sigs ] $$
processExports es'
where (sigs, es') = spanWith isSimpleSig es | 229 | false | false | 0 | 11 | 57 | 97 | 47 | 50 | null | null |
uvthenfuv/HsExpand | hsExpand.hs | gpl-2.0 | trySubstitute :: HsExp -> HsPat -> HsRhs -> Maybe HsExp
-- trySubstitute exp pat rhs | trace ("trySubstitute (" ++ show exp ++ "), (" ++ show pat ++ "), (" ++ show rhs ++ ")") False = undefined
trySubstitute (HsLit lit) (HsPLit plit) (HsUnGuardedRhs exp)
| lit == plit = Just exp
| otherwise = Nothing | 305 | trySubstitute :: HsExp -> HsPat -> HsRhs -> Maybe HsExp
trySubstitute (HsLit lit) (HsPLit plit) (HsUnGuardedRhs exp)
| lit == plit = Just exp
| otherwise = Nothing | 167 | trySubstitute (HsLit lit) (HsPLit plit) (HsUnGuardedRhs exp)
| lit == plit = Just exp
| otherwise = Nothing | 111 | true | true | 0 | 11 | 60 | 81 | 37 | 44 | null | null |
ezyang/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | unboxedUnitTyCon :: TyCon
unboxedUnitTyCon = tupleTyCon Unboxed 0 | 65 | unboxedUnitTyCon :: TyCon
unboxedUnitTyCon = tupleTyCon Unboxed 0 | 65 | unboxedUnitTyCon = tupleTyCon Unboxed 0 | 39 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
HIPERFIT/futhark | src/Futhark/Internalise/Exps.hs | isc | internaliseExp desc (E.Attr attr e loc) = do
attr' <- internaliseAttr attr
e' <- local (f attr') $ internaliseExp desc e
case attr' of
"trace" ->
traceRes (locStr loc) e'
I.AttrComp "trace" [I.AttrName tag] ->
traceRes (nameToString tag) e'
"opaque" ->
mapM (letSubExp desc . BasicOp ... | 645 | internaliseExp desc (E.Attr attr e loc) = do
attr' <- internaliseAttr attr
e' <- local (f attr') $ internaliseExp desc e
case attr' of
"trace" ->
traceRes (locStr loc) e'
I.AttrComp "trace" [I.AttrName tag] ->
traceRes (nameToString tag) e'
"opaque" ->
mapM (letSubExp desc . BasicOp ... | 645 | internaliseExp desc (E.Attr attr e loc) = do
attr' <- internaliseAttr attr
e' <- local (f attr') $ internaliseExp desc e
case attr' of
"trace" ->
traceRes (locStr loc) e'
I.AttrComp "trace" [I.AttrName tag] ->
traceRes (nameToString tag) e'
"opaque" ->
mapM (letSubExp desc . BasicOp ... | 645 | false | false | 0 | 14 | 191 | 254 | 118 | 136 | null | null |
tjakway/ghcjvm | compiler/prelude/PrelNames.hs | bsd-3-clause | ltIntegerPrimIdKey = mkPreludeMiscIdUnique 76 | 56 | ltIntegerPrimIdKey = mkPreludeMiscIdUnique 76 | 56 | ltIntegerPrimIdKey = mkPreludeMiscIdUnique 76 | 56 | false | false | 0 | 5 | 14 | 9 | 4 | 5 | null | null |
castaway/pandoc | src/Text/Pandoc/Writers/Man.hs | gpl-2.0 | blockToMan _ (RawBlock "man" str) = return $ text str | 53 | blockToMan _ (RawBlock "man" str) = return $ text str | 53 | blockToMan _ (RawBlock "man" str) = return $ text str | 53 | false | false | 0 | 7 | 9 | 26 | 12 | 14 | null | null |
GaloisInc/saw-script | saw-core-what4/src/Verifier/SAW/Simulator/What4/FirstOrder.hs | bsd-3-clause | groundToFOV :: BaseTypeRepr ty -> GroundValue ty -> Either String FirstOrderValue
groundToFOV BaseBoolRepr b = pure $ FOVBit b | 137 | groundToFOV :: BaseTypeRepr ty -> GroundValue ty -> Either String FirstOrderValue
groundToFOV BaseBoolRepr b = pure $ FOVBit b | 137 | groundToFOV BaseBoolRepr b = pure $ FOVBit b | 55 | false | true | 0 | 7 | 29 | 42 | 19 | 23 | null | null |
iu-parfunc/AutoObsidian | src/Auto/BitString.hs | bsd-3-clause | crossBitStringGenome :: (RandomGen g)
=> g -> BitString -> BitString -> BitString
crossBitStringGenome g bstr1 bstr2 =
crossBitString bstr1 bstr2 point
where (point,_) = randomR (0, len bstr1) g
-- | Convert int to list of 0s and 1s. | 259 | crossBitStringGenome :: (RandomGen g)
=> g -> BitString -> BitString -> BitString
crossBitStringGenome g bstr1 bstr2 =
crossBitString bstr1 bstr2 point
where (point,_) = randomR (0, len bstr1) g
-- | Convert int to list of 0s and 1s. | 259 | crossBitStringGenome g bstr1 bstr2 =
crossBitString bstr1 bstr2 point
where (point,_) = randomR (0, len bstr1) g
-- | Convert int to list of 0s and 1s. | 156 | false | true | 0 | 10 | 64 | 83 | 40 | 43 | null | null |
bixuanzju/fcore | lib/OptiUtils.hs | bsd-2-clause | peq n (Tuple es) (Tuple gs) =
let len1 = length es
len2 = length gs
in len1 == len2 && and (zipWith (peq n) es gs) | 124 | peq n (Tuple es) (Tuple gs) =
let len1 = length es
len2 = length gs
in len1 == len2 && and (zipWith (peq n) es gs) | 124 | peq n (Tuple es) (Tuple gs) =
let len1 = length es
len2 = length gs
in len1 == len2 && and (zipWith (peq n) es gs) | 124 | false | false | 1 | 12 | 36 | 79 | 35 | 44 | null | null |
Kinokkory/type-level-bst | src/Type/BST/BST.hs | bsd-3-clause | -- | /O(n)/. Convert from a 'Union' to a 'Sum'.
tosum :: Foldable t => Union t -> Sum (Tolist t)
tosum (u :: Union t) = tosum' (Right u :: Either (Sum '[]) (Union t)) | 168 | tosum :: Foldable t => Union t -> Sum (Tolist t)
tosum (u :: Union t) = tosum' (Right u :: Either (Sum '[]) (Union t)) | 118 | tosum (u :: Union t) = tosum' (Right u :: Either (Sum '[]) (Union t)) | 69 | true | true | 0 | 11 | 37 | 81 | 39 | 42 | null | null |
uduki/hsQt | Qtc/Gui/QApplication.hs | bsd-2-clause | qApplicationSetColorSpec :: ((Int)) -> IO ()
qApplicationSetColorSpec (x1)
= qtc_QApplication_setColorSpec (toCInt x1) | 120 | qApplicationSetColorSpec :: ((Int)) -> IO ()
qApplicationSetColorSpec (x1)
= qtc_QApplication_setColorSpec (toCInt x1) | 120 | qApplicationSetColorSpec (x1)
= qtc_QApplication_setColorSpec (toCInt x1) | 75 | false | true | 0 | 7 | 13 | 41 | 21 | 20 | null | null |
phaul/chess | Chess/Move/Generator.hs | bsd-3-clause | vacancyCastleBB :: Colour -> Castle -> BitBoard
vacancyCastleBB White Long =
mconcat [ fromSquare sq
| sq <- [(toSquare bFile firstRank) .. (toSquare dFile firstRank)]
] | 192 | vacancyCastleBB :: Colour -> Castle -> BitBoard
vacancyCastleBB White Long =
mconcat [ fromSquare sq
| sq <- [(toSquare bFile firstRank) .. (toSquare dFile firstRank)]
] | 192 | vacancyCastleBB White Long =
mconcat [ fromSquare sq
| sq <- [(toSquare bFile firstRank) .. (toSquare dFile firstRank)]
] | 144 | false | true | 0 | 11 | 48 | 63 | 32 | 31 | null | null |
binesiyu/ifl | examples/ch04/SplitLines.hs | mit | splitLines :: String -> [String]
{-- /snippet splitLines.type --}
{-- snippet splitLines --}
splitLines [] = [] | 112 | splitLines :: String -> [String]
splitLines [] = [] | 51 | splitLines [] = [] | 18 | true | true | 0 | 6 | 17 | 27 | 15 | 12 | null | null |
DougBurke/swish | src/Swish/RDF/Formatter/Internal.hs | lgpl-2.1 | formatProperties_ ::
(RDFLabel -> State a RDFLabel) -- ^ next property for the given subject
-> (LabelContext -> RDFLabel -> State a B.Builder) -- ^ convert label into text
-> (RDFLabel -> RDFLabel -> B.Builder -> State a B.Builder) -- ^ format objects
-> (a -> PredTree RDFLabel) -- ^ extract pr... | 1,011 | formatProperties_ ::
(RDFLabel -> State a RDFLabel) -- ^ next property for the given subject
-> (LabelContext -> RDFLabel -> State a B.Builder) -- ^ convert label into text
-> (RDFLabel -> RDFLabel -> B.Builder -> State a B.Builder) -- ^ format objects
-> (a -> PredTree RDFLabel) -- ^ extract pr... | 1,011 | formatProperties_ nextProperty formatLabel formatObjects props nextLine sb sbstr = do
pr <- nextProperty sb
prstr <- formatLabel PredContext pr
obstr <- formatObjects sb pr $ mconcat [sbstr, " ", prstr]
more <- hasMore props
let sbindent = hackIndent -- mkIndent sbstr
if more
then do
fr <- format... | 496 | false | true | 0 | 14 | 251 | 291 | 144 | 147 | null | null |
kimsnj/writeAscheme | src/Evaluator.hs | mit | -- Conditionals
if' :: Env -> LispVal -> LispVal -> LispVal -> IOThrowsError LispVal
if' env predicate conseq alt =
do result <- eval env predicate
case result of
Bool False -> eval env alt
Bool True -> eval env conseq
badArg -> throwError $ TypeMismatch "bool" badArg | 301 | if' :: Env -> LispVal -> LispVal -> LispVal -> IOThrowsError LispVal
if' env predicate conseq alt =
do result <- eval env predicate
case result of
Bool False -> eval env alt
Bool True -> eval env conseq
badArg -> throwError $ TypeMismatch "bool" badArg | 285 | if' env predicate conseq alt =
do result <- eval env predicate
case result of
Bool False -> eval env alt
Bool True -> eval env conseq
badArg -> throwError $ TypeMismatch "bool" badArg | 216 | true | true | 0 | 12 | 80 | 107 | 48 | 59 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Atomic/HandleAtomicWrite.hs | bsd-3-clause | updAutoFaction :: MonadStateWrite m => FactionId -> Bool -> m ()
updAutoFaction fid st =
updateFaction fid (\fact ->
assert (gunderAI fact == not st) $ fact {gunderAI = st}) | 179 | updAutoFaction :: MonadStateWrite m => FactionId -> Bool -> m ()
updAutoFaction fid st =
updateFaction fid (\fact ->
assert (gunderAI fact == not st) $ fact {gunderAI = st}) | 179 | updAutoFaction fid st =
updateFaction fid (\fact ->
assert (gunderAI fact == not st) $ fact {gunderAI = st}) | 114 | false | true | 0 | 12 | 35 | 77 | 38 | 39 | null | null |
lisphacker/codewars | Change.hs | bsd-2-clause | countChange :: Integer -> [Integer] -> Integer
countChange n dens = ccRec n $ sort dens
where ccRec n dens
| null dens = 0
| n < 0 = 0
| n == 0 = 1
| n < head dens = 0
| n == head dens = 1
| otherwise = foldl (+) 0 $ map (\l -> ccRe... | 359 | countChange :: Integer -> [Integer] -> Integer
countChange n dens = ccRec n $ sort dens
where ccRec n dens
| null dens = 0
| n < 0 = 0
| n == 0 = 1
| n < head dens = 0
| n == head dens = 1
| otherwise = foldl (+) 0 $ map (\l -> ccRe... | 359 | countChange n dens = ccRec n $ sort dens
where ccRec n dens
| null dens = 0
| n < 0 = 0
| n == 0 = 1
| n < head dens = 0
| n == head dens = 1
| otherwise = foldl (+) 0 $ map (\l -> ccRec (n - head l) l) $ init $ (tails dens) | 312 | false | true | 0 | 15 | 159 | 176 | 83 | 93 | null | null |
jfischoff/hs-mitsuba | tests/Tests/Mitsuba/Types.hs | bsd-3-clause | case_spot_toXML
= actualSpot `assertElement` [xmlQQ|
<emitter type="spot">
<transform name="toWorld">
<lookat origin="1.0, 1.0, 1.0" up="1.0, 0.0, 0.0" target="1.0, 2.0, 1.0"/>
</transform>
<float name="cutoffAngle" value="2.0"/>
<texture name="texture" type="vertexcolors"/>
<spectr... | 460 | case_spot_toXML
= actualSpot `assertElement` [xmlQQ|
<emitter type="spot">
<transform name="toWorld">
<lookat origin="1.0, 1.0, 1.0" up="1.0, 0.0, 0.0" target="1.0, 2.0, 1.0"/>
</transform>
<float name="cutoffAngle" value="2.0"/>
<texture name="texture" type="vertexcolors"/>
<spectr... | 460 | case_spot_toXML
= actualSpot `assertElement` [xmlQQ|
<emitter type="spot">
<transform name="toWorld">
<lookat origin="1.0, 1.0, 1.0" up="1.0, 0.0, 0.0" target="1.0, 2.0, 1.0"/>
</transform>
<float name="cutoffAngle" value="2.0"/>
<texture name="texture" type="vertexcolors"/>
<spectr... | 460 | false | false | 1 | 5 | 85 | 19 | 11 | 8 | null | null |
forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/rename/should_compile/rn003.hs | bsd-3-clause | [] = f (f []) | 13 | [] = f (f []) | 13 | [] = f (f []) | 13 | false | false | 1 | 8 | 4 | 23 | 9 | 14 | null | null |
Hodapp87/ivory | ivory-eval/src/Ivory/Eval.hs | bsd-3-clause | numUnOp op (Uint16 x) = Uint16 (op x) | 37 | numUnOp op (Uint16 x) = Uint16 (op x) | 37 | numUnOp op (Uint16 x) = Uint16 (op x) | 37 | false | false | 0 | 7 | 7 | 26 | 12 | 14 | null | null |
reiddraper/haskell-pipes-fun | main.hs | apache-2.0 | runTests :: IO ()
runTests = quickCheck test | 44 | runTests :: IO ()
runTests = quickCheck test | 44 | runTests = quickCheck test | 26 | false | true | 0 | 6 | 7 | 19 | 9 | 10 | null | null |
sdiehl/ghc | testsuite/tests/polykinds/T14172a.hs | bsd-3-clause | withIso :: AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
withIso ai k = case ai (Exchange id Identity) of
Exchange sa bt -> k sa (runIdentity #. bt)
| 155 | withIso :: AnIso s t a b -> ((s -> a) -> (b -> t) -> r) -> r
withIso ai k = case ai (Exchange id Identity) of
Exchange sa bt -> k sa (runIdentity #. bt)
| 155 | withIso ai k = case ai (Exchange id Identity) of
Exchange sa bt -> k sa (runIdentity #. bt)
| 94 | false | true | 3 | 11 | 40 | 97 | 48 | 49 | null | null |
nwf/trifecta | src/Text/Trifecta/Rope.hs | bsd-3-clause | rope :: FingerTree Delta Strand -> Rope
rope r = Rope (measure r) r | 67 | rope :: FingerTree Delta Strand -> Rope
rope r = Rope (measure r) r | 67 | rope r = Rope (measure r) r | 27 | false | true | 0 | 7 | 13 | 34 | 16 | 18 | null | null |
krgn/RootAnim | src/Graphics/UI/GLWindow.hs | gpl-3.0 | dtime :: IO (Double)
dtime = realToFrac <$> c_dtime | 51 | dtime :: IO (Double)
dtime = realToFrac <$> c_dtime | 51 | dtime = realToFrac <$> c_dtime | 30 | false | true | 0 | 6 | 8 | 21 | 11 | 10 | null | null |
andrewjanke/mytardis-dicom | src/Main.hs | bsd-2-clause | pUploadOneOptions :: Parser Command
pUploadOneOptions = CmdUploadOne <$> UploadOneOptions <$> strOption (long "hash" <> help "Hash of experiment to upload.") | 157 | pUploadOneOptions :: Parser Command
pUploadOneOptions = CmdUploadOne <$> UploadOneOptions <$> strOption (long "hash" <> help "Hash of experiment to upload.") | 157 | pUploadOneOptions = CmdUploadOne <$> UploadOneOptions <$> strOption (long "hash" <> help "Hash of experiment to upload.") | 121 | false | true | 0 | 9 | 19 | 38 | 18 | 20 | null | null |
owainlewis/seven | src/Language/Ava/Reader.hs | bsd-3-clause | eval (Prim (List x)) = (TPush (Prim (List x))) | 46 | eval (Prim (List x)) = (TPush (Prim (List x))) | 46 | eval (Prim (List x)) = (TPush (Prim (List x))) | 46 | false | false | 0 | 10 | 8 | 40 | 19 | 21 | null | null |
nevrenato/Hets_Fork | Temporal/NuSmv.hs | gpl-2.0 | showBasicExpr (Geq exprA exprB) True = concat [ showBasicExpr exprA False, " >= ", showBasicExpr exprB False ] | 120 | showBasicExpr (Geq exprA exprB) True = concat [ showBasicExpr exprA False, " >= ", showBasicExpr exprB False ] | 120 | showBasicExpr (Geq exprA exprB) True = concat [ showBasicExpr exprA False, " >= ", showBasicExpr exprB False ] | 120 | false | false | 1 | 7 | 27 | 42 | 20 | 22 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.