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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
import System.Random
import Data.List
type Part = String
part1 :: [Part]
part1 = [
"Pol",
"Sand",
"Wester",
"Karl",
"Gustav",
"Nils",
"Lund" ]
part2 :: [Part]
part2 = [
"hem",
"man",
"sen",
"sson",
"gren" ]
count :: Int
count = 10 * (length part1 + length part2)
par... | carlmartus/helloworlds | haskell/names.hs | bsd-2-clause | 870 | 0 | 13 | 230 | 367 | 196 | 171 | 34 | 1 |
data List a = Empty | Cons a (List a) deriving (Show, Read, Eq, Ord)
-- record 语法
-- data List a = Empty | Cons { listHead :: a, listTail :: List a } deriving (Show, Read, Eq, Ord)
infixr 5 :-:
data List1 a = Empty1 | a :-: (List1 a) deriving (Show, Read, Eq, Ord)
-- make a function that adds two of our lists togethe... | sharkspeed/dororis | languages/haskell/LYHGG/8-making-our-own-types-and-typeclasses/5-recursive-data-structures.hs | bsd-2-clause | 1,595 | 0 | 8 | 352 | 476 | 246 | 230 | 22 | 1 |
module Foundation where
import Prelude
import Yesod
import Yesod.Fay
import Yesod.Static
import Yesod.Auth
import Yesod.Auth.BrowserId
import Yesod.Auth.GoogleEmail
import Yesod.Default.Config
import Yesod.Default.Util (addStaticContentExternal)
import Network.HTTP.Conduit (Manager)
import qualified Settings
import Se... | snoyberg/photosorter | Foundation.hs | bsd-2-clause | 6,461 | 0 | 17 | 1,366 | 899 | 493 | 406 | -1 | -1 |
-- | Provides a simple, clean monad to write websocket servers in
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings,
NoMonomorphismRestriction, Rank2Types, ScopedTypeVariables #-}
module Network.WebSockets.Monad
( WebSocketsOptions (..)
, defaultWebSocketsOptions
, WebSockets ... | 0xfaded/websockets | src/Network/WebSockets/Monad.hs | bsd-3-clause | 9,538 | 0 | 17 | 2,293 | 2,149 | 1,137 | 1,012 | 172 | 2 |
data C_AAM = C_AAM
instance AAM C_AAM where
type Time C_AAM = Integer
type Addr C_AAM = (Integer, Name)
tzero C_AAM = 0
tick C_AAM _ t = t+1
alloc C_AAM x t = (t, x)
| davdar/quals | writeup-old/sections/03AAMByExample/04RecoveringConcrete/00AAM.hs | bsd-3-clause | 176 | 0 | 6 | 46 | 82 | 44 | 38 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Numeric.Sparse.Types where
import Data.IntMap (IntMap)
import Data.Proxy
import GHC.TypeLits
import Numeric.Sparse.Internal
-- Sparse vector -----... | mnick/hsparse | src/Numeric/Sparse/Types.hs | bsd-3-clause | 1,144 | 0 | 13 | 320 | 387 | 211 | 176 | 24 | 0 |
module Ttlv.ClientSpec where
import Kmip.Client
import Ttlv.Enum
import qualified Ttlv.Validator.Message as M
import qualified Ttlv.Validator.Objects
import Ttlv.Validator.Structures (runTtlvParser)
import Test.Hspec
spec :: Spec
spec = do
describe "Client" $ do
let r... | nymacro/hs-kmip | tests/Ttlv/ClientSpec.hs | bsd-3-clause | 780 | 0 | 19 | 218 | 238 | 117 | 121 | 21 | 1 |
{-# LANGUAGE GADTs, FlexibleContexts, PatternGuards, TemplateHaskell #-}
module YaLedger.Processor.Duplicates
(deduplicate) where
import Control.Applicative ((<$>))
import Control.Monad.Exception
import qualified Data.Map as M
import Data.Dates
import Data.Decimal
import YaLedger.Types
import YaLedger.Kernel.Corres... | portnov/yaledger | YaLedger/Processor/Duplicates.hs | bsd-3-clause | 8,017 | 0 | 22 | 2,556 | 2,586 | 1,287 | 1,299 | 158 | 20 |
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.Delay
import Control.Monad
import System.IO
spamDelays i = do
putStr $ "\r" ++ show i
hFlush stdout
d <- newDelay 100000000
threadDelay 1000
cancelDelay d
spamDelays $! i+1
main = spamDelays 1
| joeyadams/haskell-stm-delay | test/spamDelays.hs | bsd-3-clause | 305 | 0 | 8 | 63 | 98 | 47 | 51 | 13 | 1 |
module ProgramMain (
main
) where
import Data.List
import Data.Monoid
import System.Environment
main :: IO ()
main = do
[moduleName] <- getArgs >>= return . map (stripExt "hs")
putStrLn $ mainModuleText moduleName >>= expandTab 4
type Extension = String
stripExt :: Extension -> FilePath -> Fil... | thomaseding/main | src/ProgramMain.hs | bsd-3-clause | 1,005 | 0 | 11 | 283 | 337 | 179 | 158 | 35 | 2 |
module Data.GNG
( -- * Types
Input(len, add, mul)
, GNG
, NodeId
, EdgeId
-- * Settings
, GNGSettings
, def
, ageMax
, moveRatio1
, moveRatio2
, splitSpan
-- * Functions
, initialize
, modify
, update
-- * Outputs
, getNodes
, getEdges
... | yunomu/gng | Data/GNG.hs | bsd-3-clause | 6,379 | 0 | 21 | 1,842 | 2,840 | 1,449 | 1,391 | 178 | 7 |
{-# LANGUAGE MonadComprehensions, BangPatterns, ScopedTypeVariables #-}
{-|
Module : Operations.WithExternalSymbols
Description : Contains FA operations. Each operation has one extra parameter to
pass an external alphabet which is used instead of the implicit
alphabet.
-}
module Operat... | jakubriha/automata | src/Operations/WithExternalSymbols.hs | bsd-3-clause | 8,718 | 0 | 23 | 1,824 | 2,914 | 1,536 | 1,378 | 149 | 2 |
-- |
-- Module: Main
-- Description: CommandWrapper subcommand for executing commands with a
-- predefined environment.
-- Copyright: (c) 2018-2020 Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portability: GHC specific language extensions.... | trskop/command-wrapper | command-wrapper/app-exec/Main.hs | bsd-3-clause | 26,427 | 0 | 22 | 7,677 | 6,034 | 3,296 | 2,738 | -1 | -1 |
{-# LANGUAGE PackageImports #-}
import "steveroggenkamp" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| roggenkamps/steveroggenkamp.com | app/devel.hs | bsd-3-clause | 133 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Physics.Falling3d.InertiaTensor3d
(
InertiaTensor3d(..),
InverseInertiaTensor3d(..),
)
where
import Data.Vect.Double.Base
import Physics.Falling.Dynamics.InertiaTensor
import Physics.Falling.Math.Transform
import Physics.Falling3d.Tr... | sebcrozet/falling3d | Physics/Falling3d/InertiaTensor3d.hs | bsd-3-clause | 983 | 0 | 8 | 177 | 182 | 106 | 76 | 19 | 0 |
--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.
{-# LANGUAGE GADTs #-}
module Duckling.Rules.NE
( defaultRules
, langRules
, localeRules
) where
import ... | facebookincubator/duckling | Duckling/Rules/NE.hs | bsd-3-clause | 1,242 | 0 | 9 | 194 | 408 | 216 | 192 | 31 | 1 |
------------------------------------------------------------------------------
-- | Core library components. Most anything that touches raw JMacro should
-- go in this module for now.
------------------------------------------------------------------------------
{-# LANGUAGE DeriveFunctor #-}
{-# LAN... | Soostone/hs-d3 | src/Graphics/HSD3/D3/Graph.hs | bsd-3-clause | 3,414 | 0 | 10 | 763 | 760 | 422 | 338 | 68 | 1 |
{-# LANGUAGE LambdaCase #-}
module Jerimum.PostgreSQL.Types.DateTime
-- * Text codec
( parseDate
, formatDate
, parseTimeTz
, formatTimeTz
, parseTimeNoTz
, formatTimeNoTz
, parseTimestampTz
, formatTimestampTz
, parseTimestampNoTz
, formatTimestampNoTz
, fromTimestampNoTz
-- * CBOR codec
... | dgvncsz0f/nws | src/Jerimum/PostgreSQL/Types/DateTime.hs | bsd-3-clause | 9,171 | 0 | 24 | 1,851 | 3,042 | 1,575 | 1,467 | 240 | 4 |
{-# OPTIONS -Wall -Werror #-}
-- #hide
module Data.Time.LocalTime.Format
(
-- * UNIX-style formatting
module Data.Time.LocalTime.Format
) where
import Data.Time.LocalTime.LocalTime
import Data.Time.LocalTime.TimeOfDay
import Data.Time.LocalTime.TimeZone
import Data.Time.Calendar.WeekDate
import Data.Time.Calendar... | FranklinChen/hugs98-plus-Sep2006 | packages/time/Data/Time/LocalTime/Format.hs | bsd-3-clause | 7,685 | 6 | 17 | 1,374 | 2,134 | 1,188 | 946 | 86 | 5 |
{-# LANGUAGE LambdaCase #-}
module Tree where
pair (f, g) x = (f x, g x)
cross (f, g) (x, y) = (f x, g y)
compose (h, k) = h . k
data Tree a = Tip a | Bin (Tree a) (Tree a) deriving (Show, Eq)
tip = Tip
bin = uncurry Bin
foldt :: (a -> b, (b, b) -> b) -> Tree a -> b
foldt (f, g) (Tip a) = f a
foldt (f, g) (Bin tl tr... | cutsea110/aop | src/Tree.hs | bsd-3-clause | 3,158 | 0 | 15 | 828 | 1,523 | 796 | 727 | 61 | 2 |
{-# OPTIONS_HADDOCK hide, prune #-}
module Handler.Mooc.Survey
( getSurveyR, postSurveyR
) where
import Import
import Yesod.Form.Bootstrap3
postSurveyR :: Handler Html
postSurveyR = do
((formResult, formWidget), formEnctype) <- runFormPost $ renderBootstrap3 BootstrapBasicForm testForm
case formResult of
... | achirkin/qua-kit | apps/hs/qua-server/src/Handler/Mooc/Survey.hs | mit | 5,610 | 0 | 28 | 1,775 | 656 | 325 | 331 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : $Header$
Description : Signatures for CoCASL, as extension of CASL signatures
Copyright : (c) Till Mossakowski, Uni Bremen 2004
License : GPLv2 or higher, see LICENSE.txt
Maintainer : hausmann@informatik.uni-bremen.de
Stability : provisional
Portabil... | keithodulaigh/Hets | CoCASL/CoCASLSign.hs | gpl-2.0 | 1,981 | 0 | 11 | 358 | 554 | 290 | 264 | 38 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Numeric.Units.Dimensional.Parsing.Units
(
-- * Parsers
expression
, quantity
, unit
, number
-- * Customizing the Accepted Language
, LanguageDefinition(..)
, defaultLanguageDefiniti... | dmcclean/dimensional-parsing | src/Numeric/Units/Dimensional/Parsing/Units.hs | bsd-3-clause | 12,945 | 2 | 24 | 4,226 | 3,274 | 1,735 | 1,539 | 220 | 4 |
{-# LANGUAGE CPP #-}
-- |Convenience interface for working with GLSL shader
-- programs. Provides an interface for setting attributes and
-- uniforms.
module Graphics.GLUtil.ShaderProgram
(-- * The ShaderProgram type
ShaderProgram(..),
-- * Simple shader programs utilizing a vertex shader and a fragment shade... | coghex/abridgefaraway | src/GLUtil/ShaderProgram.hs | bsd-3-clause | 10,118 | 0 | 16 | 2,289 | 2,363 | 1,291 | 1,072 | 131 | 2 |
{-# LANGUAGE FlexibleInstances
, FlexibleContexts
, MultiParamTypeClasses
, ScopedTypeVariables
, TypeSynonymInstances
, TypeFamilies
, GeneralizedNewtypeDeriving
#-}
-----------------------------------------------------------------------------
-- |
--... | sordina/Diagrams-AST | src/Diagrams/Backend/Image.hs | bsd-3-clause | 1,839 | 0 | 8 | 413 | 163 | 95 | 68 | 20 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module VarSet (
-- * Var, Id and TyVar set types
VarSet, IdSet, TyVarSet, CoVarSet, TyCoVarSet,
-- ** Manipulating these sets
emptyVarSet, unitVarSet, mkVarSet,
... | nushio3/ghc | compiler/basicTypes/VarSet.hs | bsd-3-clause | 9,743 | 0 | 10 | 2,188 | 1,844 | 1,062 | 782 | 173 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : Extension of CASL2SubCFOL to CoCASL
Copyright : (c) Till Mossakowski, C.Maeder, Uni Bremen 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stabilit... | mariefarrell/Hets | Comorphisms/CoCASL2CoSubCFOL.hs | gpl-2.0 | 4,097 | 0 | 15 | 960 | 906 | 474 | 432 | 81 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.DebugStack
-- Copyright : (c) Brandon S Allbery KF8NH, 2012
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : allbery.b@gmail.com
-- Stability : unstable
-- Portability : not portable
-... | jthornber/XMonadContrib | XMonad/Hooks/DebugStack.hs | bsd-3-clause | 3,459 | 0 | 16 | 1,207 | 729 | 408 | 321 | 45 | 3 |
<?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="ar-SA">
<title>FuzzDB Files</title>
<maps>
<homeID>fuzzdb</homeID>
<mapref location="ma... | kingthorin/zap-extensions | addOns/fuzzdb/src/main/javahelp/help_ar_SA/helpset_ar_SA.hs | apache-2.0 | 960 | 77 | 66 | 156 | 407 | 206 | 201 | -1 | -1 |
module Main where
import Control.Applicative ((<$>))
import Control.Monad (replicateM)
import qualified Data.HashMap.Strict as HM
import Data.List (delete)
import Data.Maybe
import Test.HUnit (Assertion, assert)
import Test.Framework (Test, defaultMain)
import Test.Framework.Providers.HUnit (testCase)
import Test.Fram... | pacak/cuddly-bassoon | unordered-containers-0.2.8.0/tests/Regressions.hs | bsd-3-clause | 2,248 | 0 | 13 | 535 | 834 | 460 | 374 | 59 | 2 |
module Risers where
{-@ LIQUID "--totality" @-}
{-@ predicate NonNull X = ((len X) > 0) @-}
{- risers :: (Ord a) => zs:[a] -> {v: [[a]] | ((NonNull zs) => (NonNull v)) } @-}
risers []
= []
risers [x]
= [[x]]
risers (x:y:etc)
= if x <= y then (x:s):ss else [x]:(s:ss)
where (s:ss) = risers ... | mightymoose/liquidhaskell | tests/neg/risers.hs | bsd-3-clause | 352 | 0 | 8 | 94 | 113 | 64 | 49 | 8 | 2 |
{-# LANGUAGE PolyKinds, TypeFamilies #-}
module Bug where
import GHC.Exts
class HasRep a where
type Rep a :: TYPE r
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T12938.hs | bsd-3-clause | 121 | 0 | 7 | 25 | 29 | 17 | 12 | -1 | -1 |
-- | Imported by 'Threaded', since a TH splice can't be used in the
-- module where it is defined.
module Threaded_TH where
import Control.Concurrent (forkOS)
import Language.Haskell.TH.Syntax (Exp (LitE), Lit (IntegerL), Q, runIO)
-- | forkOS requires the threaded RTS, so this TH fails if haddock was
-- built withou... | Acidburn0zzz/haddock | html-test/src/Threaded_TH.hs | bsd-2-clause | 426 | 0 | 13 | 75 | 102 | 59 | 43 | 7 | 1 |
import Control.Monad
import Data.List
allAscii = ['a'..'z']
countGemStones = foldl intersect allAscii
main :: IO ()
main = do
n <- readLn :: IO Int
input <- replicateM n getLine
let ans = countGemStones input
print (length ans)
| mgrebenets/hackerrank | alg/strings/gem-stones.hs | mit | 247 | 0 | 10 | 57 | 95 | 46 | 49 | 10 | 1 |
module Feature.AndOrParamsSpec where
import Network.Wai (Application)
import Network.HTTP.Types
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import PostgREST.Config.PgVersion (PgVersion, pgVersion112)
import Protolude hiding (get)
import SpecHelper
spec :: PgVersion -> SpecWith ((), Applicat... | steve-chavez/postgrest | test/Feature/AndOrParamsSpec.hs | mit | 17,445 | 0 | 24 | 4,266 | 2,377 | 1,411 | 966 | -1 | -1 |
{- |
Module : DataAssociation.Utils
Description : Different utilities.
License : MIT
Stability : development
-}
module DataAssociation.Utils (
preservingArg
, sortingGroupBy
, allSubsetsOneShorter
, countSupported
, calculateSupport
, sufficientSupport
) where
import Control.Arrow ((&&&))
import Cont... | fehu/min-dat--a-priori | core/src/DataAssociation/Utils.hs | mit | 3,010 | 3 | 16 | 816 | 565 | 325 | 240 | -1 | -1 |
import System.Environment
import System.Exit
import Data.List
import Spiral
prettyPrint m = intercalate "\n" (map (intercalate "\t") mstr)
where mstr = map (map show) m
main = do
args <- getArgs
case args of
[] -> putStrLn $ "Exiting, need spiral size"
list | length list > 1 -> putStrLn $ "too many para... | kirhgoff/haskell-sandbox | euler28/printer.hs | mit | 519 | 0 | 16 | 138 | 178 | 87 | 91 | 16 | 3 |
-- |
-- Module : HGE2D.AABBTree
-- Copyright : (c) 2016 Martin Buck
-- License : see LICENSE
--
-- Containing the definition and functions for an axis aligned bounding box tree
module HGE2D.AABBTree where
import HGE2D.Types
import HGE2D.Datas
import HGE2D.Classes
import HGE2D.Geometry
import HGE2D.Colli... | I3ck/HGE2D | src/HGE2D/AABBTree.hs | mit | 3,431 | 0 | 13 | 1,042 | 739 | 385 | 354 | 44 | 3 |
{-
- Whidgle.Hoisting
-
- Describes hoisting for Whidgle.
-}
module Whidgle.Hoisting
( ioHoistWhidgle
) where
import Control.Monad.Reader
import Control.Monad.State
import System.IO.Unsafe
import Whidgle.Types
-- Hoists an IO morphism to a Whidgle one.
-- There's probably a clever mmorphy way to do this but I r... | Zekka/whidgle | src/Whidgle/Hoisting.hs | mit | 619 | 0 | 11 | 117 | 129 | 70 | 59 | 11 | 1 |
-- School of Haskell "Basics of Haskell" Chapter 2
-- https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell/2-my-first-program
-- Exercise 3
-- Define a function that takes a segment and returns it's center point:
center :: ((Double, Double), (Double, Double)) -> (Double, Double)
center ((x1,... | chsm/code | hs/soh/basics/02-03.hs | mit | 418 | 0 | 8 | 63 | 132 | 80 | 52 | 4 | 1 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Grammar.Greek.Morph.Stage where
import Grammar.Common
import Grammar.Greek.Morph.Clitic.Stage (clitic)
import Grammar.Greek.Morph.Phoneme.Stage (phoneme)
morph
= clitic
<+> phoneme
| ancientlanguage/haskell-analysis | greek-morph/src/Grammar/Greek/Morph/Stage.hs | mit | 244 | 0 | 5 | 27 | 49 | 33 | 16 | 8 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Glot.DockerRun
( RunRequest(..)
, RunRequestPayload(..)
, RunResult(..)
, Config(..)
, run
, Error(..)
, ErrorBody(..)
, formatError
, debugError
) where
import Import hiding (RunResult)
import qualifi... | prasmussen/glot-www | Glot/DockerRun.hs | mit | 9,069 | 0 | 21 | 3,509 | 1,588 | 829 | 759 | -1 | -1 |
module Lisp.StdLib(stdLib) where
import Lisp.Spefication
import Data.SyntaxIR
import Data.Map as M
-- # UTILITY
a |> f = f a
reduceFn fn acc elems = impl acc elems
where impl acc (n:ns) = impl (fn acc n) ns
impl acc [] = acc
functionFactory name onSingle onMultiple = func
where
func [] = ... | AKST/lisp.hs | src/Lisp/StdLib.hs | mit | 2,259 | 0 | 14 | 784 | 948 | 475 | 473 | 61 | 3 |
-- Copyright (C) 2004-2005 David Roundy
--
-- 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, or (at your option)
-- any later version.
--
-- This program is distributed ... | DavidAlphaFox/darcs | src/Darcs/Repository/Match.hs | gpl-2.0 | 3,869 | 0 | 13 | 1,034 | 862 | 464 | 398 | -1 | -1 |
{--
-- Natume -- an implementation of Kana-Kanji conversion in Haskell
-- Copyright (C) 2006-2012 Takayuki Usui
--
-- 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 th... | takayuki/natume | Getopt.hs | gpl-2.0 | 2,583 | 0 | 21 | 912 | 739 | 405 | 334 | 48 | 9 |
module SW_liquid
( sw_liquid_n, sw_liquid_Veff, homogeneous_sw_liquid )
where
import Expression
import IdealGas ( idealgas, idealgas_of_veff, kT )
import WhiteBear ( gSigmaA, whitebear )
import FMT ( rad )
sigma :: Type a => Expression a
sigma = 2*rad
epsilon :: Type a => Expression a
epsilon = s_tex "... | droundy/deft | src/haskell/SW_liquid.hs | gpl-2.0 | 4,975 | 2 | 29 | 1,419 | 2,202 | 1,141 | 1,061 | 98 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module SerializingTreesToJsonSpec where
import Test.Hspec
import NodeEditor.Data
import NodeEditor.Serialize
import NodeEditor.Parser
spec = do
it "works for nodes" $ do
toJson (topLevelNodes $ treeFromText "line one")
`shouldBe`
"[{\"body\":\"line one\",\"id\":0}]"
| rickardlindberg/node-editor-2 | test/SerializingTreesToJsonSpec.hs | gpl-3.0 | 320 | 0 | 14 | 51 | 62 | 34 | 28 | 11 | 1 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- remove the two benign defaults
-- | A simple color module for handling RGB and HSV representations of colors.
module Data.Color (
-- * Datatypes
RGB(..)
, HSV(..)
, rgbToHex
, hsvToHex
-- ** Predefined colors
, red
, green
, blue
-- ** Conversions
... | meiersi/scyther-proof | src/Data/Color.hs | gpl-3.0 | 7,152 | 0 | 15 | 1,751 | 1,963 | 1,047 | 916 | 154 | 7 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Context
( ActionContext(..)
, ActionContextM
, runContextM
, BackgroundContext(..)
, BackgroundContextM
, withBackgroundContextM
, SolrIndexingContext(..)
, SolrIndexingContextM
, mkSolrIndexingContext
) where
import Control.Monad.Trans.Reader (Re... | databrary/databrary | src/Context.hs | agpl-3.0 | 5,615 | 0 | 13 | 953 | 1,215 | 668 | 547 | -1 | -1 |
main = putStrLn $ show $ foldl1 (\x y -> lcm x y) [1..20]
| rohitjha/ProjectEuler | MPL/PE005.hs | unlicense | 58 | 0 | 9 | 14 | 39 | 20 | 19 | 1 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
module Service where
import Network.HTTP.Server
import Network.HTTP.Server.Logger
import Codec.Binary.UTF8.String
import Data.List (intercalate)
import Data.List.Split (splitOn)
import Paths_burningbar (version)
import Data.Version (showVersion)
import Util
import Language
import Parse... | cfr/burningbar | src/Service.hs | unlicense | 2,019 | 0 | 16 | 526 | 516 | 272 | 244 | 39 | 3 |
module Haskoin.Crypto.Base58.Tests (tests) where
import Test.QuickCheck.Property hiding ((.&.))
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Control.Monad.Identity
import Data.Maybe
import Data.Word
import Data.Bits
import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import qu... | lynchronan/haskoin-crypto | testsuite/Haskoin/Crypto/Base58/Tests.hs | unlicense | 943 | 0 | 9 | 166 | 239 | 137 | 102 | 27 | 2 |
module HEP.Automation.Model.Client.Command where
import HEP.Automation.Model.Client.ProgType
import HEP.Automation.Model.Client.Job
import HEP.Automation.Model.Client.Config
import Data.Configurator
commandLineProcess :: Model_client -> IO ()
commandLineProcess (Create cfg mn) = do
putStrLn "create called"
mc <-... | wavewave/model-client | lib/HEP/Automation/Model/Client/Command.hs | bsd-2-clause | 1,179 | 0 | 11 | 184 | 381 | 185 | 196 | 26 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
-----------------------------------------------------... | kylcarte/qclib | src/Application.hs | bsd-3-clause | 1,043 | 0 | 11 | 140 | 170 | 98 | 72 | 21 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.Mem
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability : unportable
--
-- A ... | raboof/xmobar | src/Plugins/Monitors/Mem.hs | bsd-3-clause | 1,786 | 0 | 16 | 428 | 532 | 288 | 244 | 37 | 1 |
module Distribution.Redo
( -- * Redo Monad
Redo, runRedo
, debug
, Status(..), status
, DepPath(..)
, getDeps, addDep, clearDeps
, checkForChanges
, clearStatus, recordChanged, recordNoChange, recordBuildFailure
-- * Environment
, Vars(..), varsFromEnv
-- ** Paths
... | Zankoku-Okuno/redo | src/Distribution/Redo.hs | bsd-3-clause | 889 | 0 | 9 | 191 | 230 | 143 | 87 | 28 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, NoMonomorphismRestriction #-}
class Num a
(+) :: Int -> Int -> Int
x + y = x
data IO a
type String = [Char]
length :: [a] -> Int
length [] = 0
length (x:xs) = 1 + length xs
filter :: (a -> Bool) -> [a] -> [a]
words :: String -> [String]
cl... | rodrigogribeiro/mptc | test/overloaded-compose.hs | bsd-3-clause | 948 | 0 | 11 | 260 | 513 | 273 | 240 | -1 | -1 |
-- 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.
{-# LANGUAGE Over... | rfranek/duckling | Duckling/Numeral/DE/Corpus.hs | bsd-3-clause | 3,367 | 0 | 11 | 1,484 | 605 | 346 | 259 | 95 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module SerializeableSessions where
import Data.Generics --for deriving Typeable
import HAppS.State -- for deriving Serialize
import SerializeableUsers (UserName (..))
import qualified Data.Map as M
type SessionKey = Integer ... | tphyahoo/happs-tutorial | src/SerializeableSessions.hs | bsd-3-clause | 775 | 0 | 10 | 243 | 173 | 97 | 76 | 16 | 0 |
{-# LANGUAGE DataKinds, GADTs, StandaloneDeriving #-}
module Page3 () where
import Data.Type.Natural
import Page2
type RB a n = Either (Red a n) (Black a n)
type RBCrumb a n = Either (RedCrumb a n) (BlackCrumb a (S n))
data RedCrumb a n where
RootCrumb :: RedCrumb a n
RedCrumb :: a -> (Black a n) -> (BlackCr... | farrellm/dependent-rbtree | src/Page3.hs | bsd-3-clause | 2,473 | 34 | 23 | 610 | 1,227 | 617 | 610 | 47 | 1 |
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and
-- detab the module (please do the detabbing in a separate patch). See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
-- fo... | nomeata/ghc | compiler/nativeGen/SPARC/CodeGen/CondCode.hs | bsd-3-clause | 3,235 | 34 | 14 | 926 | 1,028 | 511 | 517 | 80 | 23 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE RankNTypes #-... | iblumenfeld/saw-core | src/Verifier/SAW/TypedAST.hs | bsd-3-clause | 34,429 | 5 | 18 | 9,555 | 11,366 | 5,808 | 5,558 | -1 | -1 |
module Process.Console
( start
) where
import Prelude hiding (init)
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad.Reader
import Control.Monad.State
import Process
import Process.ConsoleChan
import qualified Process.Status
import Process.StatusChan
data PConf = PConf
{ cCm... | artems/htorr | src/Process/Console.hs | bsd-3-clause | 2,671 | 0 | 17 | 779 | 729 | 359 | 370 | 75 | 4 |
module Text.Document.PluginRegister (pluginRegister) where
import Text.Document.Plugin
import Text.Document.Core.Type
import Text.Document.Plugin.HsColour
import Text.Document.Plugin.Formula
import Text.Document.Plugin.TOC
pluginRegister :: [Plugin Document Syn_Document]
pluginRegister = [
formulaPlugin
, hsco... | sebastiaanvisser/orchid-doc | src/Text/Document/PluginRegister.hs | bsd-3-clause | 350 | 0 | 6 | 42 | 73 | 48 | 25 | 11 | 1 |
{-# OPTIONS_HADDOCK not-home #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
-- | Internal constructors and helper functions. Note that no guarantees are
-- given for stability of these interfaces.
module Network.Wai.Internal where
import Blaze.ByteString.Builder ... | beni55/wai | wai/Network/Wai/Internal.hs | mit | 5,189 | 0 | 13 | 1,257 | 475 | 310 | 165 | 44 | 0 |
module Goats where
-- for cardinality, it means that
-- unary constructors are the identity function
data Animals = Animals Int deriving (Eq, Show)
-- tooManyGoats :: Int -> Bool
-- tooManyGoats n = n > 42
newtype Goats =
Goats Int deriving (Eq, Show)
newtype Cows =
Cows Int deriving (Eq, Show)
tooManyGoats ... | brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/GoatsChapter11.hs | mit | 876 | 0 | 8 | 193 | 217 | 121 | 96 | 20 | 1 |
{- |
Module : $Header$
Description : alpha-conversion (renaming of bound variables) for CASL formulas
Copyright : (c) Christian Maeder, Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
uniquely rename v... | nevrenato/Hets_Fork | CASL/AlphaConvert.hs | gpl-2.0 | 1,641 | 0 | 20 | 425 | 435 | 227 | 208 | 25 | 1 |
-- This file is part of HamSql
--
-- Copyright 2014-2016 by it's authors.
-- Some rights reserved. See COPYING, AUTHORS.
module Database.HamSql.Internal.Option where
import Control.Monad.Trans.Reader
import Data.Monoid
import Options.Applicative
import Options.Applicative.Builder.Internal (HasMetavar, HasValue)
import... | qua-bla/hamsql | src/Database/HamSql/Internal/Option.hs | gpl-3.0 | 5,214 | 0 | 15 | 1,135 | 1,206 | 621 | 585 | 148 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- This deals with files that are ready to ingest.
--
module Ambiata.Cli.Processing (
availableFiles
, moveToArchive
, uploadAction
, processReady
, fileAddress
, uploadReady
) where
im... | ambiata/tatooine-cli | src/Ambiata/Cli/Processing.hs | apache-2.0 | 2,674 | 0 | 15 | 611 | 729 | 387 | 342 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.InstallPlan
-- Copyright : (c) Duncan Coutts 2008
-- License : BSD-like
--
-- Maintainer : duncan@community.haskell.org
-... | headprogrammingczar/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | 34,195 | 0 | 18 | 8,441 | 6,111 | 3,238 | 2,873 | 506 | 7 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Get
-- Copyright : (c) Andrea Vezzosi 2008
-- Duncan Coutts 2011
-- John Millikin 2012
-- License : BSD-like
--
-- Maintainer : cabal-devel@haskell.org... | plumlife/cabal | cabal-install/Distribution/Client/Get.hs | bsd-3-clause | 12,693 | 0 | 22 | 3,408 | 2,975 | 1,520 | 1,455 | 252 | 6 |
module Kalium.Nucleus.Vector.BindClean where
import Kalium.Prelude
import Kalium.Util
import Kalium.Nucleus.Vector.Program
import Kalium.Nucleus.Vector.Recmap
import Kalium.Nucleus.Vector.Attempt
bindClean :: Endo' Program
bindClean = over recmapped bindCleanExpression
bindCleanExpression :: Endo' Expression
bindCl... | rscprof/kalium | src/Kalium/Nucleus/Vector/BindClean.hs | bsd-3-clause | 1,540 | 0 | 15 | 402 | 666 | 333 | 333 | -1 | -1 |
module Lambda.Type
( module Lambda.Data
, module Lambda.Position
, toTree
)
where
import Lambda.Data
import Lambda.IO
import Lambda.Tree
import Lambda.Position
| Erdwolf/autotool-bonn | src/Lambda/Type.hs | gpl-2.0 | 168 | 0 | 5 | 28 | 43 | 27 | 16 | 8 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-rds/gen/Network/AWS/RDS/DeleteDBInstance.hs | mpl-2.0 | 6,075 | 0 | 9 | 1,191 | 589 | 367 | 222 | 70 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-elasticache/gen/Network/AWS/ElastiCache/DescribeReplicationGroups.hs | mpl-2.0 | 6,107 | 0 | 12 | 1,217 | 729 | 435 | 294 | 78 | 1 |
-- | A gallery of instruments (found in Csound catalog).
module Color where
import Csound.Base
bass (amp, cps) = sig amp * once env * osc (sig cps)
where env = eexps [1, 0.00001]
pluckSynth (amp, cps1, cps2) = 0.5 * sig amp * once env * pluck 1 (sig cps1) cps2 def 3
where env = eexps [1, 0.004]
marimbaSynth... | isomorphism/csound-expression | examples/Color.hs | bsd-3-clause | 6,349 | 0 | 17 | 2,529 | 2,732 | 1,492 | 1,240 | 117 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans
-fno-warn-incomplete-patterns
-fno-warn-deprecations
-fno-warn-unused-binds #-} --FIXME
module UnitTests.Distribution.Version (versionTests) where
import Distribution.Version
import Distribution.Text
import Text.Pre... | tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/tests/UnitTests/Distribution/Version.hs | bsd-3-clause | 26,648 | 0 | 16 | 6,013 | 6,094 | 3,151 | 2,943 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- |
module Stack.Types.Package where
import Control.DeepSeq
import Control.Exception hiding (try,catch)
import Co... | phadej/stack | src/Stack/Types/Package.hs | bsd-3-clause | 16,693 | 0 | 18 | 4,431 | 3,347 | 1,823 | 1,524 | 408 | 4 |
{-# LANGUAGE TypeFamilies #-}
module ShouldCompile where
import Data.Kind (Type)
class Cls a where
type Fam a :: Type
type Fam a = Maybe a
instance Cls Int where
-- Overriding default
type Fam Int = Bool
nott :: (Fam a ~ Bool) => a -> Fam a -> Fam a
nott _proxy False = True
nott _proxy True = False... | sdiehl/ghc | testsuite/tests/typecheck/should_compile/tc252.hs | bsd-3-clause | 372 | 0 | 8 | 94 | 137 | 74 | 63 | -1 | -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="ja-JP">
<title>Regular Expression Tester</title>
<maps>
<homeID>regextester</homeID>
<m... | thc202/zap-extensions | addOns/regextester/src/main/javahelp/help_ja_JP/helpset_ja_JP.hs | apache-2.0 | 978 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
module D5 where
{-Rename top level identifier 'sumSquares' to 'sum'.
This refactoring affects module `D5', 'B5' , 'C5' and 'A5' -}
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe :: Tree a -> [a]
fringe (Leaf x ) = [x]
fringe (Branch left right) = fringe left ++ fringe right
class SameOrNot a where
... | kmate/HaRe | old/testing/renaming/D5.hs | bsd-3-clause | 561 | 0 | 8 | 154 | 217 | 112 | 105 | 15 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ViewPatterns #-}
module Stack.Types.Compiler where
import Control.DeepSeq
import Control.DeepSeq.Generics (genericRnf)
import Data.Aeson
import Data.Binary (Binary)
import Data.Monoid ((<>)... | Denommus/stack | src/Stack/Types/Compiler.hs | bsd-3-clause | 2,902 | 0 | 11 | 567 | 673 | 349 | 324 | 62 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module T14931_Bug where
import Prelude (Int, IO, Bool(..), Num(..), Monad(..), not, print)
import qualified Language.Haskell.TH.Syntax as TH
import T14931_State
wat :: IO ()
wat = print $(let playGame [] = do
(_, score) <- ge... | sdiehl/ghc | testsuite/tests/profiling/should_compile/T14931_Bug.hs | bsd-3-clause | 901 | 0 | 20 | 407 | 279 | 152 | 127 | 21 | 5 |
{-# LANGUAGE DataKinds, TypeOperators, KindSignatures, TypeFamilies,
ConstraintKinds, FlexibleContexts #-}
{-# OPTIONS_GHC -fplugin T11525_Plugin #-}
module T11525 where
import GHC.TypeLits
import Data.Proxy
truncateB :: KnownNat a => Proxy (a + b) -> Proxy a
truncateB Proxy = Proxy
class Bus t where
... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T11525.hs | bsd-3-clause | 711 | 0 | 11 | 213 | 188 | 102 | 86 | 18 | 1 |
module Model where
import Prelude
import Yesod
import Yesod.Markdown
import qualified Data.ByteString as BS
import Data.Text (Text)
import Data.Time (UTCTime)
import Data.Map
import Database.Persist.Quasi
import Database.Persist.MongoDB hiding (master)
import Language.Haskell.TH.Syntax
import Data.Typeable (Typeable)
... | klarh/barch | Model.hs | mit | 767 | 0 | 14 | 138 | 149 | 88 | 61 | -1 | -1 |
module Ho.Library(
LibDesc(..),
readDescFile,
collectLibraries,
libModMap,
libHash,
libMgHash,
libProvides,
libName,
libBaseName,
libHoLib,
preprocess,
listLibraries
) where
import Control.Monad
import Data.Char
import Data.List
import Data.Maybe
import Data.Monoid
i... | m-alvarez/jhc | src/Ho/Library.hs | mit | 11,496 | 0 | 22 | 3,102 | 4,342 | 2,231 | 2,111 | -1 | -1 |
{- | This module defines a collection of combinators for looping over
nonterminals and metavariables, as well as for assembling output
for Coq. -}
module CoqLNOutputCombinators where
import Control.Monad.State
import Text.Printf ( printf )
import AST
import ASTAnalysis
import ComputationMonad
import CoqLNOutpu... | plclub/lngen | src/CoqLNOutputCombinators.hs | mit | 7,130 | 0 | 15 | 2,619 | 1,493 | 800 | 693 | 127 | 8 |
-- Copyright © 2013 Bart Massey
-- [This program is licensed under the "MIT License"]
-- Please see the file COPYING in the source
-- distribution of this software for license terms.
-- Select columns and/or rows from a CSV file
import Data.List (intersect)
import System.Console.ParseArgs
import System.IO
import Text... | BartMassey/csv-cut | csv-cut.hs | mit | 2,802 | 0 | 13 | 695 | 1,022 | 526 | 496 | 83 | 3 |
module PWMModelAux where
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import MlgscTypes
-- some functions useful for building clade models from alignents
-- Converts a residue probability (estimated by its relative frequency) to a
-- rounded, scaled, logarithm.
probToScore :: Double -> Dou... | tjunier/mlgsc | src/PWMModelAux.hs | mit | 1,676 | 0 | 11 | 284 | 291 | 160 | 131 | 15 | 1 |
module Spear.Render.StaticModel
(
-- * Data types
StaticModelResource
, StaticModelRenderer
-- * Construction and destruction
, staticModelResource
, staticModelRenderer
-- * Manipulation
, box
, modelRes
-- * Rendering
, bind
, render
-- * Collision
, mkColsFromSt... | jeannekamikaze/Spear | Spear/Render/StaticModel.hs | mit | 4,210 | 0 | 13 | 1,141 | 968 | 485 | 483 | 98 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Data.Aeson
import Data.Attoparsec.Number
import Data.Char
import qualified Data.HashMap.Strict as HMS
import Data.Maybe
import qualified Data.Text as DT
import qualified Data.Vector as Vec
-- import Debug.Trace
import System.IO
import Util.Json
dat... | dancor/melang | src/ProcHanziJson.hs | mit | 1,557 | 0 | 15 | 337 | 597 | 309 | 288 | 50 | 3 |
module Main
( main
) where
import Data.Foldable (maximum)
import Data.Ix (inRange)
import qualified Data.Map.Strict as M
import Linear (V2 (..), _x, _y)
import Relude.Extra.Lens ((^.))
import qualified Relude.Unsafe as U
data Seat = Empty | Oc... | genos/online_problems | advent_of_code_2020/day11/Main.hs | mit | 1,887 | 0 | 14 | 586 | 906 | 481 | 425 | -1 | -1 |
module BACnet.Prim
(
CharacterString(..),
OctetString(..),
BitString,
bitStringUnusedBits,
bitStringBytes,
bitStringLength,
bitString,
bitStringEmpty,
testBit,
Enumerated(..),
Date(..),
Time(..),
ObjectIdentifier(..),
objectIdentifier,
getObjectType,
get... | michaelgwelch/bacnet | src/BACnet/Prim.hs | mit | 3,186 | 0 | 11 | 730 | 980 | 557 | 423 | 87 | 3 |
{- Catalan Numbers in Haskell, with some help from
- http://rosettacode.org/wiki/Catalan_numbers#Haskell
-}
import Test.QuickCheck (quickCheck)
-- helpers
binom :: Integer -> Integer -> Integer
binom n k = product [k + 1 .. n] `div` product [1 .. n - k]
factorial :: Integer -> Integer
factorial = product . enumFrom... | genos/Programming | workbench/catalan.hs | mit | 1,373 | 0 | 14 | 347 | 734 | 408 | 326 | 33 | 1 |
-- Inverses Module
--
-- This stores all the fundamental things for manipulating matrices
-- This includes things like determinants and inverse matrices
--
-- Jacob Buete 2014
module Inverses (
det_two, -- :: Matrix -> Float
determinant, -- :: Matrix -> Float
cofactor_matrix, -- :: Matrix -> Mat... | JBuete/Haskell-Matrices | Inverses.hs | mit | 3,171 | 2 | 13 | 1,294 | 938 | 471 | 467 | 56 | 2 |
module Feature.BinaryJwtSecretSpec where
-- {{{ Imports
import Network.Wai (Application)
import Network.HTTP.Types
import Test.Hspec
import Test.Hspec.Wai
import Protolude
import SpecHelper
-- }}}
spec :: SpecWith ((), Application)
spec = describe "server started with binary JWT secret" $
-- this test will stop ... | steve-chavez/postgrest | test/Feature/BinaryJwtSecretSpec.hs | mit | 699 | 0 | 11 | 94 | 110 | 62 | 48 | 13 | 1 |
-- ----------------------------------------------------------------------------
{- |
Module : Holumbus.Data.Crunch
Copyright : Copyright (C) 2008 Timo B. Huebel
License : MIT
Maintainer : Timo B. Huebel (tbh@holumbus.org)
Stability : experimental
Portability: portable
Version : 0.1
Th... | ichistmeinname/holumbus | src/Holumbus/Data/Crunch.hs | mit | 5,072 | 0 | 11 | 1,148 | 1,442 | 778 | 664 | 91 | 2 |
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE RecordWildCards #-}
{-|
Module : CLI
Description : CLI options
Stability : experimental
Portability : POSIX
Work with CLI options.
-}
module CLI
( optionsParser
, makeSureOptionsAreValid
) where
import Options.Applicative.Simple
import ... | denisshevchenko/breadu.info | src/app/CLI.hs | mit | 3,005 | 0 | 14 | 947 | 415 | 225 | 190 | 51 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariable... | wyager/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs | mit | 32,398 | 1 | 26 | 8,400 | 8,388 | 4,406 | 3,982 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this mo... | marksauter/reactd3 | server/Site.hs | mit | 5,420 | 0 | 19 | 1,491 | 1,437 | 743 | 694 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.