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 Basal where
type DateTime = String
type Url = String
| lesguillemets/forvo-pronounce.hs | Basal.hs | mit | 61 | 0 | 4 | 12 | 16 | 11 | 5 | 3 | 0 |
module Unused.TermSearch
( SearchResults(..)
, SearchBackend(..)
, SearchTerm
, search
) where
import qualified Data.Maybe as M
import GHC.IO.Exception (ExitCode(ExitSuccess))
import qualified System.Process as P
import Unused.TermSearch.Internal
(commandLineOptions, parseSearchResult)
impor... | joshuaclayton/unused | src/Unused/TermSearch.hs | mit | 1,163 | 0 | 10 | 186 | 331 | 190 | 141 | 26 | 2 |
-- | Data.TSTP.Role module
module Data.TSTP.Role where
-- | Formula roles.
data Role = Assumption
| Axiom
| Conjecture
| Definition
| FiDomain
| FiFunctors
| FiPredicates
| Hypothesis
| Lemma
| NegatedConjecture
| P... | agomezl/tstp2agda | src/Data/TSTP/Role.hs | mit | 423 | 0 | 6 | 190 | 74 | 47 | 27 | 16 | 0 |
-- Tree.hs
module Tree where
import Data.Monoid
import qualified Data.Map as M
import qualified Data.Tree as T
data TravelGuide = TravelGuide { title :: String, authors :: [String],
price :: Double } deriving (Show, Eq, Ord)
newtype TravelGuidePrice = TravelGuidePrice TravelGuide der... | hnfmr/beginning_haskell | Chapter4.hs | mit | 2,226 | 0 | 14 | 624 | 828 | 431 | 397 | 43 | 3 |
module Main where
import Rotations
main :: IO ()
main = do
inputWords <- lines <$> getContents
mapM_ (putStrLn . format . rotateWord) inputWords
where
format (n, word) = show n ++ " " ++ word
| tyehle/programming-studio | 2017-W20/tobin/app/Main.hs | mit | 204 | 0 | 10 | 48 | 79 | 41 | 38 | 7 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleContexts, FlexibleInstances, UndecidableInstances, OverlappingInstances #-}
{- |
The HList library
(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke
A generic implementation of a type equality predicate. The given
implementation only ... | bjornbm/HList-classic | Data/HList/TypeEqGeneric2.hs | mit | 1,882 | 0 | 7 | 320 | 248 | 139 | 109 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-certificate-domainvalidationoption.html
module Stratosphere.ResourceProperties.Certificate... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CertificateManagerCertificateDomainValidationOption.hs | mit | 2,896 | 0 | 13 | 222 | 267 | 153 | 114 | 29 | 1 |
module Language.HAsm.Test where
import Language.HAsm.Types
import Language.HAsm.Parse
import Language.HAsm.Codegen
import Language.HAsm.PrettyPrint
{-
- Test Examples
-}
regl = OpndReg . RegL
imml = OpndImm . ImmL
immb = OpndImm . ImmB
label l = OpndRM noSIB (DisplLabel l)
instr i = HasmStInstr [] . Operation i
d... | EarlGray/hasm | src/Language/HAsm/Test.hs | mit | 1,980 | 0 | 10 | 401 | 689 | 362 | 327 | 49 | 1 |
sayHello :: String -> IO ()
sayHello x = putStrLn ("Hello, " ++ x ++ "!")
triple x = x * 3
squareAndMultiplyByPi x = (x ^ 2) * pi
x = 7
y = 10
f = x + y
| rasheedja/HaskellFromFirstPrinciples | Chapter2/test.hs | mit | 155 | 0 | 8 | 43 | 87 | 45 | 42 | 7 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances,
MultiParamTypeClasses, DeriveDataTypeable, OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Pane.Errors
-- Copyright ... | JPMoresmau/leksah | src/IDE/Pane/Errors.hs | gpl-2.0 | 20,470 | 123 | 20 | 4,974 | 4,908 | 2,586 | 2,322 | 392 | 5 |
module Eval (evalProgram, evalExpression, evalString, displayStack, builtins) where
import Types
import Parser
import Data.Bits
import Data.Char
import Data.List
import Math.NumberTheory.Powers
import Math.NumberTheory.Primes
import qualified Data.Map as M
evalProgram :: SmProgram -> SmFunction
evalProgram = flip $ ... | AlephAlpha/Samau | OldSamau/Eval.hs | gpl-2.0 | 30,173 | 0 | 19 | 9,677 | 14,228 | 7,141 | 7,087 | 652 | 3 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{- |
Module : Yi.CompletionTree
License : GPL-2
Maintainer : yi-devel@googlegroups.com
Stability : experimental
Portability : portable
Little helper for ... | yi-editor/yi | yi-core/src/Yi/CompletionTree.hs | gpl-2.0 | 7,035 | 0 | 22 | 1,704 | 1,705 | 924 | 781 | 82 | 3 |
module Http where
import Data.Char
import Data.List
import Network.HTTP
import Network.Stream
import System.IO
import Numeric
import Content
import File
import Util
-- http types
type HttpKey = String
type HttpValue = String
data HttpPair = HttpPair {
httpKey :: HttpKey,
httpVal :: HttpValue
}
-- implement... | Jon0/status | src/Http.hs | gpl-3.0 | 5,323 | 0 | 13 | 1,124 | 1,710 | 889 | 821 | 131 | 4 |
module SugarScape.Model
( SugAgentState (..)
, SugAgentObservable (..)
, SugEnvCell (..)
, SugAgentMonad
, SugAgentMonadT
, SugEnvironment
, SugAgent
, SugAgentDef
, SugAgentOut
, AgentAgeSpan (..)
, SugarScapeParams (..)
, AgentDistribution (..)
, SugarRegrow (..)
, PolutionFormati... | thalerjonathan/phd | public/towards/SugarScape/experimental/chapter2_environment/src/SugarScape/Model.hs | gpl-3.0 | 12,822 | 0 | 9 | 2,480 | 1,542 | 993 | 549 | 228 | 1 |
{-# LANGUAGE UnicodeSyntax #-}
--
-- Utility functions to process XmlNode's directly, i.e. outside of XmlArrow.
--
module XmlNodeUtil where
import Prelude.Unicode
import Control.Arrow
import Data.AssocList
import Data.Maybe
import qualified Text.XML.HXT.DOM.XmlNode as XN
type LocalName = String
l... | c0c0n3/hAppYard | inkscape-util/src/shared/XmlNodeUtil.hs | gpl-3.0 | 1,004 | 0 | 9 | 215 | 286 | 152 | 134 | 21 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/DescribeDomain.hs | mpl-2.0 | 4,604 | 0 | 11 | 985 | 522 | 320 | 202 | 63 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adsense-host/gen/Network/Google/Resource/AdSenseHost/CustomChannels/Patch.hs | mpl-2.0 | 3,913 | 0 | 15 | 883 | 469 | 280 | 189 | 78 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/NonBillableWinningBids/List.hs | mpl-2.0 | 7,696 | 0 | 18 | 1,585 | 891 | 520 | 371 | 137 | 1 |
module Forms
( newTaskForm
, editTaskForm
, reorderTaskForm
, newNoteForm
) where
import Import
import Util (fieldListOptions)
import Control.Monad (unless)
newTaskForm :: Bool -> Form NewTask
newTaskForm includeNonDaily = renderBootstrap $ NewTask
<$> areq textField titleSettings Nothing
<*> are... | samstokes/yesodoro-reboot | Forms.hs | bsd-2-clause | 3,625 | 0 | 19 | 887 | 1,024 | 527 | 497 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
module NLP.EarleyFacile where
import Prelude hiding (init)
import Control.Monad (void, forM_, when, msum)
import qualified Control.Monad.RWS.Strict as RWS
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
impor... | kawu/earley-facile | src/NLP/EarleyFacile.hs | bsd-2-clause | 18,171 | 1 | 22 | 6,132 | 5,571 | 2,798 | 2,773 | 421 | 3 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QLineEdit.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:36
Warning : this file is machine generated - do not... | keera-studios/hsQt | Qtc/Enums/Gui/QLineEdit.hs | bsd-2-clause | 2,472 | 0 | 18 | 544 | 629 | 322 | 307 | 58 | 1 |
{-# LANGUAGE Haskell2010 #-}
module Bug458 where
-- | See the defn of @'⊆'@.
(⊆) :: () -> () -> ()
_ ⊆ _ = ()
| haskell/haddock | html-test/src/Bug458.hs | bsd-2-clause | 118 | 0 | 7 | 28 | 40 | 23 | 17 | 4 | 1 |
{-# LANGUAGE TemplateHaskell, TupleSections, FlexibleContexts #-}
module Syscall ( Syscall(..)
, scName
, scArgs
, scRet
, Argument(..)
, parseSyscall
) where
import Control.Monad
import Control.Applicative ((<*), (<$>), (<*>))
... | ratatosk/traceblade | Syscall.hs | bsd-3-clause | 2,838 | 0 | 12 | 894 | 893 | 476 | 417 | 83 | 2 |
{-# LANGUAGE CPP #-}
import Control.Shell
import Data.Bits
import System.Info (os)
import Control.Monad
import System.Environment (getArgs)
import System.Exit
inBuildDir :: [String] -> Shell a -> Shell a
inBuildDir args act = do
srcdir <- pwd
isdir <- isDirectory "_build"
when (isdir && not ("no-rebuild" `elem` ... | jtojnar/haste-compiler | build-release.hs | bsd-3-clause | 5,322 | 0 | 22 | 1,505 | 1,379 | 693 | 686 | 113 | 4 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
module Distribution.Client.GlobalFlags (
GlobalFlags(..)
, defaultGlobalFlags
, RepoContext(..)
, withRepoContext
) ... | edsko/cabal | cabal-install/Distribution/Client/GlobalFlags.hs | bsd-3-clause | 11,226 | 0 | 19 | 3,208 | 2,000 | 1,119 | 881 | 210 | 4 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PatternGuards #-}
module Data.Grid where
import Data.Points
import Util
import Control.Applicative
import Control.Arrow ((&&&))
import Control.Lens
import Control.Monad
import Data.List (maximumBy, minimumBy, nub)
import qu... | kylcarte/wangtiles | src/Data/Grid.hs | bsd-3-clause | 6,400 | 0 | 13 | 1,460 | 3,130 | 1,589 | 1,541 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Selection
-- Copyright : (c) Sven Panne 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven_panne@yahoo.com
-- Stability : provisiona... | OS2World/DEV-UTIL-HUGS | libraries/Graphics/Rendering/OpenGL/GL/Selection.hs | bsd-3-clause | 3,618 | 0 | 12 | 527 | 813 | 450 | 363 | 61 | 1 |
{-|
Module : Values
Description : common functions for MPBall benchmarks
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
-}
module Values where
import MixedTypesNumPrelude
-- import Prelude... | michalkonecny/aern2 | aern2-mp/bench/old/Values.hs | bsd-3-clause | 1,173 | 0 | 15 | 227 | 284 | 160 | 124 | 27 | 1 |
{-|
Module : Idris.IBC
Description : Core representations and code to generate IBC files.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.IBC (loadIBC, loadPkgIndex,
writeIBC,... | jmitchell/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | 102,681 | 0 | 21 | 56,796 | 28,070 | 12,890 | 15,180 | 2,461 | 17 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings, FlexibleInstances, GeneralizedNewtypeDeriving #-}
module Options where
{-
This module is temporary, until ghc-mod exports the contents from its library,
as it is currently only in the ghc-mod executable.
It is based on/copied from
https://github.com/... | kmate/HaRe | src/Options.hs | bsd-3-clause | 7,943 | 0 | 24 | 2,163 | 1,860 | 968 | 892 | 188 | 2 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Rho.InfoHash where
import Control.DeepSeq (NFData)
import Data.Bits
import qualified Data.ByteString as B
-- | 20-byte info_hash of torrent
-- TODO: Move this type to somewhere nice and remove this module.
newtype InfoHash = InfoHash { unwrapInfoH... | osa1/rho-torrent | src/Rho/InfoHash.hs | bsd-3-clause | 1,091 | 0 | 11 | 338 | 281 | 150 | 131 | 26 | 0 |
{-# LANGUAGE OverloadedStrings #-}
import Text.Printf (printf)
import Web.Scotty (scotty, get, json, liftAndCatchIO)
import Data.Aeson (object, (.=))
import Control.Concurrent.STM.TVar (newTVarIO, readTVar, modifyTVar)
import Control.Monad.STM (atomically)
main :: IO ()
main = do
putStrLn "\nStarting web server, s... | simnalamburt/stack-practice | app/Main.hs | bsd-3-clause | 763 | 0 | 22 | 244 | 212 | 109 | 103 | 20 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGU... | manyoo/reflex-dom | src/Reflex/Dom/Widget/Basic.hs | bsd-3-clause | 24,249 | 0 | 24 | 5,247 | 7,055 | 3,577 | 3,478 | 331 | 4 |
module Interpreter(evalExpr, evalExprs, eval) where
import Control.Monad
import qualified Control.Monad.Trans.State as S
import qualified Data.Functor.Identity as I
import Types
import Env
evalExpr :: Expr -> S.State Env Expr
evalExpr v@(EValue _) = return v
evalExpr (ESymbol s) = do
env <- S.get
return . envLo... | martintrojer/scheme-haskell | src/Interpreter.hs | bsd-3-clause | 1,054 | 0 | 19 | 271 | 437 | 217 | 220 | 33 | 3 |
{-# LANGUAGE NamedFieldPuns #-}
module GHC.Util.HsDecl (declName,bindName)
where
import GHC.Hs
import GHC.Types.SrcLoc
import Language.Haskell.GhclibParserEx.GHC.Types.Name.Reader
-- | @declName x@ returns the \"new name\" that is created (for
-- example a function declaration) by @x@. If @x@ isn't a declaration
--... | ndmitchell/hlint | src/GHC/Util/HsDecl.hs | bsd-3-clause | 1,516 | 0 | 14 | 296 | 505 | 251 | 254 | 24 | 13 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.AmountOfMoney.FR.Tests
( tests ) where
import Data.String
import Prelude
import Test.Tasty
im... | facebookincubator/duckling | tests/Duckling/AmountOfMoney/FR/Tests.hs | bsd-3-clause | 522 | 0 | 9 | 78 | 79 | 50 | 29 | 11 | 1 |
{-# LANGUAGE CPP, DeriveDataTypeable #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Common.Token
-- Copyright : (c) 2009 Bernie Pope
-- License : BSD-style
-- Maintainer : bjpop@csse.unimelb.edu.au
-- Stability : experimental
-- Portabili... | alanz/language-javascript | src/Language/JavaScript/Parser/Token.hs | bsd-3-clause | 11,779 | 0 | 10 | 2,080 | 2,753 | 1,636 | 1,117 | 625 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Database.Hitcask.Delete where
import Database.Hitcask.Types
import Database.Hitcask.Put
import Data.ByteString.Char8()
import qualified Data.HashMap.Strict as M
import Control.Concurrent.STM
delete :: Hitcask -> Key -> IO ()
delete h key = do
put h key "<<hitcask_tombstone>>... | tcrayford/hitcask | Database/Hitcask/Delete.hs | bsd-3-clause | 373 | 0 | 11 | 50 | 108 | 61 | 47 | 11 | 1 |
{-# LANGUAGE TypeFamilies, TypeSynonymInstances, FlexibleInstances,
PatternGuards, RecordWildCards #-}
-----------------------------------------------------------------------------
-- |
-- Module : Blip.Compiler.Compile
-- Copyright : (c) 2012, 2013, 2014 Bernie Pope
-- License : BSD-style
-- Maintainer ... | bjpop/blip | blipcompiler/src/Blip/Compiler/Compile.hs | bsd-3-clause | 60,092 | 19 | 24 | 14,052 | 12,651 | 6,320 | 6,331 | 1,060 | 17 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
module Ivory.OS.FreeRTOS.Tower.Time
( time_module
) where
import Ivory.Language
import Ivory.Tower
import qualified Ivory.OS.FreeRTOS.Time as T
time_module :: Module
time_module = package "tower_time" $ do
T.moddef
incl getTimeProc
where
getTimePr... | GaloisInc/ivory-tower-stm32 | tower-freertos-stm32/src/Ivory/OS/FreeRTOS/Tower/Time.hs | bsd-3-clause | 595 | 0 | 17 | 113 | 178 | 95 | 83 | 18 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: $HEADER$
-- Description: Type restricted variants of functions from Data.Function
-- module, and more.
-- Copyright: (c) 2015, Peter Trško
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: experimental
-- Portabili... | trskop/type-proxies | src/Data/Proxy/Function.hs | bsd-3-clause | 3,724 | 0 | 9 | 744 | 441 | 278 | 163 | 45 | 1 |
{-|
Module : Data.Boltzmann.Internal.Logging
Description : Basic logging utilities.
Copyright : (c) Maciej Bendkowski, 2017-2021
License : BSD3
Maintainer : maciej.bendkowski@tcs.uj.edu.pl
Stability : experimental
General logging utilities.
-}
module Data.Boltzmann.Internal.Logging
( Log(..)... | maciej-bendkowski/boltzmann-brain | Data/Boltzmann/Internal/Logging.hs | bsd-3-clause | 2,721 | 0 | 14 | 785 | 837 | 435 | 402 | 75 | 2 |
{-# LANGUAGE LambdaCase, OverloadedStrings #-}
module Transformations.EffectMap
( effectMap
) where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid
import Data.Functor.Foldable as Foldable
import qualified Data.Foldable
import Lens.M... | andorp/grin | grin/src/Transformations/EffectMap.hs | bsd-3-clause | 3,131 | 0 | 24 | 686 | 1,135 | 588 | 547 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module Language.C.Analysis.TypeCheck where
import Control.Monad
import Data.Either
import Data.Maybe
import Language.C.Data.Ident
import Language.C.Data.Node
import Language.C.Data.Position
import Language.C.Pretty
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
impor... | jthornber/language-c-ejt | src/Language/C/Analysis/TypeCheck.hs | bsd-3-clause | 19,649 | 0 | 21 | 5,388 | 6,745 | 3,287 | 3,458 | 379 | 17 |
module Widgets.Settings where
data Setting = Cast | Reflection
deriving (Enum, Ord, Eq, Show) | Zielon/Bounce | src/Widgets/Settings.hs | bsd-3-clause | 98 | 0 | 6 | 18 | 35 | 20 | 15 | 3 | 0 |
-- for TokParsing, MonadicParsing
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
-- {-# OPTIONS_GHC -Wall #-}
-- {-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- {-# OPTIONS_GHC -fno-warn-orphans #-}
-- {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-- {-# OPTION... | reuleaux/pire | src/Pire/Parser/Telescope.hs | bsd-3-clause | 6,543 | 0 | 15 | 1,949 | 1,224 | 655 | 569 | 120 | 1 |
module ImportDict2 where
data A a = MkA a deriving Show
y = x
x = 3 | roberth/uu-helium | test/correct/ImportDict2.hs | gpl-3.0 | 69 | 0 | 6 | 18 | 27 | 17 | 10 | 4 | 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="hr-HR">
<title>Support for the Open API Specification | ZAP Extension</title>
<maps>
<homeI... | veggiespam/zap-extensions | addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 1,000 | 80 | 66 | 164 | 423 | 214 | 209 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ViewPatterns#-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUA... | s9gf4ult/yesod | yesod-core/test/RouteSpec.hs | mit | 13,258 | 0 | 22 | 4,237 | 2,993 | 1,543 | 1,450 | 212 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[StgSyn]{Shared term graph (STG) syntax for spineless-tagless code generation}
This data type represents programs just before code generation (conversion to
@Cmm@): basically, what we have is a stylised form of @CoreSyntax@, the style
being one that... | mettekou/ghc | compiler/stgSyn/StgSyn.hs | bsd-3-clause | 26,796 | 0 | 16 | 7,677 | 3,655 | 1,951 | 1,704 | 304 | 2 |
--
-- Copyright (c) 2012 Citrix Systems, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This progra... | jean-edouard/manager | disksync/DiskSync.hs | gpl-2.0 | 4,919 | 0 | 17 | 1,153 | 1,128 | 606 | 522 | 98 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
@DsMonad@: monadery used in desugaring
-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- instance MonadThings is necessarily an orphan
module DsMonad (
DsM, mapM, mapAndUnzipM,
... | acowley/ghc | compiler/deSugar/DsMonad.hs | bsd-3-clause | 17,977 | 2 | 19 | 5,874 | 3,332 | 1,793 | 1,539 | 288 | 5 |
module A4 where
import D4
main = (sumFun [1 .. 4]) + (sum (map (f 1) [1 .. 7]))
| SAdams601/HaRe | old/testing/generaliseDef/A4_AstOut.hs | bsd-3-clause | 81 | 0 | 11 | 20 | 54 | 31 | 23 | 3 | 1 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE AutoDeriveTypeable, StandaloneDeriving #-}
-------------------------------------------------------------------------------
-- |
-- Module : System.Timeout
-- Copyright : (c) The University of Glasgow 2007
-- License : BSD-style (see the file librari... | jtojnar/haste-compiler | libraries/ghc-7.10/base/System/Timeout.hs | bsd-3-clause | 5,589 | 0 | 20 | 1,456 | 641 | 355 | 286 | 52 | 4 |
import Data.Ratio -- 1.3
import Data.Array -- 1.3
infix 1 =:
(=:) a b = (a,b)
main = putStr (shows sub_b "\n")
where
sub_b :: Array Int Double
sub_b = ixmap (102, 113) id b
b :: Array Int Double
b = fmap ( \ r -> fromRational r / pi )
(ixmap (101,200) (\ i -> toInt... | sdiehl/ghc | testsuite/tests/array/should_run/arr013.hs | bsd-3-clause | 507 | 0 | 14 | 198 | 232 | 126 | 106 | 13 | 1 |
module T7145a ( Applicative(pure) ) where
| urbanslug/ghc | testsuite/tests/rename/should_compile/T7145a.hs | bsd-3-clause | 43 | 0 | 5 | 7 | 13 | 9 | 4 | 3 | 0 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.RTCRtpTransceiver
(setDirection, stop, getMid, getMidUnsafe, getMidUnchecked,
getSender, getReceiver, get... | ghcjs/jsaddle-dom | src/JSDOM/Generated/RTCRtpTransceiver.hs | mit | 3,842 | 0 | 12 | 542 | 837 | 481 | 356 | -1 | -1 |
import Prelude hiding (and, concat, elem)
and :: [Bool] -> Bool
--ad [] = True
--ad (b : bs) = b && ad bs
--and [] = True
--and (b : bs)
-- | b = and bs
-- | otherwise = False
--and [] = False
--and (b : bs) = b && and bs
--and [] = False
--and (b : bs) = b && and bs
--and [] = True
--and (b : bs)
-- | b ... | supermitch/learn-haskell | edx-fp101x/5_hw.hs | mit | 1,625 | 0 | 11 | 464 | 587 | 326 | 261 | 33 | 1 |
module BACnet.TagSpec where
import BACnet.Tag.Core
import BACnet.Tag.Reader
import Test.Hspec
import BACnet.Reader
-- TODO: Remove the readAPTag tests. Remove the function as well.
spec :: Spec
spec =
describe "readNullAPTag" $
it "returns () for input [0x00]" $
run readNullAPTag [0x00] `shouldBe` NullAP
| michaelgwelch/bacnet | test/BACnet/TagSpec.hs | mit | 320 | 0 | 8 | 56 | 67 | 39 | 28 | 10 | 1 |
module Location where
import Control.Applicative
import Data.List ( sortBy )
import Data.Map ( Map )
import Data.Maybe ( mapMaybe, isNothing )
import Data.Set ( Set )
import Data.Tree ( Tree(Node), Forest )
import Text.JSON
import qualified Data.Graph as Graph
import qualified Data.Map as Map
import qualified Data.Set ... | Soares/tagwiki | src/Location.hs | mit | 2,077 | 0 | 10 | 462 | 850 | 453 | 397 | 43 | 2 |
module Rebase.Data.Word
(
module Data.Word
)
where
import Data.Word
| nikita-volkov/rebase | library/Rebase/Data/Word.hs | mit | 71 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
--------------------------------------------------------------------------------
-- |
-- Module : Network.MQTT.Topic
-- Copyright : (c) Lars Petersen 2016
-- License : MIT
--
-- Maintainer : info@lars-petersen.net
--... | lpeterse/haskell-mqtt | src/Network/MQTT/Message/Topic.hs | mit | 6,114 | 0 | 17 | 1,475 | 1,915 | 1,015 | 900 | 150 | 2 |
module Y2016.M11.D29.Solution where
import Control.Arrow ((&&&), second)
import Data.Time
-- below imports is available at 1HaskellADay git repository
import Control.List (weave)
import Control.Presentation (laxmi)
import Control.Scan.CSV (csv)
import Y2016.M11.D28.Solution
{--
One of the things about a time-series... | geophf/1HaskellADay | exercises/HAD/Y2016/M11/D29/Solution.hs | mit | 3,038 | 0 | 16 | 552 | 484 | 270 | 214 | -1 | -1 |
-- -------------------------------------------------------------------------------------
-- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved.
-- For email, run on linux (perl v5.8.5):
-- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0... | cbrghostrider/Hacking | HackerRank/Mathematics/Probability/palindromeExpectation.hs | mit | 3,645 | 0 | 15 | 754 | 1,006 | 549 | 457 | 56 | 2 |
module Tak.Range (makeRange, asTuple, shiftRange, startPos, endPos) where
import Tak.Types
import Tak.Util
makeRange :: Pos -> Pos -> Range
makeRange p0 p1 =
Range (min p0 p1) (max p0 p1)
asTuple :: Range -> (Pos, Pos)
asTuple r = let Range p0 p1 = r in (p0, p1)
shiftRange :: Range -> Pos -> Range
(Range p0 p1... | sixohsix/tak | src/Tak/Range.hs | mit | 476 | 0 | 9 | 104 | 230 | 125 | 105 | 14 | 1 |
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-}
-- | Reexports "Data.Functor.Compose.Compat"
-- from a globally unique namespace.
module Data.Functor.Compose.Compat.Repl (
module Data.Functor.Compose.Compat
) where
import "this" Data.Functor.Compose.Compat
| haskell-compat/base-compat | base-compat/src/Data/Functor/Compose/Compat/Repl.hs | mit | 312 | 0 | 5 | 31 | 31 | 24 | 7 | 5 | 0 |
{- |
Module: $Header$
Description: Testing the OpenTheory standard theory library
License: MIT
Maintainer: Joe Leslie-Hurd <joe@gilith.com>
Stability: provisional
Portability: portable
-}
module Main
( main )
where
import OpenTheory.Primitive.Natural
import OpenTheory.Primitive.Test
assertion0 :: Bool
assertion0 =... | gilith/opentheory | data/haskell/opentheory-primitive/src/Test.hs | mit | 1,153 | 0 | 8 | 269 | 274 | 140 | 134 | 25 | 1 |
module AbstractInterpreter where
import LabeledAst
import Data.Set (Set, member, union, unions)
import qualified Data.Set as Set
import Data.Map (Map, singleton, (!), insert)
import qualified Data.Map as Map
import Control.Monad.State
import Parser
data Closure = Closure LAst ContextEnvironment
deriving ... | fiigii/AbstractInterpretation | AbstractInterpreter.hs | mit | 4,550 | 0 | 18 | 1,427 | 1,677 | 844 | 833 | 110 | 2 |
module Examples.Combined where
import Control.Effects.Eff
import Control.Effects.Exception
import Control.Effects.Reader
import Control.Effects.Search
import Control.Monad
testPrg = do
v <- ask
x <- choose [1..(v :: Int)]
when (x < 5) $ searchFail (T :: T Int)
y <- choose [3,4]
let d = x - y
if d == 0
... | edofic/effect-handlers | test/Examples/Combined.hs | mit | 936 | 0 | 12 | 261 | 345 | 177 | 168 | 27 | 2 |
-- |
-- Module : $Header$
-- Description : The compiler pipeline
-- Copyright : (c) Sebastian Ertel and Justus Adam 2017. All Rights Reserved.
-- License : EPL-1.0
-- Maintainer : sebastian.ertel@gmail.com, dev@justus.science
-- Stability : experimental
-- Portability : portable
-- This source code is lic... | ohua-dev/ohua-core | core/src/Ohua/Compile.hs | epl-1.0 | 4,001 | 0 | 15 | 806 | 956 | 479 | 477 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, StandaloneDeriving #-}
{-| Implementation of opcodes parameters.
These are defined in a separate module only due to TemplateHaskell
stage restrictions - expressions defined in the current module can't
be passed to splices. So we have to either parameters/repeat each
parameter definition ... | ribag/ganeti-experiments | src/Ganeti/OpParams.hs | gpl-2.0 | 53,110 | 0 | 16 | 9,229 | 9,528 | 5,287 | 4,241 | 1,464 | 3 |
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-}
module Turing.Machine where
-- $Id$
import Machine.Class
import Machine.Akzeptieren
import qualified Challenger as C
import qualified Machine.Acceptor.Type as A
import Turing.Type
import Turing.Konfiguration
import Turing.Nachfolger ( folgekonfiguration... | Erdwolf/autotool-bonn | src/Turing/Machine.hs | gpl-2.0 | 2,214 | 5 | 15 | 533 | 426 | 222 | 204 | 35 | 0 |
module Language where
import Control.Spoon -- spoon
---- Grammatical states ----
data Number = S | P deriving (Show, Eq)
data Gender = M | F | N deriving (Show, Eq)
data Person = FirstPerson | SecondPerson | SecondPersonFormal | ThirdPerson deriving (Show, Eq)
-- This typeclass links the cases of different language... | Fedjmike/ngen | language.hs | gpl-3.0 | 1,892 | 6 | 12 | 389 | 697 | 380 | 317 | -1 | -1 |
-- Copyright (c) 2014 Contributors as noted in the AUTHORS file
--
-- This file is part of frp-arduino.
--
-- frp-arduino 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
-... | frp-arduino/frp-arduino | src/Arduino/Internal/CodeGen/C.hs | gpl-3.0 | 19,583 | 0 | 29 | 6,618 | 6,102 | 2,911 | 3,191 | 433 | 21 |
module ATP.Util.Tuple
( map2
, map3
, map4
, map9
, map10
)
where
map2 :: (a -> b) -> (a, a) -> (b, b)
map2 f (a1, a2) = (f a1, f a2)
map3 :: (a -> b) -> (a, a, a) -> (b, b, b)
map3 f (a1, a2, a3) = (f a1, f a2, f a3)
map4 :: (a -> b) -> (a, a, a, a) -> (b, b, b, b)
map4 f (a1, a2, a3, a4) = (f a1, f... | andre-artus/handbook-of-practical-logic-and-automated-reasoning-haskell | src/ATP/Util/Tuple.hs | gpl-3.0 | 722 | 0 | 7 | 228 | 594 | 348 | 246 | 16 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/UnassignInstance.hs | mpl-2.0 | 3,498 | 0 | 9 | 711 | 352 | 217 | 135 | 47 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Genomics.Ty... | rueshyna/gogol | gogol-genomics/gen/Network/Google/Genomics/Types/Product.hs | mpl-2.0 | 223,832 | 0 | 27 | 54,330 | 39,026 | 22,521 | 16,505 | 4,276 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-redis/gen/Network/Google/Resource/Redis/Projects/Locations/List.hs | mpl-2.0 | 6,113 | 0 | 19 | 1,442 | 962 | 556 | 406 | 133 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/ApplyUpdatesToInstances.hs | mpl-2.0 | 5,677 | 0 | 18 | 1,249 | 550 | 327 | 223 | 100 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/Annotations/Delete.hs | mpl-2.0 | 5,315 | 0 | 18 | 1,325 | 857 | 498 | 359 | 122 | 1 |
module Utils.Zip where
import qualified Codec.Archive.Zip as Zip
import qualified Network.HTTP.Client as Client
import Utils.Http as Http
extract :: FilePath -> Http.Handler ()
extract destination request manager =
let
zipOpts = [Zip.OptDestination destination]
in do
response <- Client.httpLbs request ... | johnpmayer/elm-protoc | app/Utils/Zip.hs | agpl-3.0 | 439 | 0 | 15 | 74 | 124 | 66 | 58 | 12 | 1 |
-- Copyright 2020 Google LLC
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in ... | google/cabal2bazel | bzl/tests/proto/GeneratedTest.hs | apache-2.0 | 742 | 0 | 6 | 117 | 51 | 38 | 13 | 4 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-
Copyright 2016 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, V... | nomeata/codeworld | codeworld-game-server/src/CodeWorld/GameServer.hs | apache-2.0 | 9,778 | 0 | 19 | 2,507 | 3,004 | 1,531 | 1,473 | 233 | 2 |
{- |
Module : Cantor.Parser.AST
Copyright : Copyright (C) 2014 Krzysztof Langner
License : BSD3
Maintainer : Krzysztof Langner <klangner@gmail.com>
Stability : alpha
Portability : portable
AST model for java source code
-}
module Cantor.Parser.AST ( Class
, Function
,... | klangner/cantor | src/Cantor/Parser/AST.hs | bsd-2-clause | 2,020 | 0 | 10 | 719 | 397 | 225 | 172 | 37 | 1 |
{-# LANGUAGE NumDecimals #-}
import Gauge.Main
import Data.Default.Class
import qualified Data.Vector.Unboxed as U
import Text.Printf
import System.Random (randomIO)
import qualified Numeric.Sum as Sum
import Numeric.SpecFunctions
import Numeric.Polynomial
import Numeric.RootFinding
-- Uniformly sample logGamma per... | Shimuuar/math-functions | bench/bench.hs | bsd-2-clause | 3,673 | 0 | 19 | 1,460 | 1,363 | 751 | 612 | 93 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE PatternGuards #-}
module Main where
import Control.Applicative
import Control.Monad (guard)
import Control.Lens
import Data.List (nub)
import Data.Map as M
import Data.Maybe (fromMaybe)
import Data.Vector as B
import Data.Vector.Unboxed as U
import Data.Vector.Hybrid as H
... | ekmett/sparse | tests/properties.hs | bsd-2-clause | 1,514 | 0 | 16 | 270 | 595 | 316 | 279 | -1 | -1 |
module Data.Text.Prettyprint.Doc {-# DEPRECATED "Use \"Prettyprinter\" instead." #-} (
module Prettyprinter
) where
import Prettyprinter
| quchen/prettyprinter | prettyprinter/src/Data/Text/Prettyprint/Doc.hs | bsd-2-clause | 142 | 0 | 4 | 20 | 18 | 13 | 5 | 3 | 0 |
{-# LANGUAGE CPP, TypeOperators,
FlexibleInstances,
ScopedTypeVariables,
MultiParamTypeClasses,
KindSignatures #-}
{- 2012 Joel Svensson -}
module Intel.ArBB.Vector where
import qualified Data.Vector.Storable as V
import qualified Data.Vector.Storable.Mutable a... | svenssonjoel/EmbArBB | Intel/ArBB/Vector.hs | bsd-3-clause | 3,089 | 0 | 10 | 775 | 702 | 386 | 316 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Stack.PackageDump
( Line
, eachSe... | hesselink/stack | src/Stack/PackageDump.hs | bsd-3-clause | 15,600 | 0 | 27 | 5,098 | 3,972 | 2,032 | 1,940 | 357 | 8 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Traduisons.Types where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Concurrent.MVar
import Data.Aeson
import Data.ByteString.Char8
import qualified Data.Map as M
-- | The 'Traduisons' Monad gives you a sta... | johntyree/traduisons-hs | src/Traduisons/Types.hs | bsd-3-clause | 4,438 | 0 | 11 | 1,022 | 789 | 455 | 334 | 81 | 1 |
{-# LANGUAGE ForeignFunctionInterface, CPP #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Core32
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : ... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core32.hs | bsd-3-clause | 2,292 | 1 | 11 | 230 | 292 | 218 | 74 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Graph where
import Data.Text (pack,unpack)
import Graphics.Blank
import Control.Arrow hiding (loop)
import System.Random
import GHC.Float
import LinReg
import Data.List
lsrf :: Int -> [(Float,Float)] -> [Float]
lsrf o l = map double2Float $ lsr o (map (float2Double *** float2... | sordina/CanvasGraph | Graph.hs | bsd-3-clause | 3,038 | 0 | 18 | 940 | 1,338 | 698 | 640 | 75 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Test.Framework.TH (defaultMainGenerator)
import Test.HUnit
import Test.Framework.Providers.HUnit (testCase)
import Test.QuickCheck
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Euler.Problem16 (sumDigitsPowerOfTwo)
main = $(defaultMainG... | FranklinChen/project-euler-haskell | Test/Test16.hs | bsd-3-clause | 376 | 0 | 6 | 41 | 81 | 50 | 31 | 11 | 1 |
{-# LANGUAGE RecursiveDo #-}
module Main where
import LOGL.Application
import Foreign.Ptr
import Graphics.UI.GLFW as GLFW
import Graphics.Rendering.OpenGL.GL as GL hiding (normalize)
import Graphics.GLUtil
import System.FilePath
import Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects
import Linear.Matrix
import Lin... | atwupack/LearnOpenGL | app/1_Getting-started/7_Camera/Camera-zoom.hs | bsd-3-clause | 7,283 | 0 | 18 | 1,992 | 2,336 | 1,203 | 1,133 | 157 | 5 |
{-# LANGUAGE OverloadedStrings, NamedFieldPuns #-}
module ReferenceTests where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Base64 as Base64
import qualified Data.ByteString.Base64.URL as Base64url
import qualified Data.ByteSt... | thoughtpolice/binary-serialise-cbor | tests/ReferenceTests.hs | bsd-3-clause | 11,016 | 0 | 16 | 2,589 | 3,696 | 2,257 | 1,439 | 201 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Routing(
routing
)where
import Control.Monad.IO.Class(MonadIO,liftIO)
import Control.Monad.Trans
import Control.Monad.Reader
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import qualified Data.Map as M
import qualified Data.ByteS... | DavidAlphaFox/sblog | src/Routing.hs | bsd-3-clause | 1,868 | 0 | 15 | 325 | 528 | 286 | 242 | 51 | 3 |
tarai :: Int -> Int -> Int -> Int
tarai x y z
| x <= y = y
| otherwise = tarai (tarai (x-1) y z)
(tarai (y-1) z x)
(tarai (z-1) x y)
main :: Stream -> Stream
main stdin = toStream $ show $ tarai 122 52 10
| tromp/hs2blc | examples/tarai.hs | bsd-3-clause | 265 | 0 | 10 | 111 | 139 | 69 | 70 | 8 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances #-}
module NewTypes where
class TooMany a where
tooMany :: a -> Bool
instance TooMany Int where
tooMany n = n > 42
newtype Goats = Goats Int deriving (Show, TooMany)
{- not needed anymore as pragma GeneralizedNewtypeDeriving is used above
instance TooMa... | chengzh2008/hpffp | src/ch11-AlgebraicDataTypes/newTypes.hs | bsd-3-clause | 688 | 0 | 8 | 142 | 185 | 103 | 82 | -1 | -1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Mafia.Process
( -- * Inputs
File
, Directory
, Argument
, EnvKey
... | ambiata/mafia | src/Mafia/Process.hs | bsd-3-clause | 17,052 | 0 | 17 | 4,110 | 4,838 | 2,537 | 2,301 | 393 | 3 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack48 #-}
module Games.Chaos2010.Database.Creature_pieces where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout
type Creature_pieces =
Record
(HCons (LVPair Ptype (Expr (Maybe String)))
(... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Creature_pieces.hs | bsd-3-clause | 832 | 0 | 27 | 226 | 272 | 142 | 130 | 17 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.