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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Monoid.Colorful
import Data.Foldable
import Text.Printf
ansiColors :: [Color]
ansiColors = [ DefaultColor
, Black
, Red
, Green
, Yellow
, Blue
, Magenta
, Cyan
... | minad/colorful-monoids | example.hs | mit | 3,982 | 0 | 23 | 1,223 | 1,593 | 748 | 845 | 115 | 2 |
import Control.Monad.Except
import System.IO
import System.Environment
import PISA
import Parser
import ClassAnalyzer
import ScopeAnalyzer
import TypeChecker
import CodeGenerator
import MacroExpander
import Data.List.Split
type Error = String
main :: IO ()
main =
do args <- getArgs
when (null args) (erro... | cservenka/ROOPLPPC | src/ROOPLPPC.hs | mit | 967 | 0 | 16 | 199 | 270 | 135 | 135 | 30 | 2 |
{-# LANGUAGE OverlappingInstances, TemplateHaskell, DeriveDataTypeable, StandaloneDeriving #-}
module HeapSort.Data where
import HeapSort.Tree
import HeapSort.Operation
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Size
import Data.Typeable
import Data.Derive.All
$(derives [makeEq,makeOrd] [''Operation,... | Erdwolf/autotool-bonn | src/HeapSort/Data.hs | gpl-2.0 | 1,341 | 0 | 9 | 296 | 344 | 197 | 147 | 33 | 0 |
{- |
Module : $Header$
Description : create legal THF mixfix identifier
Copyright : (c) A. Tsogias, DFKI Bremen 2011
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Alexis.Tsogias@dfki.de
Stability : provisional
Portability : portable
translations for the buildins of HasCasl
-}
module TH... | nevrenato/Hets_Fork | THF/HasCASL2THF0Buildins.hs | gpl-2.0 | 7,250 | 0 | 18 | 2,349 | 2,188 | 1,207 | 981 | 187 | 2 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module Modular.Config where
import Network.XmlRpc.Internals
import Autolib.ToDoc
import Data.Typeable
data Config =
Config { contents :: String
}
deriving Typeable
instance XmlRpcType ( Config ) where
toValue d = toValue [("contents",toValue ... | Erdwolf/autotool-bonn | src/Modular/Config.hs | gpl-2.0 | 554 | 5 | 11 | 126 | 163 | 87 | 76 | 16 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
module Diagram where
import GHC.TypeLits
--
import Control.Applicative
import Data.Hashable
import qualified Data.HashSet as H
import Data.List (find)
import qualified Data.Map as M
import Data.Maybe ... | wavewave/qft | old/lib/Diagram.hs | gpl-3.0 | 2,983 | 0 | 14 | 956 | 1,039 | 579 | 460 | 62 | 1 |
module NESDL (sdlInit, draw, getKeys, quitHandler) where
import Graphics.UI.SDL as SDL
import Control.Monad (forM_, forever)
import Data.Word
import System.IO.Unsafe (unsafeInterleaveIO)
import Types hiding (Pixel)
import Prelude hiding (Left, Right)
-- Initialize the system.
sdlInit :: IO ()
sdlInit = do
SDL.ini... | tobsan/yane | NESDL.hs | gpl-3.0 | 2,244 | 0 | 16 | 765 | 831 | 420 | 411 | 60 | 17 |
module Main (main) where
import Cli (main)
| ciderpunx/rsstwit | app/Main.hs | gpl-3.0 | 44 | 0 | 5 | 8 | 17 | 11 | 6 | 2 | 0 |
{-# LANGUAGE FlexibleInstances, UndecidableInstances,BangPatterns#-}
module HPseudoBool
(Var(..),
Sum(..),
Line(..),
emptySum,
(|==|),
(|>=|),
(|<=|),
(|*|),
(|<|),
(|>|),
getEncoding,
newVar,
newVars,
sumC,
Constraint(..),
PBencM,
PBencState(..),
add,
comment,
... | EJahren/HPseudoBool | src/HPseudoBool.hs | gpl-3.0 | 5,282 | 0 | 14 | 1,519 | 2,585 | 1,332 | 1,253 | 153 | 3 |
-- Simple Fay program for drawing a barnsley fern
-- values are hardcoded because I'm lazy and still
-- trying to work out how to use Fay
--
-- Robert 'Probie' Offner
import Prelude
import FFI
data IFS = IFS [(Probability, Transition)]
deriving Show
data Transition = Affine Double Double Double Double Double Dou... | LudvikGalois/Fay-IFS | Sierpinski.hs | gpl-3.0 | 2,729 | 0 | 12 | 641 | 995 | 515 | 480 | -1 | -1 |
{-# LANGUAGE TemplateHaskell #-}
-- Copyright (C) 2010-2012 John Millikin <john@john-millikin.com>
--
-- 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 3 of the License, or
-- a... | jotrk/haskell-dbus | tests/DBusTests/InterfaceName.hs | gpl-3.0 | 2,574 | 14 | 15 | 483 | 609 | 311 | 298 | 50 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/Versions/Instances/Delete.hs | mpl-2.0 | 7,135 | 0 | 24 | 1,821 | 1,093 | 633 | 460 | 157 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games/gen/Network/Google/Resource/Games/Applications/Get.hs | mpl-2.0 | 5,707 | 0 | 19 | 1,368 | 868 | 505 | 363 | 125 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-iam/gen/Network/Google/Resource/IAM/Organizations/Roles/Patch.hs | mpl-2.0 | 6,507 | 0 | 17 | 1,331 | 873 | 515 | 358 | 122 | 1 |
-- Example 11 - the union of a square and a circle.
import Graphics.Implicit
out = union [
rectR 0 (-40,-40) (40,40),
translate (40,40) (circle 30) ]
main = writeSVG 2 "example11.svg" out
| krakrjak/ImplicitCAD | Examples/example11.hs | agpl-3.0 | 205 | 0 | 9 | 50 | 73 | 40 | 33 | 5 | 1 |
{-# LANGUAGE FlexibleInstances #-}
-- | REPL Parser
-- parses interpret commands
--
module CoALPj.REPL.Parser (
parseCmd
, cmdInfo
, replCompletion
) where
import Control.Applicative
import Control.Monad.IO.Class (MonadIO)
import Control.Arrow ((***))
import Data.Maybe (fromJust)
import Data.Monoid (Monoid,memp... | frantisekfarka/CoALP | inter/CoALPj/REPL/Parser.hs | lgpl-3.0 | 8,197 | 168 | 24 | 1,780 | 2,702 | 1,493 | 1,209 | 201 | 4 |
cnst :: [String] -> (String,[Int])
cnst [n,b,w] =
let b' = read b :: Int
w' = read w :: Int
in
(n, [w' - b' + 1, w'])
solv :: [(String,[Int])] -> Int -> String
solv t w =
let f = filter (\ (n,[s,e]) -> (w >= s) && (e >= w) ) t
in
if f == []
then "Unknown"
else
... | a143753/AOJ | 2242.hs | apache-2.0 | 827 | 0 | 15 | 337 | 482 | 257 | 225 | 27 | 2 |
-- Copyright 2016 David Edwards
--
-- 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 wr... | davidledwards/rpn-haskell | src/Token.hs | apache-2.0 | 1,759 | 0 | 7 | 316 | 376 | 211 | 165 | 50 | 1 |
module Web.Socdiff.FB.FB where
import qualified Data.Text as T
import Facebook
import Haxl.Core
import Web.Socdiff.FB.DataSource
-- | Fetch a list of friends for the given user id
getFriends :: T.Text -> GenHaxl u [T.Text]
getFriends u = dataFetch (GetFriends (Id u))
| relrod/socdiff | src/Web/Socdiff/FB/FB.hs | bsd-2-clause | 270 | 0 | 9 | 42 | 76 | 45 | 31 | 7 | 1 |
module Data.ConstIndex where
newtype ConstIndex f k a = ConstIndex { runConstIndex :: f a }
instance (Functor f) => Functor (ConstIndex f a) where
fmap f (ConstIndex ls) = ConstIndex (fmap f ls)
instance Foldable f => Foldable (ConstIndex f a) where
foldMap f (ConstIndex ls) = foldMap f ls
instance (Foldable f... | esmolanka/struct-parse | Data/ConstIndex.hs | bsd-3-clause | 438 | 0 | 8 | 83 | 181 | 94 | 87 | 8 | 0 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Config
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
-... | typelead/epm | epm/Distribution/Client/Config.hs | bsd-3-clause | 39,196 | 83 | 28 | 10,555 | 7,840 | 4,262 | 3,578 | 712 | 9 |
-----------------------------------------------------------------------------
--
-- Stg to C-- code generation: bindings
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module GHC.StgToCmm.Bind (
cgTopRhsClosure,
cgBind,
... | sdiehl/ghc | compiler/GHC/StgToCmm/Bind.hs | bsd-3-clause | 30,935 | 4 | 24 | 8,840 | 4,607 | 2,427 | 2,180 | 367 | 4 |
module Distribution.Client.Dependency.Modular.IndexConversion where
import Data.List as L
import Data.Map as M
import Data.Maybe
import Prelude hiding (pi)
import qualified Distribution.Client.PackageIndex as CI
import Distribution.Client.Types
import Distribution.Compiler
import Distribution.InstalledPackageInfo as ... | IreneKnapp/Faction | faction/Distribution/Client/Dependency/Modular/IndexConversion.hs | bsd-3-clause | 6,904 | 0 | 20 | 1,617 | 1,947 | 1,016 | 931 | 102 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module Data.FieldML.InitialModel (initialModel, blankNamespaceContents, nsBuiltinMain, nsSpecial, nsMain, biSrcSpan, nsNatural, nsInteger, reservedIDs)
where
import qualified Data.Map as M
import Data.FieldML.Level2Structure
import qualified Data.FieldML.Level1Structure as L1
biSrcS... | A1kmm/declarative-fieldml-prototype | src/Data/FieldML/InitialModel.hs | bsd-3-clause | 20,326 | 0 | 18 | 8,031 | 3,640 | 2,002 | 1,638 | 260 | 1 |
module Data.Csv.Conversion.Internal
( decimal
, realFloat
) where
import Blaze.ByteString.Builder
import Blaze.ByteString.Builder.Char8
import Data.Array.Base (unsafeAt)
import Data.Array.IArray
import qualified Data.ByteString as B
import Data.Char (ord)
import Data.Int
import Data.Monoid
import Data.Word... | sjoerdvisscher/cassava | Data/Csv/Conversion/Internal.hs | bsd-3-clause | 10,128 | 0 | 24 | 2,889 | 2,408 | 1,309 | 1,099 | 193 | 15 |
-- This is a model of the Furnace. It is described in different sources [1, 2].
--
-- [1] A. Alan B. Pritsker, Simulation with Visual SLAM and AweSim, 2nd ed.
--
-- [2] Труб И.И., Объектно-ориентированное моделирование на C++: Учебный курс. - СПб.: Питер, 2006
import Data.Maybe
import Control.Monad
import Control.Mon... | dsorokin/aivika-branches | tests/Furnace.hs | bsd-3-clause | 10,983 | 0 | 18 | 3,362 | 2,419 | 1,209 | 1,210 | 215 | 2 |
module Main where
import ClassyPrelude.Yesod hiding (Proxy, join)
import Control.Monad.Logger
import Database.Esqueleto
import Database.Persist.Sqlite
import Database.Esqueleto.Join
import Ents1
import Ents2
import Ents3
main :: IO ()
main =
runStderrLoggingT . withSqliteConn ":memory:" $ \backend ->
flip run... | pseudonom/dovetail | test/Spec.hs | bsd-3-clause | 984 | 0 | 18 | 206 | 359 | 190 | 169 | -1 | -1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
--
-- Generating machine code (instruction selection)
--
-- (c) The University of Glasgow 1996-2013
--
-----------------------------------------------------------------------------
{-# LANGUAGE GADTs #-}
module SPARC.Co... | ezyang/ghc | compiler/nativeGen/SPARC/CodeGen.hs | bsd-3-clause | 22,667 | 0 | 29 | 7,368 | 4,663 | 2,315 | 2,348 | 390 | 52 |
module Punk where
import Control.Exception.Base
import Network.Socket
main' port = do
hostaddr <- inet_addr "0.0.0.0"
asocket <- socket AF_INET Stream defaultProtocol
let sockaddr = SockAddrInet port hostaddr
bindSocket asocket sockaddr
listen asocket 1
bracket (accept asocket) (\(conn, address) -> do
... | hlian/punk | src/Punk.hs | bsd-3-clause | 471 | 0 | 12 | 148 | 147 | 71 | 76 | 16 | 1 |
-- File created: 2009-08-05 20:14:14
module Haschoo.Evaluator.Standard.Strings (procedures, isString, strToList)
where
import Control.Applicative ((<$>))
import Control.Arrow ((&&&))
import Control.Monad (join, liftM2)
import Data.Array.IArray ((!), bounds, elems)
import Data.Array.IO (IOUArray)
... | Deewiant/haschoo | Haschoo/Evaluator/Standard/Strings.hs | bsd-3-clause | 9,576 | 2 | 18 | 2,806 | 3,705 | 1,905 | 1,800 | 197 | 6 |
module Scheme.Evaluator (
eval, evalMacro,
runScm, Scm,
initScmStates,
initScmEnv,
initScmRef,
) where
import Scheme.DataType
import Scheme.Evaluator.Micro
import Scheme.Evaluator.Prelude
import Scheme.Evaluator.Prelude2
import Scheme.Evaluator.IO
import Scheme.Evaluator.Chaitin
import qualifi... | ocean0yohsuke/Scheme | src/Scheme/Evaluator.hs | bsd-3-clause | 834 | 0 | 8 | 156 | 196 | 121 | 75 | 29 | 1 |
--------------------------------------------------------------------------------
-- |
-- Module : Database.EventStore
-- Copyright : (C) 2019 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
--
----------------... | YoEight/eventstore | Database/EventStore.hs | bsd-3-clause | 5,931 | 0 | 6 | 1,424 | 847 | 596 | 251 | 185 | 0 |
module PropToBdd
( evalBdd
, synthesizeBdd
) where
import qualified Cudd
import Prop
import PropCSE
import PropEval
import HsCuddPrelude
import qualified Data.Map as Map
import Data.Map (Map, (!))
--import Debug.Trace (trace)
--import Text.Printf (printf)
evalBdd :: Assignment Int -> Cudd.Mgr -> Cudd.Bdd -> I... | bradlarsen/hs-cudd | test/PropToBdd.hs | bsd-3-clause | 3,009 | 0 | 16 | 910 | 720 | 374 | 346 | 42 | 11 |
import Data.List
import Network
import System.IO
import System.Exit
import Control.Arrow
import Control.Monad.Reader
import Control.Exception
import Text.Printf
import Bot
import Index
server = "irc.freenode.org"
port = 6667
chan = "#tutbot-testing"
nick = "tutbot"
-- The 'Net' monad, a wrapper over IO, carr... | redfish64/IrcScanner | src/IrcScanner/IRCBot.hs | bsd-3-clause | 2,261 | 0 | 13 | 591 | 705 | 353 | 352 | 58 | 2 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack52 #-}
module Games.Chaos2010.Database.Live_wizards where
import Games.Chaos2010.Database.Fields
import Games.Chaos2010.Database.Fields
import Games.Chaos2010.Database.Fields
import Games.Chaos2010.Database.Fields
import Database.H... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Live_wizards.hs | bsd-3-clause | 1,324 | 0 | 35 | 401 | 405 | 213 | 192 | 24 | 1 |
{-# LANGUAGE CPP #-}
-- | A @TimeZoneSeries@ describes a timezone by specifying the various
-- clock settings that occurred in the past and are scheduled to occur
-- in the future for the timezone.
module Data.Time.LocalTime.TimeZone.Series
(
-- * Representing a timezone
-- $abouttzs
TimeZoneSeries(..),
timeZ... | ygale/timezone-series | Data/Time/LocalTime/TimeZone/Series.hs | bsd-3-clause | 11,177 | 0 | 12 | 2,108 | 1,684 | 939 | 745 | 107 | 1 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module ... | aemxdp/playlistach | backend/Playlistach/Model/Track.hs | bsd-3-clause | 2,222 | 0 | 10 | 544 | 536 | 299 | 237 | 57 | 1 |
module Servant.API.Vault
( -- $vault
Vault
) where
import Data.Vault.Lazy (Vault)
-- $vault
--
-- | Use 'Vault' in your API types to provide access to the 'Vault'
-- of the request, which is a location shared by middlewares and applications
-- to store arbitrary data. See <https://hackage.haskel... | zerobuzz/servant | servant/src/Servant/API/Vault.hs | bsd-3-clause | 520 | 0 | 5 | 110 | 36 | 28 | 8 | 4 | 0 |
module ExpertData where
b1 = map (0 <) y1
b2 = map (0 <) y2
b3 = expand 1 3001 z1
b4 = expand 1 3001 z2
expand :: Int -> Int -> [Int] -> [Bool]
expand a b [] = replicate (b - a) False
expand a b (x:xs)
| a == b = []
| a == x = True : expand (a+1) b xs
| otherwise = False : expand (a+1) b (x:xs)
y1 = ... | cullina/Extractor | src/ExpertData.hs | bsd-3-clause | 10,630 | 0 | 9 | 3,409 | 6,459 | 4,274 | 2,185 | 1,139 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
-- | Resolving a build plan for a set of packages in a given Stacka... | rvion/stack | src/Stack/BuildPlan.hs | bsd-3-clause | 31,182 | 0 | 32 | 10,548 | 7,454 | 3,824 | 3,630 | 586 | 5 |
{-# 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-elasticache/gen/Network/AWS/ElastiCache/CreateSnapshot.hs | mpl-2.0 | 4,502 | 0 | 13 | 923 | 625 | 375 | 250 | 81 | 1 |
module FasionShow where
import Data.Char
import Data.Sequence(Seq)
import qualified Data.Sequence as S
import Control.Monad.ST
import Data.STRef
import Control.Monad
import System.Random
import Data.Vector.Unboxed (freeze, toList)
import qualified Data.Vector.Unboxed.Mutable as V
import Control.M... | lihlcnkr/codejam | src/QR/FasionShow.hs | apache-2.0 | 1,696 | 0 | 12 | 470 | 761 | 383 | 378 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Database.DSH.VSL
( module Database.DSH.VSL.Lang
, module Database.DSH.VSL.VirtualSegmentAlgebra
, module Database.DSH.Common.VectorLang
, module Database.DSH.Translate.VSL2Algebra
) where
import Database.D... | ulricha/dsh | src/Database/DSH/VSL.hs | bsd-3-clause | 794 | 0 | 6 | 173 | 129 | 90 | 39 | 17 | 0 |
-- |
-- Module : Foundation.Collection.List
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : portable
--
module Foundation.Collection.List
( wordsWhen
, revTake
, revDrop
, revSplitAt
, breakEnd
, uncons
, uns... | vincenthz/hs-foundation | foundation/Foundation/Collection/List.hs | bsd-3-clause | 1,744 | 0 | 13 | 488 | 742 | 413 | 329 | 44 | 3 |
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-}
module Parse.Type where
import Data.List (intercalate)
import Text.Parsec ((<|>), (<?>), char, choice, many, optionMaybe, string, try)
import qualified AST.Type as Type
import qualified AST.Variable as Var
import Parse.Helpers
import qualified Reporting.Annotation as... | mgold/Elm | src/Parse/Type.hs | bsd-3-clause | 2,603 | 0 | 17 | 737 | 894 | 450 | 444 | 80 | 3 |
-- | Parsers for IMAP server responses
module Network.HaskellNet.IMAP.Parsers
( eval
, eval'
, pNone
, pCapability
, pSelect
, pList
, pLsub
, pStatus
, pExpunge
, pSearch
, pFetch
)
where
import Text.Packrat.Parse hiding (space, spaces)
import Text.Packrat.Pos
import D... | lemol/HaskellNet | src/Network/HaskellNet/IMAP/Parsers.hs | bsd-3-clause | 15,800 | 0 | 20 | 6,739 | 4,729 | 2,352 | 2,377 | 338 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ranged.Boundaries
-- Copyright : (c) Paul Johnson 2006
-- License : BSD-style
-- Maintainer : paul@cogito.org.uk
-- Stability : experimental
-- Portability : portable
--
------------------------------... | beni55/alex | src/Data/Ranged/Boundaries.hs | bsd-3-clause | 7,294 | 0 | 14 | 1,961 | 1,551 | 836 | 715 | 121 | 2 |
f x = y
where
y = 2 * x
| ruchee/vimrc | vimfiles/bundle/vim-haskell/tests/indent/test015/test.hs | mit | 24 | 0 | 5 | 10 | 21 | 10 | 11 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveDataTypeab... | tedkornish/stack | src/Stack/Setup.hs | bsd-3-clause | 51,741 | 0 | 31 | 17,485 | 11,878 | 5,935 | 5,943 | 1,015 | 15 |
-- Test purpose:
-- Ensure that -Wno-compat disables a previously set -Wcompat
{-# OPTIONS_GHC -Wcompat #-}
{-# OPTIONS_GHC -Wno-compat #-}
module WCompatWarningsOnOff where
import qualified Data.Semigroup as Semi
monadFail :: Monad m => m a
monadFail = do
Just _ <- undefined
undefined
(<>) = undefined -- ... | ezyang/ghc | testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs | bsd-3-clause | 518 | 0 | 8 | 101 | 128 | 72 | 56 | 15 | 1 |
{-# LANGUAGE PatternGuards #-}
module Idris.CaseSplit(splitOnLine, replaceSplits,
getClause, getProofClause,
mkWith,
nameMissing,
getUniq, nameRoot) where
-- splitting a variable in a pattern clause
import Idris.AbsSyntax
impo... | adnelson/Idris-dev | src/Idris/CaseSplit.hs | bsd-3-clause | 19,205 | 0 | 27 | 7,604 | 6,726 | 3,358 | 3,368 | 364 | 22 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Bob (responseFor)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
testCase :: Str... | Sgoettschkes/learning | haskell/exercism/bob/bob_test.hs | mit | 4,500 | 0 | 12 | 566 | 682 | 360 | 322 | 94 | 2 |
<?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="ro-RO">
<title>Form Handler | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref... | thc202/zap-extensions | addOns/formhandler/src/main/javahelp/org/zaproxy/zap/extension/formhandler/resources/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 973 | 78 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
module WhereIn1 where
f = (case (x,z) of
(1,2) -> "First Branch"
_ -> "Second Branch")
where
(x,z) = (1,2) | SAdams601/HaRe | old/testing/simplifyExpr/WhereIn1.hs | bsd-3-clause | 139 | 0 | 9 | 52 | 60 | 36 | 24 | 5 | 2 |
module Util.Pretty (
module Text.PrettyPrint.Annotated.Leijen,
Sized(..), nestingSize,
Pretty(..)
) where
--import Text.PrettyPrint.HughesPJ
import Text.PrettyPrint.Annotated.Leijen
-- A rough notion of size for pretty printing various types.
class Sized a where
size :: a -> Int
instance (Sized a, Sized b) =... | mrmonday/Idris-dev | src/Util/Pretty.hs | bsd-3-clause | 539 | 0 | 8 | 107 | 180 | 101 | 79 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP, MagicHash, UnboxedTuples, NoImplicitPrelude #-}
{-# OPTIONS_GHC -O2 #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Float.ConversionUtils
-- Copyright : (c) Daniel Fischer 2010
--... | tolysz/prepare-ghcjs | spec-lts8/base/GHC/Float/ConversionUtils.hs | bsd-3-clause | 3,119 | 0 | 25 | 913 | 753 | 388 | 365 | 53 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE CPP #-}
{-# LANGU... | suhailshergill/extensible-effects | src/Control/Eff/Writer/Lazy.hs | mit | 5,172 | 0 | 11 | 1,409 | 1,359 | 731 | 628 | -1 | -1 |
module Main (main) where
import ODIS.Core ()
-- | Entry point of the application.
main :: IO ()
main = print "Hello :)"
| odis-project/odis-core | executable/Main.hs | mit | 132 | 0 | 6 | 35 | 36 | 21 | 15 | 4 | 1 |
{-# LANGUAGE JavaScriptFFI, GHCForeignImportPrim #-}
-----------------------------------------------------------------------------
-- |
-- Module : JsHs.Callback
-- Copyright : Artem Chirkin
-- License : MIT
--
-- Maintainer : Artem Chirkin
-- Stability : experimental
--
--
--------------------------... | mb21/qua-kit | libs/hs/ghcjs-hs-interop/src/JsHs/Callback.hs | mit | 2,775 | 5 | 11 | 513 | 513 | 291 | 222 | 62 | 1 |
-- |
-- Utilities for dealing with 'FilePath'.
--
module GraphDB.Util.FileSystem
(
module Filesystem,
module Filesystem.Path.CurrentOS,
Status(..),
getStatus,
getExists,
getTemporaryDirectory,
remove,
removeIfExists,
removeTreeIfExists,
move,
copy,
resolve,
Lock,
... | nikita-volkov/graph-db | library/GraphDB/Util/FileSystem.hs | mit | 3,806 | 0 | 18 | 874 | 1,095 | 553 | 542 | -1 | -1 |
{- |
Module : Exception
Copyright : Zeqing Guo
Licence : MIT (see LICENSE in the distribution)
Maintainer : github.com/zeqing-guo
Stability : experimental
Portability : portable
This file contains all things about exception.
-}
module Exception
( GinError(..)
, ThrowsError
) where
im... | zeqing-guo/gin-haskell | src/Exception.hs | mit | 859 | 0 | 7 | 195 | 132 | 74 | 58 | 17 | 1 |
-- |All type conversion to and from the PostgreSQL server is handled here.
module Database.TemplatePG.Types ( PGType(..)
, pgTypeFromOID
, pgStringToType
, pgTypeToString
) where
import ... | jekor/templatepg | Database/TemplatePG/Types.hs | mit | 5,250 | 0 | 10 | 1,371 | 602 | 366 | 236 | -1 | -1 |
module Scrabble (scoreLetter, scoreWord) where
import Data.Char (toUpper)
import Data.Map (findWithDefault, fromList)
scoreLetter :: Num a => Char -> a
scoreLetter letter = findWithDefault 0 (toUpper letter) scoreMap
where
scoreMap = fromList [(k,v) | (ks, v) <- scoreTable, k <- ks]
scoreTable = [ ("AEIO... | exercism/xhaskell | exercises/practice/scrabble-score/.meta/examples/success-standard/src/Scrabble.hs | mit | 632 | 0 | 11 | 247 | 209 | 122 | 87 | 15 | 1 |
main :: IO ()
main = putStrLn "Not yet implemented"
| justanotherdot/advent-linguist | 2016/Haskell/AdventOfCode/test/Spec.hs | mit | 52 | 0 | 6 | 10 | 19 | 9 | 10 | 2 | 1 |
import GameOfLife
main = do
print $ step $ setAlive 3 1 $ setAlive 2 1 $ setAlive 1 1 newGame
| tsujigiri/Game-of-Life-Haskell | src/Main.hs | mit | 102 | 0 | 10 | 29 | 45 | 21 | 24 | 3 | 1 |
-- vim: ts=2:sw=2:sts=2
module XMonad.Config.Amer.Mouse (myMouseBindings) where
import XMonad
import qualified Data.Map.Strict as M
import qualified XMonad.StackSet as W
import qualified XMonad.Actions.FlexibleManipulate as Flex
myMouseBindings :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ())
myMouseBin... | amerlyq/airy | xmonad/cfg/Mouse.hs | mit | 1,172 | 0 | 11 | 194 | 213 | 131 | 82 | 11 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ... | johannesgerer/buchhaltung | src/Buchhaltung/Types.hs | mit | 15,019 | 7 | 16 | 3,854 | 4,109 | 2,255 | 1,854 | 332 | 2 |
module NLP100.Chapter01Spec where
import NLP100.Chapter01
import Test.Hspec
spec :: Spec
spec = do
describe "第1章: 準備運動" $ do
describe "00. 文字列の逆順" $ do
-- 文字列"stressed"の文字を逆に(末尾から先頭に向かって)並べた文字列を得よ.
it "should return correct value" $ do
knock00 "stressed" `shouldBe` "desserts"
describe... | namikingsoft/nlp100knock | test/NLP100/Chapter01Spec.hs | mit | 6,138 | 0 | 32 | 1,353 | 920 | 513 | 407 | 73 | 1 |
{- This module was generated from data in the Kate syntax
highlighting file texinfo.xml, version 0.2, by Daniel Franke (franke.daniel@gmail.com) -}
module Text.Highlighting.Kate.Syntax.Texinfo
(highlight, parseExpression, syntaxName, syntaxExtensions)
where
import Text.Highlighting.Kate.Types
import Text.... | ambiata/highlighting-kate | Text/Highlighting/Kate/Syntax/Texinfo.hs | gpl-2.0 | 5,266 | 0 | 15 | 781 | 1,405 | 765 | 640 | 88 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Tests where
import Test.HUnit
import Types
import Parse
-- Parse
testGrabLine = TestCase $ assertEqual
"Should accept 0+ anyChar followed by newline" "\n" (textP grabLine "\n")
testDef = TestCase $ assertEqual
"Simplest Def chunk"
[Def 1 "asdf" [Code "ass\n",... | tcrs/lit | test/Tests.hs | gpl-2.0 | 1,523 | 0 | 11 | 332 | 384 | 198 | 186 | 35 | 1 |
-- -- {{{1
--
-- File : Flx/TODO.hs
-- Maintainer : Felix C. Stegerman <flx@obfusk.net>
-- Date : 2012-06-28
--
-- Copyright : Copyright (C) 2012 Felix C. Stegerman
-- Licence : GPLv2
--
-- Depends : ...
-- Description : ...
--... | obfusk/hs-flx | src/Flx/TODO.hs | gpl-2.0 | 1,606 | 0 | 13 | 601 | 636 | 353 | 283 | 25 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
-----------------------------------------------------------------------------
--
-- Module : IDE.PaneGroups
-- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie
-- License : GPL
--
-- Mainta... | JPMoresmau/leksah | src/IDE/PaneGroups.hs | gpl-2.0 | 5,580 | 0 | 19 | 1,381 | 1,520 | 776 | 744 | 117 | 4 |
#!/user/bin/env stack
-- stack --resolver lts-11.8 script --package process --package directory --package filepath --package mtl
--
-- Copyright (c) 2014-18 Nicola Bonelli <nicola@pfq.io>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License ... | pfq/PFQ | Build.hs | gpl-2.0 | 6,349 | 0 | 13 | 1,867 | 1,285 | 635 | 650 | 97 | 1 |
module GetExpression
{-
(getExpression)
-}
where
import Language.Haskell.TH
import Language.Haskell.Meta.Parse
import Data.Either
getExpression string = head $ rights [parseExp string]
getExpressionAndLine string = (makeGhciLine string,head $ rights [parseExp string])
makeGhciLine x = ghciLinePrompt ++ "putStr $ con... | xpika/chord | GetExpression.hs | gpl-3.0 | 3,825 | 0 | 9 | 541 | 224 | 128 | 96 | 33 | 1 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Exit
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability ... | jwiegley/ghc-release | libraries/base/System/Exit.hs | gpl-3.0 | 2,640 | 0 | 8 | 417 | 207 | 132 | 75 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Types.LocalConfig where
import Types.Base
import Prelude hiding(FilePath)
data LocalConfig = LocalConfig
{ saveFile :: Maybe FilePath
, verbose :: Maybe Bool
} deriving(Show)
| diegospd/pol | app/Types/LocalConfig.hs | gpl-3.0 | 227 | 0 | 9 | 38 | 55 | 33 | 22 | 8 | 0 |
module LambdaLine.Shells.Base
( appendSpace
, mkSegment
, plain
, prependSpace
, stringToSegment
, stylePrompt
) where
import LambdaLine.Segment
appendSpace :: String -> String
appendSpace = stylePrompt (++ " ")
plain :: String -> String
plain = id
prependSpace :: String -> String
prependSpace = stylePrompt (' ':)
... | josiah14/lambdaline | LambdaLine/Shells/Base.hs | gpl-3.0 | 485 | 0 | 7 | 119 | 132 | 76 | 56 | 18 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
import Graphics.X11.Xlib
import Graphics.X11.Xlib.Extras
actions dpy win gc = do
drawInWin 12 dpy win gc
liveMain = do
putStrLn ""
return actions
drawInWin x dpy win gc = do
bgcolor <- initColor dpy "green"
fgcolor <- initColor dpy "blue"
setForeground dpy gc bg... | xpika/live-source | examples/live-x11/liveX11Source.hs | gpl-3.0 | 688 | 0 | 12 | 132 | 265 | 125 | 140 | 21 | 1 |
-- Copyright 2014 Joris Rehm
--
-- 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 ... | joris-r/labaskel | Parsing.hs | apache-2.0 | 22,770 | 0 | 30 | 5,287 | 5,882 | 2,907 | 2,975 | 660 | 4 |
{-| Ganeti monitoring agent daemon
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this ... | apyrgio/snf-ganeti | src/ganeti-mond.hs | bsd-2-clause | 1,817 | 0 | 7 | 290 | 106 | 67 | 39 | 17 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import
import Settings
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Yesod.Logger (Logger, logBS, toProduction)
import Network.Wai.... | erochest/NeatlineUpdate | Application.hs | bsd-2-clause | 2,313 | 0 | 11 | 423 | 433 | 237 | 196 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, CPP, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided... | apyrgio/ganeti | test/hs/Test/Ganeti/Utils.hs | bsd-2-clause | 15,971 | 0 | 21 | 3,651 | 3,634 | 1,955 | 1,679 | 264 | 2 |
{-# LANGUAGE RecordWildCards #-}
module Main where
import Options (Config(..),getConfig,genLocationsFile)
import Protocol
(getRequest,putResponse,Request(..),Response(..)
,respondResult,Instance(..),showPosition)
import SITL
... | GaloisInc/planning-synthesis | sitl_server/server/src/Main.hs | bsd-2-clause | 3,397 | 0 | 18 | 1,046 | 828 | 421 | 407 | 70 | 8 |
module System.Random.Lehmer.Util (
(//)
, coerce
, stdUniform
, expDist
) where
-- import Data.Function (on)
import System.Random.Lehmer.Constants
-- | Division of Int values into Floating.
(//) :: (Integral a, Integral b, Floating c) => a -> b -> c
a // b = (fromIntegral a) / (fromIntegral b)
-- Why doesn'... | zirrostig/haskell-lehmer | System/Random/Lehmer/Util.hs | bsd-3-clause | 1,135 | 0 | 8 | 335 | 304 | 170 | 134 | -1 | -1 |
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Infer functional dependencies from table algebra operators.
module Database.DSH.Backend.Sql.Opt.Properties.FD
( inferFDNullOp
, inferFDUnOp
, inferFDBinOp
) where
import qualified Data.Map ... | ulricha/dsh-sql | src/Database/DSH/Backend/Sql/Opt/Properties/FD.hs | bsd-3-clause | 5,179 | 0 | 16 | 1,598 | 1,330 | 689 | 641 | 82 | 11 |
{- |
Module : SAWScript.Prover.MRSolver
Description : The SAW monadic-recursive solver (Mr. Solver)
Copyright : Galois, Inc. 2022
License : BSD3
Maintainer : westbrook@galois.com
Stability : experimental
Portability : non-portable (language extensions)
-}
module SAWScript.Prover.MRSolver
(askMRSolver, ... | GaloisInc/saw-script | src/SAWScript/Prover/MRSolver.hs | bsd-3-clause | 515 | 0 | 5 | 69 | 57 | 40 | 17 | 6 | 0 |
{-# OPTIONS -Wall #-}
module Language.Pck.Cpu.Instruction (
-- * the instruction set type
Inst(..)
, GReg(..)
, FCond(..)
) where
import Data.Array (Ix)
import Control.DeepSeq (NFData, rnf)
----------------------------------------
-- instruction set
---------------------------... | takenobu-hs/processor-creative-kit | Language/Pck/Cpu/Instruction.hs | bsd-3-clause | 2,855 | 0 | 7 | 1,236 | 400 | 255 | 145 | 43 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
-- | JSON schema validation.
module Data.Aeson.Validation
( -- * Schema validation
Schema
, validate
-- * Boolean schemas
, bool
, true
, false
-- * Number schemas
, number
, theNumber
, someNumber
, integer
, theInteger
, someInteger
-- * Strin... | mitchellwrosen/json-validation | src/Data/Aeson/Validation.hs | bsd-3-clause | 825 | 0 | 5 | 214 | 129 | 92 | 37 | 33 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Control.Applicative
import Control.Exception
import Control.Monad
import Control.Monad.Reader
import ... | cies/bloodhound | tests/tests.hs | bsd-3-clause | 30,357 | 0 | 25 | 8,436 | 8,188 | 3,972 | 4,216 | 592 | 2 |
module Win32Bitmap where
import StdDIS
import Win32Types
import GDITypes
----------------------------------------------------------------
-- Resources
----------------------------------------------------------------
-- Yoiks - name clash
-- %dis bitmap x = addr ({LPTSTR} x)
--
-- type Bitmap = LPCTSTR
--
-- intTo... | OS2World/DEV-UTIL-HUGS | libraries/win32/Win32Bitmap.hs | bsd-3-clause | 19,802 | 174 | 31 | 3,400 | 4,833 | 2,679 | 2,154 | -1 | -1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Duration.DE.Corpus
( corpus
) where
import Prelude
impor... | facebookincubator/duckling | Duckling/Duration/DE/Corpus.hs | bsd-3-clause | 2,814 | 0 | 9 | 1,088 | 449 | 262 | 187 | 70 | 1 |
module MyCloud
( module MyCloud.Types
--, module MyCloud.Files
, runMyCloud
, postgresConf
-- * DB queries
, recentEvents
) where
import Control.Concurrent.MState
import Control.Monad.Reader
--import Database.HDBC.PostgreSQL
import Network
import qualified Data.Map as M
import MyCloud.DB
import MyClo... | mcmaniac/mycloud | src/MyCloud.hs | bsd-3-clause | 805 | 0 | 7 | 156 | 170 | 101 | 69 | 23 | 1 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.DepthClamp
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : ... | haskell-opengl/OpenGLRaw | src/Graphics/GL/NV/DepthClamp.hs | bsd-3-clause | 632 | 0 | 5 | 91 | 47 | 36 | 11 | 7 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-incomplete-patterns #-}
module Test.Distribution.Version (properties) where
import Distribution.Version
import Test.QuickCheck
import Test.QuickCheck.Utils
import qualified Test.Laws as Laws
import Control.Monad (liftM, liftM2)
import Data.Maybe (isJust, fromJust)
import D... | dcreager/cabal | tests/Test/Distribution/Version.hs | bsd-3-clause | 18,209 | 0 | 16 | 3,848 | 4,169 | 2,176 | 1,993 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
-- | Semantics of abilities in terms of actions and the AI procedure
-- for picking the best action for an actor.
module Game.LambdaHack.Client.AI.HandleAbilityClient
( actionStrategy
) where
import Prelude ()
import Prelude.Compat
import Control.Arrow (second)
import Control.Exception.... | beni55/LambdaHack | Game/LambdaHack/Client/AI/HandleAbilityClient.hs | bsd-3-clause | 45,456 | 22 | 34 | 14,101 | 11,698 | 6,042 | 5,656 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
-- | This module implements an optimisation that moves in-place
-- updates into/before loops where possible, with the end goal of
-- minim... | mrakgr/futhark | src/Futhark/Optimise/InPlaceLowering.hs | bsd-3-clause | 11,234 | 0 | 22 | 3,249 | 2,880 | 1,473 | 1,407 | 208 | 5 |
module Data.Geo.GPX.Lens.AgeofdgpsdataL where
import Data.Lens.Common
class AgeofdgpsdataL a where
ageofdgpsdataL :: Lens a (Maybe Double)
| tonymorris/geo-gpx | src/Data/Geo/GPX/Lens/AgeofdgpsdataL.hs | bsd-3-clause | 144 | 0 | 9 | 20 | 40 | 23 | 17 | 4 | 0 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import ACME
import Control.Monad.Catch
import Control.Monad.IO.Class
import Control.Monad.State as State
import Crypto.Ha... | sam142/hasencrypt | src/Main.hs | bsd-3-clause | 8,065 | 1 | 17 | 2,080 | 2,041 | 1,071 | 970 | 167 | 4 |
module PIC.Simulator
( simulate
) where
import Data.Bits
import Data.IntMap as Map hiding ( null, filter )
import PIC.Assemble
import PIC.Configuration
import Utils
-- | Execution violations.
data Violation
= NoMoreInstructions
| InvalidGOTO
| InvalidSkip
deriving Show
-- | The state of the machine.
dat... | tomahawkins/trs | attic/PIC/Simulator.hs | bsd-3-clause | 8,900 | 0 | 20 | 2,830 | 3,073 | 1,585 | 1,488 | 168 | 35 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Will Jones' style.
module HIndent.Styles.WillJones where
import HIndent.Pretty
import HIndent.Styles.WillJones.Data
import HIndent.Styles.WillJones.Modules
import HIndent.Styles.WillJones.Types
import HIndent.Types
import Control.Monad.State
... | lunaris/hindent | src/HIndent/Styles/WillJones.hs | bsd-3-clause | 3,975 | 0 | 14 | 1,227 | 876 | 456 | 420 | 94 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.