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 RefacIntroPattern(introPattern, introCase, foldPattern) where
import TypeCheck
import PrettyPrint
import PosSyntax
import AbstractIO
import Data.Maybe
import TypedIds
import UniqueNames hiding (srcLoc)
import PNT
import TiPNT
import Data.List
import RefacUtils hiding (getParams)
import PFE0 (findFile, allFiles,... | kmate/HaRe | old/refactorer/RefacIntroPattern.hs | bsd-3-clause | 46,058 | 0 | 26 | 16,651 | 13,613 | 6,846 | 6,767 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.Command.VCS.Common
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL Nothing
--
-- Maintainer : maintainer@leksah.org
-- Stability : ... | 573/leksah | src/IDE/Command/VCS/Common.hs | gpl-2.0 | 7,260 | 0 | 19 | 2,193 | 1,445 | 744 | 701 | 112 | 5 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.ST.Safe
-- Copyright : (c) The University of Glasgow 2011
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stabil... | jtojnar/haste-compiler | libraries/ghc-7.10/array/Data/Array/ST/Safe.hs | bsd-3-clause | 961 | 0 | 5 | 178 | 66 | 53 | 13 | 9 | 0 |
module Foo () where
import Language.Haskell.Liquid.Prelude (choose)
prop = if x < 0 then bar x else x
where x = choose 0
{-@ bar :: Nat -> Nat @-}
bar :: Int -> Int
bar x = x
{-@ bar :: a -> {v:Int | v = 9} @-}
bar :: a -> Int
bar _ = 8
| mightymoose/liquidhaskell | tests/neg/LocalSpec.hs | bsd-3-clause | 263 | 0 | 7 | 85 | 85 | 49 | 36 | 8 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.SetWMName
-- Copyright : © 2007 Ivan Tarasov <Ivan.Tarasov@gmail.com>
-- License : BSD
--
-- Maintainer : Ivan.Tarasov@gmail.com
-- Stability : experimental
-- Portability : unportable
--
-- S... | pjones/xmonad-test | vendor/xmonad-contrib/XMonad/Hooks/SetWMName.hs | bsd-2-clause | 4,831 | 0 | 20 | 1,027 | 792 | 410 | 382 | 56 | 2 |
{-# LANGUAGE TypeInType #-}
module T11648b where
import Data.Proxy
data X (a :: Proxy k)
| ezyang/ghc | testsuite/tests/polykinds/T11648b.hs | bsd-3-clause | 92 | 0 | 6 | 18 | 23 | 15 | 8 | -1 | -1 |
module A (f, y) where
import B.C (T(..))
f (T x) = x
y = T 42
| siddhanathan/ghc | testsuite/tests/rename/prog006/A.hs | bsd-3-clause | 67 | 0 | 7 | 22 | 48 | 28 | 20 | 4 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DefaultSignatures #-}
module GFunctor (
-- * Generic Functor class
GFunctor(..)
) where
import GHC.Generics
--------------------------------------------------------------------------------
-- Generi... | urbanslug/ghc | testsuite/tests/generics/GFunctor/GFunctor.hs | bsd-3-clause | 1,449 | 0 | 11 | 342 | 594 | 302 | 292 | 33 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Hpack.UtilSpec (main, spec) where
import Data.Aeson
import Data.Aeson.QQ
import Data.Aeson.Types
import Helper
import System.Directory
import Hpack.Config
import Hpack.Util
mai... | phunehehe/hpack | test/Hpack/UtilSpec.hs | mit | 6,657 | 0 | 21 | 2,081 | 1,663 | 815 | 848 | 160 | 1 |
{-# LANGUAGE
ScopedTypeVariables,
TupleSections,
OverloadedStrings
#-}
{-
The compactor does link-time optimization. It is much simpler
than the Optimizer, no fancy dataflow analysis here.
Optimizations:
- rewrite all variables starting with h$$ to shorter names,
... | ghcjs/ghcjs | src/Gen2/Compactor.hs | mit | 57,974 | 0 | 22 | 18,073 | 19,235 | 9,806 | 9,429 | -1 | -1 |
import Control.Monad.State
import System.Random
type GeneratorState = State StdGen
data Tree a =
Node a [Tree a]
deriving (Show)
vertexNumWithEqualValAndDegree :: Tree Int -> Int
vertexNumWithEqualValAndDegree tree =
let
func (Node a [])
| a == 0 = 1
| otherwise = 0
func (Node a childs)
| a == (leng... | agsh/hs3-lab | Baladurin Constantine (var 11)/lab3.hs | mit | 2,697 | 27 | 27 | 639 | 1,226 | 604 | 622 | 85 | 2 |
module Graphics.Urho3D.UI.Internal.CheckBox(
CheckBox
, checkBoxCntx
, sharedCheckBoxPtrCntx
, SharedCheckBox
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import Graphics.Urho3D.Container.Ptr
import qualified Data.Ma... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/UI/Internal/CheckBox.hs | mit | 516 | 0 | 11 | 89 | 120 | 80 | 40 | -1 | -1 |
module Unison.PrettyTerminal where
import Unison.Util.Less (less)
import qualified Unison.Util.Pretty as P
import qualified Unison.Util.ColorText as CT
import qualified System.Console.Terminal.Size as Terminal
import Data.List (dropWhileEnd)
import Data.Char (isSpace)
stripS... | unisonweb/platform | parser-typechecker/src/Unison/PrettyTerminal.hs | mit | 1,611 | 0 | 13 | 312 | 567 | 279 | 288 | 41 | 2 |
{-# LANGUAGE MultiWayIf #-}
module Data.Bitsplit.Calc
(deleteSplit, upsertSplit, deduct) where
import Data.Bitsplit.Types
import Data.Ratio
import Data.Natural
import Data.List (partition, genericLength)
import Data.Set (fromList, member)
import Debug.Trace
traceMessage :: (Show a) => String -> a -> a
traceMessage mes... | micmarsh/bitsplit-hs | src/Data/Bitsplit/Calc.hs | mit | 2,409 | 0 | 14 | 676 | 868 | 459 | 409 | 54 | 3 |
{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-}
module Expression where
import Text.Parsec hiding (many, (<|>))
import Control.Applicative
import Text.Parsec hiding (many, (<|>))
import Data.Functor.Identity (Identity)
import Data.Text (Text)
import qualified Data.Map as M
import Data.Maybe (f... | danchoi/dsvt | Expression.hs | mit | 4,427 | 0 | 19 | 997 | 1,279 | 664 | 615 | 86 | 2 |
{-# LANGUAGE RankNTypes, FlexibleContexts #-}
{-# LANGUAGE TupleSections #-}
module Turnip.Eval.Util where
import Turnip.Eval.Types
import Control.Lens
import qualified Data.Map as Map (lookup, empty, lookupMax, split, findMin, notMember, null)
import Data.Map
import Control.Monad.Except (throwError)
getFunctionData... | bananu7/Turnip | src/Turnip/Eval/Util.hs | mit | 4,562 | 0 | 15 | 984 | 1,408 | 697 | 711 | -1 | -1 |
module Day13 where
import Data.List
type Feelings = [(String, String, Int)]
parse :: String -> Feelings
parse = map (go . words . init) . lines
where go :: [String] -> (String, String, Int)
go [name, _, "lose", num, _, _, _, _, _, _, to] = (name, to, (- readInt num))
go [name, _, "gain", num, _, _... | cirquit/Personal-Repository | Haskell/Playground/AdventOfCode/advent-coding/src/Day13.hs | mit | 1,893 | 1 | 15 | 583 | 813 | 439 | 374 | 47 | 3 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.Headers
(append, delete, get, get_, getUnsafe, getUnchecked, has, has_,
set, Headers(..), gTypeHeaders)
... | ghcjs/jsaddle-dom | src/JSDOM/Generated/Headers.hs | mit | 3,683 | 0 | 14 | 595 | 1,038 | 580 | 458 | -1 | -1 |
{-|
Module : Database.Orville.PostgreSQL.Internal.QueryKey
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
{-# LANGUAGE CPP #-}
module Database.Orville.PostgreSQL.Internal.QueryKey where
import Database.Orville.PostgreSQL.Internal.MappendCompat ((<>))
import Data.Time.LocalTime
import Datab... | flipstone/orville | orville-postgresql/src/Database/Orville/PostgreSQL/Internal/QueryKey.hs | mit | 4,695 | 0 | 9 | 754 | 1,743 | 878 | 865 | 107 | 1 |
-- |
-- Module : Elrond.Client
-- Description :
-- Copyright : (c) Jonatan H Sundqvist, 2015
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental|stable
-- Portability : POSIX (not sure)
--
-- Created December 22 2015
-- TODO | -
-- -
-- SPEC | -
-- -
------... | SwiftsNamesake/Elrond | src/Elrond/Client.hs | mit | 2,363 | 0 | 15 | 262 | 257 | 149 | 108 | 20 | 1 |
{-|
Module : CatNPlus.App
Description : Application entrypoint for catnplus
Copyright : (C) Richard Cook, 2017
Licence : MIT
Maintainer : rcook@rcook.org
Stability : experimental
Portability : portable
-}
module CatNPlus.App (runApp) where
import CatNPlus.KeyPress
import Control.Exce... | rcook/catnplus | src/CatNPlus/App.hs | mit | 2,076 | 0 | 25 | 622 | 602 | 305 | 297 | 45 | 2 |
module Data.CTG1371.Encoder ( encodeCTG
, CTGData(..)
, CTGStatus(..)
, SignalQuality(..)
, FetalMovement(..)
, HR(..)
, HR1(..)
... | danplubell/CTG1371 | library/Data/CTG1371/Encoder.hs | mit | 918 | 0 | 7 | 439 | 160 | 109 | 51 | 19 | 1 |
module Class2 where
data String
data Bool = True | False
class Show a where
show :: a -> String
instance Show Bool
false x = show False
falseFn x = show (x False)
show' x = show x
| Lemmih/haskell-tc | tests/Class2.hs | mit | 188 | 0 | 7 | 47 | 81 | 41 | 40 | -1 | -1 |
module Kind
where
import Data.Maybe (isNothing, fromJust)
import Types
import Utils
maxNumChildren :: Kind a -> Int
maxNumChildren (ArrayFold _ _ c) = length c
maxNumChildren (Bind _ _ _ _) = 2
maxNumChildren (Const _) = 0
maxNumChildren (Freeze _ _ _) = 1
maxNumChildren Invalid = 0
maxNumC... | JenniferWang/incremental-haskell | src/Kind.hs | mit | 1,930 | 0 | 13 | 708 | 800 | 410 | 390 | 38 | 2 |
power2 :: Num a => [a] -> [a]
power2 [] = []
power2 (x:xs) = (x^2):power2 xs
-- let geopro n = last $ take n (iterate (*2) 1)
apply :: (a -> a) -> Int -> a -> a
apply f 0 x = x
apply f n x = apply f (n - 1) (f x)
geopro n = \n -> apply (*2) (n-1) 1
insert :: Ord a => a -> [a] -> [a]
insert x [] = [x]
insert x ... | dalonng/hellos | haskell.hello/higherOrderFunction.hs | gpl-2.0 | 661 | 2 | 8 | 195 | 462 | 240 | 222 | 21 | 1 |
{-# OPTIONS_HADDOCK ignore-exports #-}
-- |This module provides methods to build a cyclic half-edge data structure
-- from an already parsed obj mesh file. As such, it depends on details
-- of the parsed data.
--
-- In particular, 'indirectHeFaces', 'indirectHeVerts' and 'indirectToDirect'
-- assume specific structure... | hasufell/CGA | Graphics/HalfEdge.hs | gpl-2.0 | 8,486 | 0 | 16 | 2,399 | 1,519 | 873 | 646 | 121 | 6 |
module Cryptography.ComputationalProblems.Games.Abstract.Macro where
import Types
import Macro.MetaMacro
import Functions.Application.Macro
import Logic.PropositionalLogic.Macro
-- * Games
-- ** Winning condition
wins_ :: Note
wins_ = omega
wins :: Note -> Note -> Note
wins... | NorfairKing/the-notes | src/Cryptography/ComputationalProblems/Games/Abstract/Macro.hs | gpl-2.0 | 722 | 0 | 7 | 172 | 205 | 123 | 82 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Intelligence (DB, createDatabase, generateLine) where
import Control.Applicative ((<$>))
import Control.Monad ((=<<), mapM)
import Control.Monad.Random (Rand, RandomGen, evalRandIO, getRandomR)
import Data.Maybe (maybe)
import qualified Data.Map.Strict as M
import qualified Da... | Rembane/mrShoe | src/Intelligence.hs | gpl-3.0 | 3,188 | 0 | 15 | 769 | 945 | 508 | 437 | 46 | 2 |
-- Author: Viacheslav Lotsmanov
-- License: GPLv3 https://raw.githubusercontent.com/unclechu/xlib-keys-hack/master/LICENSE
{-# LANGUAGE ScopedTypeVariables, RankNTypes, BangPatterns #-}
{-# LANGUAGE DeriveGeneric, DeriveAnyClass, TemplateHaskell #-}
module Options
( Options (..)
, HasOptions (..)
, Erg... | unclechu/xlib-keys-hack | src/Options.hs | gpl-3.0 | 28,704 | 0 | 15 | 8,971 | 3,184 | 1,875 | 1,309 | -1 | -1 |
module Main where
import Elocmd
import Elovalo
import Effects
import Interface.JsonRpc
-- This is a test only
main = do
elo <- initElocmd "/dev/ttyUSB0"
sendFrame elo $ singleIntensity elo 0.5
runJsonRpc 8080 elo
| elovalo/helovalo | src/Main.hs | gpl-3.0 | 222 | 0 | 8 | 42 | 57 | 29 | 28 | 9 | 1 |
{-# LANGUAGE BangPatterns #-}
-- Copyright : (c) Nikolay Orlyuk 2012
-- License : GNU GPLv3 (see COPYING)
module FRP.Yampa.GLUT.InternalUI where
import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT.Callbacks
data UI = GlutDisplay
| GlutReshape !Size
| GlutMotion !Position
| GlutP... | ony/yampa-glut | FRP/Yampa/GLUT/InternalUI.hs | gpl-3.0 | 465 | 0 | 7 | 107 | 81 | 46 | 35 | 27 | 0 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #... | jyp/inox | C/Deep.hs | gpl-3.0 | 5,323 | 0 | 25 | 1,433 | 2,141 | 1,088 | 1,053 | 125 | 9 |
-- Hplayground Ajax control is de-inverted. This means that ajax request follows the
-- normal flow. there is no need to se hup a response handler for each request
-- ajax is just a monadic statement in the Widget monad.
--
-- This example make use of the web service por compilation of tryplayground and
-- show the res... | agocorona/tryhplay | examples/ajax.hs | gpl-3.0 | 597 | 0 | 11 | 101 | 73 | 44 | 29 | 4 | 1 |
module Fault
( FaultLevel(Error, Warning)
, Fault(Fault)
, MaybeAst
) where
import Syntax as S
data FaultLevel = Error | Warning deriving (Eq, Show, Ord)
data Fault = Fault { faultLevel :: FaultLevel
, faultReason :: String
, faultContext :: String
... | mbelicki/valdemar | src/Fault.hs | gpl-3.0 | 445 | 0 | 9 | 137 | 126 | 79 | 47 | 15 | 0 |
{-# LANGUAGE OverloadedStrings, GADTs, ScopedTypeVariables #-}
{-|
Description: Generate a new SVG file from the database graph representation.
This module is responsible for taking the database representation of a graph
and creating a new SVG file.
This functionality is used both to create SVG for the Graph compone... | cchens/courseography | hs/Svg/Generator.hs | gpl-3.0 | 14,743 | 0 | 20 | 6,108 | 2,999 | 1,581 | 1,418 | 250 | 8 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.WebmasterTools.Types.Sum
-- Copyright : (c) 2015-2016 ... | brendanhay/gogol | gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Sum.hs | mpl-2.0 | 617 | 0 | 5 | 101 | 35 | 29 | 6 | 8 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Environments/Sessions/EntityTypes/Delete.hs | mpl-2.0 | 6,485 | 0 | 15 | 1,256 | 706 | 416 | 290 | 114 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Environments/Experiments/List.hs | mpl-2.0 | 7,043 | 0 | 18 | 1,519 | 886 | 514 | 372 | 137 | 1 |
module Kernel.Conversion where
import Kernel.Universe
import Kernel.Term
import Kernel.Env
import Kernel.KernelMonad
import Kernel.Reduce
import Control.Applicative
universeLe :: UnivExpr -> UnivExpr -> Kernel Bool
universeLe = go 0
where
go n UnivExpr0 UnivExpr0 | n >= 0 = return True
go n (UnivExprVar v1)... | kik/ToyPr | src/Kernel/Conversion.hs | apache-2.0 | 2,118 | 0 | 13 | 696 | 1,006 | 497 | 509 | 46 | 11 |
-- |
-- Module : Criterion.Main
-- Copyright : (c) 2009-2014 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- Wrappers for compiling and running benchmarks quickly and easily.
-- See 'defaultMain' below for an example.
mo... | osa1/criterion | Criterion/Main.hs | bsd-2-clause | 7,712 | 0 | 17 | 1,863 | 1,162 | 678 | 484 | 81 | 5 |
{-# OPTIONS_GHC -Wall #-}
module Primitives
( primitiveEnv )
where
import Control.Exception.Base
import qualified Data.HashMap.Lazy as Map
import SExpr
-- Error thrown when the number of arguments to a functions is wrong.
airityError :: IO SExpr
airityError = (return . Err) "Wrong airity!"
-... | mtsch/basic-lisp | src/Primitives.hs | bsd-2-clause | 4,865 | 0 | 11 | 1,564 | 1,427 | 750 | 677 | 87 | 1 |
module ZHelpers where
import System.ZMQ
import System.Random
import Numeric (showHex)
import Control.Monad (foldM)
import Control.Applicative ((<*>))
import Data.ByteString.Char8 (pack, unpack, ByteString, cons, empty)
import Data.Char (ord)
import Text.Printf (printf)
import qualified Data.ByteString as B
-- Not Ta... | krattai/noo-ebs | docs/zeroMQ-guide2/examples/Haskell/zhelpers.hs | bsd-2-clause | 2,546 | 0 | 17 | 611 | 978 | 487 | 491 | 58 | 2 |
{-# LANGUAGE PatternGuards #-}
module Idris.CaseSplit(splitOnLine, replaceSplits,
getClause, getProofClause,
mkWith,
nameMissing,
getUniq, nameRoot) where
-- splitting a variable in a pattern clause
import Idris.AbsSyntax
imp... | DanielWaterworth/Idris-dev | src/Idris/CaseSplit.hs | bsd-3-clause | 16,001 | 0 | 22 | 6,171 | 5,659 | 2,807 | 2,852 | 309 | 15 |
-- | A thread-safe DNS library for both clients and servers written
-- in pure Haskell.
-- The Network.DNS module re-exports all other exposed modules for
-- convenience.
-- Applications will most likely use the high-level interface, while
-- library/daemon authors may need to use the lower-level one.
-- ED... | kazu-yamamoto/dns | Network/DNS.hs | bsd-3-clause | 1,688 | 0 | 5 | 326 | 141 | 106 | 35 | 17 | 0 |
{-# LANGUAGE DataKinds, NoPolyKinds #-}
module T11334 where
import Data.Functor.Compose
import Data.Proxy
p = Proxy :: Proxy 'Compose
| mcschroeder/ghc | testsuite/tests/dependent/should_fail/T11334.hs | bsd-3-clause | 137 | 0 | 6 | 21 | 29 | 18 | 11 | 5 | 1 |
module Y2017.Day02 (answer1, answer2) where
import Data.List (sort)
import qualified Control.Foldl as F
answer1, answer2 :: IO ()
answer1 = print $ sum $ map diff input
answer2 = print $ sum $ map ((\(a, b) -> b `div` a) . findDivisors) input
diff :: [Int] -> Int
diff xs =
let f = (,) <$> F.maximum <*> F.minimu... | geekingfrog/advent-of-code | src/Y2017/Day02.hs | bsd-3-clause | 2,462 | 0 | 15 | 597 | 1,294 | 815 | 479 | 40 | 4 |
{-#LANGUAGE ViewPatterns, NamedFieldPuns#-}
module Distribution.HBrew.DepGraph
( Graph, isUserPkg
, Node, packageInfo, cabalFile
, flatten
, lookupNodesFuzzy
, ancestor
, makeConfigGraph, makeProcedure
) where
import System.FilePath
import Data.Map (Map)
import qualifi... | philopon/hbrew | src/Distribution/HBrew/DepGraph.hs | bsd-3-clause | 8,408 | 1 | 29 | 2,855 | 2,803 | 1,482 | 1,321 | 162 | 3 |
-----------------------------------------------------------------------------
-- TIMonad: Type inference monad
--
-- 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 program is di... | elben/typing-haskell-in-haskell | TIMonad.hs | bsd-3-clause | 2,433 | 0 | 16 | 784 | 862 | 452 | 410 | 47 | 1 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, StandaloneDeriving, OverloadedStrings #-}
module Main where
import QueryArrow.QueryPlan
import QueryArrow.DB.DB
import QueryArrow.DB.ResultStream
import QueryArrow.Syntax.Term
import QueryArrow.Parser
import QueryArrow.SQL.SQL
import qualified QueryArrow.Mappi... | xu-hao/QueryArrow | QueryArrow-db-cypher/test/Test.hs | bsd-3-clause | 12,674 | 0 | 18 | 2,843 | 2,185 | 1,105 | 1,080 | 125 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Legal (legalPlayer) where
import GGP.Player
import GGP.Utils
import Language.GDL
firstMove :: State -> GGP () ()
firstMove st = do
Match {..} <- get
let moves = legal matchDB st matchRole
liftIO $ putStrLn $ "LEGAL: " ++ show (head moves)
setBest $ head moves
liftIO $... | ian-ross/ggp | players/Legal.hs | bsd-3-clause | 426 | 0 | 10 | 82 | 151 | 76 | 75 | 14 | 1 |
{-# LANGUAGE TypeSynonymInstances
, FlexibleInstances
, ScopedTypeVariables
, RankNTypes
#-}
module Spire.Surface.PrettyPrinter (prettyPrint , prettyPrintError) where
import Spire.Canonical.Embedder
import Spire.Canonical.Types
import Spire.Expression.Embedder
import Spire.Ex... | spire/spire | src/Spire/Surface/PrettyPrinter.hs | bsd-3-clause | 12,316 | 0 | 17 | 3,448 | 3,622 | 1,853 | 1,769 | 241 | 2 |
-----------------------------------------------------------------------------
--
-- Module : Main
-- Copyright : 2012 (c) Mahmut Bulut
-- License : AllRightsReserved
--
-- Maintainer : Mahmut Bulut
-- Stability : unstable
-- Portability :
--
-- |
--
---------------------------------------------------... | vertexclique/sandlib | src/Test.hs | bsd-3-clause | 527 | 1 | 10 | 83 | 87 | 59 | 28 | -1 | -1 |
module Safe.Length where
import Data.Proxy (Proxy(..))
safeLength :: (Foldable f) => Proxy (f a) -> f a -> Int
safeLength _ f = length f
list :: Proxy [a]
list = Proxy
| stepcut/safe-length | src/Safe/Length.hs | bsd-3-clause | 171 | 0 | 9 | 35 | 83 | 45 | 38 | 6 | 1 |
{-# LANGUAGE RecursiveDo #-}
-- This financial model is described in
-- Vensim 5 Modeling Guide, Chapter Financial Modeling and Risk.
--
-- It illustrates how you can use the Monte-Carlo simulation and
-- define external parameters for the system of recursive diffential
-- equations to provide the Sensitivity Analy... | dsorokin/aivika-experiment-chart | examples/Financial/Model.hs | bsd-3-clause | 7,623 | 0 | 15 | 2,328 | 1,117 | 603 | 514 | 124 | 1 |
-- Copyright 2012 Wu Xingbo
-- head {{{
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
-- }}}
-- module export {{{
module Eval.Node (
SockNode,
SockHandler,
directSockNode,
startSockNode,
stopSockNode,
sendRequest,
sendRequestSafe,
sendRequestMaybe,
putBSL,
getBSL,
putObject,
getObj... | wuxb45/eval | Eval/low/Node.hs | bsd-3-clause | 5,927 | 0 | 15 | 1,291 | 1,923 | 1,021 | 902 | 147 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
module AUTOSAR.Shared.Velocity
( VelocityCtrl(..)
, velocityCtrl
) where
import AUTOSAR.ARSim
import Control.Monad
-- * Velocity estimation
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- | The velocity estimation algorithm requires whee... | josefs/autosar | ARSim/arsim-examples/AUTOSAR/Shared/Velocity.hs | bsd-3-clause | 6,303 | 0 | 23 | 2,138 | 1,035 | 526 | 509 | 82 | 4 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE EmptyDataDecls, ScopedTypeVariables, KindSignatures #-}
{-# LANGUAGE UndecidableInstances, ExistentialQuantification #-}
-- | Haskell with only one typeclass
--
-- <http://okmij.org/ftp/Hask... | suhailshergill/liboleg | Data/Class2.hs | bsd-3-clause | 9,903 | 38 | 14 | 2,129 | 2,860 | 1,580 | 1,280 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Lucid.Foundation.Buttons.SplitButtons where
import Lucid.Base
import Lucid.Html5
import qualified Data.Text as T
import Data.Monoid
split_ :: T.Text
split_ = " split "
| athanclark/lucid-foundation | src/Lucid/Foundation/Buttons/SplitButtons.hs | bsd-3-clause | 214 | 0 | 5 | 30 | 44 | 29 | 15 | 8 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LA... | GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/TypedCrucible.hs | bsd-3-clause | 188,001 | 156 | 46 | 45,020 | 44,621 | 22,647 | 21,974 | -1 | -1 |
module Main( main ) where
import System.Environment( getArgs )
import Language.Elm.TH
import Language.Haskell.TH
main = do
(infile:_) <- getArgs
result <- runQ $ do
let options = Options True [] [] "Main"
LitE (StringL str) <- translateToElm options infile
return str
putStrLn result | JoeyEremondi/haskelm | src/Haskelm.hs | bsd-3-clause | 307 | 0 | 15 | 66 | 116 | 58 | 58 | 11 | 1 |
{-# LANGUAGE OverloadedStrings, TypeFamilies, PackageImports #-}
import Control.Applicative
import Control.Monad
import Control.Concurrent
import "crypto-random" Crypto.Random
import TestClient
import Data.HandleLike
import Control.Concurrent.STM
import qualified Data.ByteString as BS
import System.IO
import Command... | YoshikuniJujo/peyotls | peyotls/test/testClient.hs | bsd-3-clause | 2,992 | 43 | 20 | 503 | 1,103 | 577 | 526 | 87 | 1 |
-- |Functions for fetching player/character data from the lodestone
module Data.Krile.Sharlayan.User (Character(..), findChar, expandCharacter)
where
import Text.HTML.TagSoup
import Network.Protocol.HTTP.Parser
import Control.Monad.TakeWhileM
import Data.Time.Clock
import Data.List.Split
import Data.Maybe ... | callummance/libsharlayan | src/Data/Krile/Sharlayan/User.hs | bsd-3-clause | 5,024 | 0 | 14 | 1,463 | 1,272 | 691 | 581 | 89 | 2 |
module Main where
import Control.Monad.IO.Class
import Servant.Client
import Servant.API
import Data.Proxy
import Options.Applicative
import Control.Applicative
import Data.Monoid
import Data.Maybe
import Network.HTTP.Client (newManager, defaultManagerSettings, Manager)
import API
url = BaseUrl Http "localhost" 8... | cl04/rest1 | hask-rest1/app/Client.hs | bsd-3-clause | 1,213 | 0 | 13 | 270 | 388 | 200 | 188 | 32 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module BCalib.Event
( module X
, Event(..)
, runNumber, eventNumber, mu
, leptons, jets, met
, eventHs
, lepFlavorChannels
, lepChargeChannels
, nJetChannels
, o... | cspollard/bcalib | src/BCalib/Event.hs | bsd-3-clause | 5,334 | 0 | 16 | 1,370 | 1,696 | 926 | 770 | 116 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Data.OpenSRS.Types.Domain where
import Data.Map
import Data.OpenSRS.Types.Common
import Data.Time
--------------------------------------------------------------------------------
-- | Domain Record
data Domain = Domain {
domainName :: DomainName,
domainAutoR... | anchor/haskell-opensrs | lib/Data/OpenSRS/Types/Domain.hs | bsd-3-clause | 1,478 | 0 | 9 | 355 | 333 | 193 | 140 | 38 | 0 |
-- | Conversion to raster forms.
--
-- TODO: the reverse.
module Propane.Raster
( rasterize
, rastimate
) where
import qualified Data.Sequence as S
import qualified Data.Colour as C
import qualified Data.Colour.SRGB as C
import qualified Data.Array.Repa as R
import Data.Array.Repa ( Z(..), (:.)(..... | kmcallister/propane | Propane/Raster.hs | bsd-3-clause | 1,681 | 0 | 14 | 451 | 646 | 359 | 287 | 35 | 5 |
{-
This is the entry point to actually building the modules in a package. It
doesn't actually do much itself, most of the work is delegated to
compiler-specific actions. It does do some non-compiler specific bits like
running pre-processors.
-}
module Distribution.Simple.Build (
build,
initialBuildSteps,
... | IreneKnapp/Faction | libfaction/Distribution/Simple/Build.hs | bsd-3-clause | 13,354 | 0 | 34 | 4,589 | 2,663 | 1,396 | 1,267 | 233 | 8 |
-----------------------------------------------------------------------------
--
-- Module : Transient.Move
-- Copyright :
-- License : MIT
--
-- Maintainer : agocorona@gmail.com
-- Stability :
-- Portability :
--
-- | @transient-universe@ extends the seamless composability of concurrent
-- ... | agocorona/transient-universe | src/Transient/Move.hs | mit | 3,677 | 0 | 5 | 614 | 279 | 214 | 65 | 20 | 0 |
{-
Type name: qualified names for register types
Part of Mackerel: a strawman device definition DSL for Barrelfish
Copyright (c) 2011, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writ... | kishoredbn/barrelfish | tools/mackerel/TypeName.hs | mit | 1,389 | 0 | 9 | 293 | 304 | 158 | 146 | 23 | 1 |
module SendTrap
( sendTrap
, pendingFin
) where
import SNMPTrapType
import Control.Concurrent
import Network.Socket
import Network.Socket.ByteString
import qualified Data.ByteString as B
sendTrap :: MVar Int -> Int -> Int -> SockAddr -> (SNMPTrap, B.ByteString) -> IO ()
sendTrap fin sent intval server (trap, msg) =... | IMOKURI/bulk-snmptrap-tool | src/SendTrap.hs | mit | 970 | 0 | 18 | 220 | 355 | 175 | 180 | 28 | 2 |
module End.Global.Object where
import End.Collection
import End.Collection.Header
import End.Constant.Settings
import End.Function.Object
import Graphics.UI.SDL
import End.Area.Tile
fpsToInt :: (Integral a, Num b) => a -> b
fpsToInt f = fromIntegral (1000 `div` f)
nextFrame :: Object o SpriteStatus => AAction -> o -... | kwrooijen/sdl-game | End/Global/Object.hs | gpl-3.0 | 3,398 | 0 | 19 | 1,005 | 1,572 | 787 | 785 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module CC.ShellCheck.Types where
import CC.Types
import Control.Applicative
import Data.Aeson
import qualified Data.Map.Strict as DM
import qualified Data.Text as T
--------------------------------------------------------------------------------
-- | ... | filib/codeclimate-shellcheck | src/CC/ShellCheck/Types.hs | gpl-3.0 | 814 | 0 | 9 | 149 | 137 | 78 | 59 | 15 | 0 |
-- Copyright 2017 Google Inc.
--
-- 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 ... | robinp/haskell-indexer | wrappers/stack-docker/test-package/src/Lib.hs | apache-2.0 | 677 | 0 | 6 | 123 | 40 | 28 | 12 | 4 | 1 |
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving, TemplateHaskell, OverloadedStrings, TypeSynonymInstances, GADTs, FlexibleInstances, MultiParamTypeClasses #-}
module Model where
import Yesod.Persist
import Database.Persist.Base (DeleteCascade (..))
import Yesod.Content (HasReps (..), toContent)
impo... | snoyberg/yesodwiki | Model.hs | bsd-2-clause | 2,220 | 0 | 11 | 399 | 607 | 341 | 266 | 46 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.InstallDirs
-- Copyright : Isaac Jones 2003-2004
-- License : BSD3
--
-- Maintainer : cabal-de... | randen/cabal | Cabal/Distribution/Simple/InstallDirs.hs | bsd-3-clause | 23,729 | 2 | 16 | 6,590 | 4,602 | 2,583 | 2,019 | 395 | 10 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
module Ros.Sensor_msgs.JoyFeedback where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.... | acowley/roshask | msgs/Sensor_msgs/Ros/Sensor_msgs/JoyFeedback.hs | bsd-3-clause | 1,762 | 1 | 12 | 354 | 518 | 294 | 224 | 44 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
module Stack.Options.Completion
( ghcOptsCompleter
, targetCompleter
, flagCompleter
, projectExeCompleter
) where
import Data.Char (isSpace)
import ... | MichielDerhaeg/stack | src/Stack/Options/Completion.hs | bsd-3-clause | 4,421 | 2 | 23 | 1,230 | 1,131 | 608 | 523 | 97 | 4 |
module Tandoori.Typing.Substitute where
-- module Tandoori.Ty.Substitute (Substitution, substCTy, addSubst, emptySubst, substTy) where
import Tandoori.Typing
import Control.Monad
import Control.Monad.RWS
import qualified Data.Map as Map
import qualified Data.Set as Set
newtype Subst = S (Map.Map Tv Ty)
emptySubs... | bitemyapp/tandoori | src/Tandoori/Typing/Substitute.hs | bsd-3-clause | 1,079 | 0 | 10 | 302 | 383 | 196 | 187 | 24 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Bead.View.Headers.AcceptLanguage (
setLanguageFromAcceptLanguage
#ifdef TEST
, acceptLanguageTests
#endif
) where
import qualified Data.ByteString.Char8 as BS
import Data.List (nub, intersect)
import Data.Maybe
import ... | andorp/bead | src/Bead/View/Headers/AcceptLanguage.hs | bsd-3-clause | 3,407 | 0 | 19 | 759 | 732 | 386 | 346 | 49 | 3 |
module MediaWiki.API.Query.WatchList.Import where
import MediaWiki.API.Types
import MediaWiki.API.Utils
import MediaWiki.API.Query.WatchList
import Text.XML.Light.Types
import Control.Monad
import Data.Maybe
stringXml :: String -> Either (String,[{-Error msg-}String]) WatchListResponse
stringXml s = parseDoc xml s
... | HyperGainZ/neobot | mediawiki/MediaWiki/API/Query/WatchList/Import.hs | bsd-3-clause | 1,616 | 0 | 12 | 405 | 586 | 294 | 292 | 47 | 1 |
module WhereIn1 where
--A definition can be lifted from a where or let into the surronding binding group.
--Lifting a definition widens the scope of the definition.
--In this example, lift 'sq' in 'sumSquares'
--This example aims to test add parameters to 'sq'.
sumSquares x y = (sq pow) x + (sq pow) y
... | SAdams601/HaRe | old/testing/liftOneLevel/WhereIn1_TokOut.hs | bsd-3-clause | 433 | 0 | 8 | 126 | 98 | 51 | 47 | 7 | 1 |
{-# OPTIONS -cpp #-}
module Map (
Map,
empty, singleton,
lookup, findWithDefault,
insert,
union, unionWith,
map,
fromList, toList
) where
import Prelude hiding (lookup, map)
#if __GLASGOW_HASKELL__ >= 603 || !__GLASGOW_HASKELL__
import Data.Map
#else
import Data.FiniteMap
type Map k a = FiniteM... | k0001/gtk2hs | tools/c2hs/base/general/Map.hs | gpl-3.0 | 1,135 | 0 | 5 | 297 | 60 | 41 | 19 | 11 | 0 |
module LiftToToplevel.A2 where
import LiftToToplevel.C2
main = sumSquares [1..4] + anotherFun [1..4]
| kmate/HaRe | test/testdata/LiftToToplevel/A2.hs | bsd-3-clause | 108 | 0 | 7 | 19 | 36 | 20 | 16 | 3 | 1 |
{-# LANGUAGE CPP #-}
#define MODULE_NAME Windows
#define IS_WINDOWS True
#include "Internal.hs"
| juhp/stack | test/integration/tests/mutable-deps/files/filepath-1.4.2.1/System/FilePath/Windows.hs | bsd-3-clause | 105 | 0 | 2 | 21 | 6 | 5 | 1 | 1 | 0 |
module Imp where
{-@ inline implies @-}
implies p q = (not p) || q
| mightymoose/liquidhaskell | tests/pos/implies.hs | bsd-3-clause | 69 | 0 | 7 | 17 | 25 | 14 | 11 | 2 | 1 |
-- If care is not taken when aborting a fixed-point iteration, wrong absentness
-- information escapes
-- Needs to be a product type
data Stream = S Int Stream
bar :: Int -> Stream -> Int
bar n s = foo n s
where
foo :: Int -> Stream -> Int
foo 0 (S n s) = 0
foo i (S n s) = n + foo (i-1) s
{-# NOINLINE b... | ezyang/ghc | testsuite/tests/stranal/should_run/T12368.hs | bsd-3-clause | 649 | 0 | 17 | 185 | 298 | 147 | 151 | 16 | 2 |
-- /tmp/panic.hs
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}
module T11254 wh... | ezyang/ghc | testsuite/tests/typecheck/should_compile/T11254.hs | bsd-3-clause | 548 | 0 | 10 | 127 | 115 | 64 | 51 | 15 | 0 |
-- Generate.hs
module Graphter.Generate where
import Graphter.Representation
import Data.List
--
-- Generate complete graph
--
completeGraph :: Type -> Int -> Graph
completeGraph graphType vertexCount = Graph graphType vertices
[uncurry Edge edge 0 | edge <-
if (==) graphType Directed
then edges
... | martinstarman/graphter | src/Graphter/Generate.hs | mit | 1,434 | 0 | 12 | 382 | 507 | 275 | 232 | 24 | 2 |
module Cmm.CmmMachOp where
import Cmm.CmmType
data MachOp
= MO_Add Width
| MO_Sub Width
| MO_Eq Width
| MO_NE Width
| MO_Mul Width
-- Signed comparisons
| MO_S_Ge Width
| MO_S_Le Width
| MO_S_Gt Width
| MO_S_Lt Width
-- Unsigned comparisons
| MO_U_Ge Width
| MO_U_L... | C-Elegans/linear | Cmm/CmmMachOp.hs | mit | 2,590 | 0 | 6 | 873 | 386 | 243 | 143 | 84 | 0 |
-- Esolang Interpreters #1 - Introduction to Esolangs and My First Interpreter (MiniStringFuck)
-- https://www.codewars.com/kata/586dd26a69b6fd46dd0000c0
module MiniStringFuck where
import Data.Char (chr)
myFirstInterpreter :: String -> String
myFirstInterpreter = reverse . snd . foldl (\(m, o) c -> if c == '.' then... | gafiatulin/codewars | src/6 kyu/MiniStringFuck.hs | mit | 401 | 0 | 14 | 64 | 123 | 74 | 49 | 4 | 2 |
applyTwice :: (a -> a) -> a -> a
applyTwice f x = f (f x)
zipWith' :: (a -> b -> c) -> [a] -> [b] -> [c]
zipWith' _ [] _ = []
zipWith' _ _ [] = []
zipWith' f (x:xs) (y:ys) = f x y : zipWith' f xs ys | v0lkan/learning-haskell | higher-order.hs | mit | 199 | 0 | 8 | 54 | 151 | 78 | 73 | 6 | 1 |
-- | Translation from Agda internal terms to the target logic.
{-# LANGUAGE CPP #-}
{-# LANGUAGE UnicodeSyntax #-}
module Apia.Translation.Terms
( agdaTermToFormula
, agdaTermToTerm
) where
------------------------------------------------------------------------------
import Apia.Prelude
import Ag... | asr/apia | src/Apia/Translation/Terms.hs | mit | 19,060 | 0 | 21 | 5,338 | 4,044 | 2,101 | 1,943 | 321 | 20 |
module Language.Haskell.TypeCheck.Pretty
( Pretty(..)
, parensIf
, module Text.PrettyPrint.ANSI.Leijen
) where
import Text.PrettyPrint.ANSI.Leijen hiding (Pretty(..))
class Pretty a where
prettyPrec :: Int -> a -> Doc
prettyPrec _ = pretty
pretty :: a -> Doc
pretty = prettyPrec 0
{-# MINIMAL prettyP... | Lemmih/haskell-tc | src/Language/Haskell/TypeCheck/Pretty.hs | mit | 486 | 0 | 8 | 98 | 155 | 88 | 67 | 16 | 1 |
module Y2020.M10.D14.Solution where
{--
I really hate wikidata sometimes.
The query:
# Continents/Countries
SELECT ?continent ?continentLabel ?country ?countryLabel
# ?region ?regionLabel # ?particularRegion ?particularRegionLabel
WHERE
{
?continent wdt:P31 wd:Q5107.
?country wdt:P31 wd:Q6256.
# ?region... | geophf/1HaskellADay | exercises/HAD/Y2020/M10/D14/Solution.hs | mit | 3,117 | 0 | 14 | 567 | 605 | 336 | 269 | 37 | 2 |
module Fao.Bot where
import Data.List (sortBy, intercalate)
import Data.Maybe (fromJust)
import Control.Monad.State (get)
import System.Log.FastLogger
import Control.Monad.IO.Class (liftIO)
import Fao.Pathfinding
import Fao.Goal
import Fao.Types
import Fao.Utils
bot :: Bot
bot = Bot { initialize = return ()
... | ksaveljev/vindinium-bot | Fao/Bot.hs | mit | 1,644 | 0 | 27 | 610 | 468 | 240 | 228 | 38 | 5 |
{-# LANGUAGE TupleSections #-}
module Board where
import Data.List
import Data.Maybe
import Data.Function
import Data.Monoid
import Control.Arrow
import Control.Monad
import qualified Data.Map.Strict as Map
import Data.Easy (monoidToMaybe)
import qualified Stone
type Position = (Char, Char) -- (X, Y)
type Board = M... | wh11e7rue/heversi | src/Board.hs | mit | 2,767 | 0 | 17 | 552 | 861 | 480 | 381 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
------------------------------------------------------------------------------
-- |
-- Module : Mahjong.Hand
-- Copyright : (C) 2014 Samuli Thomasson
-- License : MIT (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi>
-- Stabili... | SimSaladin/hajong | hajong-server/src/Mahjong/Hand.hs | mit | 13,545 | 0 | 17 | 3,805 | 3,244 | 1,682 | 1,562 | -1 | -1 |
module Bonawitz_3_16a
where
import Blaze
import Tree
-- Actual data with means generated from N(0.5,1.2)
-- > c(rnorm(5,-0.36),rnorm(3,1.52),rnorm(7,1.13))
-- [1] 0.47292825 0.75540756 -1.88129332 -2.27875185 -0.42945479
-- [6] 1.27713236 1.52884804 1.11515755 0.85932051 0.68070500
-- [11] 2.10720307 -0.0... | othercriteria/blaze | Bonawitz_3_16a.hs | mit | 2,384 | 0 | 14 | 573 | 686 | 398 | 288 | 36 | 1 |
-- Tying the loop
-- ref: | Airtnp/Freshman_Simple_Haskell_Lib | Idioms/Tying-the-loop.hs | mit | 26 | 0 | 2 | 6 | 4 | 3 | 1 | 1 | 0 |
module BlocVoting.Instructions.ModRes where
import qualified Data.ByteString as BS
import qualified BlocVoting.Nulldata as ND
import BlocVoting.Bitcoin.Address
import BlocVoting.Bitcoin.Base58
import BlocVoting.Binary (get4ByteInt, get1ByteInt)
data OpModRes = OpModRes {
mrCategories :: Int
, mrEndTimestamp ::... | XertroV/blocvoting | src/BlocVoting/Instructions/ModRes.hs | mit | 1,076 | 0 | 10 | 224 | 352 | 190 | 162 | 26 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.