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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
thalerjonathan/phd | coding/learning/haskell/selflearning/src/Typeclassopedia.hs | gpl-3.0 | fmap g (Var x) = Var (g x) | 26 | fmap g (Var x) = Var (g x) | 26 | fmap g (Var x) = Var (g x) | 26 | false | false | 0 | 7 | 7 | 28 | 12 | 16 | null | null |
mgax/beancount | lib/haskell/JournalParser.hs | gpl-2.0 | exchange :: Parser (A.Account ())
exchange = do reserved "exchange"
dat <- date
sym <- asset
qty <- quantity
sym' <- asset
qty' <- quantity
return (A.exchange dat sym qty sym' qty') | 272 | exchange :: Parser (A.Account ())
exchange = do reserved "exchange"
dat <- date
sym <- asset
qty <- quantity
sym' <- asset
qty' <- quantity
return (A.exchange dat sym qty sym' qty') | 271 | exchange = do reserved "exchange"
dat <- date
sym <- asset
qty <- quantity
sym' <- asset
qty' <- quantity
return (A.exchange dat sym qty sym' qty') | 237 | false | true | 0 | 11 | 122 | 93 | 40 | 53 | null | null |
facebookarchive/lex-pass | src/Lang/Php/Ast/Lex.hs | bsd-3-clause | -- no tokOpenPhpEchoP, done manually currently, has weird rules
tokEquals = "=" | 79 | tokEquals = "=" | 15 | tokEquals = "=" | 15 | true | false | 0 | 4 | 11 | 7 | 4 | 3 | null | null |
thekafkaf/brolang | src/Codegen.hs | mit | emptyModule :: String -> AST.Module
emptyModule label = defaultModule { moduleName = label } | 92 | emptyModule :: String -> AST.Module
emptyModule label = defaultModule { moduleName = label } | 92 | emptyModule label = defaultModule { moduleName = label } | 56 | false | true | 0 | 6 | 13 | 28 | 15 | 13 | null | null |
Kiandr/CrackingCodingInterview | Haskell/src/chapter-3/Test/Stack.hs | mit | exStack :: Stack Int
exStack = Stack [1,2,3,4,5] | 48 | exStack :: Stack Int
exStack = Stack [1,2,3,4,5] | 48 | exStack = Stack [1,2,3,4,5] | 27 | false | true | 0 | 6 | 7 | 32 | 18 | 14 | null | null |
mindriot101/pandoc | src/Text/Pandoc/Readers/LaTeX.hs | gpl-2.0 | braced' :: IncludeParser
braced' = try $ char '{' *> manyTill (satisfy (/='}')) (char '}') | 90 | braced' :: IncludeParser
braced' = try $ char '{' *> manyTill (satisfy (/='}')) (char '}') | 90 | braced' = try $ char '{' *> manyTill (satisfy (/='}')) (char '}') | 65 | false | true | 0 | 9 | 14 | 43 | 22 | 21 | null | null |
VictorCMiraldo/hs-bn | BN/Types.hs | gpl-2.0 | -- |Returns the type of a variable, if it exists.
tyOf :: (M m) => String -> Ty m (Maybe String)
tyOf s = M.lookup s . tyvars <$> get | 133 | tyOf :: (M m) => String -> Ty m (Maybe String)
tyOf s = M.lookup s . tyvars <$> get | 83 | tyOf s = M.lookup s . tyvars <$> get | 36 | true | true | 0 | 9 | 29 | 52 | 26 | 26 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxDB_SELECT_MATCHING :: Int
wxDB_SELECT_MATCHING = 3 | 52 | wxDB_SELECT_MATCHING :: Int
wxDB_SELECT_MATCHING = 3 | 52 | wxDB_SELECT_MATCHING = 3 | 24 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
eazy-f/yahui | src/Yahui.hs | bsd-3-clause | readCmdConfig = fmap parseArgs getArgs | 38 | readCmdConfig = fmap parseArgs getArgs | 38 | readCmdConfig = fmap parseArgs getArgs | 38 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
green-haskell/ghc | compiler/utils/Outputable.hs | bsd-3-clause | rbrace = docToSDoc $ Pretty.rbrace | 38 | rbrace = docToSDoc $ Pretty.rbrace | 38 | rbrace = docToSDoc $ Pretty.rbrace | 38 | false | false | 0 | 6 | 8 | 12 | 6 | 6 | null | null |
mreid/papersite | src/exec/scrape.hs | mit | -- Get the raw tags for a paper URI
-- getTags :: String ->
getTags absURL = do
parseTags <$> openURL absURL
-- Parse a single JMLR abstract page for a paper. | 163 | getTags absURL = do
parseTags <$> openURL absURL
-- Parse a single JMLR abstract page for a paper. | 102 | getTags absURL = do
parseTags <$> openURL absURL
-- Parse a single JMLR abstract page for a paper. | 102 | true | false | 0 | 8 | 36 | 22 | 11 | 11 | null | null |
kongra/kask-base | src/Kask/Logic/Kleene.hs | bsd-3-clause | -- | Logical implication a -> b = not(a) or b
impl :: Value -> Value -> Value
impl a b = not a `or` b | 101 | impl :: Value -> Value -> Value
impl a b = not a `or` b | 55 | impl a b = not a `or` b | 23 | true | true | 0 | 6 | 25 | 34 | 18 | 16 | null | null |
yoo-e/yesod-helpers | Yesod/Helpers/Handler.hs | bsd-3-clause | nonEmptyParam :: Text -> ParamResult Text -> ParamResult Text
nonEmptyParam pn pr = do
x <- pr
if T.null x
then ParamError [(pn, "must not be empty")]
else ParamSuccess x | 194 | nonEmptyParam :: Text -> ParamResult Text -> ParamResult Text
nonEmptyParam pn pr = do
x <- pr
if T.null x
then ParamError [(pn, "must not be empty")]
else ParamSuccess x | 194 | nonEmptyParam pn pr = do
x <- pr
if T.null x
then ParamError [(pn, "must not be empty")]
else ParamSuccess x | 132 | false | true | 0 | 10 | 53 | 68 | 33 | 35 | null | null |
albertoruiz/hTensor | lib/Numeric/LinearAlgebra/Array/Internal.hs | bsd-3-clause | resetCoords :: Coord t => NArray i t -> Vector t -> NArray i t
-- ^ change the whole set of coordinates.
resetCoords (A dms u) v | dim u == dim v = A dms v
| otherwise = error "wrong size in replaceCoords" | 229 | resetCoords :: Coord t => NArray i t -> Vector t -> NArray i t
resetCoords (A dms u) v | dim u == dim v = A dms v
| otherwise = error "wrong size in replaceCoords" | 187 | resetCoords (A dms u) v | dim u == dim v = A dms v
| otherwise = error "wrong size in replaceCoords" | 124 | true | true | 0 | 9 | 69 | 86 | 38 | 48 | null | null |
daz-li/svm_sgd_haskell | test/Sgd/Num/VectorT.hs | mit | dot = TestCase $ do
assertEqual
"dotFS Should work"
10
(V.dotFS (fromList [0, 1,2,3,4]) [(1, 1.0), (3, 3.0)])
assertEqual
"dot Should work"
40
(V.dot (fromList [0, 1,2,3,4]) (fromList [1,2,3,4,5])) | 230 | dot = TestCase $ do
assertEqual
"dotFS Should work"
10
(V.dotFS (fromList [0, 1,2,3,4]) [(1, 1.0), (3, 3.0)])
assertEqual
"dot Should work"
40
(V.dot (fromList [0, 1,2,3,4]) (fromList [1,2,3,4,5])) | 230 | dot = TestCase $ do
assertEqual
"dotFS Should work"
10
(V.dotFS (fromList [0, 1,2,3,4]) [(1, 1.0), (3, 3.0)])
assertEqual
"dot Should work"
40
(V.dot (fromList [0, 1,2,3,4]) (fromList [1,2,3,4,5])) | 230 | false | false | 1 | 14 | 61 | 135 | 74 | 61 | null | null |
talw/quoridor-hs | quoridor-exec/Main.hs | bsd-3-clause | main :: IO ()
main = cmdlineMain | 32 | main :: IO ()
main = cmdlineMain | 32 | main = cmdlineMain | 18 | false | true | 0 | 7 | 6 | 22 | 9 | 13 | null | null |
geocurnoff/nikki | src/Editor/Menu.hs | lgpl-3.0 | showEditorHelp :: Application -> AppState -> EditorScene Sort_ -> AppState
showEditorHelp app parent scene = case editorMode scene of
NormalMode{} -> showHelpFile
SelectionMode{} -> showHelpFile
(ObjectEditMode i) ->
let (Just oem) = objectEditMode $ editorSort $ getMainLayerEditorObject scene i
phantomOEM :: OEMState = oemInitialize oem undefined
helpText = fmap p $ lines $ oemHelp phantomOEM
in scrollingAppState app helpText parent
where
showHelpFile :: AppState
showHelpFile = appState (busyMessage (p "showHelpFile (editor)")) $ do
file <- rm2m $ getDataFileName "manual/editor.txt"
text <- io $ pFile file
return $ scrollingAppState app text parent | 743 | showEditorHelp :: Application -> AppState -> EditorScene Sort_ -> AppState
showEditorHelp app parent scene = case editorMode scene of
NormalMode{} -> showHelpFile
SelectionMode{} -> showHelpFile
(ObjectEditMode i) ->
let (Just oem) = objectEditMode $ editorSort $ getMainLayerEditorObject scene i
phantomOEM :: OEMState = oemInitialize oem undefined
helpText = fmap p $ lines $ oemHelp phantomOEM
in scrollingAppState app helpText parent
where
showHelpFile :: AppState
showHelpFile = appState (busyMessage (p "showHelpFile (editor)")) $ do
file <- rm2m $ getDataFileName "manual/editor.txt"
text <- io $ pFile file
return $ scrollingAppState app text parent | 743 | showEditorHelp app parent scene = case editorMode scene of
NormalMode{} -> showHelpFile
SelectionMode{} -> showHelpFile
(ObjectEditMode i) ->
let (Just oem) = objectEditMode $ editorSort $ getMainLayerEditorObject scene i
phantomOEM :: OEMState = oemInitialize oem undefined
helpText = fmap p $ lines $ oemHelp phantomOEM
in scrollingAppState app helpText parent
where
showHelpFile :: AppState
showHelpFile = appState (busyMessage (p "showHelpFile (editor)")) $ do
file <- rm2m $ getDataFileName "manual/editor.txt"
text <- io $ pFile file
return $ scrollingAppState app text parent | 668 | false | true | 0 | 14 | 176 | 230 | 104 | 126 | null | null |
tittoassini/typed | test/Test/Data/Values.hs | bsd-3-clause | rr1 :: RR Char () Int8
rr1 = RAB 'a' (RN 11 () 'b') () | 54 | rr1 :: RR Char () Int8
rr1 = RAB 'a' (RN 11 () 'b') () | 54 | rr1 = RAB 'a' (RN 11 () 'b') () | 31 | false | true | 1 | 8 | 14 | 44 | 20 | 24 | null | null |
ublubu/wyascheme | src/Types.hs | mit | unwordsList :: [LispVal] -> String
unwordsList = unwords . fmap showVal | 71 | unwordsList :: [LispVal] -> String
unwordsList = unwords . fmap showVal | 71 | unwordsList = unwords . fmap showVal | 36 | false | true | 0 | 6 | 10 | 25 | 13 | 12 | null | null |
mfine/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Unset a 'WarningFlag'
wopt_unset :: DynFlags -> WarningFlag -> DynFlags
wopt_unset dfs f = dfs{ warningFlags = IntSet.delete (fromEnum f) (warningFlags dfs) } | 163 | wopt_unset :: DynFlags -> WarningFlag -> DynFlags
wopt_unset dfs f = dfs{ warningFlags = IntSet.delete (fromEnum f) (warningFlags dfs) } | 136 | wopt_unset dfs f = dfs{ warningFlags = IntSet.delete (fromEnum f) (warningFlags dfs) } | 86 | true | true | 0 | 9 | 24 | 52 | 27 | 25 | null | null |
grandpascorpion/canon | Math/NumberTheory/Internals.hs | gpl-3.0 | crToInteger, crToI :: CR_ -> Integer
-- | Convert a canon rep back to an Integer.
crToInteger POne = 1 | 120 | crToInteger, crToI :: CR_ -> Integer
crToInteger POne = 1 | 74 | crToInteger POne = 1 | 37 | true | true | 2 | 7 | 37 | 31 | 13 | 18 | null | null |
DanielWaterworth/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | fmapMB f (Guess t v) = liftM2 Guess (f t) (f v) | 47 | fmapMB f (Guess t v) = liftM2 Guess (f t) (f v) | 47 | fmapMB f (Guess t v) = liftM2 Guess (f t) (f v) | 47 | false | false | 0 | 7 | 11 | 39 | 18 | 21 | null | null |
AndreasPK/stack | src/Stack/Types/Config.hs | bsd-3-clause | flagCacheLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir)
flagCacheLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "flag-cache")
-- | Where to store mini build plan caches | 234 | flagCacheLocal :: (MonadThrow m, MonadReader env m, HasEnvConfig env) => m (Path Abs Dir)
flagCacheLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "flag-cache")
-- | Where to store mini build plan caches | 234 | flagCacheLocal = do
root <- installationRootLocal
return $ root </> $(mkRelDir "flag-cache")
-- | Where to store mini build plan caches | 144 | false | true | 0 | 10 | 43 | 71 | 35 | 36 | null | null |
christiaanb/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | eqTyCon_RDR = nameRdrName eqTyConName | 41 | eqTyCon_RDR = nameRdrName eqTyConName | 41 | eqTyCon_RDR = nameRdrName eqTyConName | 41 | false | false | 1 | 5 | 7 | 13 | 4 | 9 | null | null |
nevrenato/Hets_Fork | CASL/Overload.hs | gpl-2.0 | -- qualify a single op, given by its signature and its arguments
qualifyOp :: Id -> Range -> (OpType, [TERM f]) -> TERM f
qualifyOp ide pos (op', terms') =
Application (Qual_op_name ide (toOP_TYPE op') pos) terms' pos | 221 | qualifyOp :: Id -> Range -> (OpType, [TERM f]) -> TERM f
qualifyOp ide pos (op', terms') =
Application (Qual_op_name ide (toOP_TYPE op') pos) terms' pos | 156 | qualifyOp ide pos (op', terms') =
Application (Qual_op_name ide (toOP_TYPE op') pos) terms' pos | 99 | true | true | 0 | 11 | 41 | 80 | 40 | 40 | null | null |
MathiasVP/syntax-checker-checker | numberofnodes.hs | mit | numberOfNodesExpression (Boolean _) = 1 | 39 | numberOfNodesExpression (Boolean _) = 1 | 39 | numberOfNodesExpression (Boolean _) = 1 | 39 | false | false | 0 | 6 | 4 | 16 | 7 | 9 | null | null |
ancientlanguage/haskell-analysis | grammar/src/Grammar/Common/Decompose.hs | mit | decomposeChar '\xF962' = "\x7570" | 33 | decomposeChar '\xF962' = "\x7570" | 33 | decomposeChar '\xF962' = "\x7570" | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
yiannist/ganeti | src/Ganeti/THH/Field.hs | bsd-2-clause | -- | Creates a new mandatory field that reads time as the (floating point)
-- number of seconds since the standard UNIX epoch, and represents it in
-- Haskell as 'ClockTime'.
timeAsDoubleField :: String -> Field
timeAsDoubleField fname =
(simpleField fname [t| ClockTime |])
{ fieldRead = Just $ [| \_ -> liftM unTimeAsDoubleJSON . JSON.readJSON |]
, fieldShow = Just $ [| \c -> (JSON.showJSON $ TimeAsDoubleJSON c, []) |]
} | 438 | timeAsDoubleField :: String -> Field
timeAsDoubleField fname =
(simpleField fname [t| ClockTime |])
{ fieldRead = Just $ [| \_ -> liftM unTimeAsDoubleJSON . JSON.readJSON |]
, fieldShow = Just $ [| \c -> (JSON.showJSON $ TimeAsDoubleJSON c, []) |]
} | 263 | timeAsDoubleField fname =
(simpleField fname [t| ClockTime |])
{ fieldRead = Just $ [| \_ -> liftM unTimeAsDoubleJSON . JSON.readJSON |]
, fieldShow = Just $ [| \c -> (JSON.showJSON $ TimeAsDoubleJSON c, []) |]
} | 226 | true | true | 0 | 7 | 85 | 61 | 39 | 22 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | isBuilding ProtossPylon = False | 31 | isBuilding ProtossPylon = False | 31 | isBuilding ProtossPylon = False | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
SamLex/TheCodeOfLife | src/Display.hs | gpl-3.0 | handleReshape :: ReshapeCallback
handleReshape (Size w h) = do
viewport $= (Position 0 0, Size w h)
matrixMode $= Projection
loadIdentity
let znear = 0.001
zfar = 100.0
fov = 90.0
angle = (fov*pi)/360.0
ycomp = znear / (cos angle / sin angle)
aspect = fromIntegral w / fromIntegral h
xcomp = ycomp*aspect
frustum (-xcomp) xcomp (-ycomp) ycomp znear zfar
matrixMode $= Modelview 0
postRedisplay Nothing | 545 | handleReshape :: ReshapeCallback
handleReshape (Size w h) = do
viewport $= (Position 0 0, Size w h)
matrixMode $= Projection
loadIdentity
let znear = 0.001
zfar = 100.0
fov = 90.0
angle = (fov*pi)/360.0
ycomp = znear / (cos angle / sin angle)
aspect = fromIntegral w / fromIntegral h
xcomp = ycomp*aspect
frustum (-xcomp) xcomp (-ycomp) ycomp znear zfar
matrixMode $= Modelview 0
postRedisplay Nothing | 545 | handleReshape (Size w h) = do
viewport $= (Position 0 0, Size w h)
matrixMode $= Projection
loadIdentity
let znear = 0.001
zfar = 100.0
fov = 90.0
angle = (fov*pi)/360.0
ycomp = znear / (cos angle / sin angle)
aspect = fromIntegral w / fromIntegral h
xcomp = ycomp*aspect
frustum (-xcomp) xcomp (-ycomp) ycomp znear zfar
matrixMode $= Modelview 0
postRedisplay Nothing | 512 | false | true | 0 | 13 | 209 | 178 | 87 | 91 | null | null |
abooij/sudbury | Graphics/Sudbury/CABI/DispatchFFI.hs | mit | packageCArg SFixedWAT = argCInt | 32 | packageCArg SFixedWAT = argCInt | 32 | packageCArg SFixedWAT = argCInt | 32 | false | false | 1 | 5 | 4 | 13 | 4 | 9 | null | null |
kazuya030/haskell-test | old/Euler1.hs | mit | facts_in n p' = p:facts_in (n `div` p) p
where
sqrt_n = floor $ sqrt $ fromIntegral n
p_max = [x | x <- takeWhile(<=sqrt_n)primes, x>=p' , n `mod` x==0]
p = if null p_max
then n
else head p_max | 240 | facts_in n p' = p:facts_in (n `div` p) p
where
sqrt_n = floor $ sqrt $ fromIntegral n
p_max = [x | x <- takeWhile(<=sqrt_n)primes, x>=p' , n `mod` x==0]
p = if null p_max
then n
else head p_max | 240 | facts_in n p' = p:facts_in (n `div` p) p
where
sqrt_n = floor $ sqrt $ fromIntegral n
p_max = [x | x <- takeWhile(<=sqrt_n)primes, x>=p' , n `mod` x==0]
p = if null p_max
then n
else head p_max | 240 | false | false | 6 | 9 | 86 | 129 | 60 | 69 | null | null |
mtnmts/Haskell99 | src/99-problems/problem-6.hs | mit | isPalindrome (x: xs) = (x == (last xs)) && (isPalindrome (init xs)) | 67 | isPalindrome (x: xs) = (x == (last xs)) && (isPalindrome (init xs)) | 67 | isPalindrome (x: xs) = (x == (last xs)) && (isPalindrome (init xs)) | 67 | false | false | 0 | 9 | 11 | 45 | 23 | 22 | null | null |
ghorn/cs240h-class | Lab2/Node.hs | bsd-3-clause | nodeFull :: Node -> Bool
nodeFull (Node {nodeChildren = ch})
| length ch > cN = error "nonleaf somehow got too many entries, this is a bug"
| length ch == cN = True
| otherwise = False | 197 | nodeFull :: Node -> Bool
nodeFull (Node {nodeChildren = ch})
| length ch > cN = error "nonleaf somehow got too many entries, this is a bug"
| length ch == cN = True
| otherwise = False | 197 | nodeFull (Node {nodeChildren = ch})
| length ch > cN = error "nonleaf somehow got too many entries, this is a bug"
| length ch == cN = True
| otherwise = False | 172 | false | true | 6 | 9 | 50 | 83 | 36 | 47 | null | null |
mimi1vx/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkOrNeq4 = verifyNot checkOrNeq "[ a != $cow || b != $foo ]" | 68 | prop_checkOrNeq4 = verifyNot checkOrNeq "[ a != $cow || b != $foo ]" | 68 | prop_checkOrNeq4 = verifyNot checkOrNeq "[ a != $cow || b != $foo ]" | 68 | false | false | 1 | 5 | 12 | 15 | 5 | 10 | null | null |
byorgey/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | doOp v LPar [x] = v ++ creg x | 29 | doOp v LPar [x] = v ++ creg x | 29 | doOp v LPar [x] = v ++ creg x | 29 | false | false | 0 | 6 | 8 | 23 | 11 | 12 | null | null |
nomeata/darcs-mirror-arbtt | src/dump-main.hs | gpl-2.0 | defaultOptions dir = Options
{ optLogFile = dir </> "capture.log"
, optFormat = DFHuman
, optLast = Nothing
} | 125 | defaultOptions dir = Options
{ optLogFile = dir </> "capture.log"
, optFormat = DFHuman
, optLast = Nothing
} | 125 | defaultOptions dir = Options
{ optLogFile = dir </> "capture.log"
, optFormat = DFHuman
, optLast = Nothing
} | 125 | false | false | 0 | 8 | 34 | 37 | 20 | 17 | null | null |
edwardwas/rockPaperScissors | server/src/Logic.hs | mit | getGame :: Int -> Query App (Maybe Game)
getGame n = preview (games . at n . traverse) <$> ask | 94 | getGame :: Int -> Query App (Maybe Game)
getGame n = preview (games . at n . traverse) <$> ask | 94 | getGame n = preview (games . at n . traverse) <$> ask | 53 | false | true | 0 | 9 | 19 | 55 | 25 | 30 | null | null |
asayers/TaskAgent-web | src/Todo.hs | bsd-3-clause | touchFile :: FilePath -> IO ()
touchFile path = do
createDirectoryIfMissing True $ takeDirectory path
writeFile path ""
-- | Write `contents` to a temporary file in `listDirectory`, then - if nothing
-- goes wrong - rename it to `path`, overwriting any existing file at that path. | 285 | touchFile :: FilePath -> IO ()
touchFile path = do
createDirectoryIfMissing True $ takeDirectory path
writeFile path ""
-- | Write `contents` to a temporary file in `listDirectory`, then - if nothing
-- goes wrong - rename it to `path`, overwriting any existing file at that path. | 285 | touchFile path = do
createDirectoryIfMissing True $ takeDirectory path
writeFile path ""
-- | Write `contents` to a temporary file in `listDirectory`, then - if nothing
-- goes wrong - rename it to `path`, overwriting any existing file at that path. | 254 | false | true | 0 | 9 | 51 | 51 | 22 | 29 | null | null |
lukexi/rumpus | pristine/Synthesis/Verylogue2.hs | bsd-3-clause | verylogueKnobs =
[
-- VCO1
( "VCO1 Octave" , "vco1-amp" , Stepped ["0", "1", "2", "3"], 1 )
, ( "VCO1 Wave" , "vco1-wave" , Stepped ["Saw", "Sin", "Squ"], 2 )
, ( "VCO1 Pitch" , "vco1-pitch", Linear -1 1, 0 )
, ( "VCO1 Shape" , "vco1-shape", Linear 0 1, 0.5 )
-- VCO2
, ( "VCO2 Octave" , "vco2-amp" , Stepped ["0", "1", "2", "3"], 2 )
, ( "VCO2 Wave" , "vco2-wave" , Stepped ["Saw", "Sin", "Squ"], 1 )
, ( "VCO2 Pitch" , "vco2-pitch", Linear -1 1, 0 )
, ( "VCO2 Shape" , "vco2-shape", Linear 0 1, 0.5 )
, ( "VCO2 Cross" , "vco2-crossmod" , Linear 0 1, 0 )
, ( "VCO2 EG>Pitch" , "vco2-pitch-eg-int", Linear 0 1, 0 )
-- Mixer
, ( "VCO1 Amp" , "vco1-amp" , Linear 0 1, 1 )
, ( "VCO2 Amp" , "vco2-amp" , Linear 0 1, 1 )
, ( "Noise Amp" , "noise-amp" , Linear 0 1, 0 )
-- Filter
, ( "Cutoff" , "cutoff" , Linear 0 96, 80 )
, ( "Resonance" , "resonance" , Linear 0 1, 0 )
, ( "EG Int" , "cutoff-eg-int", Linear 0 1, 0.5 )
-- Amp EG
, ( "Amp Atk" , "amp-attack" , Linear 1 1000, 10 )
, ( "Amp Dec" , "amp-decay" , Linear 1 1000, 100 )
, ( "Amp Sus" , "amp-sustain" , Linear 0 1, 0.5 )
, ( "Amp Rel" , "amp-release" , Linear 1 4000, 1000 )
-- Assignable EG
, ( "Env Atk" , "env-attack" , Linear 1 1000, 10 )
, ( "Env Dec" , "env-decay" , Linear 1 1000, 100 )
, ( "Env Sus" , "env-sustain" , Linear 0 1, 0.5 )
, ( "Env Rel" , "env-release" , Linear 1 4000, 1000 )
-- LFO
, ( "LFO Wave" , "lfo-wave" , Stepped ["Saw", "Sin", "Squ"], 0 )
, ( "LFO EG-Mod" , "lfo-eg-mod" , Stepped ["Int", "Rate", "Off"], 2 )
, ( "LFO Rate" , "lfo-rate" , Linear 0.1 250, 7 )
, ( "LFO Int" , "lfo-int" , Linear 0 1, 0.1 )
, ( "LFO Target" , "lfo-target" , Stepped ["Pitch", "Rate", "Cutoff"], 1 )
] | 2,064 | verylogueKnobs =
[
-- VCO1
( "VCO1 Octave" , "vco1-amp" , Stepped ["0", "1", "2", "3"], 1 )
, ( "VCO1 Wave" , "vco1-wave" , Stepped ["Saw", "Sin", "Squ"], 2 )
, ( "VCO1 Pitch" , "vco1-pitch", Linear -1 1, 0 )
, ( "VCO1 Shape" , "vco1-shape", Linear 0 1, 0.5 )
-- VCO2
, ( "VCO2 Octave" , "vco2-amp" , Stepped ["0", "1", "2", "3"], 2 )
, ( "VCO2 Wave" , "vco2-wave" , Stepped ["Saw", "Sin", "Squ"], 1 )
, ( "VCO2 Pitch" , "vco2-pitch", Linear -1 1, 0 )
, ( "VCO2 Shape" , "vco2-shape", Linear 0 1, 0.5 )
, ( "VCO2 Cross" , "vco2-crossmod" , Linear 0 1, 0 )
, ( "VCO2 EG>Pitch" , "vco2-pitch-eg-int", Linear 0 1, 0 )
-- Mixer
, ( "VCO1 Amp" , "vco1-amp" , Linear 0 1, 1 )
, ( "VCO2 Amp" , "vco2-amp" , Linear 0 1, 1 )
, ( "Noise Amp" , "noise-amp" , Linear 0 1, 0 )
-- Filter
, ( "Cutoff" , "cutoff" , Linear 0 96, 80 )
, ( "Resonance" , "resonance" , Linear 0 1, 0 )
, ( "EG Int" , "cutoff-eg-int", Linear 0 1, 0.5 )
-- Amp EG
, ( "Amp Atk" , "amp-attack" , Linear 1 1000, 10 )
, ( "Amp Dec" , "amp-decay" , Linear 1 1000, 100 )
, ( "Amp Sus" , "amp-sustain" , Linear 0 1, 0.5 )
, ( "Amp Rel" , "amp-release" , Linear 1 4000, 1000 )
-- Assignable EG
, ( "Env Atk" , "env-attack" , Linear 1 1000, 10 )
, ( "Env Dec" , "env-decay" , Linear 1 1000, 100 )
, ( "Env Sus" , "env-sustain" , Linear 0 1, 0.5 )
, ( "Env Rel" , "env-release" , Linear 1 4000, 1000 )
-- LFO
, ( "LFO Wave" , "lfo-wave" , Stepped ["Saw", "Sin", "Squ"], 0 )
, ( "LFO EG-Mod" , "lfo-eg-mod" , Stepped ["Int", "Rate", "Off"], 2 )
, ( "LFO Rate" , "lfo-rate" , Linear 0.1 250, 7 )
, ( "LFO Int" , "lfo-int" , Linear 0 1, 0.1 )
, ( "LFO Target" , "lfo-target" , Stepped ["Pitch", "Rate", "Cutoff"], 1 )
] | 2,064 | verylogueKnobs =
[
-- VCO1
( "VCO1 Octave" , "vco1-amp" , Stepped ["0", "1", "2", "3"], 1 )
, ( "VCO1 Wave" , "vco1-wave" , Stepped ["Saw", "Sin", "Squ"], 2 )
, ( "VCO1 Pitch" , "vco1-pitch", Linear -1 1, 0 )
, ( "VCO1 Shape" , "vco1-shape", Linear 0 1, 0.5 )
-- VCO2
, ( "VCO2 Octave" , "vco2-amp" , Stepped ["0", "1", "2", "3"], 2 )
, ( "VCO2 Wave" , "vco2-wave" , Stepped ["Saw", "Sin", "Squ"], 1 )
, ( "VCO2 Pitch" , "vco2-pitch", Linear -1 1, 0 )
, ( "VCO2 Shape" , "vco2-shape", Linear 0 1, 0.5 )
, ( "VCO2 Cross" , "vco2-crossmod" , Linear 0 1, 0 )
, ( "VCO2 EG>Pitch" , "vco2-pitch-eg-int", Linear 0 1, 0 )
-- Mixer
, ( "VCO1 Amp" , "vco1-amp" , Linear 0 1, 1 )
, ( "VCO2 Amp" , "vco2-amp" , Linear 0 1, 1 )
, ( "Noise Amp" , "noise-amp" , Linear 0 1, 0 )
-- Filter
, ( "Cutoff" , "cutoff" , Linear 0 96, 80 )
, ( "Resonance" , "resonance" , Linear 0 1, 0 )
, ( "EG Int" , "cutoff-eg-int", Linear 0 1, 0.5 )
-- Amp EG
, ( "Amp Atk" , "amp-attack" , Linear 1 1000, 10 )
, ( "Amp Dec" , "amp-decay" , Linear 1 1000, 100 )
, ( "Amp Sus" , "amp-sustain" , Linear 0 1, 0.5 )
, ( "Amp Rel" , "amp-release" , Linear 1 4000, 1000 )
-- Assignable EG
, ( "Env Atk" , "env-attack" , Linear 1 1000, 10 )
, ( "Env Dec" , "env-decay" , Linear 1 1000, 100 )
, ( "Env Sus" , "env-sustain" , Linear 0 1, 0.5 )
, ( "Env Rel" , "env-release" , Linear 1 4000, 1000 )
-- LFO
, ( "LFO Wave" , "lfo-wave" , Stepped ["Saw", "Sin", "Squ"], 0 )
, ( "LFO EG-Mod" , "lfo-eg-mod" , Stepped ["Int", "Rate", "Off"], 2 )
, ( "LFO Rate" , "lfo-rate" , Linear 0.1 250, 7 )
, ( "LFO Int" , "lfo-int" , Linear 0 1, 0.1 )
, ( "LFO Target" , "lfo-target" , Stepped ["Pitch", "Rate", "Cutoff"], 1 )
] | 2,064 | false | false | 0 | 8 | 762 | 652 | 399 | 253 | null | null |
aaronc/Idris-dev | src/Idris/AbsSyntaxTree.hs | bsd-3-clause | updateN _ n = n | 16 | updateN _ n = n | 16 | updateN _ n = n | 16 | false | false | 0 | 5 | 5 | 11 | 5 | 6 | null | null |
markus-git/imperative-edsl-vhdl | src/Language/Embedded/VHDL/Monad/Expression.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- *** Aggregates.
aggregate :: Aggregate -> Primary
aggregate = PrimAgg | 154 | aggregate :: Aggregate -> Primary
aggregate = PrimAgg | 53 | aggregate = PrimAgg | 19 | true | true | 0 | 5 | 12 | 17 | 10 | 7 | null | null |
Chobbes/Juicy.Pixels | src/Codec/Picture/Saving.hs | bsd-3-clause | imageToTiff (ImageYA8 img) = encodeTiff $ dropAlphaLayer img | 63 | imageToTiff (ImageYA8 img) = encodeTiff $ dropAlphaLayer img | 63 | imageToTiff (ImageYA8 img) = encodeTiff $ dropAlphaLayer img | 63 | false | false | 0 | 7 | 10 | 22 | 10 | 12 | null | null |
mwahab1/pandoc | src/Text/Pandoc/Writers/LaTeX.hs | gpl-2.0 | isListBlock _ = False | 38 | isListBlock _ = False | 38 | isListBlock _ = False | 38 | false | false | 0 | 5 | 20 | 9 | 4 | 5 | null | null |
jprider63/yesod | yesod-core/Yesod/Core/Json.hs | mit | parseCheckJsonBody :: (MonadHandler m, J.FromJSON a) => m (J.Result a)
parseCheckJsonBody = do
mct <- lookupHeader "content-type"
case fmap (B8.takeWhile (/= ';')) mct of
Just "application/json" -> parseJsonBody
_ -> return $ J.Error $ "Non-JSON content type: " ++ show mct
-- | Same as 'parseJsonBody', but return an invalid args response on a parse
-- error. | 385 | parseCheckJsonBody :: (MonadHandler m, J.FromJSON a) => m (J.Result a)
parseCheckJsonBody = do
mct <- lookupHeader "content-type"
case fmap (B8.takeWhile (/= ';')) mct of
Just "application/json" -> parseJsonBody
_ -> return $ J.Error $ "Non-JSON content type: " ++ show mct
-- | Same as 'parseJsonBody', but return an invalid args response on a parse
-- error. | 385 | parseCheckJsonBody = do
mct <- lookupHeader "content-type"
case fmap (B8.takeWhile (/= ';')) mct of
Just "application/json" -> parseJsonBody
_ -> return $ J.Error $ "Non-JSON content type: " ++ show mct
-- | Same as 'parseJsonBody', but return an invalid args response on a parse
-- error. | 314 | false | true | 0 | 13 | 81 | 107 | 53 | 54 | null | null |
elieux/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprPendingSplice :: OutputableBndr id => SplicePointName -> LHsExpr id -> SDoc
pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 142 | pprPendingSplice :: OutputableBndr id => SplicePointName -> LHsExpr id -> SDoc
pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 142 | pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e) | 63 | false | true | 0 | 9 | 22 | 59 | 26 | 33 | null | null |
vipo/TicTacToe | app/TicTacToe.hs | bsd-3-clause | actionText :: Action -> T.Text
actionText Defence = "to react to" | 66 | actionText :: Action -> T.Text
actionText Defence = "to react to" | 66 | actionText Defence = "to react to" | 35 | false | true | 0 | 6 | 11 | 20 | 10 | 10 | null | null |
beni55/hermit | src/HERMIT/Dictionary/Local.hs | bsd-2-clause | betaExpandR :: MonadCatch m => Rewrite c m CoreExpr
betaExpandR = setFailMsg ("Beta-expansion failed: " ++ wrongExprForm "Let (NonRec v e1) e2") $
do Let (NonRec v e1) e2 <- idR
return $ App (Lam v e2) e1
------------------------------------------------------------------------------
-- | (\\ v -> f v) ==> f | 321 | betaExpandR :: MonadCatch m => Rewrite c m CoreExpr
betaExpandR = setFailMsg ("Beta-expansion failed: " ++ wrongExprForm "Let (NonRec v e1) e2") $
do Let (NonRec v e1) e2 <- idR
return $ App (Lam v e2) e1
------------------------------------------------------------------------------
-- | (\\ v -> f v) ==> f | 321 | betaExpandR = setFailMsg ("Beta-expansion failed: " ++ wrongExprForm "Let (NonRec v e1) e2") $
do Let (NonRec v e1) e2 <- idR
return $ App (Lam v e2) e1
------------------------------------------------------------------------------
-- | (\\ v -> f v) ==> f | 269 | false | true | 0 | 11 | 60 | 84 | 40 | 44 | null | null |
HJvT/com | System/Win32/Com/HDirect/HDirect.hs | bsd-3-clause | readEnum16 :: Enum a => Ptr b -> IO a
readEnum16 p = do
x <- readInt16 (castPtr p)
return (toEnum (fromIntegral x)) | 119 | readEnum16 :: Enum a => Ptr b -> IO a
readEnum16 p = do
x <- readInt16 (castPtr p)
return (toEnum (fromIntegral x)) | 119 | readEnum16 p = do
x <- readInt16 (castPtr p)
return (toEnum (fromIntegral x)) | 81 | false | true | 0 | 11 | 26 | 65 | 29 | 36 | null | null |
plaprade/aeson | benchmarks/Typed/TH.hs | bsd-3-clause | benchmarks :: Benchmark
benchmarks =
env ((,) <$> load "json-data/twitter100.json" <*> load "json-data/jp100.json") $ \ ~(twitter100, jp100) ->
bgroup "th" [
bgroup "direct" [
bench "twitter100" $ nf encodeDirect twitter100
, bench "jp100" $ nf encodeDirect jp100
]
, bgroup "viaValue" [
bench "twitter100" $ nf encodeViaValue twitter100
, bench "jp100" $ nf encodeViaValue jp100
]
] | 441 | benchmarks :: Benchmark
benchmarks =
env ((,) <$> load "json-data/twitter100.json" <*> load "json-data/jp100.json") $ \ ~(twitter100, jp100) ->
bgroup "th" [
bgroup "direct" [
bench "twitter100" $ nf encodeDirect twitter100
, bench "jp100" $ nf encodeDirect jp100
]
, bgroup "viaValue" [
bench "twitter100" $ nf encodeViaValue twitter100
, bench "jp100" $ nf encodeViaValue jp100
]
] | 441 | benchmarks =
env ((,) <$> load "json-data/twitter100.json" <*> load "json-data/jp100.json") $ \ ~(twitter100, jp100) ->
bgroup "th" [
bgroup "direct" [
bench "twitter100" $ nf encodeDirect twitter100
, bench "jp100" $ nf encodeDirect jp100
]
, bgroup "viaValue" [
bench "twitter100" $ nf encodeViaValue twitter100
, bench "jp100" $ nf encodeViaValue jp100
]
] | 417 | false | true | 0 | 12 | 114 | 131 | 64 | 67 | null | null |
sdiehl/ghc | compiler/prelude/THNames.hs | bsd-3-clause | patSynDName = libFun (fsLit "patSynD") patSynDIdKey | 93 | patSynDName = libFun (fsLit "patSynD") patSynDIdKey | 93 | patSynDName = libFun (fsLit "patSynD") patSynDIdKey | 93 | false | false | 0 | 7 | 47 | 17 | 8 | 9 | null | null |
eniac314/wizzard | src/Graphics.hs | gpl-3.0 | dPoint :: Renderer -> Color -> Pnt -> IO ()
dPoint renderer (r,g,b,a) (x,y) =
do rendererDrawColor renderer $= V4 r g b a
drawPoint renderer (P $ V2 x y) | 162 | dPoint :: Renderer -> Color -> Pnt -> IO ()
dPoint renderer (r,g,b,a) (x,y) =
do rendererDrawColor renderer $= V4 r g b a
drawPoint renderer (P $ V2 x y) | 162 | dPoint renderer (r,g,b,a) (x,y) =
do rendererDrawColor renderer $= V4 r g b a
drawPoint renderer (P $ V2 x y) | 118 | false | true | 0 | 11 | 39 | 97 | 47 | 50 | null | null |
authchir/SoSe17-FFP-haskell-http2-server | src/Settings.hs | gpl-3.0 | getHeaderTableSize :: Endpoint -> ConnSettings -> Word32
getHeaderTableSize endp sett = getSetPairField endp $ settHeaderTableSize sett | 135 | getHeaderTableSize :: Endpoint -> ConnSettings -> Word32
getHeaderTableSize endp sett = getSetPairField endp $ settHeaderTableSize sett | 135 | getHeaderTableSize endp sett = getSetPairField endp $ settHeaderTableSize sett | 78 | false | true | 0 | 6 | 15 | 34 | 16 | 18 | null | null |
jm-g/global-variables | test/src/TestMain.hs | bsd-3-clause | main :: IO ()
main = defaultMain [ tests ] | 43 | main :: IO ()
main = defaultMain [ tests ] | 43 | main = defaultMain [ tests ] | 28 | false | true | 0 | 7 | 10 | 27 | 12 | 15 | null | null |
marcellussiegburg/autotool | collection/src/Machine/Numerical/Make.hs | gpl-2.0 | fnum :: ( Show c , Con.Check c m , Con.ConfigC c m , Machine m dat conf )
=> Con.Config c m
-> Int
-> IO ( Reporter ( N.Type c m ))
fnum conf key = do
xss <- testliste
( Con.num_args conf ) ( Con.arity conf ) ( Con.max_arg conf )
let xs = map M.Var [ 1 .. fromIntegral $ Con.arity conf ]
return $ return $ N.Make { N.op = Con.op conf
, N.key = fromIntegral key
, N.fun_info = fsep
[ text "\\" , toDoc xs , text "->", toDoc $ Con.op conf ]
, N.extra_info = vcat $
(text "Die Maschine soll die folgenden Bedingungen erfüllen:")
:
(do c <- map show ( Con.checks conf) ++ Con.conditions conf
return $ nest 4 $ text $ "* " ++ c
)
, N.args = xss
, N.cut = Con.cut conf
, N.checks = Con.checks conf
, N.start = Con.start conf
} | 973 | fnum :: ( Show c , Con.Check c m , Con.ConfigC c m , Machine m dat conf )
=> Con.Config c m
-> Int
-> IO ( Reporter ( N.Type c m ))
fnum conf key = do
xss <- testliste
( Con.num_args conf ) ( Con.arity conf ) ( Con.max_arg conf )
let xs = map M.Var [ 1 .. fromIntegral $ Con.arity conf ]
return $ return $ N.Make { N.op = Con.op conf
, N.key = fromIntegral key
, N.fun_info = fsep
[ text "\\" , toDoc xs , text "->", toDoc $ Con.op conf ]
, N.extra_info = vcat $
(text "Die Maschine soll die folgenden Bedingungen erfüllen:")
:
(do c <- map show ( Con.checks conf) ++ Con.conditions conf
return $ nest 4 $ text $ "* " ++ c
)
, N.args = xss
, N.cut = Con.cut conf
, N.checks = Con.checks conf
, N.start = Con.start conf
} | 973 | fnum conf key = do
xss <- testliste
( Con.num_args conf ) ( Con.arity conf ) ( Con.max_arg conf )
let xs = map M.Var [ 1 .. fromIntegral $ Con.arity conf ]
return $ return $ N.Make { N.op = Con.op conf
, N.key = fromIntegral key
, N.fun_info = fsep
[ text "\\" , toDoc xs , text "->", toDoc $ Con.op conf ]
, N.extra_info = vcat $
(text "Die Maschine soll die folgenden Bedingungen erfüllen:")
:
(do c <- map show ( Con.checks conf) ++ Con.conditions conf
return $ nest 4 $ text $ "* " ++ c
)
, N.args = xss
, N.cut = Con.cut conf
, N.checks = Con.checks conf
, N.start = Con.start conf
} | 824 | false | true | 0 | 19 | 409 | 362 | 181 | 181 | null | null |
forste/haReFork | refactorer/PwPf/GlobalPW.hs | bsd-3-clause | exp2Global (Exp (HsApp (Exp (HsId (HsVar (PNT (PN (UnQual "tail") _) _ (N (Just _)))))) e))
= do t <- exp2Global e
return $ Tl t
-- null exp | 154 | exp2Global (Exp (HsApp (Exp (HsId (HsVar (PNT (PN (UnQual "tail") _) _ (N (Just _)))))) e))
= do t <- exp2Global e
return $ Tl t
-- null exp | 154 | exp2Global (Exp (HsApp (Exp (HsId (HsVar (PNT (PN (UnQual "tail") _) _ (N (Just _)))))) e))
= do t <- exp2Global e
return $ Tl t
-- null exp | 154 | false | false | 0 | 20 | 42 | 99 | 47 | 52 | null | null |
pbrisbin/toml-parse | src/Text/Toml/Combinators.hs | bsd-3-clause | equal :: Parser ()
equal = satisfy it
where it (EqualT _) = Just ()
it _ = Nothing | 103 | equal :: Parser ()
equal = satisfy it
where it (EqualT _) = Just ()
it _ = Nothing | 100 | equal = satisfy it
where it (EqualT _) = Just ()
it _ = Nothing | 81 | false | true | 0 | 9 | 39 | 48 | 23 | 25 | null | null |
YtGz/Analyzing-the-Complexity-of-Monotone-Prolog | src/SymbolicEvaluationGraphs/Heuristic.hs | lgpl-3.0 | maxBranchingFactor :: Int
maxBranchingFactor = 4 | 48 | maxBranchingFactor :: Int
maxBranchingFactor = 4 | 48 | maxBranchingFactor = 4 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
josefs/sbv | SBVTestSuite/TestSuite/CRC/CCITT.hs | bsd-3-clause | -- Test suite
tests :: TestTree
tests = testGroup "CRC.CCITT"
[ goldenVsStringShow "ccitt" crcPgm
]
where crcPgm = runSAT $ forAll_ crcGood >>= output
-- We don't have native support for 48 bits in Data.SBV
-- So, represent as 32 high-bits and 16 low | 257 | tests :: TestTree
tests = testGroup "CRC.CCITT"
[ goldenVsStringShow "ccitt" crcPgm
]
where crcPgm = runSAT $ forAll_ crcGood >>= output
-- We don't have native support for 48 bits in Data.SBV
-- So, represent as 32 high-bits and 16 low | 243 | tests = testGroup "CRC.CCITT"
[ goldenVsStringShow "ccitt" crcPgm
]
where crcPgm = runSAT $ forAll_ crcGood >>= output
-- We don't have native support for 48 bits in Data.SBV
-- So, represent as 32 high-bits and 16 low | 225 | true | true | 0 | 7 | 50 | 47 | 24 | 23 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs | bsd-3-clause | gl_COLOR_TABLE_GREEN_SIZE :: GLenum
gl_COLOR_TABLE_GREEN_SIZE = 0x80DB | 70 | gl_COLOR_TABLE_GREEN_SIZE :: GLenum
gl_COLOR_TABLE_GREEN_SIZE = 0x80DB | 70 | gl_COLOR_TABLE_GREEN_SIZE = 0x80DB | 34 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | eqStringName = varQual gHC_BASE (fsLit "eqString") eqStringIdKey | 76 | eqStringName = varQual gHC_BASE (fsLit "eqString") eqStringIdKey | 76 | eqStringName = varQual gHC_BASE (fsLit "eqString") eqStringIdKey | 76 | false | false | 0 | 7 | 18 | 19 | 9 | 10 | null | null |
romanb/amazonka | amazonka-cloudsearch-domains/gen/Network/AWS/CloudSearchDomains/Search.hs | mpl-2.0 | -- | Specifies which query parser to use to process the request. If 'queryParser' is
-- not specified, Amazon CloudSearch uses the 'simple' query parser.
--
-- Amazon CloudSearch supports four query parsers:
--
-- 'simple': perform simple searches of 'text' and 'text-array' fields. By default,
-- the 'simple' query parser searches all 'text' and 'text-array' fields. You can
-- specify which fields to search by with the 'queryOptions' parameter. If you
-- prefix a search term with a plus sign (+) documents must contain the term to
-- be considered a match. (This is the default, unless you configure the default
-- operator with the 'queryOptions' parameter.) You can use the '-' (NOT), '|' (OR),
-- and '*' (wildcard) operators to exclude particular terms, find results that
-- match any of the specified terms, or search for a prefix. To search for a
-- phrase rather than individual terms, enclose the phrase in double quotes. For
-- more information, see <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html Searching for Text> in the /Amazon CloudSearch DeveloperGuide/. 'structured': perform advanced searches by combining multiple
-- expressions to define the search criteria. You can also search within
-- particular fields, search for values and ranges of values, and use advanced
-- options such as term boosting, 'matchall', and 'near'. For more information, see <http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-compound-queries.html Constructing Compound Queries> in the /Amazon CloudSearch Developer Guide/. 'lucene': search using the Apache
-- Lucene query parser syntax. For more information, see <http://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description Apache Lucene QueryParser Syntax>. 'dismax': search using the simplified subset of the Apache
-- Lucene query parser syntax defined by the DisMax query parser. For more
-- information, see <http://wiki.apache.org/solr/DisMaxQParserPlugin#Query_Syntax DisMax Query Parser Syntax>.
s1QueryParser :: Lens' Search (Maybe QueryParser)
s1QueryParser = lens _s1QueryParser (\s a -> s { _s1QueryParser = a }) | 2,203 | s1QueryParser :: Lens' Search (Maybe QueryParser)
s1QueryParser = lens _s1QueryParser (\s a -> s { _s1QueryParser = a }) | 120 | s1QueryParser = lens _s1QueryParser (\s a -> s { _s1QueryParser = a }) | 70 | true | true | 1 | 9 | 298 | 69 | 45 | 24 | null | null |
lukexi/ghc-7.8-arm64 | testsuite/tests/codeGen/should_run/cgrun064.hs | bsd-3-clause | -- Check that zero-length clones work.
test_cloneMutableArrayEmpty :: String
test_cloneMutableArrayEmpty =
let dst = runST $ do
src <- newArray len 0
dst <- cloneMutableArray src 0 0
unsafeFreezeArray dst
in shows (toList dst 0) "\n" | 277 | test_cloneMutableArrayEmpty :: String
test_cloneMutableArrayEmpty =
let dst = runST $ do
src <- newArray len 0
dst <- cloneMutableArray src 0 0
unsafeFreezeArray dst
in shows (toList dst 0) "\n" | 238 | test_cloneMutableArrayEmpty =
let dst = runST $ do
src <- newArray len 0
dst <- cloneMutableArray src 0 0
unsafeFreezeArray dst
in shows (toList dst 0) "\n" | 200 | true | true | 0 | 13 | 79 | 72 | 33 | 39 | null | null |
J2RGEZ/haskell-do | src/common/HaskellDo/Toolbar/State.hs | apache-2.0 | update ToggleEditor state = do
localIO toggleEditor
return state | 72 | update ToggleEditor state = do
localIO toggleEditor
return state | 72 | update ToggleEditor state = do
localIO toggleEditor
return state | 72 | false | false | 0 | 7 | 16 | 23 | 9 | 14 | null | null |
adamse/hindent | src/HIndent/Styles/Gibiansky.hs | bsd-3-clause | fieldUpdate :: Extend FieldUpdate
fieldUpdate (FieldUpdate _ name val) = do
pretty name
write " = "
pretty val | 116 | fieldUpdate :: Extend FieldUpdate
fieldUpdate (FieldUpdate _ name val) = do
pretty name
write " = "
pretty val | 116 | fieldUpdate (FieldUpdate _ name val) = do
pretty name
write " = "
pretty val | 82 | false | true | 0 | 7 | 24 | 45 | 19 | 26 | null | null |
beni55/hermit | src/HERMIT/Kure.hs | bsd-2-clause | -- | Rewrite the 'Id' child in an expression of the form: @Var@ 'Id'
varR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Id -> Rewrite c m CoreExpr
varR r = varT (Var <$> r) | 174 | varR :: (ExtendPath c Crumb, Monad m) => Rewrite c m Id -> Rewrite c m CoreExpr
varR r = varT (Var <$> r) | 105 | varR r = varT (Var <$> r) | 25 | true | true | 0 | 7 | 37 | 60 | 30 | 30 | null | null |
simhu/cubical | CTT.hs | mit | getIdent :: Ident -> [(Binder,a)] -> Maybe a
getIdent x defs = snd <$> lookupIdent x defs | 89 | getIdent :: Ident -> [(Binder,a)] -> Maybe a
getIdent x defs = snd <$> lookupIdent x defs | 89 | getIdent x defs = snd <$> lookupIdent x defs | 44 | false | true | 0 | 8 | 16 | 45 | 23 | 22 | null | null |
parapluu/encore | src/back/CodeGen/CCodeNames.hs | bsd-3-clause | encoreActive :: CCode Lval
encoreActive = Var "ENCORE_ACTIVE" | 61 | encoreActive :: CCode Lval
encoreActive = Var "ENCORE_ACTIVE" | 61 | encoreActive = Var "ENCORE_ACTIVE" | 34 | false | true | 1 | 5 | 7 | 20 | 8 | 12 | null | null |
naushadh/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | updateToMongoField (BackendUpdate up) = mongoUpdateToDoc up | 60 | updateToMongoField (BackendUpdate up) = mongoUpdateToDoc up | 60 | updateToMongoField (BackendUpdate up) = mongoUpdateToDoc up | 60 | false | false | 0 | 7 | 6 | 18 | 8 | 10 | null | null |
NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter14.hsproj/Idempotence.hs | mit | twice f = f . f | 15 | twice f = f . f | 15 | twice f = f . f | 15 | false | false | 1 | 5 | 5 | 16 | 6 | 10 | null | null |
tolysz/prepare-ghcjs | spec-lts8/base/GHC/IO/Handle/Internals.hs | bsd-3-clause | hClose_help :: Handle__ -> IO (Handle__, Maybe SomeException)
hClose_help handle_ =
case haType handle_ of
ClosedHandle -> return (handle_,Nothing)
_ -> do mb_exc1 <- trymaybe $ flushWriteBuffer handle_ -- interruptible
-- it is important that hClose doesn't fail and
-- leave the Handle open (#3128), so we catch
-- exceptions when flushing the buffer.
(h_, mb_exc2) <- hClose_handle_ handle_
return (h_, if isJust mb_exc1 then mb_exc1 else mb_exc2) | 552 | hClose_help :: Handle__ -> IO (Handle__, Maybe SomeException)
hClose_help handle_ =
case haType handle_ of
ClosedHandle -> return (handle_,Nothing)
_ -> do mb_exc1 <- trymaybe $ flushWriteBuffer handle_ -- interruptible
-- it is important that hClose doesn't fail and
-- leave the Handle open (#3128), so we catch
-- exceptions when flushing the buffer.
(h_, mb_exc2) <- hClose_handle_ handle_
return (h_, if isJust mb_exc1 then mb_exc1 else mb_exc2) | 552 | hClose_help handle_ =
case haType handle_ of
ClosedHandle -> return (handle_,Nothing)
_ -> do mb_exc1 <- trymaybe $ flushWriteBuffer handle_ -- interruptible
-- it is important that hClose doesn't fail and
-- leave the Handle open (#3128), so we catch
-- exceptions when flushing the buffer.
(h_, mb_exc2) <- hClose_handle_ handle_
return (h_, if isJust mb_exc1 then mb_exc1 else mb_exc2) | 490 | false | true | 0 | 13 | 169 | 115 | 59 | 56 | null | null |
janrain/riak-haskell-client | src/Network/Riak/JSON/Resolvable.hs | apache-2.0 | -- | Retrieve multiple values. If conflicting values are returned for
-- a key, 'resolve' is used to choose a winner.
getMany :: (FromJSON c, ToJSON c, Resolvable c)
=> Connection -> Bucket -> [Key] -> R -> IO [Maybe (c, VClock)]
getMany = R.getMany J.getMany | 271 | getMany :: (FromJSON c, ToJSON c, Resolvable c)
=> Connection -> Bucket -> [Key] -> R -> IO [Maybe (c, VClock)]
getMany = R.getMany J.getMany | 152 | getMany = R.getMany J.getMany | 29 | true | true | 0 | 13 | 57 | 75 | 40 | 35 | null | null |
Garygunn94/DFS | .stack-work/intero/intero86049st.hs | bsd-3-clause | fileApi :: Proxy FileApi
fileApi = Proxy | 40 | fileApi :: Proxy FileApi
fileApi = Proxy | 40 | fileApi = Proxy | 15 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
AndreasVoellmy/nettle-openflow | src/Network/Data/OpenFlow/MatchBuilder.hs | bsd-3-clause | updateSrcIPAddress, updateDstIPAddress :: IPAddressPrefix -> MatchBody -> MatchBody
updateSrcIPAddress prefix body = body { srcIPAddress = prefix} | 146 | updateSrcIPAddress, updateDstIPAddress :: IPAddressPrefix -> MatchBody -> MatchBody
updateSrcIPAddress prefix body = body { srcIPAddress = prefix} | 146 | updateSrcIPAddress prefix body = body { srcIPAddress = prefix} | 62 | false | true | 0 | 6 | 16 | 34 | 19 | 15 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs | mpl-2.0 | -- | The time when the ASP was created. Expressed in Unix time format.
aCreationTime :: Lens' Asp (Maybe Int64)
aCreationTime
= lens _aCreationTime
(\ s a -> s{_aCreationTime = a})
. mapping _Coerce | 212 | aCreationTime :: Lens' Asp (Maybe Int64)
aCreationTime
= lens _aCreationTime
(\ s a -> s{_aCreationTime = a})
. mapping _Coerce | 141 | aCreationTime
= lens _aCreationTime
(\ s a -> s{_aCreationTime = a})
. mapping _Coerce | 100 | true | true | 0 | 10 | 47 | 55 | 28 | 27 | null | null |
duplode/zip-conduit | src/Codec/Archive/Zip/Internal.hs | bsd-3-clause | localFileHeaderLength :: FileHeader -> Word32
localFileHeaderLength fh =
fromIntegral $ 4 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 4 + 2 + 2
+ length (fhFileName fh) + B.length (fhExtraField fh) | 200 | localFileHeaderLength :: FileHeader -> Word32
localFileHeaderLength fh =
fromIntegral $ 4 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 4 + 2 + 2
+ length (fhFileName fh) + B.length (fhExtraField fh) | 200 | localFileHeaderLength fh =
fromIntegral $ 4 + 2 + 2 + 2 + 2 + 2 + 4 + 4 + 4 + 2 + 2
+ length (fhFileName fh) + B.length (fhExtraField fh) | 154 | false | true | 0 | 17 | 55 | 90 | 44 | 46 | null | null |
cpettitt/tamien | Tamien/GM/EvalTest.hs | mit | testNe1 = assertProgEq 0 "main = (/= 5 5)" | 42 | testNe1 = assertProgEq 0 "main = (/= 5 5)" | 42 | testNe1 = assertProgEq 0 "main = (/= 5 5)" | 42 | false | false | 0 | 5 | 8 | 11 | 5 | 6 | null | null |
merijn/trifecta | src/Text/Trifecta/Util/Array.hs | bsd-3-clause | copy !src !_sidx@(I# sidx#) !dst !_didx@(I# didx#) _n@(I# n#) =
CHECK_LE("copy", _sidx + _n, length src)
CHECK_LE("copy", _didx + _n, lengthM dst)
ST $ \ s# -> case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
s2 -> (# s2, () #)
#else
copy !src !sidx !dst !didx n =
CHECK_LE("copy", sidx + n, length src)
CHECK_LE("copy", didx + n, lengthM dst)
copy_loop sidx didx 0 where
copy_loop !i !j !c
| c >= n = return ()
| otherwise = do
b <- index_ src i
write dst j b
copy_loop (i+1) (j+1) (c+1)
#endif
-- | Unsafely copy the elements of an array. Array bounds are not checked. | 632 | copy !src !_sidx@(I# sidx#) !dst !_didx@(I# didx#) _n@(I# n#) =
CHECK_LE("copy", _sidx + _n, length src)
CHECK_LE("copy", _didx + _n, lengthM dst)
ST $ \ s# -> case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
s2 -> (# s2, () #)
#else
copy !src !sidx !dst !didx n =
CHECK_LE("copy", sidx + n, length src)
CHECK_LE("copy", didx + n, lengthM dst)
copy_loop sidx didx 0 where
copy_loop !i !j !c
| c >= n = return ()
| otherwise = do
b <- index_ src i
write dst j b
copy_loop (i+1) (j+1) (c+1)
#endif
-- | Unsafely copy the elements of an array. Array bounds are not checked. | 632 | copy !src !_sidx@(I# sidx#) !dst !_didx@(I# didx#) _n@(I# n#) =
CHECK_LE("copy", _sidx + _n, length src)
CHECK_LE("copy", _didx + _n, lengthM dst)
ST $ \ s# -> case copyArray# (unArray src) sidx# (unMArray dst) didx# n# s# of
s2 -> (# s2, () #)
#else
copy !src !sidx !dst !didx n =
CHECK_LE("copy", sidx + n, length src)
CHECK_LE("copy", didx + n, lengthM dst)
copy_loop sidx didx 0 where
copy_loop !i !j !c
| c >= n = return ()
| otherwise = do
b <- index_ src i
write dst j b
copy_loop (i+1) (j+1) (c+1)
#endif
-- | Unsafely copy the elements of an array. Array bounds are not checked. | 632 | false | false | 5 | 11 | 156 | 150 | 76 | 74 | null | null |
kim/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/Types.hs | mpl-2.0 | -- | The ID for the origin access identity. For example: E74FTE3AJFJ256A.
cfoaiId :: Lens' CloudFrontOriginAccessIdentity Text
cfoaiId = lens _cfoaiId (\s a -> s { _cfoaiId = a }) | 179 | cfoaiId :: Lens' CloudFrontOriginAccessIdentity Text
cfoaiId = lens _cfoaiId (\s a -> s { _cfoaiId = a }) | 105 | cfoaiId = lens _cfoaiId (\s a -> s { _cfoaiId = a }) | 52 | true | true | 0 | 9 | 29 | 40 | 22 | 18 | null | null |
mettekou/ghc | compiler/utils/Bag.hs | bsd-3-clause | flatMapBagPairM f (TwoBags b1 b2) = do (r1,s1) <- flatMapBagPairM f b1
(r2,s2) <- flatMapBagPairM f b2
return (r1 `unionBags` r2, s1 `unionBags` s2) | 226 | flatMapBagPairM f (TwoBags b1 b2) = do (r1,s1) <- flatMapBagPairM f b1
(r2,s2) <- flatMapBagPairM f b2
return (r1 `unionBags` r2, s1 `unionBags` s2) | 226 | flatMapBagPairM f (TwoBags b1 b2) = do (r1,s1) <- flatMapBagPairM f b1
(r2,s2) <- flatMapBagPairM f b2
return (r1 `unionBags` r2, s1 `unionBags` s2) | 226 | false | false | 0 | 9 | 101 | 79 | 41 | 38 | null | null |
Teaspot-Studio/gore-and-ash-actor | src/Game/GoreAndAsh/Actor/Indexed.hs | bsd-3-clause | updateIndexedWire :: (GameWire m a b -> GameWire m a b) -> GameWireIndexed m i a b -> GameWireIndexed m i a b
updateIndexedWire f wi = wi { indexedWire = f $ indexedWire wi } | 175 | updateIndexedWire :: (GameWire m a b -> GameWire m a b) -> GameWireIndexed m i a b -> GameWireIndexed m i a b
updateIndexedWire f wi = wi { indexedWire = f $ indexedWire wi } | 174 | updateIndexedWire f wi = wi { indexedWire = f $ indexedWire wi } | 64 | false | true | 0 | 9 | 36 | 83 | 39 | 44 | null | null |
kelnage/tamarin-prover | lib/theory/src/Theory/Constraint/Solver/Reduction.hs | gpl-3.0 | conjoinSystem :: System -> Reduction ()
conjoinSystem sys = do
kind <- getM sSourceKind
unless (kind == get sSourceKind sys) $
error "conjoinSystem: source-kind mismatch"
joinSets sSolvedFormulas
joinSets sLemmas
joinSets sEdges
F.mapM_ insertLast $ get sLastAtom sys
F.mapM_ (uncurry insertLess) $ get sLessAtoms sys
-- split-goals are not valid anymore
mapM_ (uncurry insertGoalStatus) $ filter (not . isSplitGoal . fst) $ M.toList $ get sGoals sys
F.mapM_ insertFormula $ get sFormulas sys
-- update nodes
_ <- (setNodes . (M.toList (get sNodes sys) ++) . M.toList) =<< getM sNodes
-- conjoin equation store
eqs <- getM sEqStore
let (eqs',splitIds) = (mapAccumL addDisj eqs (map snd . getConj $ get sConjDisjEqs sys))
setM sEqStore eqs'
-- add split-goals for all disjunctions of sys
mapM_ (`insertGoal` False) $ SplitG <$> splitIds
void (solveSubstEqs SplitNow $ get sSubst sys)
-- Propagate substitution changes. Ignore change indicator, as it is
-- assumed to be 'Changed' by default.
void substSystem
where
joinSets :: Ord a => (System :-> S.Set a) -> Reduction ()
joinSets proj = modM proj (`S.union` get proj sys)
-- Unification via the equation store
-------------------------------------
-- | 'SplitStrategy' denotes if the equation store should be split into
-- multiple equation stores. | 1,437 | conjoinSystem :: System -> Reduction ()
conjoinSystem sys = do
kind <- getM sSourceKind
unless (kind == get sSourceKind sys) $
error "conjoinSystem: source-kind mismatch"
joinSets sSolvedFormulas
joinSets sLemmas
joinSets sEdges
F.mapM_ insertLast $ get sLastAtom sys
F.mapM_ (uncurry insertLess) $ get sLessAtoms sys
-- split-goals are not valid anymore
mapM_ (uncurry insertGoalStatus) $ filter (not . isSplitGoal . fst) $ M.toList $ get sGoals sys
F.mapM_ insertFormula $ get sFormulas sys
-- update nodes
_ <- (setNodes . (M.toList (get sNodes sys) ++) . M.toList) =<< getM sNodes
-- conjoin equation store
eqs <- getM sEqStore
let (eqs',splitIds) = (mapAccumL addDisj eqs (map snd . getConj $ get sConjDisjEqs sys))
setM sEqStore eqs'
-- add split-goals for all disjunctions of sys
mapM_ (`insertGoal` False) $ SplitG <$> splitIds
void (solveSubstEqs SplitNow $ get sSubst sys)
-- Propagate substitution changes. Ignore change indicator, as it is
-- assumed to be 'Changed' by default.
void substSystem
where
joinSets :: Ord a => (System :-> S.Set a) -> Reduction ()
joinSets proj = modM proj (`S.union` get proj sys)
-- Unification via the equation store
-------------------------------------
-- | 'SplitStrategy' denotes if the equation store should be split into
-- multiple equation stores. | 1,437 | conjoinSystem sys = do
kind <- getM sSourceKind
unless (kind == get sSourceKind sys) $
error "conjoinSystem: source-kind mismatch"
joinSets sSolvedFormulas
joinSets sLemmas
joinSets sEdges
F.mapM_ insertLast $ get sLastAtom sys
F.mapM_ (uncurry insertLess) $ get sLessAtoms sys
-- split-goals are not valid anymore
mapM_ (uncurry insertGoalStatus) $ filter (not . isSplitGoal . fst) $ M.toList $ get sGoals sys
F.mapM_ insertFormula $ get sFormulas sys
-- update nodes
_ <- (setNodes . (M.toList (get sNodes sys) ++) . M.toList) =<< getM sNodes
-- conjoin equation store
eqs <- getM sEqStore
let (eqs',splitIds) = (mapAccumL addDisj eqs (map snd . getConj $ get sConjDisjEqs sys))
setM sEqStore eqs'
-- add split-goals for all disjunctions of sys
mapM_ (`insertGoal` False) $ SplitG <$> splitIds
void (solveSubstEqs SplitNow $ get sSubst sys)
-- Propagate substitution changes. Ignore change indicator, as it is
-- assumed to be 'Changed' by default.
void substSystem
where
joinSets :: Ord a => (System :-> S.Set a) -> Reduction ()
joinSets proj = modM proj (`S.union` get proj sys)
-- Unification via the equation store
-------------------------------------
-- | 'SplitStrategy' denotes if the equation store should be split into
-- multiple equation stores. | 1,397 | false | true | 0 | 15 | 337 | 404 | 191 | 213 | null | null |
briansteffens/basm | src/Main.hs | gpl-2.0 | parseArgs' (a:as) args = parseArgs' as (parseArg a args) | 56 | parseArgs' (a:as) args = parseArgs' as (parseArg a args) | 56 | parseArgs' (a:as) args = parseArgs' as (parseArg a args) | 56 | false | false | 0 | 7 | 8 | 31 | 15 | 16 | null | null |
tgdavies/codeworld | codeworld-base/src/Internal/Picture.hs | apache-2.0 | -- | A thin polygon with these points as vertices
thickPolygon :: HasCallStack => ([Point], Number) -> Picture
thickPolygon (ps, n) = CWPic (CW.thickPolygon (toDouble n) (map toCWVect ps)) | 188 | thickPolygon :: HasCallStack => ([Point], Number) -> Picture
thickPolygon (ps, n) = CWPic (CW.thickPolygon (toDouble n) (map toCWVect ps)) | 138 | thickPolygon (ps, n) = CWPic (CW.thickPolygon (toDouble n) (map toCWVect ps)) | 77 | true | true | 0 | 9 | 28 | 66 | 35 | 31 | null | null |
rbermani/ib-api | src/IB/Client/Parser.hs | gpl-3.0 | pBarData :: Parser BarData
pBarData = BarData <$>
pStr
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrInt
<*> pStrDouble
<*> pStr
<*> pStrInt
<?> "Bar Data" | 221 | pBarData :: Parser BarData
pBarData = BarData <$>
pStr
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrInt
<*> pStrDouble
<*> pStr
<*> pStrInt
<?> "Bar Data" | 221 | pBarData = BarData <$>
pStr
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrDouble
<*> pStrInt
<*> pStrDouble
<*> pStr
<*> pStrInt
<?> "Bar Data" | 194 | false | true | 27 | 5 | 71 | 83 | 43 | 40 | null | null |
keithodulaigh/Hets | Isabelle/IsaConsts.hs | gpl-2.0 | binDisj = binVNameAppl disjV | 28 | binDisj = binVNameAppl disjV | 28 | binDisj = binVNameAppl disjV | 28 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
AkronCodeClub/edX-FP101x-Oct-2014 | sean_o/lab8.hs | mit | funkyMap f g (a1 : (a2 : as)) = f a1 : (g a2) : (funkyMap f g as) | 65 | funkyMap f g (a1 : (a2 : as)) = f a1 : (g a2) : (funkyMap f g as) | 65 | funkyMap f g (a1 : (a2 : as)) = f a1 : (g a2) : (funkyMap f g as) | 65 | false | false | 0 | 8 | 18 | 57 | 27 | 30 | null | null |
rfranek/duckling | exe/Duckling/Ranking/Generate.hs | bsd-3-clause | -- -----------------------------------------------------------------
-- Printing helpers
baseMode :: PPHsMode
baseMode = PPHsMode
{ classIndent = 2
, doIndent = 3
, multiIfIndent = 3
, caseIndent = 2
, letIndent = 2
, whereIndent = 2
, onsideIndent = 2
, spacing = True
, layout = PPOffsideRule
, linePragmas = False
} | 373 | baseMode :: PPHsMode
baseMode = PPHsMode
{ classIndent = 2
, doIndent = 3
, multiIfIndent = 3
, caseIndent = 2
, letIndent = 2
, whereIndent = 2
, onsideIndent = 2
, spacing = True
, layout = PPOffsideRule
, linePragmas = False
} | 283 | baseMode = PPHsMode
{ classIndent = 2
, doIndent = 3
, multiIfIndent = 3
, caseIndent = 2
, letIndent = 2
, whereIndent = 2
, onsideIndent = 2
, spacing = True
, layout = PPOffsideRule
, linePragmas = False
} | 262 | true | true | 0 | 7 | 106 | 85 | 51 | 34 | null | null |
kairuku/stack | src/Stack/Build.hs | bsd-3-clause | -- | Get the @BaseConfigOpts@ necessary for constructing configure options
mkBaseConfigOpts :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m)
=> BuildOpts -> m BaseConfigOpts
mkBaseConfigOpts bopts = do
snapDBPath <- packageDatabaseDeps
localDBPath <- packageDatabaseLocal
snapInstallRoot <- installationRootDeps
localInstallRoot <- installationRootLocal
return BaseConfigOpts
{ bcoSnapDB = snapDBPath
, bcoLocalDB = localDBPath
, bcoSnapInstallRoot = snapInstallRoot
, bcoLocalInstallRoot = localInstallRoot
, bcoBuildOpts = bopts
}
-- | Provide a function for loading package information from the package index | 714 | mkBaseConfigOpts :: (MonadIO m, MonadReader env m, HasEnvConfig env, MonadThrow m)
=> BuildOpts -> m BaseConfigOpts
mkBaseConfigOpts bopts = do
snapDBPath <- packageDatabaseDeps
localDBPath <- packageDatabaseLocal
snapInstallRoot <- installationRootDeps
localInstallRoot <- installationRootLocal
return BaseConfigOpts
{ bcoSnapDB = snapDBPath
, bcoLocalDB = localDBPath
, bcoSnapInstallRoot = snapInstallRoot
, bcoLocalInstallRoot = localInstallRoot
, bcoBuildOpts = bopts
}
-- | Provide a function for loading package information from the package index | 639 | mkBaseConfigOpts bopts = do
snapDBPath <- packageDatabaseDeps
localDBPath <- packageDatabaseLocal
snapInstallRoot <- installationRootDeps
localInstallRoot <- installationRootLocal
return BaseConfigOpts
{ bcoSnapDB = snapDBPath
, bcoLocalDB = localDBPath
, bcoSnapInstallRoot = snapInstallRoot
, bcoLocalInstallRoot = localInstallRoot
, bcoBuildOpts = bopts
}
-- | Provide a function for loading package information from the package index | 506 | true | true | 0 | 9 | 163 | 118 | 62 | 56 | null | null |
ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Processor/Decompose.hs | bsd-3-clause | mkProbs :: (Fun f, Show f, Show v, Ord f, Ord v) => Problem f v -> DecomposeBound -> Rules f v -> Rules f v -> (Problem f v, Problem f v)
mkProbs prob compfn dps trs = (rProb, sProb)
where
rDps = dps `RS.intersect` Prob.strictDPs prob
rTrs = trs `RS.intersect` Prob.strictTrs prob
sDps = Prob.strictDPs prob `RS.difference` rDps
sTrs = Prob.strictTrs prob `RS.difference` rTrs
rProb = prob
{ Prob.strictDPs = rDps
, Prob.strictTrs = rTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` sDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` sTrs
, Prob.dpGraph = DG.setWeak sDps (Prob.dpGraph prob) }
sProb = Prob.sanitiseDPGraph $
if isAdditive compfn
then prob
{ Prob.strictDPs = sDps
, Prob.strictTrs = sTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` rDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` rTrs }
else prob
{ Prob.strictTrs = sTrs
, Prob.strictDPs = sDps }
isAdditive c = c == Add || c == RelativeAdd | 1,073 | mkProbs :: (Fun f, Show f, Show v, Ord f, Ord v) => Problem f v -> DecomposeBound -> Rules f v -> Rules f v -> (Problem f v, Problem f v)
mkProbs prob compfn dps trs = (rProb, sProb)
where
rDps = dps `RS.intersect` Prob.strictDPs prob
rTrs = trs `RS.intersect` Prob.strictTrs prob
sDps = Prob.strictDPs prob `RS.difference` rDps
sTrs = Prob.strictTrs prob `RS.difference` rTrs
rProb = prob
{ Prob.strictDPs = rDps
, Prob.strictTrs = rTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` sDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` sTrs
, Prob.dpGraph = DG.setWeak sDps (Prob.dpGraph prob) }
sProb = Prob.sanitiseDPGraph $
if isAdditive compfn
then prob
{ Prob.strictDPs = sDps
, Prob.strictTrs = sTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` rDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` rTrs }
else prob
{ Prob.strictTrs = sTrs
, Prob.strictDPs = sDps }
isAdditive c = c == Add || c == RelativeAdd | 1,073 | mkProbs prob compfn dps trs = (rProb, sProb)
where
rDps = dps `RS.intersect` Prob.strictDPs prob
rTrs = trs `RS.intersect` Prob.strictTrs prob
sDps = Prob.strictDPs prob `RS.difference` rDps
sTrs = Prob.strictTrs prob `RS.difference` rTrs
rProb = prob
{ Prob.strictDPs = rDps
, Prob.strictTrs = rTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` sDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` sTrs
, Prob.dpGraph = DG.setWeak sDps (Prob.dpGraph prob) }
sProb = Prob.sanitiseDPGraph $
if isAdditive compfn
then prob
{ Prob.strictDPs = sDps
, Prob.strictTrs = sTrs
, Prob.weakDPs = Prob.weakDPs prob `RS.union` rDps
, Prob.weakTrs = Prob.weakTrs prob `RS.union` rTrs }
else prob
{ Prob.strictTrs = sTrs
, Prob.strictDPs = sDps }
isAdditive c = c == Add || c == RelativeAdd | 935 | false | true | 0 | 11 | 312 | 389 | 212 | 177 | null | null |
typedvar/hLand | hcore/GCompiler.hs | mit | argOffset :: Int -> GMEnvironment -> GMEnvironment
argOffset n env = [(v, n+m) | (v,m) <- env] | 94 | argOffset :: Int -> GMEnvironment -> GMEnvironment
argOffset n env = [(v, n+m) | (v,m) <- env] | 94 | argOffset n env = [(v, n+m) | (v,m) <- env] | 43 | false | true | 0 | 8 | 16 | 51 | 28 | 23 | null | null |
snoyberg/ghc | compiler/types/Type.hs | bsd-3-clause | tyConTyBinders :: TyCon -> [TyBinder]
-- Return the tyConBinders in TyBinder form
tyConTyBinders tycon = tyConBindersTyBinders (tyConBinders tycon) | 147 | tyConTyBinders :: TyCon -> [TyBinder]
tyConTyBinders tycon = tyConBindersTyBinders (tyConBinders tycon) | 103 | tyConTyBinders tycon = tyConBindersTyBinders (tyConBinders tycon) | 65 | true | true | 0 | 7 | 17 | 34 | 17 | 17 | null | null |
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | tests/TInterCode.hs | mit | testInterCode07 = "IntermediateCode: " ~:
InterCode.process output @=? InterCode.process input07 | 98 | testInterCode07 = "IntermediateCode: " ~:
InterCode.process output @=? InterCode.process input07 | 98 | testInterCode07 = "IntermediateCode: " ~:
InterCode.process output @=? InterCode.process input07 | 98 | false | false | 0 | 8 | 11 | 24 | 11 | 13 | null | null |
DavidAlphaFox/ghc | libraries/base/Control/Exception/Base.hs | bsd-3-clause | -- No location info unfortunately
absentError s = error ("Oops! Entered absent arg " ++ unpackCStringUtf8# s) | 123 | absentError s = error ("Oops! Entered absent arg " ++ unpackCStringUtf8# s) | 89 | absentError s = error ("Oops! Entered absent arg " ++ unpackCStringUtf8# s) | 89 | true | false | 1 | 8 | 30 | 27 | 11 | 16 | null | null |
alexbiehl/StringMap | tests/Dim2Test.hs | mit | mkP :: Int -> Int -> Point
mkP x y = P (x, y) | 45 | mkP :: Int -> Int -> Point
mkP x y = P (x, y) | 45 | mkP x y = P (x, y) | 18 | false | true | 0 | 6 | 13 | 37 | 18 | 19 | null | null |
sleepomeno/TForth | src/TF/Printer.hs | apache-2.0 | realtype :: PrimType -> Doc
realtype (PT x _ _ _ ) = text (show x) | 66 | realtype :: PrimType -> Doc
realtype (PT x _ _ _ ) = text (show x) | 66 | realtype (PT x _ _ _ ) = text (show x) | 38 | false | true | 0 | 7 | 15 | 39 | 19 | 20 | null | null |
m4lvin/robbed | tests/SimpleFormula/Types.hs | bsd-3-clause | showFormula :: Formula -> String
showFormula (Var i) = printf "x[%d]" i | 71 | showFormula :: Formula -> String
showFormula (Var i) = printf "x[%d]" i | 71 | showFormula (Var i) = printf "x[%d]" i | 38 | false | true | 0 | 9 | 11 | 35 | 15 | 20 | null | null |
neale/CS-program | 581-FunctionalProgramming/week5/HW5.ratzlafn.hs | unlicense | expr (ExLeq x y) (l, r) = case (x, y) of
(Lit x, Lit y) -> Bl (x <= y)
_ -> Error
--given an bool to negate, and a state | 196 | expr (ExLeq x y) (l, r) = case (x, y) of
(Lit x, Lit y) -> Bl (x <= y)
_ -> Error
--given an bool to negate, and a state | 196 | expr (ExLeq x y) (l, r) = case (x, y) of
(Lit x, Lit y) -> Bl (x <= y)
_ -> Error
--given an bool to negate, and a state | 196 | false | false | 0 | 10 | 106 | 70 | 37 | 33 | null | null |
vikraman/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | ppr_dec _ (RoleAnnotD name roles)
= hsep [ text "type role", ppr name ] <+> hsep (map ppr roles) | 98 | ppr_dec _ (RoleAnnotD name roles)
= hsep [ text "type role", ppr name ] <+> hsep (map ppr roles) | 98 | ppr_dec _ (RoleAnnotD name roles)
= hsep [ text "type role", ppr name ] <+> hsep (map ppr roles) | 98 | false | false | 0 | 8 | 20 | 49 | 23 | 26 | null | null |
schell/lamdu | bottlelib/Graphics/UI/Bottle/View.hs | gpl-3.0 | scaled :: Vector2 Draw.R -> Lens.Iso' View View
scaled factor =
Lens.iso (scale factor) (scale (1/factor))
where
scale ratio (size, frame) =
(size*ratio, Anim.scale ratio frame) | 191 | scaled :: Vector2 Draw.R -> Lens.Iso' View View
scaled factor =
Lens.iso (scale factor) (scale (1/factor))
where
scale ratio (size, frame) =
(size*ratio, Anim.scale ratio frame) | 191 | scaled factor =
Lens.iso (scale factor) (scale (1/factor))
where
scale ratio (size, frame) =
(size*ratio, Anim.scale ratio frame) | 143 | false | true | 0 | 9 | 39 | 100 | 47 | 53 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.