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 Sharc.Instruments.Oboe (oboe) where
import Sharc.Types
oboe :: Instr
oboe = Instr
"oboe"
"Oboe"
(Legend "McGill" "2" "8")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 233.08 46 "a#3"))
(Pitch 233.08 46 "a#3")
(Amplitude 9888.84 (HarmonicFreq 30 (Pitch 32... | anton-k/sharc-timbre | src/Sharc/Instruments/Oboe.hs | bsd-3-clause | 29,666 | 0 | 15 | 8,708 | 10,972 | 5,677 | 5,295 | 1,028 | 1 |
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
----------------------------------------------------------------
-- ~ 2021.12.14
-- |
-- Module : Data.Trie.Convenience
-- Copyright : 2008--20... | wrengr/bytestring-trie | src/Data/Trie/Convenience.hs | bsd-3-clause | 9,625 | 0 | 12 | 2,003 | 1,773 | 970 | 803 | 98 | 2 |
module TechnicalIndicators.EMA {- (ema, ema2, ema3, ema4, ema5) -} where
-- | Simple Moving Average
import Control.Applicative (Applicative, (<*>), pure)
import Control.Arrow (second)
import TechnicalIndicators.Core (pair, pair3, pair4, pair5, cross, dup, single, para, para3, para4, para5)
averageN :: (Applicative ... | cutsea110/sig | sig-api/TechnicalIndicators/EMA.hs | bsd-3-clause | 1,765 | 0 | 13 | 422 | 874 | 489 | 385 | 33 | 1 |
module Main where
import Kis
import Web
import Simulator.Sim
import Simulator.Template
import System.IO.Temp
import qualified Data.Text as T
someClients :: [KisClient IO ()]
someClients =
[ webClient
, (runSimulator __template1__)
]
main :: IO ()
main =
withTempFile "/tmp/" "tmpKisDB" $ \fp _ ->
... | lslah/kis-proto | kis/Main.hs | bsd-3-clause | 359 | 0 | 10 | 77 | 114 | 65 | 49 | 15 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Tests.Mitsuba.Types where
import Mitsuba.Types
import Mitsuba.Utils
import Mitsuba.Element
import Test.Tasty
import Test.Tasty.HUnit hiding (Lab... | jfischoff/hs-mitsuba | tests/Tests/Mitsuba/Types.hs | bsd-3-clause | 85,493 | 0 | 19 | 25,472 | 9,284 | 5,624 | 3,660 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Control.Applicative
import Control.Monad.Managed
import qualified Data.ByteString as B... | Atidot/hs-mesos | test/Main.hs | mit | 11,912 | 0 | 58 | 2,813 | 2,867 | 1,509 | 1,358 | 414 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Pos.Core.Slotting.SlotId
( SlotId (..)
, siEpochL
, siSlotL
, slotIdF
, slotIdToEnum
, slotIdFromEnum
, slotIdSucc
, slotIdPred
, FlatSlotId
, flatSlotId
, flattenSlotId
, flattenEpochIndex
... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Slotting/SlotId.hs | mit | 4,148 | 0 | 14 | 973 | 965 | 538 | 427 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
module NFA.Nerode.Incongruent.Config where
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Set
import Data.Typeable
data Ord c => Config c = Config
{ alphabet :: Set c
, nondet_automaton_size :: Int
, wanted :: Int
}
... | florianpilz/autotool | src/NFA/Nerode/Incongruent/Config.hs | gpl-2.0 | 579 | 0 | 9 | 173 | 136 | 81 | 55 | 17 | 1 |
main :: Bool -> ()
main b = case b of True -> ()
_ -> () | roberth/uu-helium | test/staticwarnings/Complete7.hs | gpl-3.0 | 79 | 0 | 8 | 39 | 40 | 20 | 20 | 3 | 2 |
module Handler.PasteRaw where
import Import
import Yesod.Markdown
getPasteRawR :: PasteId -> Handler TypedContent
getPasteRawR pasteId =
runDB (get pasteId) >>=
\case
Nothing -> notFound
Just paste ->
respond "text/plain" (unMarkdown (pasteMarkdown paste))
| bitemyapp/lypaste | Handler/PasteRaw.hs | agpl-3.0 | 277 | 0 | 13 | 52 | 81 | 41 | 40 | -1 | -1 |
module Util.Cabal ( prettyVersion
, prettyPkgInfo
, parseVersion
, parsePkgInfo
) where
import Distribution.Version (Version(..))
import Distribution.Package (PackageIdentifier(..), PackageName(..))
import Distribution.Compat.ReadP (readP_to_S)
im... | tmhedberg/hsenv | src/Util/Cabal.hs | bsd-3-clause | 1,472 | 0 | 12 | 334 | 423 | 224 | 199 | 29 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright (C) 2011-2015 John MacFarlane <jgm@berkeley.edu>
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) a... | michaelbeaumont/pandoc | src/Text/Pandoc/SelfContained.hs | gpl-2.0 | 7,238 | 7 | 23 | 1,950 | 2,091 | 1,075 | 1,016 | 132 | 7 |
{-# language ScopedTypeVariables #-}
module Distribution.AutoUpdate.Zip (unzipArchive) where
import qualified Data.ByteString as BS
import Data.Word
import Codec.Archive.LibZip
import Control.Monad.CatchIO
import System.FilePath
import System.Directory
import System.IO
import Utils
-- | chunk size while unzipp... | geocurnoff/nikki | src/Distribution/AutoUpdate/Zip.hs | lgpl-3.0 | 1,781 | 0 | 16 | 413 | 479 | 241 | 238 | 41 | 2 |
{-# LANGUAGE FlexibleInstances, OverloadedStrings, CPP #-}
-- |
-- Module: Network.Riak.Connection
-- Copyright: (c) 2011 MailRank, Inc.
-- License: Apache
-- Maintainer: Tim McGilchrist <timmcgil@gmail.com>, Mark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
-- Stability: experimenta... | k-bx/riak-haskell-client | src/Network/Riak/Escape.hs | apache-2.0 | 4,996 | 0 | 25 | 1,374 | 1,255 | 688 | 567 | 95 | 4 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | Get information on modules, expressions, and identifiers
module GHCi.UI.Info
( ModInfo(..)
, SpanInfo(..)
, spanInfoFromRealSrcSpan
, collectInfo
... | shlevy/ghc | ghc/GHCi/UI/Info.hs | bsd-3-clause | 13,997 | 1 | 21 | 4,162 | 3,412 | 1,743 | 1,669 | 265 | 5 |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... | mterwoord/mbunit-v3 | tools/Thrift/src/lib/hs/src/Thrift/Server.hs | apache-2.0 | 2,216 | 0 | 13 | 552 | 469 | 250 | 219 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.ServerMode
-- Copyright : (c) Andrea Rossato and David Roundy 2007
-- License : BSD-style (see xmonad/LICENSE)
--
-- Maintainer : andrea.rossato@unibz.it
-- Stability : unstable
-- Portability ... | markus1189/xmonad-contrib-710 | XMonad/Hooks/ServerMode.hs | bsd-3-clause | 3,388 | 0 | 19 | 804 | 462 | 276 | 186 | 25 | 2 |
{-# LANGUAGE TypeFamilies #-}
module T11581 where
import Data.Kind (Type)
type family F a :: Type -> Type
type family G a
type instance G [a] = F a (Int,Bool)
| sdiehl/ghc | testsuite/tests/indexed-types/should_compile/T11581.hs | bsd-3-clause | 163 | 0 | 6 | 34 | 58 | 36 | 22 | -1 | -1 |
module HAD.Y2014.M02.D27.Solution where
import Control.Monad
-- | Divide all the elements of the list (2nd parameter) by the first parameter
-- iff all the elements of the lists are exact multiple of it
-- returns nothing otherwise
--
-- Examples:
--
-- >>> divIfMultiple 3 [3, 6 .. 12]
-- Just [1,2,3,4]
-- >>> divIf... | 1HaskellADay/1HAD | exercises/HAD/Y2014/M02/D27/Solution.hs | mit | 494 | 0 | 11 | 97 | 100 | 59 | 41 | 5 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Rank2Types #-}
module Collision
( newOctree
, newBoundary
, GameOctree
, octreeUpdate
, octreeUpdateInsert
, octreeObject
, octreeRemoveObject
, octreeQueryObject
, goStati... | mfpi/hsys | src/Collision.hs | mit | 12,076 | 26 | 31 | 2,674 | 3,063 | 1,727 | 1,336 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Plugins.Gloss.Main where
import Plugins.Types
import qualified Graphics.Gloss as G
import Plugins.Gloss.DiagramsBackend
import Diagrams.Prelude
import Diagrams.TwoD.Adjust
plugin :: Plugin
plugin = Plugin
{ extentions = [Extension "Core" ["main"]]
, name = "1"
... | andrey013/pluginstest | Plugins/Gloss/Main.hs | mit | 1,410 | 0 | 10 | 323 | 366 | 196 | 170 | 38 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Database.Persist.Redis.Store
( execRedisT
, RedisBackend
)where
import Control.Monad.IO.Class (MonadIO (..))
import Data.Aeson(FromJSON(..), ToJSON(..))
... | naushadh/persistent | persistent-redis/Database/Persist/Redis/Store.hs | mit | 3,750 | 0 | 15 | 978 | 1,126 | 563 | 563 | 93 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import App (App, withAMQPConn, withDBPool)
import AppConfig as Config (AppConfig(..), getAppConfig)
import Messaging.Job as Job
import CommonCreatures (WithErr)
import Control.Monad.Except (runExceptT, throwError)
import Control.Monad.Reader
import qualified Data.A... | gust/feature-creature | legacy/exe-repo-puller/Main.hs | mit | 3,879 | 0 | 18 | 644 | 1,168 | 605 | 563 | 88 | 2 |
module Main (main) where
import Test.DocTest
main :: IO ()
main =
doctest
[ "-isrc"
, "src/"
, "-XTypeOperators"
, "-XGeneralizedNewtypeDeriving"
, "-XStandaloneDeriving"
, "-XMultiParamTypeClasses"
, "-XFlexibleContexts"
, "-XFlexibleInstances"
... | oisdk/hstrie | doctest/doctests.hs | mit | 724 | 0 | 6 | 239 | 98 | 62 | 36 | 27 | 1 |
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module AnimateT6 where
import JSImages
import LI11718
import OracleT1
import OracleT4
import OracleT3
import OracleT2
import System.Environment
import Test.QuickCheck.Gen
import Data.List
import Data.Maybe
import Safe
import Data.Char as Char
--impor... | hpacheco/HAAP | examples/plab/oracle/AnimateT6.hs | mit | 8,663 | 18 | 18 | 2,051 | 3,757 | 1,984 | 1,773 | 149 | 4 |
module Chapter18 where
import Control.Monad (join)
import Control.Applicative
import Data.Monoid ((<>))
-- Monad types and rules as a nice reminder for me.
-- (>>) :: Monad m => m a -> m b -> m b -- the same as applicative `*>`
-- (>>=) :: Monad m => m a -> (a -> m b) -> m b
-- return :: a -> m a -- the same as appli... | raventid/coursera_learning | haskell/chapter18/worksheet.hs | mit | 6,445 | 0 | 16 | 1,695 | 1,748 | 896 | 852 | 134 | 4 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.ElmDerive
import ClassyPrelude
main :: IO ()
main = do
writeFileUtf8 "frontend/Protocol.elm" elmProtocolModule
putStrLn "frontend/Protocol.elm updated"
| Haskell-Praxis/core-catcher | frontend/elm-bridge/Main.hs | mit | 271 | 0 | 7 | 44 | 43 | 23 | 20 | 9 | 1 |
module Stackage.Build
( build
, defaultBuildSettings
, BuildSettings (..)
) where
import Control.Monad (unless)
import Prelude hiding (pi)
import Stackage.CheckCabalVersion (checkCabalVersion)
import Stackage.Config
import ... | k-bx/stackage | Stackage/Build.hs | mit | 4,680 | 0 | 26 | 1,707 | 1,020 | 505 | 515 | 101 | 4 |
{-|
Module : Dvx.Romans
Description : Roman numeral integration module
-}
module Dvx.Romans
( dtor
, romanLetters
, rtod
) where
-- |All roman numerals tokens
romanLetters :: String
romanLetters = "MDCLXVI"
-- |Converts an integer to its roman numeral representation
dtor :: Int -> String
dtor 0 = ""
dtor n | n >... | Hamcha/dvx | Dvx/Romans.hs | mit | 1,407 | 0 | 10 | 469 | 530 | 289 | 241 | 35 | 9 |
module Graphics.Urho3D.Math.Internal.StringHash(
StringHash(..)
, stringHashCntx
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import qualified Data.Map as Map
import GHC.Generics
import Control.DeepSeq
import Data.Hasha... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Math/Internal/StringHash.hs | mit | 626 | 0 | 11 | 102 | 159 | 102 | 57 | -1 | -1 |
-- File : publictests.hs
-- Author : Peter Schachte
-- Purpose : test cases for Lab1 project
import Lab1
import HaskellTest
suite =
TimeLimit 2.0 $
Suite [
expect (subst 0 1 [0,1,2,3]) ([1,1,2,3]),
expect (interleave [1,2,3,4] [11,12,13,14]) ([1,11,2,12,3,13,4,14]),
expect (unroll 3 [1,2,3,... | martindavid/code-sandbox | comp90048/assignments/assignment1/Lab1Test.hs | mit | 387 | 0 | 11 | 90 | 201 | 119 | 82 | 11 | 1 |
-- Count by X
-- http://www.codewars.com/kata/5513795bd3fafb56c200049e
module Codewars.Kata.Count where
countBy :: Integer -> Int -> [Integer]
countBy x n = take n [x, x+x ..]
| gafiatulin/codewars | src/8 kyu/Count.hs | mit | 178 | 0 | 7 | 27 | 51 | 30 | 21 | 3 | 1 |
module BlocVoting.Tally.GrandTally where
import qualified Data.ByteString as BS
import qualified Data.Map as Map
import BlocVoting.Tally.NetworkSettings
import BlocVoting.Tally.Tally
import BlocVoting.Tally.Delegate
import BlocVoting.Tally.Transfer
data GrandTally = GrandTally {
gtNetworkSettings :: NetworkSett... | XertroV/blocvoting | src/BlocVoting/Tally/GrandTally.hs | mit | 1,408 | 0 | 10 | 234 | 369 | 208 | 161 | 35 | 1 |
module Main where
randomList :: [Integer]
randomList = [671,594,212,490,361,636,941,714,877,220,201]
-- | Simple and inefficient implementation of quickSort.
quickSort [] = []
quickSort (x:xs) = quickSort (filter (< x) xs) ++ [x] ++ quickSort (filter (>= x) xs)
-- N queens
queens :: Int -> [[Int]]
queens n = filter... | jkozlowski/haskell-presentation | code/src/Main.hs | mit | 735 | 0 | 14 | 207 | 355 | 193 | 162 | 15 | 3 |
{-
Types and Instance Declarations for DLvalidity program
Author: Abdul Rahim Nizamani
Created: 2013-10-02
Updated: 2013-10-02
-}
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, OverlappingInstances #-}
module Types where
import Text.ParserCombinators.ReadP
import Expr.TRS
import Expr.Elemen... | arnizamani/DLvalidity | Types.hs | gpl-2.0 | 15,547 | 0 | 20 | 4,092 | 6,079 | 3,024 | 3,055 | 355 | 1 |
{- |
Module : $Header$
Description : Interface to the Isabelle theorem prover.
Copyright : (c) Jonathan von Schroeder, DFKI Bremen 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Jonathan von Schroeder <jonathan.von_schroeder@dfki.de>
Stability : provisional
Portability : non-portable... | nevrenato/HetsAlloy | THF/ProveIsabelle.hs | gpl-2.0 | 1,838 | 14 | 17 | 406 | 421 | 224 | 197 | 38 | 4 |
#!/usr/bin/env stack
{- stack runghc --verbosity info
--package hledger-lib
--package hledger
--package here
-}
{-# OPTIONS_GHC -Wno-missing-signatures -Wno-name-shadowing #-}
{-# LANGUAGE QuasiQuotes #-}
import Data.String.Here
import Hledger
import Hledger.Cli
import Text.Printf
--------------------------... | mstksg/hledger | bin/hledger-check-dates.hs | gpl-3.0 | 2,837 | 0 | 20 | 584 | 758 | 393 | 365 | 60 | 5 |
{- NewickConvert
By Gregory W. Schwartz
Collects functions pertaining to converting the Newick format to the
workable tree
-}
{-# LANGUAGE OverloadedStrings #-}
module NewickConvert
( newickToTree
) where
-- Standard
import Data.Maybe
import Data.Tree
import qualified Data.Sequence as Seq
-- Cabal
import q... | GregorySchwartz/find-clumpiness | src/NewickConvert.hs | gpl-3.0 | 1,235 | 0 | 13 | 381 | 247 | 143 | 104 | 21 | 1 |
module Imports where
| dservgun/erp | src/common/imports.hs | gpl-3.0 | 21 | 0 | 2 | 3 | 4 | 3 | 1 | 1 | 0 |
{- This file is part of Scotch.
Scotch 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 3 of the License, or
(at your option) any later version.
Scotch is distributed in the ho... | bendmorris/scotch | Scotch/Eval/ReadFile.hs | gpl-3.0 | 8,963 | 23 | 23 | 3,920 | 2,165 | 1,083 | 1,082 | 141 | 25 |
-- (c) 2013 Aaron M. Taylor
isPrime n = 0
numPrimes = [ n^2 + a*n + b | n <- [1..], (a,b) <- allQuads, isPrime ( n^2 +a*n +b ) ]
where allQuads = [ (a,b) | a <- [(-1000),(-999)..1000], b <- [(-1000),(-999)..1000] ]
| kujenga/euler | Euler_27/QuadraticPrimes.hs | gpl-3.0 | 223 | 0 | 12 | 53 | 154 | 85 | 69 | 3 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fexcess-precision #-}
{-# OPTIONS_GHC -optc-ffast-math -optllc--enable-unsafe-fp-math -optllc--enable-no-nans-fp-math -optllc--enable-no-infs-fp-math #-}
--- | This module contains functions for generating People's Rectified Coordinates.
--- Jeez, my naming is awful.
modu... | Artoria2e5/PRCoords | haskell/PRCoords.hs | gpl-3.0 | 2,627 | 4 | 20 | 816 | 965 | 503 | 462 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ReplicaPool.Types
-- Copyright : (c) 2015-2016 Brendan... | brendanhay/gogol | gogol-replicapool/gen/Network/Google/ReplicaPool/Types.hs | mpl-2.0 | 5,301 | 0 | 7 | 1,309 | 626 | 420 | 206 | 166 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-kms/gen/Network/AWS/KMS/PutKeyPolicy.hs | mpl-2.0 | 3,756 | 0 | 9 | 878 | 483 | 294 | 189 | 61 | 1 |
data Expr = Val Int | Div Expr Expr
eval :: Expr -> Int
eval (Val n) = n
eval (Div x y) = eval x `div` eval y
safediv :: Int -> Int -> Maybe Int
safediv _ 0 = Nothing
safediv m n = Just (m `div` n)
eval' :: Expr -> Maybe Int
eval' (Val n) = Just n
eval' (Div x y) = eval' x >>= \n -> eval' y >>= \m -> safediv n m
-... | egaburov/funstuff | Haskell/book/12_monads.hs | apache-2.0 | 1,839 | 0 | 13 | 582 | 911 | 466 | 445 | 43 | 1 |
{-# LANGUAGE Haskell2010 #-}
-- Tests for collapsable headers
module Bug335 where
{-|
=== __ExF:__
abc
-}
f :: ()
f = ()
{-|
=== __ExG:__
>>> a
b
>>> c
d
==== Under ex
foo
== Out of Ex
foo
-}
g :: ()
g = ()
| haskell/haddock | html-test/src/Bug335.hs | bsd-2-clause | 212 | 0 | 5 | 53 | 36 | 23 | 13 | 6 | 1 |
module Calculus.Dipole24 where
-- standard modules
import qualified Data.Char as Char
import qualified Data.Map as Map
import qualified Data.Set as Set
-- local modules
import Basics
import Helpful
data Dipole24 = ELLS24 | ERRS24 | ESES24 | LERE24 | LLLL24 | LLLR24
| LLRL24 | LLRR24 | LRLL24 | LRRL24 ... | spatial-reasoning/zeno | src/Calculus/Dipole24.hs | bsd-2-clause | 90,384 | 0 | 11 | 37,291 | 2,697 | 2,436 | 261 | 46 | 0 |
{-# LANGUAGE ConstraintKinds #-}
--
-- Setting priorities for AADL threads.
--
-- (c) 2015 Galois, Inc.
--
module Tower.AADL.Priorities where
import Prelude ()
import Prelude.Compat
import Data.List
import qualified Data.Map as M
import Tower.AADL.Threads
import qualified Ivo... | GaloisInc/tower | tower-aadl/src/Tower/AADL/Priorities.hs | bsd-3-clause | 3,658 | 0 | 16 | 791 | 1,148 | 610 | 538 | 87 | 2 |
-- | QuickCheck-based queue testing, using Monadic QuickCheck
--
-- see <http://www.cse.chalmers.se/~rjmh/Papers/QuickCheckST.ps Monadic Testing with QuickCheck> paper
-- for details.
module Network.Raptr.QueueSpec where
import Control.Concurrent.Queue
import Control.Concurrent.STM
import ... | capital-match/raptr | test/Network/Raptr/QueueSpec.hs | bsd-3-clause | 3,570 | 0 | 21 | 1,007 | 1,245 | 635 | 610 | 80 | 4 |
-- {-# LANGUAGE NoImplicitPrelude #-}
--
-- Material: tests of Material module
--
module UnitTest.Aya.Material where
import Data.Maybe
-- import NumericPrelude
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck
import Test.HUnit
import Tes... | eiji-a/aya | src/UnitTest/Aya/Material.hs | bsd-3-clause | 1,860 | 0 | 17 | 445 | 751 | 414 | 337 | 44 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module MOO.Connection (
Connection
, ConnectionHandler
, Disconnect(..)
, connectionHandler
, connectionListener
, doDisconnected
, firstConnectionId
, withConnections
, withConnection
, withMaybeConnection
, connectionName
, connectionPrintMessages
, ... | verement/etamoo | src/MOO/Connection.hs | bsd-3-clause | 34,505 | 11 | 31 | 10,599 | 8,633 | 4,310 | 4,323 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Points
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : provisional
-... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Points.hs | bsd-3-clause | 3,661 | 0 | 10 | 445 | 566 | 343 | 223 | 51 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wall #-}
module Network.AWS.Da... | tvh/haxl-amazonka | lib/Network/AWS/DataSource.hs | bsd-3-clause | 5,578 | 0 | 23 | 1,787 | 1,540 | 794 | 746 | 142 | 1 |
module Opticover.Geometry.Types where
import Control.Lens
import Opticover.Ple
data Point = Point
{ _pX :: Double
, _pY :: Double
} deriving (Eq, Ord, Show)
makeLenses ''Point
-- | Box is an ordered pair of 2 points: low left corner and top right
-- corner respectively
newtype Box = Box (Pair Point)
derivin... | s9gf4ult/opticover | src/Opticover/Geometry/Types.hs | bsd-3-clause | 794 | 0 | 8 | 164 | 260 | 144 | 116 | -1 | -1 |
module Test where
import Core
import Core.Pretty
import qualified Grin
import Grin hiding ( Value )
import Utils
import VarArgs
-- TODO(farre): Remove testing, start using QuickCheck!
data Foo = Foo Variable Variable
instance Pattern Foo where
fromPattern (Foo v0 v1) = Grin.Value $ Node (var "foo") [fromValue v0, ... | farre/grin | Test.hs | bsd-3-clause | 2,943 | 0 | 17 | 768 | 1,440 | 698 | 742 | 88 | 1 |
#!/usr/bin/env runhaskell
{-# LANGUAGE LambdaCase #-}
import Parser
import Builder
import CommandParser
import Options.Applicative
import Data.Aeson
import Data.Aeson.Encode.Pretty
import qualified Data.Yaml.Pretty as Y
import qualified Data.Yaml.Builder as YB
import qualified Data.ByteString.Lazy.Char8 as BSL
import... | baig/review-md | critic.hs | bsd-3-clause | 5,321 | 0 | 20 | 2,180 | 1,480 | 725 | 755 | 89 | 2 |
{-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Generator.Combinators
-- Copyright : (c) Edward Kmett 2009
-- License : BSD-st... | ekmett/monoids | Data/Generator/Combinators.hs | bsd-3-clause | 6,510 | 0 | 10 | 1,334 | 1,396 | 808 | 588 | 98 | 1 |
{-# LANGUAGE NPlusKPatterns #-}
module Transformers where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Identity
newtype EitherT e m a = EitherT { runEitherT :: m (Either e a) }
instance Functor m => Functor (EitherT e m) where
fmap f (EitherT m) = EitherT $ (fmap . fmap) f m
i... | vasily-kirichenko/haskell-book | src/Transformers/Transformers.hs | bsd-3-clause | 3,332 | 0 | 14 | 923 | 1,592 | 796 | 796 | 96 | 2 |
module DataStructures.Answer09 where
import Debug.Trace (trace)
import DataStructures.Answer01 (mkList)
import DataStructures.Answer08 (foldRight)
-- There is a clear distinction between Scala and Haskell here:
-- Haskell is a lazy (i.e., non-strict) language, by default.
-- Scala is a strict language, by default.
... | mohsen3/Haskell4ScalaDevelopers | src/DataStructures/Answer07.hs | bsd-3-clause | 1,489 | 0 | 14 | 295 | 220 | 127 | 93 | 11 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
import Eval.DServ
import Control.Monad (void)
import Data.Maybe (fromJust)
import GHC.Generics
import System.IO (Handle)
import Data.Serialize
import Control.Concurrent.MVar
import System.Environment
data DummyData ... | wuxb45/eval | TestDServ.hs | bsd-3-clause | 1,433 | 0 | 12 | 291 | 466 | 229 | 237 | 49 | 3 |
{-# LANGUAGE BangPatterns #-}
-- ------------------------------------------------------------
module Hayoo.PackageRank
( DAGList
, DAG
, Ranking
, Score
-- , dagFromList
-- , dagToList
-- , ranking
, rankingStd
)
where
import Control.Applicative ( (<$>) )
import C... | erantapaa/simple-hunt | src/Hayoo/PackageRank.hs | bsd-3-clause | 13,773 | 0 | 15 | 4,533 | 2,695 | 1,464 | 1,231 | 155 | 2 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP
-- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP
----------------------------------------------------------------------
-- |
-- Module : ShapedTypes.ApproxEq
-- Copyright : (c) 2015-... | conal/shaped-types | src/ShapedTypes/ApproxEq.hs | bsd-3-clause | 1,376 | 0 | 9 | 247 | 333 | 184 | 149 | 18 | 1 |
-----------------------------------------------------------------------------
-- StaticThih: Static environment for Thih
--
-- Part of `Typing Haskell in Haskell', version of November 23, 2000
-- Copyright (c) Mark P Jones and the Oregon Graduate Institute
-- of Science and Technology, 1999-2000
--
-- This pr... | elben/typing-haskell-in-haskell | StaticThih.hs | bsd-3-clause | 7,519 | 0 | 21 | 1,904 | 3,234 | 1,737 | 1,497 | 143 | 1 |
{-# LANGUAGE TemplateHaskell, FlexibleContexts, LambdaCase #-}
module Types where
import Physics.Bullet
import Graphics.GL.Pal
import Control.Lens.Extra
import GHC.Word
type ObjectID = Word32
data Cube = Cube
{ _cubColor :: !(V4 GLfloat)
, _cubBody :: !RigidBody
}
makeLenses ''Cube
| lukexi/bullet-mini | test/shared/Types.hs | bsd-3-clause | 299 | 0 | 11 | 53 | 70 | 41 | 29 | 15 | 0 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.VertexArrayRange
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabil... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/VertexArrayRange.hs | bsd-3-clause | 940 | 0 | 5 | 120 | 80 | 57 | 23 | 14 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Data.Google.Mail.Filters where
import Prelude
#if MIN_VERSION_xml_conduit(1,0,0)
import qualified Data.Map as Map
#endif
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text... | liyang/google-mail-filters | src/Data/Google/Mail/Filters.hs | bsd-3-clause | 3,904 | 0 | 19 | 1,127 | 1,012 | 553 | 459 | 88 | 14 |
module HPage.GUI.Constants where
bottomString, bottomChar :: String
bottomString = "\10200"
bottomChar = "\724"
charTimeout :: Int
charTimeout = 2000 | elbrujohalcon/hPage | src/HPage/GUI/Constants.hs | bsd-3-clause | 163 | 0 | 4 | 24 | 34 | 22 | 12 | 6 | 1 |
-- | BigTable benchmark implemented using Hamlet.
--
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Criterion.Main
import Text.Hamlet
import Numeric (showInt)
import qualified Data.ByteString.Lazy as L
import qualified Text.Blaze.Renderer.Utf8 as Utf8
import Data.Monoid (mconcat)
import Text.Blaze.Html5 (table,... | piyush-kurur/yesod | yesod-core/widget-benchmark.hs | mit | 1,963 | 20 | 17 | 556 | 556 | 295 | 261 | 33 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-----------------------------------------------------------------------------
-- |
-- Module : Database.Muesli.Commit
-- Copyright : (c) 2015-16 Călin Ardelean
-- License : MIT
--... | clnx/muesli | src/Database/Muesli/Commit.hs | mit | 10,336 | 0 | 33 | 2,950 | 2,336 | 1,259 | 1,077 | -1 | -1 |
{-#LANGUAGE FlexibleInstances, MultiParamTypeClasses, GADTs, TypeOperators, PatternSynonyms, RankNTypes, FlexibleContexts, AutoDeriveTypeable, StandaloneDeriving, DeriveGeneric #-}
module Carnap.Languages.PurePropositional.Syntax where
import Carnap.Core.Data.Optics
import Carnap.Core.Data.Classes
import Carnap.Core.... | opentower/carnap | Carnap/src/Carnap/Languages/PurePropositional/Syntax.hs | gpl-3.0 | 2,879 | 0 | 11 | 565 | 681 | 364 | 317 | 64 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-iam/gen/Network/AWS/IAM/GetLoginProfile.hs | mpl-2.0 | 3,623 | 0 | 9 | 790 | 422 | 259 | 163 | 54 | 1 |
{-# LANGUAGE TypeFamilies, RankNTypes, FlexibleContexts, DataKinds #-}
module Language.Hakaru.Inference where
import Prelude hiding (Real)
import Language.Hakaru.Lazy
import Language.Hakaru.Compose
import Language.Hakaru.Syntax
import Language.Hakaru.Expect (Expect(..), Expect', normalize)
priorAsProposal
:: Moc... | suhailshergill/hakaru | Language/Hakaru/Inference.hs | bsd-3-clause | 3,875 | 0 | 18 | 1,057 | 1,778 | 911 | 867 | 88 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Rank2Types #-}
module Snap.Internal.Routing
( Route(..)
, pRoute
, route
, routeEarliestNC
, routeHeight
, routeLocal
, splitPath
) where
---------------------------------------------... | 23Skidoo/snap-core | src/Snap/Internal/Routing.hs | bsd-3-clause | 12,035 | 0 | 16 | 2,848 | 2,280 | 1,265 | 1,015 | 128 | 4 |
module UI.Command.Render (
para, indent, quote, breakLines, englishList
)where
import Data.Char (isSpace)
import Data.List (intersperse)
------------------------------------------------------------
-- Paragraph rendering
--
para :: [String] -> String
para ss = concat $ intersperse "\n" (map (\s -> breakLines... | kfish/ui-command | UI/Command/Render.hs | bsd-3-clause | 1,107 | 0 | 11 | 259 | 433 | 231 | 202 | 26 | 1 |
{-# LANGUAGE RecordWildCards #-}
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Phone (areaCode, number, prettyPrint)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :... | vaibhav276/exercism_haskell | phone-number/test/Tests.hs | mit | 4,137 | 1 | 10 | 1,618 | 784 | 463 | 321 | 82 | 1 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
{- |
Module : $Header$
Description : normalising translation of a HasCASL subset to Isabelle
Copyright : (c) C. Maeder, DFKI 2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability ... | keithodulaigh/Hets | Comorphisms/PCoClTyConsHOL2PairsInIsaHOL.hs | gpl-2.0 | 2,050 | 0 | 11 | 411 | 316 | 172 | 144 | 35 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE OverloadedStrings, FlexibleInstances,
GeneralizedNewtypeDeriving, CPP #-}
-- | JSTarget pretty printing machinery. The actual printing happens in
-- Data.JSTarget.Print.
module Data.JSTarget.PP where
import Data.Default
import Data.Monoid
import Data.St... | beni55/haste-compiler | src/Data/JSTarget/PP.hs | bsd-3-clause | 6,785 | 0 | 14 | 1,806 | 2,085 | 1,121 | 964 | 163 | 2 |
path n = product [n+1..2*n] `div` product [1..n]
p15 = path 20
| luoyetx/LearnCode | euler/p015.hs | bsd-3-clause | 64 | 0 | 8 | 13 | 47 | 24 | 23 | 2 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
module SysTools.Terminal (stderrSupportsAnsiColors) where
#if defined MIN_VERSION_terminfo
import Control.Exception (catch)
import Data.Maybe (fromMaybe)
import System.Console.Terminfo (SetupTermError, Terminal, getCapability,
set... | olsner/ghc | compiler/main/SysTools/Terminal.hs | bsd-3-clause | 4,994 | 0 | 13 | 1,057 | 237 | 136 | 101 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH
spliceMe = [| (\xs -> tail xs ++ init xs) |]
| siddhanathan/ghc | testsuite/tests/cabal/cabal04/TH.hs | bsd-3-clause | 123 | 0 | 4 | 22 | 19 | 14 | 5 | 4 | 1 |
-- !!! hiding an entity T (where T is both a type and a dcon.)
module M where
import Mod125_A hiding (T)
--x :: T
x = T
| wxwxwwxxx/ghc | testsuite/tests/module/mod125.hs | bsd-3-clause | 122 | 0 | 5 | 30 | 20 | 14 | 6 | 3 | 1 |
module Data.ConsistentHash
(
CHash
, emptyHash
, isEmpty
, updateHash
, findHash
) where
import Data.Array.IArray
import Data.List
import Data.Bits
import Data.Int
import Data.ConsistentHash.HashFunc
data CHashItem a = CHashItem Int32 a deriving Show
data CHash a = CHash (a -> Int32) (A... | eklitzke/Data.ConsistentHash | Data/ConsistentHash.hs | isc | 2,601 | 0 | 17 | 887 | 1,006 | 519 | 487 | 60 | 4 |
{-# LANGUAGE BangPatterns #-}
module Jot.Buffer
( Buffer(..)
, load
) where
import Control.Concurrent.Async
import qualified Data.ByteString.Lazy as BL
import qualified Jot.Edit as E
import qualified Jot.History as H
import qualified Jot.Range as R
import qualified Jot.Rope as S
-- |
new... | tldrlol/jot | src/Jot/Buffer.hs | isc | 735 | 0 | 13 | 185 | 280 | 150 | 130 | 26 | 1 |
-- This module holds helpers functions and the other things to help build
-- parsers.
{-# LANGUAGE FlexibleContexts #-}
module Text.Typeical.Parsing ( ParserT
, Parser
, (.>)
, (<.)
, (<.>)
... | kalhauge/typeical | src/Text/Typeical/Parsing.hs | mit | 4,679 | 0 | 10 | 1,967 | 1,186 | 618 | 568 | 95 | 1 |
module Network.Nats.Logger
( Logger
, LoggerSpec (..)
, mkLoggers
) where
import Data.Monoid ((<>))
import System.Log.FastLogger ( LogType (..)
, FastLogger
, defaultBufSize
, newFastLogger
... | kosmoskatten/nats-client | src/Network/Nats/Logger.hs | mit | 1,632 | 0 | 14 | 495 | 390 | 214 | 176 | 40 | 1 |
module Roman (numerals) where
numerals :: Int -> Maybe String
numerals = Just . go numeralMap
where
go pairs@((value, digits):pairs') n
| n >= value = digits ++ go pairs (n - value)
| otherwise = go pairs' n
go [] _ = ""
numeralMap = [ (1000, "M"), (900, "CM")
, (500, "D"), ... | exercism/xhaskell | exercises/practice/roman-numerals/.meta/examples/success-standard/src/Roman.hs | mit | 524 | 0 | 11 | 210 | 235 | 139 | 96 | 14 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE... | fpco/yesod-auth-hashdb | Yesod/Auth/HashDB.hs | mit | 17,243 | 7 | 24 | 4,905 | 2,045 | 1,122 | 923 | 166 | 4 |
{-# LANGUAGE FlexibleInstances #-}
import Control.Monad ( (>=>) )
import System.Exit
import System.Console.ANSI
import System.Console.Docopt
import System.Console.Docopt.Types
import System.Console.Docopt.ParseUtils
import System.Console.Docopt.UsageParse (pDocopt)
import System.Console.Docopt.OptParse (getArguments)... | docopt/docopt.hs | test/LangAgnosticTests.hs | mit | 5,472 | 6 | 26 | 1,376 | 1,607 | 851 | 756 | 121 | 6 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.AudioTrack
(js_getId, getId, js_setKind, setKind, js_getKind, getKind,
js_getLabel, getLabel, js_setLanguage, setLanguage, js_getLanguage,
getLanguage, js_setEnabled, setEnabled, js_getEnabl... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/AudioTrack.hs | mit | 4,619 | 60 | 11 | 685 | 1,101 | 614 | 487 | 70 | 1 |
{-# LANGUAGE RankNTypes, TypeFamilies, MultiParamTypeClasses, ScopedTypeVariables, FlexibleContexts #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE PolyKinds #-}
module Vyom.Data.Deserialiser where
-- import Vyom.Data.Typ
import Vyom.Data.Dyn
import Type.Reflection
import Vyom.Data.Exp
import Vyom.Data.ErrorOr
-- ... | ajnsit/vyom | src/Vyom/Data/Deserialiser.hs | mit | 2,045 | 0 | 18 | 421 | 667 | 345 | 322 | 40 | 3 |
-- Generated by protobuf-simple. DO NOT EDIT!
module Types.SInt32Msg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype SInt32Msg = SInt32Msg
{ value :: PB.Int32
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default SInt32Msg where
defaultVal = SInt32Ms... | sru-systems/protobuf-simple | test/Types/SInt32Msg.hs | mit | 843 | 0 | 13 | 157 | 296 | 159 | 137 | 20 | 0 |
module Physics.Hurl.Library where
import Physics.Hurl
-- | @ball r@ is an elastic ball of radius @r@.
ball :: Double -> Object'
ball = simpleObject 20 (Solid 0.9 0.5 $ Circle 0 20)
| cdxr/haskell-hurl | Physics/Hurl/Library.hs | mit | 185 | 0 | 8 | 36 | 49 | 27 | 22 | 4 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Storage where
import Reflex
import Control.Monad.IO.Class
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as C
import GHCJS.DOM.Storage
import Data.Maybe
import Game
sampleSavedGames storage _ = do
s <- sample $ pull $ liftIO $ getSavedGames storage
retu... | z0isch/ten-twenty-five | Storage.hs | mit | 713 | 0 | 12 | 118 | 205 | 106 | 99 | 19 | 1 |
module Path where
import Imports
import System.FilePath
fromFilePath :: FilePath -> Path
fromFilePath = Path . map PathComponent . splitDirectories
toFilePath :: Path -> FilePath
toFilePath = joinPath . components
components :: Path -> [String]
components = map unPathComponent . unPath
newtype... | sol/hpack | src/Path.hs | mit | 567 | 0 | 7 | 112 | 144 | 84 | 60 | 17 | 1 |
module Network.Protocol.SSH.ServerHostKey (Algorithm(..),
knownAlgorithmNames,
algorithmName,
algorithmFromName,
algorithmSupportsEncryption,
... | IreneKnapp/direct-crypto-socket | Network/Protocol/SSH/ServerHostKey.hs | mit | 1,929 | 0 | 16 | 664 | 305 | 166 | 139 | 41 | 3 |
module Typing.TypeChecker
( inferStmts
, TcEnv
, defaultEnv
, importModule
) where
import Typing.Env
import Typing.Stmt
import Typing.Types
import Util.Error
import qualified Absyn.Untyped as U
import qualified Absyn.Typed as T
inferStmts :: TcEnv -> [U.Stmt] -> Result (TcEnv, ([T.Stmt], Maybe Type))
inf... | tadeuzagallo/verve-lang | src/Typing/TypeChecker.hs | mit | 376 | 0 | 11 | 66 | 118 | 70 | 48 | 14 | 1 |
module Language.F2JS ( CompilerConfig(..)
, compileProgram
, PrimOp(..)
, Name
, Pat
, Expr
, Decl
, Lit
, Tag
, tag
... | jozefg/f2js | src/Language/F2JS.hs | mit | 912 | 0 | 5 | 612 | 121 | 81 | 40 | 31 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DuplicateRecordFields #-}
module Language.LSP.Types.Rename where
import Data.Aeson
import Data.Aeson.TH
import Data.Text (Text)
import Data.Scientific (Scientific)
import Language.LSP.Types.Location
import Language.LSP.Types.TextDocument
import Language.LSP.Types.Progres... | wz1000/haskell-lsp | lsp-types/src/Language/LSP/Types/Rename.hs | mit | 2,604 | 0 | 9 | 460 | 431 | 243 | 188 | 50 | 0 |
import Data.List
import System.IO
type Query = String
type Engine = String
runTillOutOfEngines :: ([Engine], [Query]) -> [Query]
runTillOutOfEngines ([], qs) = qs
runTillOutOfEngines (_, []) = []
runTillOutOfEngines (es, (q:qs)) = runTillOutOfEngines (newEs, newQs)
where newEs = delete q es
newQs = if null ... | davidrusu/Google-Code-Jam | 2008/qualification/savingTheUniverse.hs | mit | 1,897 | 1 | 11 | 439 | 810 | 448 | 362 | 40 | 2 |
module Problem10 where
{--
Task description:
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
--}
primes :: [Integer]
primes = 2: 3: sieve [] (tail primes) 3
where
notDivsBy d n = n `mod` d /= 0
sieve ds (p:ps) x = foldr (filter . notDivsBy) [x+2,... | runjak/projectEuler | src/Problem10.hs | mit | 467 | 0 | 11 | 126 | 178 | 97 | 81 | 9 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.