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 : Idris.Elab.Term
Description : Code to elaborate terms.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE LambdaCase, PatternGuards, ViewPatterns #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Elab.Term where
import Idris.AbsSyntax
import Idris.Core.CaseTree (SC'(... | kojiromike/Idris-dev | src/Idris/Elab/Term.hs | bsd-3-clause | 129,531 | 1,192 | 30 | 56,065 | 22,482 | 13,681 | 8,801 | 2,270 | 238 |
-- Thread pool and work stealing
--
-- Author: Patrick Maier
-----------------------------------------------------------------------------
module Control.Parallel.HdpH.Internal.Threadpool
( -- * thread pool monad
ThreadM, -- synonym: ThreadM m = ReaderT <State m> (SparkM m)
run, -- :: [DequeIO ... | bitemyapp/hdph-rs | src/Control/Parallel/HdpH/Internal/Threadpool.hs | bsd-3-clause | 5,520 | 13 | 12 | 1,171 | 995 | 562 | 433 | 75 | 4 |
module Network.MQTT.SN.ParserSpec (spec) where
import Data.Attoparsec.ByteString
import qualified Data.ByteString as BS
import Data.Maybe (fromJust)
import Network.MQTT.SN.Packet
import Network.MQTT.SN.Parser
import Test.Hspec
shouldParseFully :: (Show a, Eq a) =>... | rasendubi/arachne | test/Network/MQTT/SN/ParserSpec.hs | bsd-3-clause | 885 | 0 | 19 | 204 | 295 | 165 | 130 | -1 | -1 |
--
-- Copyright (c) 2005 Lennart Augustsson
-- See LICENSE for licensing details.
--
module HCheck(htCheckEnv, htCheckType) where
import Data.List(union)
--import Control.Monad.Trans
import Control.Monad.Error()
import Control.Monad.State
import Data.IntMap(IntMap, insert, (!), empty)
import Data.Graph(stronglyConnComp... | augustss/djinn | src/HCheck.hs | bsd-3-clause | 4,754 | 0 | 21 | 1,323 | 2,264 | 1,136 | 1,128 | 127 | 10 |
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>... | mariefarrell/Hets | GMP/SegExamples.hs | gpl-2.0 | 638 | 0 | 19 | 131 | 182 | 95 | 87 | 8 | 1 |
smallest :: Integer -> Integer
smallest n
| modOfTen == n = n
| otherwise = modOfTen `min` greatest quotOfTen
where modOfTen = mod n 10
quotOfTen = quot n 10
| OpenGenus/cosmos | code/mathematical_algorithms/src/smallest_digit_in_number/smallest_digit_in_number.hs | gpl-3.0 | 176 | 1 | 8 | 49 | 60 | 29 | 31 | -1 | -1 |
module A2 where
import C2
import D2 hiding (anotherFun)
main xs = sumSquares xs + anotherFun xs
| mpickering/HaRe | old/testing/duplication/A2_TokOut.hs | bsd-3-clause | 112 | 0 | 6 | 33 | 34 | 19 | 15 | 4 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module T5737 where
import Language.Haskell.TH
makeAlpha n = [d| data Alpha = Alpha $(conT n) deriving (Show, Read) |]
| urbanslug/ghc | testsuite/tests/th/T5737.hs | bsd-3-clause | 159 | 0 | 5 | 31 | 23 | 16 | 7 | 4 | 1 |
{-# LANGUAGE DeriveFunctor, DatatypeContexts #-}
module ShouldFail where
-- Derive Functor on a type that uses 'a' in the wrong places
newtype InFunctionArgument a = InFunctionArgument (a -> Int)
deriving (Functor)
newtype OnSecondArg a = OnSecondArg (Either a a)
deriving (Functor)
-- Derive Functor on a type... | urbanslug/ghc | testsuite/tests/deriving/should_fail/drvfail-functor2.hs | bsd-3-clause | 667 | 0 | 8 | 122 | 126 | 76 | 50 | 13 | 0 |
module Main where
import Control.Monad
import Blaze.ByteString.Builder
import qualified Data.ByteString as BS
import Records
import Text.Hastache
import Text.Hastache.Context
main :: IO ()
main = void $ sequence $ replicate 10000 $ toByteStringIO BS.putStr =<<
hastacheFileBuilder defaultConfig "toplevel.mustache"
... | singpolyma/mustache2hs | benchmark/bench2.hs | isc | 508 | 28 | 15 | 108 | 171 | 98 | 73 | 19 | 1 |
-- |
-- Module : HGE2D.Settings
-- Copyright : (c) 2016 Martin Buck
-- License : see LICENSE
--
-- Containing global settings used by the engine
module HGE2D.Settings where
---TODO define via class?
---TODO unused?
-- | Number of faces a circle should be created with
nFacesCircle :: Int
nFacesCircle = ... | I3ck/HGE2D | src/HGE2D/Settings.hs | mit | 324 | 0 | 4 | 70 | 25 | 19 | 6 | 3 | 1 |
module Text.Gps (encode, decode) where
-- TODO: previous-line info encoding with whitespaces
-- *Main Data.Char> [x|x<-['\0'..'\995000'], isSpace x]
-- "\t\n\v\f\r \160\5760\8192\8193\8194\8195\8196\8197\8198\8199\8200\8201\8202\8239\8287\12288"
-- http://en.wikipedia.org/wiki/Whitespace_character
import Data.List... | ggreif/text-gps | Text/Gps.hs | mit | 1,617 | 0 | 12 | 363 | 648 | 346 | 302 | 29 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{- |
Module : Database.Couch.Explicit.Internal
Description : Parameterized document-oriented requests to CouchDB
Copyright : Copyright (c) 2015, Michael Alan Dorman
License : MIT
Maintainer : mdorman@j... | mdorman/couch-simple | src/lib/Database/Couch/Explicit/DocBase.hs | mit | 9,034 | 0 | 17 | 2,677 | 1,276 | 681 | 595 | 142 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Chimera.Engine.Core.Menu where
import FreeGame
import Control.Lens
import Data.Default
import qualified Data.Vector as V
import qualified Data.Map as M
import qualified Data.Foldable as F
import Chimera.State
data Item m = Item {
_caption :: String,
_exec :: m ()
}
make... | myuon/Chimera | Chimera/Engine/Core/Menu.hs | mit | 2,286 | 0 | 20 | 592 | 1,111 | 568 | 543 | 61 | 3 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Action (runAction, mkEnv, add, query, list, edit, dump) where
import Prelude hiding (putStrLn, putStr)
import Control.Monad (replicateM_, unless)
import Control.Monad.Trans.Reader
import Control.Monad.IO.Class (liftIO)
import ... | sol/pwsafe | src/Action.hs | mit | 3,931 | 0 | 20 | 917 | 1,284 | 666 | 618 | 98 | 2 |
{-# LANGUAGE CPP #-}
module Main where
import qualified FizzBuzz as FB
import qualified Arith as Ar
import qualified Cipher as Ci
import qualified CP
import Test.HUnit hiding ( Test )
import Test.Framework ( defaultMain, testGroup, Test )
import Test.Framework.Providers.HUnit
import GHC.IO.Handle ( hDuplicate, ... | MerelyAPseudonym/cmdtheline | test/Main.hs | mit | 3,375 | 0 | 14 | 783 | 1,013 | 540 | 473 | 76 | 1 |
module Main where
import Board
import Control.Exception
import System.IO
takeTurn :: Board -> Marker -> IO Board
takeTurn brd m = do
putStr $ show m ++ "'s turn [0-8]: "
sqr <- getLine
en <- try (evaluate (read sqr :: Int) ) :: IO (Either SomeException Int)
case en of
Left _ -> takeTurn brd m
... | m0baxter/tic-tac-toe-hs | src/Main.hs | mit | 1,366 | 0 | 18 | 535 | 443 | 205 | 238 | 48 | 4 |
{-|
Module : RaizSegGrau
Description : calculates the roots of a quadratic equation in Haskell
Copyright : (c) Fabrício Olivetti, 2017
License : GPL-3
Maintainer : fabricio.olivetti@gmail.com
The application of Baskhara
-}
module Main where
-- |'raizSegGrau' calculates the
-- real roots of a quadratic e... | folivetti/BIGDATA | 02 - Básico/RaizSegGrau.hs | mit | 771 | 3 | 15 | 177 | 228 | 117 | 111 | 13 | 1 |
{-- Author: Manoel Vilela --}
import Data.Char (chr, ord)
import Data.Bits (xor)
parseFile :: String -> [Int]
parseFile s = read ("[" ++ s ++ "]")
passwords :: [[Int]]
passwords = [map ord [a,b,c] | a <- ['a'..'z'],
b <- ['a'..'z'],
c <- ['a'..'z']]
appl... | DestructHub/ProjectEuler | Problem059/Haskell/solution_1.hs | mit | 1,112 | 0 | 12 | 360 | 453 | 246 | 207 | 25 | 1 |
module Y2016.M06.D14.Solution where
import Control.Arrow ((&&&))
import Data.Array (listArray, elems)
import Data.Matrix
{-- Inverting a matrix ... because we can!
We'll use the minors/cofactors/adjugate(transpose) method described here:
https://www.mathsisfun.com/algebra/matrix-inverse-minors-cofactors-adjugate.h... | geophf/1HaskellADay | exercises/HAD/Y2016/M06/D14/Solution.hs | mit | 2,860 | 0 | 15 | 635 | 553 | 302 | 251 | -1 | -1 |
{-# LANGUAGE TypeOperators #-}
-- this listens on port 6000 and 6001.
import Control.Concurrent.Waitfree
import Network
import IO (Handle, hSetBuffering, BufferMode (NoBuffering), hPutStrLn, hGetLine, hPutStr)
handle :: PortID -> t -> IO Handle
handle p _ = withSocketsDo $ do
s <- listenOn p
(h,_,_) <- accept s
... | pirapira/waitfree | doc/sample/simple.hs | mit | 1,694 | 0 | 14 | 375 | 721 | 372 | 349 | 36 | 1 |
{-# htermination compare :: Ord a => [a] -> [a] -> Ordering #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_compare_4.hs | mit | 64 | 0 | 2 | 13 | 3 | 2 | 1 | 1 | 0 |
import Common
main = print $ product [ champernowne !! (10^x) | x <- [0..6] ]
champernowne = concat [ toDigits x | x <- [0..] ]
| lekto/haskell | Project-Euler-Solutions/problem0040.hs | mit | 130 | 0 | 10 | 29 | 68 | 36 | 32 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
module WykopTypes where
import Control.Applicative ((<$>), (<*>), pure, empty)
import Control.Monad (mzero)
import Data.Aeson
import Data.Text (unpack)
import Data.Time (LocalTime(..))
import Data.Time.Format (parseTime)
import System.Locale (defau... | mikusp/hwykop | WykopTypes.hs | mit | 15,061 | 0 | 66 | 6,450 | 3,343 | 1,855 | 1,488 | 424 | 1 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit (testCase)
import Tests.Syntax
import Tests.Codegen
tests :: TestTree
tests = testGroup "Compile... | alfpark/bond | compiler/tests/Main.hs | mit | 4,159 | 0 | 12 | 1,472 | 599 | 309 | 290 | 91 | 1 |
import System.Environment
import Text.SSWC
import qualified Data.Text.IO as T
main :: IO ()
main = getArgs >>= dispatch
dispatch :: [String] -> IO ()
dispatch [] = putStrLn "usage: sswc filename"
dispatch (fnm:_) = do
edoc <- loadDocument fnm
case edoc of
Right doc -> do Right ts <- loadTemplates doc
... | openbrainsrc/sswc | src/Main.hs | mit | 465 | 0 | 15 | 125 | 166 | 81 | 85 | 14 | 2 |
main = do
contents <- getContents
putStr (shortLinesOnly contents)
shortLinesOnly :: String -> String
shortLinesOnly input =
let allLines = lines input
shortLines = filter (\line -> length line < 10) allLines
result = unlines shortLines
in result | KHs000/haskellToys | src/scripts/shortlines.hs | mit | 301 | 0 | 13 | 92 | 89 | 43 | 46 | 9 | 1 |
module Preprocessor.Hsx (
module Preprocessor.Hsx.Syntax
, module Preprocessor.Hsx.Build
, module Preprocessor.Hsx.Parser
, module Preprocessor.Hsx.Pretty
, module Preprocessor.Hsx.Transform
, parseFileContents
, parseFileContentsWithMode
, parseFile
) where
import Preprocessor.Hsx.Build
import Preprocessor... | timthelion/fenfire | Preprocessor/Hsx.hs | gpl-2.0 | 892 | 6 | 15 | 112 | 234 | 131 | 103 | 22 | 1 |
module Main where
import Data.List
import System.Console.Haskeline
import Datatypes
import Parser
import Demo
import License
import Manual
import SequenceCalculus
import Prover
main :: IO ()
main = runInputT defaultSettings (outputStrLn manual >> loop [])
loop :: Assumptions -> InputT IO ()
loop as = do
... | lpeterse/crprover | Main.hs | gpl-2.0 | 1,683 | 1 | 17 | 682 | 549 | 263 | 286 | 37 | 12 |
import Data.Char
cap = unwords . map capitalizeWord . words
where capitalizeWord [] = []
capitalizeWord (c:cs) = toUpper c : map toLower cs | rootguy1/code-base | haskel/cap.hs | gpl-2.0 | 152 | 0 | 9 | 36 | 63 | 31 | 32 | 4 | 2 |
module Probability.RandomVariable.Macro where
import Types
import Prelude (error, sequence_)
import Macro.Math
import Macro.MetaMacro
import Macro.Text
import Macro.Tuple
import Functions.Application.Macro
import ... | NorfairKing/the-notes | src/Probability/RandomVariable/Macro.hs | gpl-2.0 | 4,092 | 0 | 7 | 967 | 970 | 553 | 417 | 99 | 1 |
{-# LANGUAGE Arrows #-}
module ABSDataTests
(
absDataTests
) where
import Data.List
import Data.Maybe
import Data.Void
import FRP.Yampa
import Test.Tasty
import Test.Tasty.QuickCheck as QC
import ABSData
import SIR
import Debug.Trace
-- note that we are creating also recovered messages
-- although a recov... | thalerjonathan/phd | coding/papers/pfe/testing/src/ABSDataTests.hs | gpl-3.0 | 6,690 | 1 | 15 | 2,112 | 1,008 | 544 | 464 | 101 | 6 |
{-# LANGUAGE FlexibleContexts #-}
-- |
-- Copyright : (c) 2010-2012 Benedikt Schmidt
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Benedikt Schmidt <beschmi@gmail.com>
--
-- Types for communicating with Maude.
module Term.Maude.Types (
-- * Maude terms
MaudeLit(..)
, MSubst
, MTerm
-- * conve... | ekr/tamarin-prover | lib/term/src/Term/Maude/Types.hs | gpl-3.0 | 6,817 | 0 | 16 | 1,796 | 1,558 | 823 | 735 | 95 | 4 |
module TicTacToe where
import Data.Either
import Data.Maybe
import Data.List
-- Board representation: => +---+---+---+
-- => | X | 2 | 3 |
-- 1 Board consists of 3 rows => +---+---+---+
-- 1 Row consists of 3 Ce... | veskoy/functional-programming-fmi | Project/TicTacToe.hs | gpl-3.0 | 7,892 | 0 | 15 | 1,685 | 3,152 | 1,638 | 1,514 | 145 | 2 |
module View.GUI where
import Graphics.UI.SDL
data GUIView
= StandardView {
stdViewScreen :: Surface
, stdViewZoomArea :: Surface
}
| phaazon/phraskell | src/View/GUI.hs | gpl-3.0 | 155 | 0 | 8 | 42 | 33 | 21 | 12 | 6 | 0 |
-- | (This is a part of MIOS.)
-- Solver, the main data structure
{-# LANGUAGE
MultiWayIf
, RecordWildCards
, ScopedTypeVariables
, TupleSections
, ViewPatterns
#-}
{-# LANGUAGE Safe #-}
module SAT.Mios.Solver
(
-- * Solver
Solver (..)
, newSolver
-- * Misc Access... | shnarazk/mios | src/SAT/Mios/Solver.hs | gpl-3.0 | 17,089 | 0 | 46 | 5,941 | 3,383 | 1,761 | 1,622 | 372 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.StreetViewPublish
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mo... | brendanhay/gogol | gogol-streetviewpublish/gen/Network/Google/StreetViewPublish.hs | mpl-2.0 | 5,806 | 0 | 12 | 1,294 | 629 | 458 | 171 | 140 | 0 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module View.PledgeButton (
overlayImage,
fillInPledgeCount,
blankPledgeButton,
) where
import Import hiding ((<>))
import Diagrams.Prelude
import Diagrams.Backend.Rasterific
import Codec.Picture.Png
import Codec.Picture.Types
import Data.FileEmbed
import qualified Data.By... | Happy0/snowdrift | View/PledgeButton.hs | agpl-3.0 | 1,847 | 8 | 12 | 304 | 527 | 278 | 249 | -1 | -1 |
{-
FCA - A generator of a Formal Concept Analysis Lattice
Copyright (C) 2014 Raymond Racine
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
... | RayRacine/hsfca | src/Data/Fca/Ident.hs | agpl-3.0 | 1,628 | 0 | 11 | 434 | 209 | 124 | 85 | 22 | 0 |
module SSH.Server
(
-- * Higher-level functions
ErrorCode (..)
, LogVerbosity (..)
, getError
, getErrorCode
, getBindError
, getBindErrorCode
, getPubkeyHash
, setRsaKey
, setBindPort
, setLogVerbosity
)
where
import Data.Word
import Foreign.C
import Foreign.Marshal.Alloc
import Fore... | lpeterse/haskell-libssh | SSH/Server.hs | lgpl-3.0 | 3,182 | 0 | 13 | 955 | 764 | 376 | 388 | 88 | 5 |
module BuiltIn.Finance (builtInFinance) where
import qualified Data.Map as M
import BuiltIn.Common
import Type
import Types
retDoll :: Double -> Interpreter EvalError Value
retDoll x = return . VNum $ fromIntegral ((round $ 100 * x) :: Integer) / 100
biDb :: BuiltIn
biDb = BuiltIn
... | ahodgen/archer-calc | src/BuiltIn/Finance.hs | bsd-2-clause | 2,722 | 0 | 14 | 795 | 1,100 | 587 | 513 | 78 | 3 |
-- |
--
-- Copyright:
-- This file is part of the package vimeta. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
-- https://github.com/pjones/vimeta
--
-- No part of this package, including this file, may be copied,
-- modified... | pjones/vimeta | src/Vimeta/Core/Config.hs | bsd-2-clause | 3,261 | 0 | 17 | 743 | 753 | 409 | 344 | 81 | 3 |
module MonadServ.JSONObject where
import MonadServ.JSON
class JSONObject a where
toJSON :: a -> Value
| jcaldwell/monadserv | src/MonadServ/JSONObject.hs | bsd-2-clause | 111 | 0 | 7 | 23 | 29 | 16 | 13 | 4 | 0 |
module Module1 (
increaseBy2
)where
import Data.Global
import Data.IORef
someVar :: IORef Int
someVar = declareIORef "my-global-var" 0
increaseBy2 :: IO ()
increaseBy2 = atomicModifyIORef someVar inc2
where
inc2 x = (2+x, ())
| jm-g/global-variables | examples/multimodule/Module1.hs | bsd-3-clause | 239 | 0 | 8 | 46 | 79 | 43 | 36 | 9 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Types where
import Data.Typeable
import Control.Exception
import Control.Monad.Except
import Control.Monad.Reader
import Data.Aeson
import GHC.Generics
import Network.HTTP.Client
import Network.Wreq
imp... | Frefreak/Gideon | src/Types.hs | bsd-3-clause | 2,707 | 0 | 9 | 689 | 647 | 374 | 273 | 81 | 1 |
{-# LANGUAGE CPP #-}
module System.Environment.XDG.BaseDir
( getUserDataDir
, getUserDataFile
, getUserConfigDir
, getUserConfigFile
, getUserCacheDir
, getUserCacheFile
, getSystemDataDirs
, getSystemDataFiles
, getSystemConfigDirs
, getSystemConfigFiles
, getAllDataDirs
... | willdonnelly/xdg-basedir | System/Environment/XDG/BaseDir.hs | bsd-3-clause | 4,333 | 0 | 10 | 908 | 904 | 480 | 424 | 67 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
-- | A linear version of a Functor
module Data.Functor.LFunctor where
import Data.Linear (flip, liftUnit, ($), (.))
import Data.Functor.Compose (Compose(..))
import Data.Functor.Sum (Sum(..))
import Data.Functor.Identity (Identity(..))
class LFunctor f where
fmap :: (a ⊸ b) ⊸ f a... | m0ar/safe-streaming | src/Data/Functor/LFunctor.hs | bsd-3-clause | 928 | 0 | 10 | 206 | 463 | 254 | 209 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
module UseHaskellAPIClient where
import Data.Proxy
import Servant.API
import ... | crowley100/my_distro_API | src/UseHaskellAPIClient.hs | bsd-3-clause | 2,400 | 0 | 10 | 417 | 513 | 273 | 240 | 49 | 1 |
{-# LANGUAGE PackageImports #-}
-- |
-- Module : Crypto.Hash.SHA224
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
--
-- A module containing SHA224 bindings
--
module Crypto.Hash.SHA224
( Ctx(..)
-- * Incremental hash... | vincenthz/hs-cryptohash | Crypto/Hash/SHA224.hs | bsd-3-clause | 1,679 | 0 | 8 | 337 | 322 | 190 | 132 | 28 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.VertexAttrib64Bit
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portab... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/VertexAttrib64Bit.hs | bsd-3-clause | 1,249 | 0 | 5 | 176 | 144 | 97 | 47 | 30 | 0 |
{-# OPTIONS_GHC -fbang-patterns #-}
-- Copyright (c) 2008 Stephen C. Harris.
-- See COPYING file at the root of this distribution for copyright information.
module HMQ.ReverseEngineering where
import System.IO
import System.FilePath
import System.Directory
import System.Time
import Text.Regex
import Data.Maybe
impo... | scharris/hmq | ReverseEngineering.hs | bsd-3-clause | 17,701 | 0 | 27 | 4,996 | 2,757 | 1,483 | 1,274 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Foundation.Input where
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Threepenny.Core
import Foundation.Common
import Control.Applicative
import Control.Monad
import Data.Maybe (catMaybes)
-- ButtonGroup {{{
data But... | kylcarte/threepenny-extras | src/Foundation/Input.hs | bsd-3-clause | 7,994 | 0 | 20 | 2,581 | 2,543 | 1,311 | 1,232 | 203 | 6 |
module Network.TeleHash.SwitchApi
(
-- * Telehash-c api
switch_send
, switch_sending
, switch_sendingQ
, switch_receive
, switch_open
, switch_pop
, switch_seed
, switch_note
-- * chan api
, chan_start
, chan_new
, chan_free
, chan_reliable
, chan_reset
, chan_in
, chan_packet
... | alanz/htelehash | src/Network/TeleHash/SwitchApi.hs | bsd-3-clause | 60,694 | 74 | 74 | 18,990 | 11,871 | 5,815 | 6,056 | 972 | 17 |
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Rubik.Face where
import Prelude hiding (Left, Right)
import Data.Array as A
import Control.Applicative
import Rubik.Key as K
import Rubik.Turn as T
import Rubik.Negate as N
import Rubik.V2
import Rubik.Abs
{-
data File = Left | Center |... | andygill/rubik-solver | src/Rubik/Face.hs | bsd-3-clause | 1,674 | 0 | 6 | 503 | 78 | 52 | 26 | 11 | 0 |
#! /usr/local/bin/stack runghc
{-# LANGUAGE QuasiQuotes,OverloadedStrings #-}
import UnitB.FunctionTable
main :: IO ()
main = do
renderSpecMDFile "README.md" $ do
-- verifySpec $ do
title "logic-function-tables"
"Linux / OSX: " >> link (image "Build Status" "https://travis-ci.org/unitb/logic-function-tabl... | unitb/logic-function-tables | README.hs | bsd-3-clause | 4,736 | 0 | 17 | 1,773 | 270 | 127 | 143 | 45 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Models.List where
import GHC.Generics
import Data.Aeson (FromJSON, ToJSON)
import Models.Item
data List = List
{ listId :: Int -- ^ List id
, listName :: String -- ^ List name
, listItems :: [Item] -- ^ List items
} deriving (Show, Generic)
instance FromJSON Lis... | bendiksolheim/listify-backend | src/Models/List.hs | bsd-3-clause | 343 | 0 | 9 | 73 | 88 | 53 | 35 | 12 | 0 |
module Main where
import qualified Test.Data.ART as ART
import qualified Test.Data.ART.Children as Children
import qualified Test.Data.ART.Internal.Array as Array
import qualified Test.Data.ART.Internal.SortingNetwork as Sort
import qualified Test.Data.ART.Key ... | TikhonJelvis/adaptive-radix-trees | test/test.hs | bsd-3-clause | 730 | 0 | 8 | 269 | 133 | 84 | 49 | 14 | 1 |
module Language.AtomHD
(
-- * Types
DesignAction
, Design
, Action
, E
, Name
-- * Compilation
, compile
-- * Design Stuff
, reg
, array
, fifo
, (==>)
, (-:)
-- ** Interface Methods
, methodValue
, methodAction
, methodActionValue
-- * Action Stuff
, cond
, (<==)
, assi... | tomahawkins/atom-hd | Language/AtomHD.hs | bsd-3-clause | 12,415 | 0 | 15 | 3,353 | 5,157 | 2,732 | 2,425 | 319 | 17 |
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TupleSections #-}
module Language.Fixpoint.Solver.Worklist
( -- * Worklist type is opaque
Worklist, Stats
-- * Initialize
, init
-- * Pop off a constraint
, pop
... | gridaphobe/liquid-fixpoint | src/Language/Fixpoint/Solver/Worklist.hs | bsd-3-clause | 8,981 | 0 | 14 | 2,775 | 2,224 | 1,194 | 1,030 | 189 | 1 |
{-# LANGUAGE MonadComprehensions #-}
module MComp where
import Control.Applicative
data Opt a = Yes a | No deriving Show
instance Functor Opt where
fmap f No = No
fmap f (Yes a) = Yes $ f a
instance Applicative Opt where
pure = Yes
No <*> _ = No
(Yes f) <*> a = fmap f a
instance Monad Opt where
(Yes a)... | dterei/Scraps | haskell/parsers/MComp.hs | bsd-3-clause | 913 | 0 | 8 | 288 | 433 | 222 | 211 | 34 | 1 |
{- | Module : ./GMP/GMP-CoLoSS/GMP/Prover.hs
- Description : Implementation of the generic sequent calculus
- Copyright : (c) Daniel Hausmann & Lutz Schroeder, DFKI Lab Bremen,
- Rob Myers & Dirk Pattinson, Department of Computing, ICL
- License : GPLv2 or higher, see LICENSE.txt
- Mai... | spechub/Hets | GMP/GMP-CoLoSS/GMP/Prover.hs | gpl-2.0 | 6,643 | 0 | 19 | 2,119 | 1,637 | 844 | 793 | 70 | 2 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE OverloadedStrings #-}
module Preprocess
(preprocess)
where
import qualified Data.Text as T
preprocess :: T.Text -> T.Text
preprocess txt = T.cons '\"' $ T.snoc escaped '\"'
where escaped = T.concatMap escaper txt
escaper :: Char -> T.Text
escaper c
| c == '\t... | Pold87/Haggressive | src-lib/Preprocess.hs | gpl-2.0 | 411 | 0 | 8 | 95 | 139 | 71 | 68 | 14 | 1 |
#!/usr/bin/env runhaskell
import Hledger.Vty (main)
| Lainepress/hledger | hledger-vty/hledger-vty.hs | gpl-3.0 | 52 | 0 | 5 | 5 | 12 | 7 | 5 | 1 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/CreateDistribution.hs | mpl-2.0 | 5,079 | 0 | 14 | 1,018 | 689 | 412 | 277 | 89 | 1 |
module Bench.Pos.Explorer.ServerBench
( runTimeBenchmark
, runSpaceBenchmark
) where
import Universum
import Criterion.Main (bench, defaultConfig, defaultMainWith, nfIO)
import Criterion.Types (Config (..))
import Weigh (io, mainWith)
import Test.QuickChe... | input-output-hk/cardano-sl | explorer/bench/Bench/Pos/Explorer/ServerBench.hs | apache-2.0 | 5,219 | 0 | 12 | 1,047 | 795 | 438 | 357 | 75 | 1 |
module Settings.Builders.Haddock (haddockBuilderArgs) where
import Hadrian.Haskell.Cabal
import Hadrian.Haskell.Cabal.Type
import Hadrian.Utilities
import Packages
import Rules.Documentation
import Settings.Builders.Common
import Settings.Builders.Ghc
-- | Given a version string such as "2.16.2" produce an integer e... | sdiehl/ghc | hadrian/src/Settings/Builders/Haddock.hs | bsd-3-clause | 2,924 | 0 | 19 | 976 | 733 | 371 | 362 | 65 | 1 |
{-# LANGUAGE NoImplicitPrelude, MagicHash, TypeOperators,
DataKinds, TypeFamilies, FlexibleContexts, MultiParamTypeClasses #-}
-----------------------------------------------------------------------------
-- |
-- Module : Java.Math
-- Copyright : (c) Jyothsna Srinivas 2017
--
-- License : BSD-style (see... | rahulmutt/ghcvm | libraries/base/Java/Math.hs | bsd-3-clause | 7,175 | 171 | 8 | 1,026 | 1,538 | 798 | 740 | -1 | -1 |
{-# LANGUAGE LambdaCase, OverloadedStrings, RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Brick
import Brick.Widgets.DeviceList
import Brick.Widgets.Border
import Brick.Widgets.HelpMessage
import Brick.Widgets.WrappedText
import Brick.BChan
import Graphics.Vty hiding (Event, nextEv... | rootzlevel/device-manager | src/Main.hs | bsd-3-clause | 7,733 | 0 | 19 | 1,878 | 2,278 | 1,179 | 1,099 | 174 | 12 |
{-# LANGUAGE PackageImports #-}
module Main where
import System.Environment
import qualified Data.ByteString.Lazy as L
import "cryptonite" Crypto.Hash
import qualified "cryptohash" Crypto.Hash as Old
main = do
args <- getArgs
case args of
[] -> error "usage: bench <big-file>"
"old":x:_... | tekul/cryptonite | benchs/Hash.hs | bsd-3-clause | 570 | 0 | 16 | 191 | 174 | 88 | 86 | 18 | 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="ms-MY">
<title>Highlighter</title>
<maps>
<homeID>highlighter</homeID>
<mapref location... | thc202/zap-extensions | addOns/highlighter/src/main/javahelp/help_ms_MY/helpset_ms_MY.hs | apache-2.0 | 964 | 77 | 66 | 155 | 404 | 205 | 199 | -1 | -1 |
{-# LANGUAGE PolyKinds, RankNTypes, ScopedTypeVariables #-}
module T8616 where
import Data.Proxy
import GHC.Exts
withSomeSing :: forall k (kproxy :: k). Proxy kproxy
withSomeSing = undefined :: (Any :: k)
-- The 'k' is bought into scope by the type signature
-- This is a type error, but should not crash GHC
foo ... | sdiehl/ghc | testsuite/tests/polykinds/T8616.hs | bsd-3-clause | 471 | 1 | 8 | 95 | 93 | 58 | 35 | 7 | 1 |
{-# Language CPP #-}
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in th... | notae/haskell-exercise | yesod/my-project/Settings.hs | bsd-3-clause | 5,447 | 0 | 12 | 1,463 | 706 | 405 | 301 | -1 | -1 |
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-}
module PMC003 where
f :: Bool -> Bool -> ()
f _ False = ()
f True False = ()
f _ _ = ()
| ezyang/ghc | testsuite/tests/pmcheck/should_compile/pmc003.hs | bsd-3-clause | 176 | 0 | 7 | 43 | 56 | 30 | 26 | 6 | 1 |
{-# LANGUAGE GADTs, ExistentialQuantification #-}
module ShouldFail where
data T = forall a. T a (a->Int)
f ~(T x f) = f x | siddhanathan/ghc | testsuite/tests/gadt/lazypat.hs | bsd-3-clause | 131 | 0 | 8 | 31 | 48 | 26 | 22 | 4 | 1 |
{-# LANGUAGE UnicodeSyntax, Arrows, RankNTypes #-}
module T8959b where
foo :: Int -> Int
foo = ()
bar :: ()
bar = proc x -> do return -< x
baz = () :: (forall a. a -> a) -> a
| urbanslug/ghc | testsuite/tests/ghci/scripts/T8959b.hs | bsd-3-clause | 179 | 1 | 8 | 44 | 73 | 41 | 32 | 7 | 1 |
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
module Compiler where
import qualified Data.List
import qualified Expr
import Data.List((\\))
import Expr(Expr(..), Id)
import FreshName
import Type
import Debug.Trace(traceShow)
import Debug.Trace(traceShowId)
-- Intermediate language in normal form
d... | authchir/mini-ml | src/Compiler.hs | isc | 11,602 | 0 | 24 | 3,336 | 5,469 | 2,725 | 2,744 | 262 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Chip8.Emulator.SDL ( runSDLEmulator
) where
import Data.Word (Word8, Word32)
import Data.List (foldl')
import Data.Bits ((.|.))
import Data.STRef (STRef, readSTRef, writeSTRef)
import Control.Monad (foldM_, when)
import Control.Monad.ST (Real... | ksaveljev/chip-8-emulator | Chip8/Emulator/SDL.hs | mit | 7,586 | 0 | 18 | 1,875 | 2,555 | 1,282 | 1,273 | 187 | 17 |
module Station.Types.Card.Time where
import Import
import Data.Scientific (Scientific)
import qualified Data.Time.Calendar as CAL
import Data.Time.Clock (UTCTime(..), DiffTime,
... | seagreen/station | src/Station/Types/Card/Time.hs | mit | 1,740 | 0 | 10 | 508 | 298 | 179 | 119 | 30 | 1 |
-- | For importing into Network.Campfire.Types for use
-- by TemplateHaskell
module Network.Campfire.Types.TH (deriveJSONOptions) where
import Data.Aeson.TH
import Data.Char(toLower, isLower)
import Data.List(intercalate, groupBy)
-- | Options for renaming fields of record types in
-- Network.Campfire.Types
deriveJS... | joshmcgrath08/campfire-lib | Network/Campfire/Types/TH.hs | mit | 846 | 0 | 10 | 132 | 137 | 81 | 56 | 15 | 1 |
eratosSieve :: [Integer] -> [Integer]
eratosSieve (n:ns)
| n*n > last ns = n:ns
eratosSieve (n:ns) = n:eratosSieve [ i | i<-ns, i `mod` n /= 0]
primeList' :: Integer -> [Integer]
primeList' n = eratosSieve [2..n]
primeFactorizeCount :: Integer -> Integer -> Integer
primeFactorizeCount n p
| n `mod` p == 0 = 1 +... | mino2357/Hello_Haskell | 2018-02-25.hsproj/Main.hs | mit | 817 | 0 | 10 | 145 | 362 | 189 | 173 | 17 | 1 |
module AbilityTests where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit as HUnit
import EverCraft
ability_setting_tests :: Test.Framework.Test
ability_setting_tests = testGroup "Character has ability scores" [
testCase "they default to 10" $ default_ability_scores @?= [10,10,10,1... | coreyhaines/evercraft_kata | test/AbilityTests.hs | mit | 2,369 | 0 | 15 | 385 | 642 | 363 | 279 | 44 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Views.Layout (layout) where
import Assets.CSS (layoutCss)
import Data.Monoid (mempty)
import Data.Text.Lazy (toStrict)
import Prelude hiding (head)
import Text.Blaze.Html (Html)
import Text.Blaze.Html5 (Html, body, docTypeHtml, head,
... | av-ast/hello-scotty | src/Views/Layout.hs | mit | 1,696 | 0 | 14 | 513 | 361 | 187 | 174 | 32 | 1 |
module Rebase.Data.Semigroup.Foldable.Class
(
module Data.Semigroup.Foldable.Class
)
where
import Data.Semigroup.Foldable.Class
| nikita-volkov/rebase | library/Rebase/Data/Semigroup/Foldable/Class.hs | mit | 131 | 0 | 5 | 12 | 26 | 19 | 7 | 4 | 0 |
{-|
Module : Jupyter.Test.Install
Description : Tests for the Jupyter.Install module.
Copyright : (c) Andrew Gibiansky, 2016
License : MIT
Maintainer : andrew.gibiansky@gmail.com
Stability : stable
Portability : POSIX
-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
module Jupyt... | gibiansky/jupyter-haskell | tests/Jupyter/Test/Install.hs | mit | 11,430 | 0 | 17 | 2,672 | 2,099 | 1,058 | 1,041 | 188 | 4 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
-- | The Participant Server, which runs the Consensus algorithm, ultimately "accepting" and sending a 2B to Observer Servers
module Hetcons.Participant (Participant, new_parti... | isheff/hetcons | src/Hetcons/Participant.hs | mit | 7,325 | 0 | 18 | 1,418 | 1,446 | 808 | 638 | 108 | 1 |
module SSH.Types
( getWord32be'
, putWord32be'
, getString
, putString
, runStrictGet
, runStrictPut
) where
import Control.Applicative ((<$>))
import Data.Binary.Get (Get, getWord32be, getByteString, runGet)
import Data.Binary.Put (Put, pu... | mithrandi/ssh-key-generator | SSH/Types.hs | mit | 958 | 0 | 11 | 214 | 266 | 153 | 113 | 26 | 1 |
module ExportProduct (exportProduct, exportUcmToLatex, exportAspectInterfacesToLatex, exportSourceCode) where
import System.IO
-- import System
import System.Directory
import System.FilePath
import System.Process
import System.Exit
import Control.Monad
import Control.Exception
import Ensemble.Types
import ComponentMo... | hephaestus-pl/hephaestus | willian/ExportProduct.hs | mit | 5,141 | 0 | 16 | 913 | 1,426 | 710 | 716 | 115 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns, CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
module Network.Wai.Handler.Warp.HTTP2.Sender (frameSender) where
#if __GLASGOW_HASKELL__ < 709
import Control.Applicative
#endif
import Control.Concurrent.STM
import qualified Control.Exception as E
import Control.Mo... | iquiw/wai | warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs | mit | 18,038 | 0 | 20 | 5,142 | 4,301 | 2,125 | 2,176 | 303 | 18 |
{-# LANGUAGE OverloadedStrings #-}
module Y2018.M05.D18.Exercise where
-- Before we insert new articles, let's step back in time for a moment. Recall
import Y2018.M04.D09.Exercise
{--
where we uploaded tags, we uploaded a sample set of 10 tags. There are a lot
more tags than 10 for the World Policy Journal. Today w... | geophf/1HaskellADay | exercises/HAD/Y2018/M05/D18/Exercise.hs | mit | 1,486 | 0 | 6 | 233 | 77 | 50 | 27 | 9 | 1 |
{-|
Module : Language.X86.HwTranslator
Description : Virtual Asm to Hardware Asm translator
Copyright : (c) Jacob Errington and Frederic Lafrance, 2016
License : MIT
Maintainer : goto@mail.jerrington.me
Stability : experimental
This module is reponsible for the translation between virtual and hardware
as... | djeik/goto | libgoto/Language/X86/HwTranslator.hs | mit | 12,525 | 0 | 27 | 4,615 | 3,054 | 1,515 | 1,539 | 216 | 55 |
{-# LANGUAGE MagicHash, UnboxedTuples, CPP, RankNTypes #-}
{-# OPTIONS_GHC -fno-full-laziness #-}
module Data.TrieVector.SmallArrayPrim (
Array
, MArray
, new
, write
, read
, thaw
, index
, freeze
, unsafeFreeze
, unsafeThaw
, sizeof
, sizeofMut
, copy
, copyM... | AndrasKovacs/trie-vector | Data/TrieVector/SmallArrayPrim.hs | mit | 1,508 | 0 | 10 | 312 | 270 | 169 | 101 | 64 | 1 |
{-# LANGUAGE RecordWildCards, LambdaCase #-}
module QuadRenderingAdHoc ( drawQuadImmediate
, drawQuadAdHocVBO
, drawQuadAdHocVBOShader
) where
import qualified Graphics.Rendering.OpenGL as GL
import qualified Data.Vector.Storable.Mutable a... | blitzcode/jacky | src/old_code/QuadRenderingAdHoc.hs | mit | 9,871 | 0 | 24 | 3,260 | 2,443 | 1,283 | 1,160 | 168 | 5 |
module Test where
{
import PopGen;
import Probability;
get_observed_alleles file = map list_from_vector $ list_from_vector $ read_phase_file file;
filename = "/home/bredelings/Reports/Kmar/TwinCays2005a.phase1.infile";
n = 5;
note mean ~ iid(n, gamma(0.5,0.5) );
note sigmaOverMu ~ iid(n, gamma(1.05,0.1) );... | bredelings/BAli-Phy | tests/PartialSelfing/diploid.andro.multi_theta.TCb.hs | gpl-2.0 | 1,448 | 34 | 16 | 318 | 669 | 370 | 299 | -1 | -1 |
module GraphTheory.Macro where
import Types
import Macro.Tuple
graph_ :: Note
graph_ = "G"
grph :: Note -> Note -> Note
grph = tuple
grph_ :: Note
grph_ = grph vrt_ edg_
vrt_ :: Note
vrt_ = "V"
edg_ :: Note
edg_ = "E"
| NorfairKing/the-notes | src/GraphTheory/Macro.hs | gpl-2.0 | 245 | 0 | 6 | 70 | 77 | 45 | 32 | 13 | 1 |
module Main (main) where
import Data.Bifunctor
import Language.SimplyTyped.Parser
import Language.SimplyTyped.Pretty
import Language.SimplyTyped.Semantics
import Language.SimplyTyped.Interpreter
import System.Console.Haskeline
evalString :: String -> String
evalString input = either id id $ evalString' input where
... | robertclancy/tapl | simply-typed/src/Main.hs | gpl-2.0 | 967 | 0 | 15 | 311 | 264 | 128 | 136 | 25 | 2 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, GeneralizedNewtypeDeriving #-}
module Lamdu.Data.DbLayout
( DbM, runDbTransaction
, ViewM, runViewTransaction
, CodeProps, codeProps, codeIRefs
, RevisionProps, revisionProps, revisionIRefs
, module Lamdu.Data.Anchors
) where
import P... | da-x/lamdu | Lamdu/Data/DbLayout.hs | gpl-3.0 | 2,291 | 0 | 11 | 452 | 631 | 366 | 265 | 52 | 1 |
{-# LANGUAGE EmptyDataDecls,
MultiParamTypeClasses,
GADTs,
RankNTypes,
FlexibleInstances #-}
module Canon where
import Music (Name(..), Accidental(..), Scale(..), Tuning(..), Timing(..), Metronome(..), Duration(..),
AbstractInt1(..), AbstractPitch1(.... | ejlilley/AbstractMusic | Canon.hs | gpl-3.0 | 3,116 | 0 | 20 | 804 | 1,341 | 791 | 550 | 60 | 1 |
module StopWatch where
import FRP.Yampa
import Data.IORef
import Data.Time.Clock
data Stopwatch = Stopwatch { zero :: UTCTime
, prev :: UTCTime }
startStopWatch :: UTCTime -> Stopwatch
startStopWatch now = Stopwatch now now
storeStopwatch :: IO (IORef Stopwatch)
storeStopwatch = getCurre... | eniac314/aquarium | src/StopWatch.hs | gpl-3.0 | 676 | 0 | 12 | 156 | 214 | 111 | 103 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
-- Module : Network.AWS.ElasticFileSystem.DeleteFileSystem
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : This Source Code Form is subject to the terms of
-- the Mozilla Public Licen... | fmapfmapfmap/amazonka | amazonka-efs/gen/Network/AWS/ElasticFileSystem/DeleteFileSystem.hs | mpl-2.0 | 3,611 | 0 | 9 | 704 | 326 | 206 | 120 | 41 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateGroup.hs | mpl-2.0 | 4,083 | 0 | 9 | 898 | 472 | 287 | 185 | 57 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.