code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Main where
import Test.HUnit hiding (path)
import TestUtil
import Database.TokyoCabinet.BDB
import qualified Database.TokyoCabinet.BDB.Cursor as C
import Data.Maybe (catMaybes, fromJust)
import Data.List (sort)
import Control.Monad
dbname :: String
dbname = "foo.tcb"
withOpenedBDB :: String -> (BDB -> IO a) ... | tom-lpsd/tokyocabinet-haskell | tests/BDBTest.hs | bsd-3-clause | 8,667 | 0 | 17 | 3,168 | 3,298 | 1,665 | 1,633 | 231 | 1 |
module Sexy.Classes.Show (Show(..)) where
import Sexy.Data.String (String)
class Show a where
show :: a -> String
| DanBurton/sexy | src/Sexy/Classes/Show.hs | bsd-3-clause | 119 | 0 | 7 | 21 | 45 | 27 | 18 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.SubmissionTable (
AdministratedCourses
, AdministratedGroups
, CourseTestScriptInfos
, SubmissionTableContext(..)
, submissionTable
, submissionTableContext
, sortUserLines
, resultCell
) where
import Control.Monad
import ... | pgj/bead | src/Bead/View/Content/SubmissionTable.hs | bsd-3-clause | 15,319 | 0 | 25 | 3,713 | 4,168 | 2,154 | 2,014 | 284 | 5 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnBinds]{Renaming and dependency analysis of bindings}
This module does renaming and dependency analysis on value bindings in
the abstract syntax. It does {\em not} do cycle-checks on class or
type-synonym declarations; those cannot be done at thi... | vTurbine/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | 49,610 | 0 | 22 | 15,412 | 9,278 | 4,895 | 4,383 | 565 | 23 |
----------------------------------------------------------------------------
-- |
-- Module : Data.Condition
-- Copyright : (c) Sergey Vinokurov 2016
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
-- Created : Monday, 12 September 2016
-------------------------------------... | sergv/tags-server | src/Data/Condition.hs | bsd-3-clause | 1,207 | 0 | 8 | 193 | 192 | 108 | 84 | 21 | 1 |
-- Copyright (C) 2015-2016 Moritz Schulte <mtesseract@silverratio.net>
module Wosa where
import Data.Map
import Control.Exception
import Data.Typeable
import Data.IORef
import Nebelfiller.Datatypes
-- | These are the possible "actions". These allow for transforming a
-- given state to some other state.
data WosaAct... | mtesseract/wosa | src/Wosa.hs | bsd-3-clause | 4,301 | 0 | 10 | 1,416 | 647 | 378 | 269 | 64 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
module Facebook.Object.Marketing.AdImage where
import Facebook.Records hiding (get)
import qualified Facebook.Records as Rec
impo... | BeautifulDestinations/fb | src/Facebook/Object/Marketing/AdImage.hs | bsd-3-clause | 8,508 | 0 | 13 | 1,308 | 2,450 | 1,316 | 1,134 | -1 | -1 |
{-# LANGUAGE CPP
, DataKinds
, InstanceSigs
, GADTs
, KindSignatures
, Rank2Types
, TypeOperators
#-}
module Language.Hakaru.Syntax.Reducer where
import Language.Hakaru.Types.DataKind
import Language.Hakaru.Types.HClasses
import Language.Hak... | zaxtax/hakaru | haskell/Language/Hakaru/Syntax/Reducer.hs | bsd-3-clause | 3,652 | 0 | 12 | 1,172 | 1,427 | 708 | 719 | 87 | 1 |
module NIB
( Switch (..)
, Endpoint (..)
, FlowTbl (..)
, FlowTblEntry
, PortCfg (..)
, Msg (..)
, Queue (..)
, SwitchType (..)
, newQueue
, switchWithNPorts
, newEmptyNIB
, addSwitch
, addPort
, addEndpoint
, linkPorts
, getPath
, endpointPort
, getEthFromIP
, snapshot
, NIB
,... | brownsys/pane | src/NIB.hs | bsd-3-clause | 19,672 | 2 | 35 | 5,359 | 6,250 | 3,092 | 3,158 | -1 | -1 |
module Quiz.Config ( getConfig ) where
import Data.Yaml
import Quiz.Prelude
import System.Environment
import System.Exit
import Quiz.Types
-- | Deserialize command-line arguments and quiz file.
getConfig :: IO (Int, Map Text Quiz)
getConfig = do
-- Read and decode command line arguments
(port, quizFile) <- ge... | michael-swan/quick-quiz | src/Quiz/Config.hs | bsd-3-clause | 1,379 | 0 | 10 | 311 | 352 | 178 | 174 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Trombone.Db.Reflection
( probeTemplate
, uscToCamel
) where
import Data.Text ( Text, pack, unpack )
import Database.HsSqlPpp.Ast
import Database.HsSqlPpp.Parser
import Trombone.Db.Parse
import Trombone.Db.Template
import qual... | johanneshilden/trombone | Trombone/Db/Reflection.hs | bsd-3-clause | 3,056 | 0 | 12 | 939 | 958 | 497 | 461 | 56 | 5 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
-- | Display mode (resolution, refresh rate, etc.)
module Haskus.System.Linux.Graphics.Mode
( Mode(..)
, ModeType(..)
, ModeTypes
, ModeFlag(..)
, ModeFlags
-- * Low level
, fromStructMode
, toStructMo... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/System/Linux/Graphics/Mode.hs | bsd-3-clause | 3,279 | 0 | 13 | 972 | 632 | 374 | 258 | 117 | 1 |
{-
PlayFile.hs (adapted from playfile.c in freealut)
Copyright (c) Sven Panne 2005 <sven.panne@aedion.de>
This file is part of the ALUT package & distributed under a BSD-style license
See the file libraries/ALUT/LICENSE
-}
import Control.Monad ( when, unless )
import Data.List ( intersperse )
import Sound.... | FranklinChen/hugs98-plus-Sep2006 | packages/ALUT/examples/Basic/PlayFile.hs | bsd-3-clause | 1,618 | 0 | 18 | 400 | 338 | 165 | 173 | 28 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | SIG page controller.
module HL.Controller.SIG where
import HL.Controller
import HL.Controller.Markdown
import HL.View
-- | SIG controller.
getSIGR :: C (Html ())
getSIGR =
markdownPage [] "Commercial Haskell Special Interest Group" "sig.md"
| commercialhaskell/commercialhaskell.com | src/HL/Controller/SIG.hs | bsd-3-clause | 287 | 0 | 8 | 43 | 56 | 33 | 23 | 8 | 1 |
{-# LANGUAGE PackageImports #-}
import "UCD" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| mithrandi/ucd-api | app/devel.hs | mit | 121 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
module MothAST where
import Control.Monad.Reader
type VName = String
type Label = String
type OpName = String
data Typ = TVar VName
| TBool
| TFun [Typ] Typ
| TNum
| TUndefined
| TObj [(Label,Typ)]
| TString
data MothExp = MVar VName
| MVarDecl VNam... | clarissalittler/moth-lang | MothAST.hs | mit | 3,315 | 1 | 14 | 1,098 | 986 | 513 | 473 | -1 | -1 |
-- -- $Id$
module Pump.Positiv
( positiv )
where
import Pump.Type
import Language.Type
import Autolib.Util.Seed
import Autolib.ToDoc
import Autolib.Size
import Control.Monad ( guard )
import Autolib.Reporter
import Autolib.FiniteMap
import Autolib.Set
import Data.List ( sort, nub )
import Data.Maybe ( isNothing )... | florianpilz/autotool | src/Pump/Positiv.hs | gpl-2.0 | 1,979 | 69 | 9 | 574 | 598 | 319 | 279 | -1 | -1 |
module Rasa.Internal.AsyncSpec where
import Test.Hspec
spec :: Spec
spec = return ()
| samcal/rasa | rasa/test/Rasa/Internal/AsyncSpec.hs | gpl-3.0 | 87 | 0 | 6 | 14 | 27 | 16 | 11 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-support/gen/Network/AWS/Support/DescribeAttachment.hs | mpl-2.0 | 3,977 | 3 | 9 | 798 | 457 | 276 | 181 | 56 | 1 |
module Lamb where
addOneIfOdd n = case odd n of
True -> f n
False -> n
where f = \n -> n + 1
-- p. 355 pattern matching
f :: (a, b, c) -> (d, e, f) -> ((a, d), (c, f))
f (a, _, c) (d, _, f) = ((a, d), (c, f))
-- p. 360 case expressions
functionC x y = if (x > y) then x else y
funcC ... | m3mitsuppe/haskell | exercises/ch_07_01_lambda.hs | unlicense | 1,332 | 0 | 9 | 533 | 693 | 361 | 332 | 49 | 3 |
module Foundation
( App (..)
, Route (..)
, AppMessage (..)
, resourcesApp
, Handler
, Widget
, Form
, maybeAuth
, requireAuth
, module Settings
, module Model
) where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Ye... | sordina/RedditFollow | Foundation.hs | bsd-2-clause | 6,098 | 0 | 17 | 1,325 | 873 | 488 | 385 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/EnableSnapshotCopy.hs | mpl-2.0 | 4,996 | 0 | 9 | 1,003 | 568 | 348 | 220 | 69 | 1 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | crogers1/manager | apptool/OVF/Parse.hs | gpl-2.0 | 25,107 | 25 | 18 | 4,790 | 7,024 | 3,567 | 3,457 | 441 | 13 |
{-# LANGUAGE TupleSections #-}
-- | haste-install-his; install all .hi files in a directory.
module Main where
import Haste.Environment
import System.Environment
import Control.Applicative
import Control.Monad
import Data.List
import Data.Char
import Control.Shell
main :: IO ()
main = do
args <- getArgs
case args ... | joelburget/haste-compiler | src/haste-install-his.hs | bsd-3-clause | 1,360 | 0 | 14 | 305 | 484 | 244 | 240 | 38 | 2 |
module CaseIn2 where
foo :: Int -> Int
foo x
= case x of
1 -> foo 0
0 -> ((\ a b c -> addThree a b c) 1 2 3) +
((\ y -> plusOne y) 2)
where
addThree a b c = (a + b) + c
plusOne y = y + 1
main = foo 10
| kmate/HaRe | old/testing/introNewDef/CaseIn2AST.hs | bsd-3-clause | 313 | 0 | 13 | 172 | 135 | 70 | 65 | 10 | 2 |
{-| Metadata daemon types.
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of ... | apyrgio/ganeti | src/Ganeti/Metad/Types.hs | bsd-2-clause | 1,443 | 0 | 5 | 224 | 35 | 22 | 13 | 4 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
module T14955a where
import Prelude (Bool(..), (||), (&&))
-- Implementation 1
class Prop r where
or :: r -> r -> r
and :: r -> r -> r
true :: r
false :: r
instance Prop Bool where
or = (||)
and = (&&)
true = True
false = False
... | sdiehl/ghc | testsuite/tests/perf/should_run/T14955a.hs | bsd-3-clause | 1,272 | 0 | 10 | 315 | 510 | 285 | 225 | 46 | 1 |
-- !! fromRational woes
import Data.Ratio -- 1.3
main = putStr (
shows tinyFloat ( '\n'
: shows t_f ( '\n'
: shows hugeFloat ( '\n'
: shows h_f ( '\n'
: shows tinyDouble ( '\n'
: shows t_d ( '\n'
: shows hugeDouble ( '\n'
: shows h_d ( '\n'
: shows x_f ( '\n'
: shows x_d ( '\n'
:... | urbanslug/ghc | testsuite/tests/codeGen/should_run/cgrun034.hs | bsd-3-clause | 4,739 | 44 | 41 | 1,297 | 1,104 | 594 | 510 | 79 | 3 |
-- There was a bug in 6.12 that meant that the binding
-- for 'rght' was initially determined (correctly) to be
-- strictly demanded, but the FloatOut pass made it lazy
--
-- The test compiles the program and greps for the
-- binding of 'rght' to check that it is marked strict
-- something like this:
-- rght [D... | siddhanathan/ghc | testsuite/tests/simplCore/should_compile/EvalTest.hs | bsd-3-clause | 1,397 | 0 | 11 | 360 | 449 | 240 | 209 | 35 | 1 |
-- | Athena.Translation.Utils module.
{-# LANGUAGE UnicodeSyntax #-}
module Athena.Translation.Utils
( stdName
, subIndex
) where
------------------------------------------------------------------------------
import Data.List.Split ( splitOn )
-----------------------------------------------------------------... | jonaprieto/athena | src/Athena/Translation/Utils.hs | mit | 676 | 0 | 7 | 103 | 160 | 86 | 74 | 19 | 1 |
-- file: ch03/NestedLets.hs
-- From chapter 3, http://book.realworldhaskell.org/read/defining-types-streamlining-functions.html
foo = let a = 1
in let b = 2
in a + b
bar = let x = 1
in ((let x = "foo" in x), x)
quux a = let a = "foo"
in a ++ "eek!"
| Sgoettschkes/learning | haskell/RealWorldHaskell/ch03/NestedLets.hs | mit | 272 | 0 | 12 | 71 | 93 | 47 | 46 | 7 | 1 |
module TeX.Count
( Count(CountOverflow)
)
where
data Count = Count Integer | CountOverflow
deriving (Eq, Show)
checkOverflowed :: Count -> Count
checkOverflowed (Count num)
| num < -2147483647 = CountOverflow
| num > 2147483647 = CountOverflow
| otherwise = (Count num)
checkOverflowed CountOverflow = CountOve... | spicyj/tex-parser | src/TeX/Count.hs | mit | 846 | 0 | 9 | 186 | 369 | 191 | 178 | 26 | 1 |
module UnitB.Expr.Parser where
import Logic.Expr
import Logic.Expr.Parser.Internal.Setting
import UnitB.UnitB
import Control.Lens hiding ( indices )
import Data.Map hiding ( map )
import qualified Data.Map as M
machine_setting :: Machine -> ParserSetting
machine_setting m = setting
& dec... | literate-unitb/literate-unitb | src/UnitB/Expr/Parser.hs | mit | 833 | 0 | 11 | 182 | 253 | 144 | 109 | 18 | 1 |
-- Implemntation of a merge sort.
-- [] and [a] are already sorted,
-- and any other list is sorted by merging together
-- the two lists that result from sorting the two halves of the list separately.
halve :: [a] -> ([a],[a])
halve xs = splitAt (length xs `div` 2) xs
merge :: Ord a => [a] -> [a] -> [a]
merge xs [] ... | calebgregory/fp101x | wk3/msort.hs | mit | 604 | 0 | 9 | 147 | 310 | 168 | 142 | 14 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Main where
-- import Options.Applicative
import Control.Monad (filterM, forM)
import Data.List (find, isSuffixOf)
import Data.String.Utils (join)
import Deve... | haskellbr/missingh | package-splitter/src/Main.hs | mit | 3,526 | 1 | 20 | 1,260 | 845 | 431 | 414 | 70 | 3 |
import Control.Error
import Control.Monad.Trans
data Failure
= NonPositive Int
| ReadError String
deriving Show
main :: IO ()
main = do
e <- runEitherT $ do
liftIO $ putStrLn "Enter a positive number."
s <- liftIO getLine
n <- tryRead (ReadError s) s
if n > 0
then return $ n + ... | riwsky/wiwinwlh | src/eithert.hs | mit | 482 | 0 | 14 | 149 | 170 | 82 | 88 | 18 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-job-jobcommand.html
module Stratosphere.ResourceProperties.GlueJobJobCommand where
import Stratosphere.... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/GlueJobJobCommand.hs | mit | 1,718 | 0 | 12 | 205 | 264 | 151 | 113 | 27 | 1 |
{-|
Module : BreadU.Pages.Markup.Common.Footer
Description : HTML markup for pages' top area.
Stability : experimental
Portability : POSIX
HTML markup for pages' top area.
Please don't confuse it with <head>-tag, it's defined in another module.
-}
module BreadU.Pages.Markup.Common.Footer
( commonFooter
... | denisshevchenko/breadu.info | src/lib/BreadU/Pages/Markup/Common/Footer.hs | mit | 2,635 | 0 | 21 | 835 | 523 | 273 | 250 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- | Controlling biegunka interpreters and their composition
module Control.Biegunka.Settings
( -- * Settings common for all interpreters
Settings
, HasSettings(..)
, HasRunRoot(..)
, defaultSettings
, logger
, Templates(..)
-- ** Bi... | biegunka/biegunka | src/Control/Biegunka/Settings.hs | mit | 2,392 | 0 | 12 | 535 | 653 | 378 | 275 | 59 | 2 |
{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable, FlexibleInstances #-}
module Program.Array.Instance where
import Program.Array.Statement
import Program.Array.Value
import Program.Array.Semantics
import qualified Program.Array.Roll as R
import qualified Program.Array.Config as F
import Program.General.Class
... | Erdwolf/autotool-bonn | src/Program/Array/Instance.hs | gpl-2.0 | 2,171 | 12 | 14 | 518 | 576 | 329 | 247 | 53 | 1 |
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{- |
Module : $Header$
Description : CASL signatures colimits
Copyright : (c) Mihai Codescu, and Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : mcodescu@informatik.uni-bremen.de
Stability : provisional
Portability : ... | nevrenato/Hets_Fork | CASL/ColimSign.hs | gpl-2.0 | 22,130 | 4 | 32 | 7,884 | 7,505 | 4,003 | 3,502 | 394 | 5 |
module Language.Dockerfile.EDSL.PluginsSpec
where
-- import Language.Dockerfile.EDSL
-- import Language.Dockerfile.EDSL.Plugins
import Test.Hspec
spec =
describe "listPlugins" $
it "lists docker images matching language-dockerfile-*" pending
-- str <- toDockerFi... | beijaflor-io/haskell-language-dockerfile | test/Language/Dockerfile/EDSL/PluginsSpec.hs | gpl-3.0 | 713 | 0 | 6 | 321 | 41 | 28 | 13 | 5 | 1 |
module HEP.Automation.MadGraph.Dataset.Set20110302set3 where
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.Cluster
import HEP.Automation.MadGraph.SetupType
import HEP.Automation.MadGraph.Dataset.Common
my_ssetup :: S... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110302set3.hs | gpl-3.0 | 1,747 | 0 | 8 | 435 | 366 | 226 | 140 | 47 | 1 |
module UnitConversions where
import Data.Maybe (mapMaybe)
import Data.Text (pack, replace, unpack)
import Text.Read (readMaybe)
import Text.Regex.TDFA ((=~))
import Types
-- NOTE: Here, "imperial" means "U.S. Customary". Conversion to British,
-- Australian, Canadian, etc. imperial units is not yet implemented.
data... | JackKiefer/herms | src/UnitConversions.hs | gpl-3.0 | 4,486 | 0 | 12 | 987 | 1,458 | 780 | 678 | 95 | 13 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
-- |
-- Module : Aura.Core
-- Copyright : (c) Colin Woodbury, 2012 - 2020
-- License : GPL3
-- Maintainer: Colin Woodbury <colin@fosskers.ca>
--
-- Core types and functions which belong nowhere else.
module Aura.Core
( -- * Types
Env(.... | bb010g/aura | aura/lib/Aura/Core.hs | gpl-3.0 | 7,885 | 0 | 17 | 1,645 | 2,002 | 1,070 | 932 | 120 | 2 |
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances, DeriveGeneric #-}
module Tile where
{-module Tile (Tile (), Floor (..), Wall (..),
makeWall, makeFloor, emptySpace,
tileColor, renderTile, describeTile, tileWallType,
tileBlocksVision, tileBlocksMovement, tile... | arirahikkala/straylight-divergence | src/Tile.hs | gpl-3.0 | 2,718 | 0 | 13 | 664 | 826 | 420 | 406 | 50 | 1 |
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
"http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0">
<title>Remote Execution Processor Help</title>
<maps>
<homeID>top</home... | senbox-org/snap-desktop | snap-remote-execution-ui/src/main/resources/org/esa/snap/remote/execution/docs/help.hs | gpl-3.0 | 787 | 54 | 44 | 166 | 285 | 144 | 141 | -1 | -1 |
main = do
putStrLn $ "haskell" ++ "lang"
putStrLn $ "1 + 1 = " ++ show (1 + 1)
putStrLn $ "7.0/3.0 = " ++ show (7.0 / 3.0)
print $ True && False
print $ True || False
print $ not True
| daewon/til | haskell/haskell_by_example/values.hs | mpl-2.0 | 197 | 0 | 10 | 57 | 91 | 42 | 49 | 7 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-serviceconsumermanagement/gen/Network/Google/Resource/ServiceConsumerManagement/Services/TenancyUnits/AttachProject.hs | mpl-2.0 | 7,107 | 0 | 16 | 1,424 | 797 | 473 | 324 | 117 | 1 |
{- |
Shutdown can be used to execute functions when exiting the program
This can be very usefull when threads need to be stopped on exit.
addEnd will add a function to the list of functions to be executed
shutdown will block while the functions added by addEnd are executed.
-}
module CanvasHs.Shutdown
... | CanvasHS/Canvas.hs | canvashs-module/CanvasHs/Shutdown.hs | lgpl-2.1 | 1,186 | 0 | 12 | 249 | 249 | 136 | 113 | 17 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module X01 where
----------------------------... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/2020-07-07-harold-carr-phantom-existential-scratchpad/src/X01.hs | unlicense | 7,084 | 0 | 16 | 1,601 | 2,216 | 1,089 | 1,127 | -1 | -1 |
{-
Each new term in the Fibonacci sequence is generated by adding the previous two terms.
By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million,
find the sum of the even-valued terms.
-... | m3mitsuppe/haskell | projecteuler/pr002.hs | unlicense | 660 | 0 | 10 | 156 | 181 | 90 | 91 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Sync.Retrieve.GitHub.GitHub where
import Control.Exception
import Data.Issue
import Data.Maybe
import Data.Char
import Data.List (sort)
import Debug.Trace
import Network.HTTP.Conduit (HttpException(..))
import Network.HTTP.Types (statusCode, statusMessage)
import qualified Gi... | lally/org-issue-sync | src/Sync/Retrieve/GitHub/GitHub.hs | apache-2.0 | 7,005 | 0 | 20 | 1,769 | 2,246 | 1,113 | 1,133 | 156 | 5 |
----
-- Copyright (c) 2013 Andrea Bernardini.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or a... | andrebask/newsprint | src/AccountManagerWS/Handler/UpdateFeed.hs | apache-2.0 | 2,907 | 0 | 20 | 817 | 708 | 363 | 345 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE... | ekmett/transients | src/Data/Transient/WordMap/Internal.hs | bsd-2-clause | 27,551 | 2 | 23 | 6,315 | 9,341 | 4,609 | 4,732 | 521 | 6 |
-- Module: ModuleWithCommentsResembilngModuleHeader
--
-- Please note the module ... where part
module ModuleWithCommentsResemblingModuleHeader
( foo )
where
import EmptyModule
foo :: a -> a
foo x = x
-- where
| sergv/tags-server | test-data/0003module_header_detection/ModuleWithCommentsResemblingModuleHeader.hs | bsd-3-clause | 216 | 0 | 5 | 37 | 33 | 21 | 12 | 5 | 1 |
module Main where
import Control.Monad.Random
import System.Random
import Data.Ord
import Data.VPTree
import Data.VPTree.MetricSpace
example :: VPTree Int
example = Split 0 10 (Leaf [0, 7]) (Leaf [14])
data Point = Point Double Double deriving (Show)
instance MetricSpace Point where
distance (Point x0 y0) (Poi... | tixxit/hillside | app/Main.hs | bsd-3-clause | 831 | 0 | 12 | 222 | 369 | 188 | 181 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Request
( getFileRequests
, forEachFileRequestIn
, FileRequest
, FileID
, FileSize
, RequestType(..)
) where
import qualified Data.ByteString as B (ByteString, hGetContents)
import qualified Data.ByteString.Char8 as B (lines, readInt, split)
... | wochinge/CacheSimulator | src/Request.hs | bsd-3-clause | 1,423 | 0 | 11 | 303 | 404 | 221 | 183 | 39 | 1 |
module Musica.Render.Keyboard (
renderKeyboard
) where
import Data.List (genericLength)
import Graphics.Gloss
whiteHeight = 14
whiteWidth = 2.3
blackHeight = 9
blackWidth = 1.5
bww = 2 * blackWidth / whiteWidth
bwh = blackHeight / whiteHeight
keyRatio = whiteHeight / whiteWidth
-- Output Picture will be 1... | josejuan/midi-keyboard-player | app/Musica/Render/Keyboard.hs | bsd-3-clause | 1,177 | 0 | 14 | 308 | 439 | 233 | 206 | 22 | 2 |
{-# Language BangPatterns #-}
{- |
Copyright : 2010-2016 Erlend Hamberg
License : BSD3
Stability : experimental
Portability : portable
A framework for simple evolutionary algorithms. Provided with a function for
evaluating a genome's fitness, a function for probabilistic selection among a
pool of genomes,... | ehamberg/simpleea | AI/SimpleEA.hs | bsd-3-clause | 6,826 | 0 | 14 | 1,536 | 655 | 354 | 301 | 49 | 1 |
-- | Main compiler executable.
module Main where
import Fay
import Paths_fay (version)
import Control.Monad
import Data.List.Split (wordsBy)
import Data.Maybe
import Data.Version (showVersion)
import Options.Applicative
import Options.Ap... | fpco/fay | src/main/Main.hs | bsd-3-clause | 6,933 | 0 | 34 | 1,810 | 1,563 | 798 | 765 | 123 | 5 |
{-# LANGUAGE GADTs, ExistentialQuantification, StandaloneDeriving, BangPatterns #-}
module Data.MatFile where
import Data.Binary
import Data.Binary.Get
import Data.Binary.IEEE754
import Data.Text.Encoding
import Data.Text hiding (map, zipWith)
import Control.Monad (replicateM)
import Data.Int
import Data.Word
import ... | BJTerry/matfile | Data/MatFile.hs | bsd-3-clause | 14,138 | 5 | 22 | 2,954 | 4,811 | 2,365 | 2,446 | 317 | 16 |
import Data.Conduit
import Data.Conduit.Binary
import Data.Conduit.List as C
import Data.Conduit.BZlib
import System.Environment
main :: IO ()
main = do
[file] <- getArgs
runResourceT $ sourceFile file =$= bzip2 $$ sinkNull
-- runResourceT $ sourceFile file =$= bunzip2 $$ sinkNull
| tanakh/bzlib-conduit | bench/bench.hs | bsd-3-clause | 289 | 0 | 10 | 46 | 75 | 42 | 33 | 9 | 1 |
module Main where
import Ivory.Tower.Config
import Ivory.OS.FreeRTOS.Tower.STM32
import LDrive.Platforms
import LDrive.Tests.SPI (app)
main :: IO ()
main = compileTowerSTM32FreeRTOS testplatform_stm32 p $
app (stm32config_clock . testplatform_stm32)
testplatform_spi
testplatform_uart... | sorki/odrive | test/SPITest.hs | bsd-3-clause | 406 | 0 | 8 | 88 | 89 | 50 | 39 | 12 | 1 |
{- Test the unit parser
Copyright (c) 2014 Richard Eisenberg
-}
{-# LANGUAGE TemplateHaskell, TypeOperators, CPP #-}
module Tests.Parser where
import Prelude hiding ( lex, exp )
import Text.Parse.Units
import Control.Monad.Reader
import qualified Data.Map.Strict as Map
import Text.Parsec
import Data.Generics
im... | adamgundry/units-parser | Tests/Parser.hs | bsd-3-clause | 11,335 | 0 | 15 | 2,896 | 2,980 | 1,711 | 1,269 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Test.HUnit.SafeCopy
( testSafeCopy
, MissingFilesPolicy(..)
) where
-------------------------------------------------------------------------------
import Control.Monad (unless)
import qualified Data.ByteString as BS
import Da... | Soostone/safecopy-hunit | src/Test/HUnit/SafeCopy.hs | bsd-3-clause | 4,947 | 0 | 24 | 1,213 | 1,141 | 591 | 550 | 91 | 5 |
module Rubik.Relation where
data Relation a b = Relation { apply :: a -> b, coapply :: b -> a }
| andygill/rubik-solver | src/Rubik/Relation.hs | bsd-3-clause | 98 | 0 | 9 | 23 | 37 | 23 | 14 | 2 | 0 |
module Module3.Task2 where
nTimes:: a -> Int -> [a]
nTimes x n = iter [] x n
where
iter a _ 0 = a
iter a x n = iter (x : a) x (n - 1)
| dstarcev/stepic-haskell | src/Module3/Task2.hs | bsd-3-clause | 145 | 0 | 9 | 48 | 88 | 46 | 42 | 5 | 2 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module AuthorInfo
( AuthorInfo(..)
) where
import Data.Aeson
import Data.Text
import Data.Typeable
import GHC.Generics
import Author (AuthorId)
type AuthorName = Text
data AuthorInfo = AuthorInfo { authorId :: AuthorId
... | cutsea110/servant-sample-book | src/AuthorInfo.hs | bsd-3-clause | 453 | 0 | 8 | 143 | 93 | 57 | 36 | 13 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Crypto.Hash.Tsuraan.Blake2
( hash
, hash_key
) where
import Data.ByteString ( ByteString, length )
import Prelude hiding ( length )
import qualified Crypto.Hash.Tsuraan.Blake2.Parallel as Par
import qualified Crypto.Hash.Tsuraan.Blake2.Serial as Ser
-- | Hash a strict 'ByteS... | tsuraan/hs-blake2 | src/Crypto/Hash/Tsuraan/Blake2.hs | bsd-3-clause | 1,451 | 0 | 7 | 303 | 199 | 121 | 78 | 25 | 2 |
{-
Types.hs, odds and ends
Joel Svensson
Todo:
-}
module Obsidian.ArrowObsidian.Types where
type Name = String
| svenssonjoel/ArrowObsidian | Obsidian/ArrowObsidian/Types.hs | bsd-3-clause | 131 | 0 | 4 | 35 | 14 | 10 | 4 | 2 | 0 |
module Zero.GHCJS where
import Control.Monad
import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
import qualified JavaScript.Array.Internal as AI
import qualified JavaScript.Object.Internal as OI
import qualified Data.HashMap.Strict as H
import qualified Data.Aeson as AE
import qualified Dat... | et4te/zero | src/Zero/GHCJS.hs | bsd-3-clause | 2,474 | 0 | 26 | 706 | 785 | 414 | 371 | 49 | 6 |
{-# LANGUAGE TypeFamilies,GeneralizedNewtypeDeriving #-}
module Fragnix.ModuleDeclarations
( parse
, moduleDeclarationsWithEnvironment
, moduleSymbols
) where
import Fragnix.Declaration (
Declaration(Declaration),Genre(..))
import Language.Haskell.Exts (
Module,ModuleName,QName(Qual,UnQual),Decl(..),
... | phischu/fragnix | src/Fragnix/ModuleDeclarations.hs | bsd-3-clause | 7,077 | 0 | 16 | 1,265 | 1,617 | 876 | 741 | 122 | 2 |
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, EmptyDataDecls,
DeriveDataTypeable, GHCForeignImportPrim, DataKinds, KindSignatures,
PolyKinds, MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances,
UnboxedTuples, MagicHash, UnliftedFFITypes
#-}
module JavaScript... | ghcjs/ghcjs-base | JavaScript/JSON/Types/Internal.hs | mit | 10,200 | 39 | 12 | 2,153 | 2,334 | 1,271 | 1,063 | 229 | 7 |
{-
SockeyeParserAST.hs: AST for the Sockeye parser
Part of Sockeye
Copyright (c) 2018, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writing to:
ETH Zurich D-INFK, CAB F.78, Uni... | kishoredbn/barrelfish | tools/sockeye/SockeyeParserAST.hs | mit | 5,941 | 0 | 10 | 1,707 | 1,250 | 788 | 462 | 200 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudtrail/gen/Network/AWS/CloudTrail/StartLogging.hs | mpl-2.0 | 3,831 | 0 | 13 | 872 | 499 | 302 | 197 | 66 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998
\section[TyCoRep]{Type and Coercion - friends' interface}
Note [The Type-related module hierarchy]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Class
CoAxiom
TyCon imports Class, CoAxiom
TyCoRep imports Class, CoAxiom, T... | olsner/ghc | compiler/types/TyCoRep.hs | bsd-3-clause | 111,889 | 0 | 20 | 26,476 | 15,833 | 8,440 | 7,393 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
-- | All types.
module HIndent.Types
(Printer(..)
,PrintState(..)
,Extender(..)
,Style(..)
,Config(..)
,defau... | gittywithexcitement/hindent | src/HIndent/Types.hs | bsd-3-clause | 4,694 | 0 | 15 | 1,091 | 927 | 555 | 372 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Monad.ST
import Criterion.Main
import Data.Bits
import Data.ByteString (ByteString)
import Data.ByteString.Lazy (toStrict)
import Data.ByteString.Lazy.Builder
import Data.Monoid
import Data.Word
import qualified Vaultaire.ReaderAlgorithms as A
simplePoint... | afcowie/vaultaire | bench/ReaderAlgorithms.hs | bsd-3-clause | 1,091 | 0 | 11 | 275 | 287 | 155 | 132 | 28 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Text.Read.Lex
-- Copyright : (c) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ... | rahulmutt/ghcvm | libraries/base/Text/Read/Lex.hs | bsd-3-clause | 18,738 | 164 | 23 | 5,908 | 4,894 | 2,536 | 2,358 | 401 | 44 |
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-}
{-# LINE 1 "Text/Regex/Base/RegexLike.hs" #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
-----------------------------------------------------------------------------
... | phischu/fragnix | tests/packages/scotty/Text.Regex.Base.RegexLike.hs | bsd-3-clause | 10,050 | 0 | 17 | 1,839 | 1,458 | 891 | 567 | 89 | 0 |
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE helpset
PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN"
"http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0">
<title>Binning Operator Help</title>
<maps>
<homeID>top</homeID>
... | arraydev/snap-desktop | snap-binning-ui/src/main/resources/org/esa/snap/binning/docs/help.hs | gpl-3.0 | 777 | 54 | 44 | 165 | 283 | 143 | 140 | -1 | -1 |
{-# LANGUAGE CPP #-}
module TestImport (
module TestImport,
module Export
) where
import Test.Hspec as Export hiding (Selector)
import Database.MongoDB as Export
import Control.Monad.Trans as Export (MonadIO, liftIO)
import Data.Time (ParseTime, UTCTime)
import qualified Data.Time as Time
-- We support the old ... | VictorDenisov/mongodb | test/TestImport.hs | apache-2.0 | 1,103 | 0 | 9 | 144 | 188 | 116 | 72 | 19 | 1 |
--------------------------------------------------------------------
-- |
-- Module : MediaWiki.API.Query.LangLinks
-- Description : Representing 'langlinks' requests.
-- Copyright : (c) Sigbjorn Finne, 2008
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Por... | neobrain/neobot | mediawiki/MediaWiki/API/Query/LangLinks.hs | bsd-3-clause | 1,514 | 0 | 11 | 304 | 254 | 154 | 100 | 32 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="pt-BR">
<title>Regras de varredura ativa - Alfa | Extensão ZAP</title>
<maps>
<homeID>top</h... | kingthorin/zap-extensions | addOns/ascanrulesAlpha/src/main/javahelp/org/zaproxy/zap/extension/ascanrulesAlpha/resources/help_pt_BR/helpset_pt_BR.hs | apache-2.0 | 995 | 78 | 67 | 163 | 427 | 215 | 212 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
module Haddock.Backends.Hyperlinker.Ast (enrich) where
import Haddock.Syb
import Haddock.Backends.Hyperlinker.Types
import qualified GHC
import Control.Applicative
import Data.Data
impor... | Helkafen/haddock | haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs | bsd-2-clause | 7,039 | 0 | 18 | 1,788 | 2,301 | 1,190 | 1,111 | 129 | 10 |
module DetMachine where
import NondetMachine
import FSM
import DFA(DFA(..))
import qualified OrdMap as OM
-- Representation of Deterministic Finite State Machines:
type DState = [State]
-- Translation of nondeterministic to deterministic state machines:
deterministicMachine ((start,final),nfa) =
((states inited... | forste/haReFork | tools/base/parse2/LexerGen/DetMachine.hs | bsd-3-clause | 956 | 28 | 11 | 219 | 385 | 210 | 175 | 25 | 2 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.IO.Handle.FD
-- Copyright : (c) The University of Glasgow, 1994-2008
-- License : see libraries/base/LICENSE
--
-- Maintainer : librar... | beni55/haste-compiler | libraries/ghc-7.10/base/GHC/IO/Handle/FD.hs | bsd-3-clause | 9,828 | 0 | 14 | 2,236 | 1,284 | 714 | 570 | 119 | 4 |
{-# LANGUAGE Rank2Types #-}
module Distribution.Solver.Modular.RetryLog
( RetryLog
, toProgress
, fromProgress
, mapFailure
, retry
, failWith
, succeedWith
, continueWith
, tryWith
) where
import Distribution.Solver.Modular.Message
import Distribution.Solver.Types.Progress
-- ... | sopvop/cabal | cabal-install/Distribution/Solver/Modular/RetryLog.hs | bsd-3-clause | 2,449 | 0 | 11 | 584 | 690 | 357 | 333 | 46 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE KindSignatures #-}
module T10604_no_PolyKinds where
import GHC.Generics
data F (f :: * -> *) = F deriving Generic1
| ezyang/ghc | testsuite/tests/generics/T10604/T10604_no_PolyKinds.hs | bsd-3-clause | 161 | 0 | 6 | 26 | 32 | 21 | 11 | 5 | 0 |
module IRTS.DumpBC where
import IRTS.Lang
import IRTS.Simplified
import Idris.Core.TT
import IRTS.Bytecode
import Data.List
interMap :: [a] -> [b] -> (a -> [b]) -> [b]
interMap xs y f = concat (intersperse y (map f xs))
indent :: Int -> String
indent n = replicate (n*4) ' '
serializeReg :: Reg -> String
serializeR... | mrmonday/Idris-dev | src/IRTS/DumpBC.hs | bsd-3-clause | 3,082 | 0 | 17 | 899 | 1,277 | 627 | 650 | 67 | 22 |
{-# LANGUAGE PatternSynonyms, RecordWildCards #-}
module T11283 where
data P = MkP Bool
pattern S{x} = MkP x
d = S{x = True}
e = S{..}
f S{x=x} = x
| olsner/ghc | testsuite/tests/patsyn/should_compile/T11283.hs | bsd-3-clause | 148 | 0 | 8 | 30 | 71 | 40 | 31 | 7 | 1 |
-- | Module responsible to parse a String into a Command
module Shaker.Parser(
parseCommand
)
where
import Data.Char
import Text.Parsec.Combinator
import Text.Parsec
import Text.Parsec.ByteString
import Shaker.Type
import qualified Data.Map as M
import qualified Data.ByteString.Char8 as B
-- | Parse the given str... | bonnefoa/Shaker | src/Shaker/Parser.hs | isc | 2,578 | 0 | 14 | 501 | 835 | 415 | 420 | 57 | 3 |
import qualified System.Directory as Directory
import qualified System.FilePath.Posix as Posix
import qualified Data.Map as DataMap
import qualified Data.Maybe as Maybe
import qualified System.Random as Random
-- import qualified Text.Groom as Groom
-- import qualified Debug.Trace as Trace
------------------------
-- ... | orblivion/random-chain | Main.hs | mit | 11,514 | 0 | 13 | 2,286 | 2,290 | 1,189 | 1,101 | 151 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Pocket.Get
( GetReq(..)
, makeGetReq
, GetRsp(..)
)
where
-- aeson
import Data.Aeson
-- text
import Data.Text (Text)
data GetReq =
GetReq
{ getReqConsumerKey :: Text
, getReqAccessToken :: Text
, getReqState :: Maybe Text
, getReqFavorite :... | jpvillaisaza/pocket-haskell | src/Web/Pocket/Get.hs | mit | 2,010 | 0 | 11 | 553 | 485 | 275 | 210 | 69 | 1 |
module ASTParser where
import AST
import Control.Monad (void)
import Text.Megaparsec
import Text.Megaparsec.Expr
import Text.Megaparsec.String
import qualified Text.Megaparsec.Lexer as L
import Text.Megaparsec
import Lexer
testParser = miniJavaParser
miniJavaParser :: Parser MiniJava
miniJavaParser = MiniJava <$> ... | cirquit/hjc | src/ASTParser.hs | mit | 5,626 | 0 | 23 | 1,230 | 2,056 | 1,044 | 1,012 | 156 | 1 |
module Feature.SingularSpec where
import Text.Heredoc
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Network.HTTP.Types
import Network.Wai.Test (SResponse(..))
import Network.Wai (Application)
import SpecHelper
import Protolude hiding (get)
spec :: SpecWith Application
spec =
describe ... | begriffs/postgrest | test/Feature/SingularSpec.hs | mit | 7,690 | 0 | 20 | 2,093 | 1,540 | 847 | 693 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import GHC.Exts (fromList, toList)
import Test.Hspec (Spec, describe, it, shouldMatchList)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Anagram (anagramsFor)
main :: IO ()
main = hspecWith defaultConfig {co... | genos/online_problems | exercism/haskell/anagram/test/Tests.hs | mit | 4,538 | 0 | 15 | 1,943 | 887 | 559 | 328 | 86 | 1 |
module Main where
import Data.HEPEVT
main = do
events <- parseEventFile "events.dat"
putStrLn $ show $ length events
| bytbox/hepevt.hs | Main.hs | mit | 124 | 0 | 8 | 25 | 38 | 19 | 19 | 5 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-|
Module : Graphics.Heatmap
Description : Heatmap generation utilities.
Copyright : (c) Dustin Sallings, 2021
License : BSD3
Maintainer : dustin@spy.net
Stability : experimental
Tool... | dustin/heatmap | src/Graphics/Heatmap.hs | mit | 2,780 | 0 | 14 | 666 | 789 | 431 | 358 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.