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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno... | awakenetworks/gRPC-haskell | examples/echo/echo-hs/Echo.hs | apache-2.0 | 8,770 | 0 | 17 | 2,780 | 1,786 | 1,008 | 778 | 167 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
-- |
-- XML Signature Syntax and Processing
--
-- <http://www.w3.org/TR/xmldsig-core1/> (selected portions)
module SAML2.XML.Signature.Types where
import Control.Lens (Lens')
imp... | dylex/hsaml2 | SAML2/XML/Signature/Types.hs | apache-2.0 | 20,188 | 0 | 20 | 4,087 | 4,530 | 2,449 | 2,081 | 460 | 1 |
{-# LANGUAGE CPP, OverloadedStrings #-}
module Sound.Freesound.Sound (
SoundId(..)
, FileType(..)
, GeoTag(..)
, Sound(..)
, Summary
, Detail
, url
, description
, geotag
, created
, sound_license
, fileType
, channels
, filesize
, bitrate
, bitdepth
, duration
, samplerate
, sou... | kaoskorobase/freesound | src/Sound/Freesound/Sound.hs | bsd-2-clause | 1,021 | 0 | 10 | 242 | 248 | 157 | 91 | 45 | 1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : Blaze.ByteString.Builder.ZoomCache.Internal
-- Copyright : Conrad Parker
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Conrad ... | kfish/zoom-cache | Blaze/ByteString/Builder/ZoomCache/Internal.hs | bsd-2-clause | 2,881 | 0 | 10 | 659 | 633 | 344 | 289 | 60 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | Parse CSS with parseNestedBlocks and render it with renderNestedBlock
module Text.CSS.Parse
( NestedBlock(..)
, parseNestedBlocks
, parseBlocks
, parseBlock
, attrParser
, attrsParser
, blockParser
, blocksParser
, parseAttr
, parseAttrs
... | jgm/css-text | Text/CSS/Parse.hs | bsd-2-clause | 2,989 | 0 | 17 | 700 | 955 | 509 | 446 | 82 | 2 |
module Import
( module Prelude
, module Yesod
, module Foundation
, module Settings.StaticFiles
, module Settings.Development
, module Data.Monoid
, module Control.Applicative
, module Utils
, Text
#if __GLASGOW_HASKELL__ < 704
, (<>)
#endif
) where
import Prelude hiding (wr... | erochest/whatisdh | Import.hs | bsd-2-clause | 708 | 0 | 7 | 141 | 193 | 130 | 63 | 23 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Properties (tests) where
import Control.Applicative as A ((<$>))
import Criterion.Analysis
import Prelude ()
import Prelude.Compat
import Statistics.Types (Sample)
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
impo... | bos/criterion | tests/Properties.hs | bsd-2-clause | 1,082 | 0 | 12 | 157 | 310 | 173 | 137 | 27 | 1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-| dependant is a simple dependency resolving library.
To be able to use dependant, the items you want to sort have to be an instance
of the 'D... | firecoders/sachverhalt-server | src/Dependencies.hs | bsd-3-clause | 2,055 | 0 | 13 | 559 | 292 | 162 | 130 | -1 | -1 |
module ETCS.DMI
( module ETCS.DMI.Windows.MenuWindows
, mkWidget, widgetEvent
) where
import ETCS.DMI.Windows.MenuWindows
import Reactive.Banana.DOM
| open-etcs/openetcs-dmi | src/ETCS/DMI.hs | bsd-3-clause | 191 | 0 | 5 | 56 | 35 | 24 | 11 | 5 | 0 |
module Rules.Gmp (
gmpRules, gmpBuildPath, gmpObjectsDir, gmpLibraryH, gmpBuildInfoPath
) where
import Base
import Context
import GHC
import Oracles.Setting
import Target
import Utilities
gmpBase :: FilePath
gmpBase = pkgPath integerGmp -/- "gmp"
gmpLibraryInTreeH :: FilePath
gmpLibraryInTreeH = "include/gmp... | ezyang/ghc | hadrian/src/Rules/Gmp.hs | bsd-3-clause | 4,575 | 0 | 22 | 1,243 | 920 | 466 | 454 | 82 | 2 |
{-# LANGUAGE MagicHash, CPP #-}
{-|
Module : Data.Number.MPFR.Instances.Zero
Description : Instance declarations
Copyright : (c) Aleš Bizjak
License : BSD3
Maintainer : ales.bizjak0@gmail.com
Stability : experimental
Portability : non-portable
This module defines ins... | ekmett/hmpfr | src/Data/Number/MPFR/Instances/Zero.hs | bsd-3-clause | 3,154 | 0 | 12 | 961 | 1,025 | 529 | 496 | 59 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.APPLE.RowBytes
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability :... | haskell-opengl/OpenGLRaw | src/Graphics/GL/APPLE/RowBytes.hs | bsd-3-clause | 679 | 0 | 5 | 95 | 52 | 39 | 13 | 8 | 0 |
module System.Unix.Files where
import Control.Exception (catch)
import Prelude hiding (catch)
import System.Posix.Files (createSymbolicLink, removeLink)
import System.IO.Error (isAlreadyExistsError)
-- |calls 'createSymbolicLink' but will remove the target and retry if
-- 'createSymbolicLink' raises EEXIST.
forceSymb... | seereason/haskell-unixutils | System/Unix/Files.hs | bsd-3-clause | 610 | 0 | 11 | 122 | 128 | 72 | 56 | 12 | 2 |
-- | Meta data for a presentation of a /movie fragment/.
module Data.ByteString.IsoBaseFileFormat.Boxes.TrackFragmentHeader where
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.Util.BoxContent
import Data.ByteString.IsoBaseFileFormat.Util.BoxFields
import Data.ByteString.IsoBaseF... | sheyll/isobmff-builder | src/Data/ByteString/IsoBaseFileFormat/Boxes/TrackFragmentHeader.hs | bsd-3-clause | 1,265 | 0 | 9 | 171 | 168 | 101 | 67 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998
\section[DataCon]{@DataCon@: Data Constructors}
-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
module DataCon (
-- * Main data types
DataCon, DataConRep(..), HsBang(..), StrictnessMark(..),
ConTag,
... | bitemyapp/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | 45,391 | 0 | 18 | 13,432 | 4,975 | 2,827 | 2,148 | 405 | 4 |
module Day9 where
import qualified Text.Parsec as Parsec
import Text.Parsec hiding (parse)
import Text.Parsec.Char
import Lib
data Code = Raw String | Repeat Int String
deriving (Show)
type Parser = Parsec String ()
input = readFile "day9"
marker :: Parser Code
marker = do
string "("
subseqCount <- rea... | mbernat/aoc16-haskell | src/Day9.hs | bsd-3-clause | 950 | 0 | 10 | 229 | 391 | 199 | 192 | 32 | 2 |
--
-- Ray.Algebra
--
module Ray.Algebra where
import Data.Maybe
import Test.QuickCheck
nearly0 = 0.00000001 :: Double
class (Show a, Eq a) => BasicMatrix a where
madd :: a -> a -> a
msub :: a -> a -> a
mscale :: Double -> a -> a
mdiv :: a -> Double -> Maybe a
mdiv a s
| s == 0 = Nothing
| oth... | eijian/raytracer | src/Ray/Algebra-r1.hs | bsd-3-clause | 3,483 | 4 | 13 | 1,248 | 982 | 532 | 450 | -1 | -1 |
{-|
Module : Idris.REPL
Description : Entry Point for the Idris REPL and CLI.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
PatternGuards, CPP #-}
module Idris.REPL
( idemodeStart
, startServer
, runClient
, proce... | enolan/Idris-dev | src/Idris/REPL.hs | bsd-3-clause | 69,507 | 1 | 22 | 25,718 | 22,139 | 10,759 | 11,380 | 1,363 | 73 |
module Gen.Log where
import System.Console.ANSI
asStep, asSuccess, asInfo, asWarning, asError :: IO a -> IO a
asStep = writeIn Blue
asSuccess = writeIn Green
asInfo = writeIn Cyan
asWarning = writeIn Yellow
asError = writeIn Red
writeIn :: Color -> IO a -> IO a
writeIn col x = do
setSGR [SetColor Foregrou... | rvion/ride | jetpack-gen/src/Gen/Log.hs | bsd-3-clause | 374 | 0 | 9 | 83 | 142 | 73 | 69 | 14 | 1 |
{-# LANGUAGE ConstraintKinds #-}
-- | This version explores the simple option of using type-classes to
-- overload on the type of the tuning input parameters. This enables
-- us to remain polymorphic in how many "dimensions" are being tuned.
-- It enables some forms of composability, but requires that the
-- dimensio... | iu-parfunc/AutoObsidian | interface_brainstorming/03_QuickCheck_style/ClassBasedTuning.hs | bsd-3-clause | 1,581 | 0 | 10 | 293 | 209 | 129 | 80 | 15 | 1 |
module Algebra.Enumerable (
Enumerable(..), universeBounded,
Enumerated(..)
) where
-- | Finitely enumerable things
class Enumerable a where
universe :: [a]
universeBounded :: (Enum a, Bounded a) => [a]
universeBounded = enumFromTo minBound maxBound
-- | Wrapper used to mark where we expect to use the... | batterseapower/lattices | Algebra/Enumerable.hs | bsd-3-clause | 1,177 | 0 | 8 | 246 | 324 | 178 | 146 | 23 | 1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses,FunctionalDependencies, TypeSynonymInstances, FlexibleContexts, UndecidableInstances #-}
module EFA2.Display.DispVector (module EFA2.Display.DispVector) where
import EFA2.Display.DispBase
import EFA2.Signal.Base
import qualified Data.Vector.Unboxed as UV
-- | d... | energyflowanalysis/efa-2.1 | attic/src/EFA2/Display/DispData.hs | bsd-3-clause | 2,070 | 0 | 12 | 453 | 550 | 285 | 265 | 22 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
module CO4.Example.WCB_Matrix
(result,ex0)
where
import Prelude hiding (sequence)
import ... | apunktbau/co4 | test/CO4/Example/WCB_Matrix.hs | gpl-3.0 | 2,198 | 0 | 14 | 660 | 642 | 354 | 288 | 56 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeApplications #-}
module GrLang (initialize) where
import Control.Arrow ((***))
import Control.Monad
import Control.Monad.Except (ExceptT (.... | rodrigo-machado/verigraph | src/repl/GrLang.hs | gpl-3.0 | 26,993 | 0 | 23 | 6,952 | 8,715 | 4,272 | 4,443 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/AssociateElasticIp.hs | mpl-2.0 | 3,940 | 0 | 9 | 775 | 428 | 261 | 167 | 54 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Graphics.UI.Threepenny.Internal.FFI (
-- * Synopsis
-- | Combinators for creating JavaScript code and marhsalling.
-- * Documentation
ffi,
FFI(..), ToJS(..),
JSFunction,
showJSON,
... | yuvallanger/threepenny-gui | src/Graphics/UI/Threepenny/Internal/FFI.hs | bsd-3-clause | 5,641 | 0 | 12 | 1,250 | 1,174 | 650 | 524 | 79 | 3 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamil... | keent/stack | src/Stack/Types/Config.hs | bsd-3-clause | 64,972 | 0 | 17 | 15,156 | 12,416 | 6,711 | 5,705 | 1,411 | 8 |
{-# LANGUAGE
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances,
TypeOperators,
ScopedTypeVariables,
TypeSynonymInstances,
ConstraintKinds #-}
module Functions.Comp.Eval where
import DataTypes.Comp
import Functions.Comp.Desugar
import Data.Comp
import D... | spacekitteh/compdata | benchmark/Functions/Comp/Eval.hs | bsd-3-clause | 12,730 | 0 | 13 | 4,341 | 5,710 | 2,846 | 2,864 | 270 | 2 |
module FunctionUsagesInMultipleFiles00001 where
import FunctionUsagesInSingleFile00001
thisFile :: ()
thisFile = <caret>boring
name :: String
name = "Testsuite"
| KasperJanssens/intellij-haskforce | tests/gold/codeInsight/FunctionUsagesInMultipleFiles00001.hs | apache-2.0 | 164 | 2 | 5 | 20 | 35 | 21 | 14 | -1 | -1 |
import KMeansCore
import Data.Random.Normal
import System.Random
import System.IO
import Data.Array
import System.Environment
import Control.Monad
import Data.List
import Data.Binary
minX, maxX, minY, maxY, minSD, maxSD :: Double
minX = -10
maxX = 10
minY = -10
maxY = 10
minSD = 1.5
maxSD = 2.0
main = do
n: minp:... | prt2121/haskell-practice | parconc/kmeans/GenSamples.hs | apache-2.0 | 2,094 | 2 | 13 | 577 | 728 | 370 | 358 | 56 | 2 |
import PPfeMain(mainPFE)
import PPfeInstances
import PfeInteractive(pfeiAllCmds)
import PPfeCmds(ppfeCmds)
--import TraceIO(traceIO)
--main = traceIO main'
main = mainPFE (pfeiAllCmds ppfeCmds)
| forste/haReFork | tools/property/ppfe.hs | bsd-3-clause | 197 | 0 | 7 | 22 | 44 | 26 | 18 | 5 | 1 |
{-# LANGUAGE GADTs #-}
module T14978 where
data Equal a b where
Refl :: Equal a a
data Goof a where
Goof :: {-# UNPACK #-} !(Equal a Int) -> Goof a
foo :: Goof Int
foo = Goof Refl
| sdiehl/ghc | testsuite/tests/simplCore/should_compile/T14978.hs | bsd-3-clause | 189 | 0 | 9 | 49 | 64 | 37 | 27 | 8 | 1 |
-- Who likes it?
-- http://www.codewars.com/kata/5266876b8f4bf2da9b000362/
module Likes where
likes :: [String] -> String
likes [] = "no one likes this"
likes [x] = x ++ " likes this"
likes (x:x':[]) = x ++ " and " ++ x' ++ " like this"
likes (x:x':x'':[]) = x ++ ", " ++ x' ++ " and " ++ x'' ++ " like this"
likes (x:... | gafiatulin/codewars | src/6 kyu/Likes.hs | mit | 403 | 0 | 10 | 88 | 171 | 91 | 80 | 7 | 1 |
{-# LANGUAGE RecordWildCards #-}
module Actor.Conductor
(
) where
import Control.Distributed.Process hiding
(call)
import Control.Distributed.Process.Platform.ManagedProcess
import Data.... | neight-allen/lonelycyberwolf | src/Actor/Conductor.hs | mit | 494 | 0 | 5 | 241 | 60 | 39 | 21 | 11 | 0 |
module Cook.Recipe.FsTree (
FsTree (..)
, Content (..)
, defAttrs
, createFsTree
) where
import Data.Aeson
import Data.ByteString (ByteString)
import Data.Default.Class
import Data.Foldable
import Data.Text (Text)
import System.Directory
import System.FilePath
import System.Posix.Files
import System.Posix... | jimenezrick/cook.hs | src/Cook/Recipe/FsTree.hs | mit | 2,615 | 0 | 11 | 660 | 921 | 472 | 449 | -1 | -1 |
module Server where
import Control.Concurrent.Async
import Control.Exception (bracket, handleJust)
import Control.Monad (guard, void, when)
import Control.Monad.IfElse (whenM)
import Control.Monad.Loops (iterateWhile)
import Con... | bennofs/hdevtools | src/Server.hs | mit | 3,425 | 0 | 18 | 859 | 1,098 | 549 | 549 | 72 | 4 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-| Use @threads-supervisor@ if you want the "poor-man's Erlang supervisors".
@threads-supervisor@ is an IO-based library with minimal dependencies
which does only one thing: It provides you a 'Supervisor' entity you can use
to monitor your forked computations... | adinapoli/threads-supervisor | src/Control/Concurrent/Supervisor/Tutorial.hs | mit | 7,018 | 0 | 3 | 1,301 | 145 | 142 | 3 | 3 | 0 |
module Foundation
where
import Prelude
import Yesod
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager))
import qualified Settings
import S... | tagami-keisuke/yesod-blog | Foundation.hs | mit | 6,544 | 0 | 18 | 1,481 | 980 | 531 | 449 | -1 | -1 |
module Var0 where
import Control.Monad.Identity
type M a = Identity a
showM :: Show a => M a -> String
showM = show.runIdentity
type Name = String
data Term = Var Name
| Con Integer
| Term :+: Term
| Lam Name Term
| App Term Term
deriving (Show)
term0 :: Term
term... | PavelClaudiuStefan/FMI | An_3_Semestru_1/ProgramareDeclarativa/Extra/Laborator/Laborator 10/var0.hs | cc0-1.0 | 1,850 | 0 | 19 | 603 | 861 | 432 | 429 | 64 | 2 |
module Dimensions where
import Data.Semigroup
import Data.List.NonEmpty
type XPos = Double
type YPos = Double
type Height = Double
type Width = Double
-- Top, Right, Bottom, Left
type TaggedDimensions = (String, Double, Double, Double, Double)
data Dimensions = D { top :: Double, right :: Double, bottom :: Double, l... | pbevin/toycss | src/Dimensions.hs | gpl-2.0 | 1,345 | 0 | 8 | 283 | 586 | 318 | 268 | 35 | 1 |
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-}
module PGIP.GraphQL.Result.NativeDocument where
import PGIP.GraphQL.Result.DocumentLink
import PGIP.GraphQL.Result.OMSSimple
import Data.Data
data NativeDocument = NativeDocument { __typename :: String
, displayName :: Strin... | spechub/Hets | PGIP/GraphQL/Result/NativeDocument.hs | gpl-2.0 | 775 | 0 | 9 | 357 | 109 | 70 | 39 | 14 | 0 |
module Frontend where
import Data.Map(Map)
import qualified Data.Map as M
import Control.Monad
import Data.Monoid
import Control.Monad.Trans
import Control.Monad.Identity
import Control.Monad.Trans.State
import Control.Monad.Trans.Writer
import Text.Printf
-- [1] http://comonad.com/reader/2012/mirrored-lenses/
data ... | haraldsteinlechner/lambdaWolf | src/Frontend.hs | gpl-3.0 | 4,090 | 0 | 13 | 889 | 998 | 539 | 459 | 76 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
{- |
A functional, type-safe interface to slicing up audio files with SoX.
-}
module Sound.Scissors
( Audio
, Rawdio(..)
, Side(..)
, Time(..)
, toRawdio
, fro... | mtolly/sound-scissors | src/Sound/Scissors.hs | gpl-3.0 | 10,326 | 0 | 16 | 2,591 | 3,099 | 1,613 | 1,486 | -1 | -1 |
module Zombies.Model (
ZombiesMsg (..),
Role (..),
ZombiesAgentState (..),
ZombiesEnvironment,
ZombiesNetwork,
ZombiesPatch,
ZombiesPatches,
ZombiesAgentDef,
ZombiesAgentBehaviour,
ZombiesAgentIn,
ZombiesAgentOut,
ZombiesAgentObservable,
humanCount,
zombie... | thalerjonathan/phd | coding/libraries/chimera/examples/ABS/Zombies/Model.hs | gpl-3.0 | 3,984 | 0 | 8 | 530 | 736 | 435 | 301 | 81 | 1 |
module DrawGraph where
-- Data structures
import Data.List as List
import Data.Set as Set
import Data.Foldable as Fold
import qualified Data.Map.Strict as Map
import OpenGraph as OG
import GraphPresentation
import TypeHierarchy
import SemanticScheme
import Utilities
-- GUI / Rendering stuff
import Graphics.UI.Gtk.Gdk... | wetneb/yanker | src/DrawGraph.hs | gpl-3.0 | 18,475 | 296 | 19 | 5,778 | 5,059 | 2,782 | 2,277 | 425 | 21 |
import System.Environment
import System.Directory
import Text.StringTemplate
main :: IO ()
main = do
args <- getArgs
cdir <- getCurrentDirectory
tmpl <- (directoryGroup cdir :: IO (STGroup String))
let mneutstr = args !! 0
Just cntrtmpl = getStringTemplate "contour.gpl" tmpl
Just cmbdtmpl = getStr... | wavewave/lhc-analysis-collection | pic/drawfigure.hs | gpl-3.0 | 1,897 | 0 | 13 | 819 | 368 | 208 | 160 | 36 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Handlers for working with user authentication. Login, Logout etc.
module Reffit.Handlers.HandleAuthentication (
handleLogin
,handleLoginSubmit
,handleLogout
) where
import Application
import Snap.Core
import Data.Map.Syntax
import ... | imalsogreg/reffit | src/Reffit/Handlers/HandleAuthentication.hs | gpl-3.0 | 1,153 | 0 | 9 | 256 | 260 | 143 | 117 | 25 | 1 |
module SmellsAnalyzerSpec(spec) where
import Language.Mulang.Analyzer hiding (result, spec)
import Language.Mulang.Ast
import Test.Hspec
result smells
= emptyCompletedAnalysisResult { smells = smells }
runExcept language content smells = analyse (smellsAnalysis (CodeSample language co... | mumuki/mulang | spec/SmellsAnalyzerSpec.hs | gpl-3.0 | 9,059 | 0 | 24 | 1,846 | 2,034 | 993 | 1,041 | 107 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/RegionNetworkEndpointGroups/List.hs | mpl-2.0 | 8,270 | 0 | 20 | 1,765 | 834 | 498 | 336 | 125 | 1 |
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
module Main where
import Test.Tasty
import qualified Test.Network.Wai.Route as Route
main :: IO ()
main = defaultMa... | romanb/wai-route | test/Main.hs | mpl-2.0 | 335 | 0 | 6 | 58 | 42 | 27 | 15 | 5 | 1 |
-- GSoC 2015 - Haskell bindings for OpenCog.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE Cons... | virneo/atomspace | opencog/haskell/OpenCog/AtomSpace/Types.hs | agpl-3.0 | 6,401 | 0 | 10 | 2,316 | 1,235 | 686 | 549 | -1 | -1 |
-- Author: Giedrius Jonikas
-- giedriusj1@gmail.com
{-# LANGUAGE BangPatterns #-}
module Msm (simulateVolatility,
simulateReturns) where
import Control.Monad.State
import System.Random
import System.IO.Unsafe
rand :: Float -> Float -> Float
rand min max = unsafePerformIO $ do
ge... | Giedriusj1/Markov_switching_multifractal_simulation | Msm.hs | unlicense | 3,787 | 0 | 24 | 1,240 | 1,050 | 535 | 515 | 68 | 2 |
-- | Read a file line-by-line using handles, and perform a fold over the lines.
-- The fold is used here to calculate the number of lines in the file.
--
-- Tested in this benchmark:
--
-- * Buffered, line-based IO
--
{-# LANGUAGE BangPatterns #-}
module Benchmarks.FoldLines
( benchmark
) where
import Test.Tas... | bos/text | benchmarks/haskell/Benchmarks/FoldLines.hs | bsd-2-clause | 1,094 | 0 | 16 | 332 | 310 | 162 | 148 | 26 | 2 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Numeral.GA.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import D... | facebookincubator/duckling | tests/Duckling/Numeral/GA/Tests.hs | bsd-3-clause | 504 | 0 | 9 | 78 | 79 | 50 | 29 | 11 | 1 |
module Chat.Bot.Run.Guess where
import Chat.Data
import Chat.Bot.Guess
import Chat.Bot.Misc.Guess
import Control.Concurrent
import Control.Monad
import Data.List
import System.Random
guessBot :: IO Bot
guessBot = do
secretVar <- newMVar 0
next... | charleso/haskell-in-haste | src/Chat/Bot/Run/Guess.hs | bsd-3-clause | 858 | 0 | 19 | 272 | 240 | 120 | 120 | 28 | 3 |
module Main where
import RDSTests.DBInstanceTests
import RDSTests.DBParameterGroupTests
import RDSTests.DBSecurityGroupTests
import RDSTests.DBSnapshotTests
import RDSTests.DBSubnetGroupTests
import RDSTests.EventTests
import RDSTests.EventSubscriptionTests
import RDSTests.OptionGroupTests
import RDSTests.TagTests
ma... | worksap-ate/aws-sdk | test/RDSTests.hs | bsd-3-clause | 562 | 0 | 6 | 75 | 91 | 47 | 44 | 21 | 1 |
{-|
Module : IRTS.Bytecode
Description : Bytecode for a stack based VM (e.g. for generating C code with an accurate hand written GC)
Copyright :
License : BSD3
Maintainer : The Idris Community.
BASE: Current stack frame's base
TOP: Top of stack
OLDBASE: Passed in to each function, the previous stack fra... | uuhan/Idris-dev | src/IRTS/Bytecode.hs | bsd-3-clause | 5,962 | 0 | 11 | 1,654 | 1,852 | 958 | 894 | 96 | 3 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.N... | rfranek/duckling | tests/Duckling/Numeral/UK/Tests.hs | bsd-3-clause | 600 | 0 | 9 | 96 | 80 | 51 | 29 | 11 | 1 |
module Command.Helper where
import qualified Server as S
import qualified User as U
import qualified Reply as R
import qualified Message as M
import System.IO
import Control.Concurrent.MVar
sendNeedMoreParams :: MVar U.User -> S.Server -> String -> IO ()
sendNeedMoreParams userVar serv cmd = do
use <- takeMVar use... | allonsy/chirp | src/Command/Helper.hs | bsd-3-clause | 797 | 0 | 13 | 143 | 301 | 151 | 150 | 21 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : provisional
-- Por... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL.hs | bsd-3-clause | 3,761 | 0 | 5 | 349 | 556 | 429 | 127 | 63 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Bead.View.BeadContextInit (
beadContextInit
, beadConfigFileName
, InitTasks
, Daemons(..)
, usersJson
) where
import Control.Applicative
import Control.Monad
import Control.Monad... | pgj/bead | src/Bead/View/BeadContextInit.hs | bsd-3-clause | 5,912 | 0 | 22 | 1,289 | 1,259 | 660 | 599 | 105 | 3 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Pretty-printing assembly language
--
-- (c) The University of Glasgow 1993-2005
--
-----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-orphans #-}
module X86.Ppr... | sdiehl/ghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | 35,651 | 0 | 22 | 10,286 | 9,702 | 4,829 | 4,873 | 647 | 96 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, PatternGuards #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Mosaic
-- Copyright : (c) 2009 Adam Vogt, 2007 James Webb
-- License : BSD-style (see xmonad/LICENSE)
--... | MasseR/xmonadcontrib | XMonad/Layout/Mosaic.hs | bsd-3-clause | 7,801 | 0 | 18 | 1,928 | 2,446 | 1,319 | 1,127 | 117 | 1 |
{-# LANGUAGE TypeFamilies #-}
module Data.Hot.Generic
( prefix
, suffix
, merge
) where
import Data.Hot.Base
import GHC.TypeLits
{-# INLINABLE prefix #-}
prefix :: (HotClass n, HotClass m, m <= n) => Hot n a -> Hot m a
prefix x = runSub $ unfold buildSub $ Sub 0 (elementAt x)
{-# INLINABLE suffix #-}
suff... | tserduke/hot | lib/indexed/Data/Hot/Generic.hs | bsd-3-clause | 1,340 | 0 | 14 | 372 | 738 | 376 | 362 | -1 | -1 |
import Control.Monad
import Haste
import Haste.DOM
import PropositionalLogic
main = do
withElem "analyzeButton" $ \el -> setCallback el OnClick analyzeFormula
withElem "formulaInput" $ \el -> setCallback el OnKeyPress analyzeOnEnter
analyzeOnEnter keyCode = when (keyCode == 13) (analyzeFormula 0)
analyzeFormula... | tilltheis/propositional-logic | src/App.hs | bsd-3-clause | 1,453 | 0 | 17 | 496 | 401 | 188 | 213 | 26 | 2 |
import Control.Monad(forM_)
import Control.Concurrent(threadDelay)
import System.PIO.Linux.GPIO(getValue)
{--
Connection for Intel Edison
$ sh/setup_in.sh 78
[J20-11]
[J19- 2]
--}
test = do
forM_ [0..999] $ \_ -> do
print =<< getValue 78
threadDelay $ 100 * 1000
| mitsuji/huckleberry | demo/GpioIn.hs | bsd-3-clause | 286 | 0 | 12 | 59 | 80 | 43 | 37 | 7 | 1 |
{-# OPTIONS_GHC -Wall #-}
-- |Here we parse the shell AST and delegate all the builtins,
-- piping, command-running, etc.
module System.Console.ShSh.Command ( runCommands, source, eval ) where
import System.Console.ShSh.Builtins ( builtin, showAlias )
import System.Console.ShSh.Foreign.Pwd ( getHomeDir )
import Syste... | shicks/shsh | System/Console/ShSh/Command.hs | bsd-3-clause | 19,493 | 0 | 21 | 7,659 | 4,930 | 2,513 | 2,417 | 303 | 19 |
-- | Simplified interface for go. Defines the standard black/white player,
-- and re-exports versions of common functions which take 2D co-ordinates
-- for the board position rather than a Repa co-ordinate. This allows you
-- to use the Go package for standard 2D, 2-player games without having to
-- pull in the Repa ... | dpwright/igo | src/Game/Go/Simple.hs | bsd-3-clause | 8,047 | 0 | 12 | 1,885 | 1,953 | 1,080 | 873 | 116 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Monad
import Control.Monad.Base
import Control.Monad.Trans.Class
import Control.Monad.Trans.Loop
main :: IO ()
main = do
foreach [1..10] $ \(i :: Int) -> do
foreach [1..10] $ \(j :: Int) -> do
when (j > i) $
lift continue
... | joeyadams/haskell-control-monad-loop | test/lift-continue.hs | bsd-3-clause | 559 | 0 | 20 | 199 | 206 | 103 | 103 | 18 | 1 |
{-# LANGUAGE CPP, NondecreasingIndentation, ScopedTypeVariables #-}
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 2005-2012
--
-- The GHC API
--
-- -----------------------------------------------------------------------------
module GHC (
... | bitemyapp/ghc | compiler/main/GHC.hs | bsd-3-clause | 55,483 | 4 | 28 | 15,226 | 9,854 | 5,316 | 4,538 | -1 | -1 |
import Text.XML.YJSVG
main = do
putStrLn $ showSVG 600 550 $ [
Text 10 50 25 (ColorName "green") "KochiGothic" "今日は",
Text 10 90 25 (ColorName "green") "KochiMincho" "今日は"
]
| YoshikuniJujo/yjsvg_haskell | tests/font.hs | bsd-3-clause | 195 | 7 | 11 | 38 | 81 | 39 | 42 | 5 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import qualified Brick.AttrMap as A
import Brick.BChan
import qualified Brick.Main as M
import Brick.Types (BrickEvent (..), CursorLocation,
... | clojj/hsedit | app/Main.hs | bsd-3-clause | 4,831 | 19 | 21 | 1,421 | 1,347 | 723 | 624 | 105 | 4 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
module WeiXin.PublicPlatform.Utils
( module WeiXin.PublicPlatform.Utils
, epochIntToUtcTime
, utcTimeToEpochInt
) where
import ClassyPrelude
#if MIN_VERSION_base(4, 13, 0)
import Control.Monad (MonadFail(..))
#else
#endif
import qualified Control.Exce... | yoo-e/weixin-mp-sdk | WeiXin/PublicPlatform/Utils.hs | mit | 13,317 | 0 | 26 | 4,029 | 2,931 | 1,524 | 1,407 | 230 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/ListVolumeRecoveryPoints.hs | mpl-2.0 | 4,804 | 0 | 12 | 922 | 534 | 322 | 212 | 65 | 1 |
module Bug548 (WrappedArrow(..)) where
import Control.Applicative
| Fuuzetsu/haddock | html-test/src/Bug548.hs | bsd-2-clause | 67 | 0 | 5 | 7 | 18 | 12 | 6 | 2 | 0 |
{-# LANGUAGE TypeFamilies, GADTs, ConstraintKinds, RankNTypes #-}
module T5655 where
import GHC.Exts (Constraint)
class Show a => Twice a where twice :: a -> a
instance Twice Int where twice = (*2)
data ETwice where ETwice :: Twice a => a -> ETwice
class E e where
type C e :: * -> Constraint
ap :: (forall ... | rahulmutt/ghcvm | tests/suite/typecheck/compile/T5655.hs | bsd-3-clause | 567 | 0 | 11 | 147 | 256 | 137 | 119 | 18 | 1 |
-- Copyright (c) 2013 Eric McCorkle. 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 conditi... | emc2/compiler-misc | src/Bound/Scope/ExtraInstances.hs | bsd-3-clause | 2,541 | 0 | 10 | 452 | 328 | 189 | 139 | 18 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/GetInvalidation.hs | mpl-2.0 | 3,854 | 0 | 9 | 865 | 513 | 309 | 204 | 65 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
module Web.Twitter.Conduit.Stream
(
-- * StreamingAPI
Userstream
, userstream
, StatusesFilte... | johan--/twitter-conduit | Web/Twitter/Conduit/Stream.hs | bsd-2-clause | 2,839 | 0 | 12 | 558 | 556 | 323 | 233 | -1 | -1 |
{- |
Module : $Id$
Description : from a list of words create haskell constants
Copyright : (c) Christian Maeder, DFKI Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
from a list of words (one each line) c... | keithodulaigh/Hets | utils/createKeywordDecls.hs | gpl-2.0 | 964 | 0 | 20 | 249 | 278 | 146 | 132 | 21 | 4 |
-----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Internal.CTypes
-- Copyright : (C) 2012-2016 Edward Kmett, (C) 2017 Ryan Scott
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : exper... | ddssff/lens | src/Control/Lens/Internal/CTypes.hs | bsd-3-clause | 1,145 | 0 | 5 | 184 | 64 | 48 | 16 | 7 | 0 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
module Cryptol.ModuleSystem (
-- * Module System
ModuleEnv(..), initialModuleEnv
, DynamicEnv(..)
, ModuleError(.... | ntc2/cryptol | src/Cryptol/ModuleSystem.hs | bsd-3-clause | 3,284 | 0 | 14 | 607 | 758 | 424 | 334 | 54 | 1 |
{-
(c) The GRASP Project, Glasgow University, 1994-1998
\section[TysWiredIn]{Wired-in knowledge about {\em non-primitive} types}
-}
{-# LANGUAGE CPP #-}
-- | This module is about types that can be defined in Haskell, but which
-- must be wired into the compiler nonetheless. C.f module TysPrim
module TysWiredIn (
... | AlexanderPankiv/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | 39,069 | 0 | 14 | 10,358 | 6,411 | 3,505 | 2,906 | 553 | 10 |
<?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="hr-HR">
<title>TreeTools</title>
<maps>
<homeID>treetools</homeID>
<mapref location="ma... | kingthorin/zap-extensions | addOns/treetools/src/main/javahelp/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 960 | 77 | 66 | 155 | 404 | 205 | 199 | -1 | -1 |
module RmOneParameter.D1 where
{-remove parameter 'ys' from function 'sumSquares'. This refactoring
affects module 'D1', and 'A1'-}
sumSquares (x:xs) = sq x + sumSquares xs
sumSquares [] = 0
sq x = x ^ pow
pow =2
| RefactoringTools/HaRe | test/testdata/RmOneParameter/D1.expected.hs | bsd-3-clause | 221 | 0 | 7 | 44 | 59 | 31 | 28 | 5 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module DefinedNames(module DefinedNames,module TypedIds) where
import TypedIds
import HsIdent
--import Maybe(mapMaybe)
import Recursive
{-+
This modules defines a ... | kmate/HaRe | old/tools/base/defs/DefinedNames.hs | bsd-3-clause | 2,903 | 0 | 11 | 520 | 715 | 376 | 339 | 41 | 1 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Named
-- Copyright : (c) David Roundy <droundy@darcs.net>
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : non... | markus1189/xmonad-contrib-710 | XMonad/Layout/Named.hs | bsd-3-clause | 1,607 | 0 | 7 | 274 | 136 | 89 | 47 | 11 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor,
PatternGuards #-}
module Idris.ElabDecls where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.DSL
import Idris.Error
import Idris.Delaborate
import Idris.Directives
import Idris.Imports
import Idris.Elab.Term
import Idris.Co... | osa1/Idris-dev | src/Idris/ElabDecls.hs | bsd-3-clause | 10,739 | 0 | 21 | 3,510 | 3,725 | 1,875 | 1,850 | 227 | 6 |
module Idris.Help (CmdArg(..), extraHelp) where
data CmdArg = ExprArg -- ^ The command takes an expression
| NameArg -- ^ The command takes a name
| FileArg -- ^ The command takes a file
| ModuleArg -- ^ The command takes a module name
| PkgArgs -- ^ The command takes a ... | adnelson/Idris-dev | src/Idris/Help.hs | bsd-3-clause | 2,969 | 0 | 8 | 814 | 450 | 268 | 182 | 45 | 1 |
{-# LANGUAGE MagicHash #-}
-- Should be compiled with -O0
import Control.Concurrent
import GHC.Conc
import GHC.Prim
import GHC.Exts
main = do
t <- forkIO (f 0 `seq` return ())
threadDelay 10
killThread t
putStrLn "Done"
-- Non-allocating let-no-escape infinite loop in fail
{-# NOINLINE f #-}
f :: In... | forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/concurrent/should_run/T367_letnoescape.hs | bsd-3-clause | 501 | 0 | 12 | 151 | 164 | 84 | 80 | 17 | 3 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Helper information for the main optimisation passes.
module Futhark.Optimise.MemoryBlockMerging.AuxiliaryInfo where
import qualified Data.Map.Strict as M
import Control.Monad
import Futhark.Representation.AST
import Futhark.Representation.ExplicitMe... | ihc/futhark | src/Futhark/Optimise/MemoryBlockMerging/AuxiliaryInfo.hs | isc | 4,337 | 0 | 19 | 777 | 1,144 | 582 | 562 | 90 | 2 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import WordProblem (answer)
main :: IO ()
main = hspecWith defaultConfig {configFast... | exercism/xhaskell | exercises/practice/wordy/test/Tests.hs | mit | 4,638 | 0 | 11 | 2,132 | 791 | 485 | 306 | 85 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.HTMLTableCellElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.HTMLTableCellElement
#else
module Graphics.UI.Gtk.WebKit.DOM.HTMLTableCellElement
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(U... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/HTMLTableCellElement.hs | mit | 485 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
-- | Faun.Fuzzy is a fun functional set of functions for fuzzy logic
module Faun.Parser.NamedFuzzy
( parseNamedFuzzy
) where
import qualified Data.Text as T
import Text.Parsec
import Text.Parsec.String (Parser)
import Faun.Parser.Core
import Faun.Parser.FuzzySet
import Faun.NamedFuzzy
-- | Parse a fuzzy set.
parseNam... | PhDP/Sphinx-AI | Faun/Parser/NamedFuzzy.hs | mit | 606 | 0 | 11 | 94 | 150 | 80 | 70 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.FlexibleTime
( (.+)
, (.-)
, getYear
, getMonth
, getDay
, getDate
, getHour
, getMin
, getSec
) where
import qualified Data.ByteString.Char8 as BS
import Data.UnixTime (Format, UnixTi... | tattsun/flexible-time | src/Data/FlexibleTime.hs | mit | 2,047 | 0 | 11 | 529 | 681 | 373 | 308 | 55 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GADTs #-}
... | TransportEngineering/nice-html | src/Text/Html/Nice/Writer.hs | mit | 7,413 | 0 | 19 | 1,903 | 2,390 | 1,284 | 1,106 | 174 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module System.Directory.Watchman.Subscribe
( SubscriptionName(..)
, SubscribeParams
, SubscriptionNotification(..)
, SubscriptionFiles(..)
, SubscriptionStateEnter(..)
, SubscriptionStateLeave(..)
, renderSubscribe
, parseSubscriptionNotification
... | bitc/hs-watchman | src/System/Directory/Watchman/Subscribe.hs | mit | 9,455 | 0 | 20 | 2,021 | 1,970 | 1,046 | 924 | 223 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
import GHC.Generics
import Web.Scotty
import Data.Aeson (ToJSON)
data PadOutput = PadOutput { str :: String } deriving (Generic)
instance ToJSON PadOutput
-- Snippet originally from https://hackage.haskell.org/package/acme-left-pad
leftPad :: String -... | melonmanchan/left-pad-services | haskell/leftpad/Main.hs | mit | 758 | 0 | 16 | 166 | 283 | 142 | 141 | 20 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module DarkSky.Response where
import DarkSky.Response.Alert
import DarkSky.Response.DataBlock
import DarkSky.Response.DataPoint
import DarkSky.Response.Flags
import DarkSky.Types
import Data.Aeson
import Data.Maybe (fromMaybe)
import Data.Text (Text)
data Response = Response
{ co... | peterstuart/dark-sky | src/DarkSky/Response.hs | mit | 1,300 | 0 | 14 | 349 | 350 | 192 | 158 | 44 | 0 |
module Zeno.Unification (
Unifiable (..), Unification (..),
applyUnification, mergeUnifiers, allUnifiers,
) where
import Prelude ()
import Zeno.Prelude
import Zeno.Utils
import Zeno.Traversing
import qualified Data.Map as Map
-- |The result of trying to unify two values where
-- 'NoUnifier' indicates that unif... | trenta3/zeno-0.2.0.1 | src/Zeno/Unification.hs | mit | 1,650 | 0 | 12 | 328 | 495 | 263 | 232 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.